From 8b7f4c5e604848a6597b70004d189b85971395ad Mon Sep 17 00:00:00 2001 From: Yoann Date: Mon, 16 Jan 2017 20:33:44 +0100 Subject: [PATCH] replace `null` comparison by `Objects` methods --- .../atlanmod/neoemf/data/hbase/store/DirectWriteHBaseStore.java | 2 +- .../data/berkeleydb/store/DirectWriteBerkeleyDbStore.java | 2 +- .../atlanmod/neoemf/data/mapdb/store/DirectWriteMapDbStore.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neoemf-data/hbase/src/main/java/fr/inria/atlanmod/neoemf/data/hbase/store/DirectWriteHBaseStore.java b/neoemf-data/hbase/src/main/java/fr/inria/atlanmod/neoemf/data/hbase/store/DirectWriteHBaseStore.java index 6674476374..9eaac4794e 100644 --- a/neoemf-data/hbase/src/main/java/fr/inria/atlanmod/neoemf/data/hbase/store/DirectWriteHBaseStore.java +++ b/neoemf-data/hbase/src/main/java/fr/inria/atlanmod/neoemf/data/hbase/store/DirectWriteHBaseStore.java @@ -263,7 +263,7 @@ public EStructuralFeature getContainingFeature(InternalEObject internalObject) { @Override public EObject eObject(Id id) { PersistentEObject object = null; - if(id != null) { + if(nonNull(id)) { EClass eClass = resolveInstanceOf(id); object = persistentObjectsCache.get(id, new PersistentEObjectCacheLoader(eClass)); if (object.resource() != resource()) { diff --git a/neoemf-data/map/berkeleydb/src/main/java/fr/inria/atlanmod/neoemf/data/berkeleydb/store/DirectWriteBerkeleyDbStore.java b/neoemf-data/map/berkeleydb/src/main/java/fr/inria/atlanmod/neoemf/data/berkeleydb/store/DirectWriteBerkeleyDbStore.java index 77146a4312..36df64cef1 100644 --- a/neoemf-data/map/berkeleydb/src/main/java/fr/inria/atlanmod/neoemf/data/berkeleydb/store/DirectWriteBerkeleyDbStore.java +++ b/neoemf-data/map/berkeleydb/src/main/java/fr/inria/atlanmod/neoemf/data/berkeleydb/store/DirectWriteBerkeleyDbStore.java @@ -299,7 +299,7 @@ public EStructuralFeature getContainingFeature(InternalEObject internalObject) { @Override public EObject eObject(Id id) { PersistentEObject object = null; - if(id != null) { + if(nonNull(id)) { EClass eClass = resolveInstanceOf(id); object = persistentObjectsCache.get(id, new PersistentEObjectCacheLoader(eClass)); if (object.resource() != resource()) { diff --git a/neoemf-data/map/mapdb/src/main/java/fr/inria/atlanmod/neoemf/data/mapdb/store/DirectWriteMapDbStore.java b/neoemf-data/map/mapdb/src/main/java/fr/inria/atlanmod/neoemf/data/mapdb/store/DirectWriteMapDbStore.java index cf24fc665a..743d6aa845 100644 --- a/neoemf-data/map/mapdb/src/main/java/fr/inria/atlanmod/neoemf/data/mapdb/store/DirectWriteMapDbStore.java +++ b/neoemf-data/map/mapdb/src/main/java/fr/inria/atlanmod/neoemf/data/mapdb/store/DirectWriteMapDbStore.java @@ -312,7 +312,7 @@ public EStructuralFeature getContainingFeature(InternalEObject internalObject) { @Override public EObject eObject(Id id) { PersistentEObject object = null; - if(id != null) { + if(nonNull(id)) { EClass eClass = resolveInstanceOf(id); object = persistentObjectsCache.get(id, new PersistentEObjectCacheLoader(eClass)); if (object.resource() != resource()) {