From 6d46c473d41c6c47e6b8bd8c676d925e544bd378 Mon Sep 17 00:00:00 2001 From: Benjamin Culkin Date: Fri, 5 Jul 2024 12:43:13 -0400 Subject: More cleanup --- .../src/main/java/net/wotonomy/access/EOModel.java | 6 +++--- .../src/main/java/net/wotonomy/control/EOEditingContext.java | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'projects/net.wotonomy.persistence/src/main/java/net') diff --git a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/access/EOModel.java b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/access/EOModel.java index 9c77d45..3d39fc0 100644 --- a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/access/EOModel.java +++ b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/access/EOModel.java @@ -44,8 +44,8 @@ public class EOModel { // This array contains dictionaries with "className" and "name" protected NSMutableArray _entities = new NSMutableArray(); - protected NSMutableDictionary _entitiesByName = new NSMutableDictionary(); - protected NSMutableDictionary _entitiesByClass = new NSMutableDictionary(); + protected NSMutableDictionary _entitiesByName = new NSMutableDictionary<>(); + protected NSMutableDictionary _entitiesByClass = new NSMutableDictionary<>(); protected NSDictionary _connectionDictionary = NSDictionary.EmptyDictionary; protected String _adaptorName = "JDBC"; protected NSMutableDictionary _prototypesByName = new NSMutableDictionary(); @@ -85,7 +85,7 @@ public class EOModel { } catch (IOException e) { throw new IllegalArgumentException("Cannot read index.eomodeld"); } - NSDictionary d = NSPropertyListSerialization.dictionaryForString(x); + NSDictionary d = NSPropertyListSerialization.dictionaryForString(x); String version = (String) d.objectForKey("EOModelVersion"); if (version == null || !version.startsWith("2.")) throw new IllegalArgumentException("Invalid eomodel version: " + version); diff --git a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOEditingContext.java b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOEditingContext.java index 8342722..defacb1 100644 --- a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOEditingContext.java +++ b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOEditingContext.java @@ -1490,7 +1490,8 @@ public class EOEditingContext extends EOObjectStore implements EOObserving { NSNotificationCenter.defaultCenter() .postNotification(new NSNotification(InvalidatedAllObjectsInStoreNotification, this)); } else if (EOGlobalID.GlobalIDChangedNotification.equals(aNotification.name())) { - NSDictionary userInfo = aNotification.userInfo(); + @SuppressWarnings("unchecked") + NSDictionary userInfo = (NSDictionary) aNotification.userInfo(); // if any keys in userInfo are registered ids, // re-register with new permanent values. -- cgit v1.2.3