diff --git a/titan-core/src/main/java/com/thinkaurelius/titan/core/TitanFactory.java b/titan-core/src/main/java/com/thinkaurelius/titan/core/TitanFactory.java index bf90a0372a..2a3a6ae2bc 100644 --- a/titan-core/src/main/java/com/thinkaurelius/titan/core/TitanFactory.java +++ b/titan-core/src/main/java/com/thinkaurelius/titan/core/TitanFactory.java @@ -218,7 +218,7 @@ private static ReadConfiguration getLocalConfiguration(String shortcutOrFile) { @SuppressWarnings("unchecked") private static ReadConfiguration getLocalConfiguration(File file) { Preconditions.checkArgument(file != null && file.exists() && file.isFile() && file.canRead(), - "Need to specify a readable configuration file, but was given: %s", file.toString()); + "Need to specify a readable configuration file, but was given: %s", file != null ? file.toString() : "null"); try { PropertiesConfiguration configuration = new PropertiesConfiguration(file); diff --git a/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/keycolumnvalue/SliceQuery.java b/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/keycolumnvalue/SliceQuery.java index bbb9a89321..7ecb692d5f 100644 --- a/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/keycolumnvalue/SliceQuery.java +++ b/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/keycolumnvalue/SliceQuery.java @@ -69,7 +69,7 @@ public boolean equals(Object other) { if (this == other) return true; - if (other == null && !getClass().isInstance(other)) + if (other == null || !getClass().isInstance(other)) return false; SliceQuery oth = (SliceQuery) other; diff --git a/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/configuration/GraphDatabaseConfiguration.java b/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/configuration/GraphDatabaseConfiguration.java index a2566d46a2..195eec3ceb 100644 --- a/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/configuration/GraphDatabaseConfiguration.java +++ b/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/configuration/GraphDatabaseConfiguration.java @@ -1153,7 +1153,7 @@ public boolean apply(@Nullable Duration sd) { ConfigOption.Type.MASKABLE, "unicast", new Predicate() { @Override public boolean apply(@Nullable String s) { - return s!=null && s.equalsIgnoreCase("unicast") || s.equalsIgnoreCase("multicast"); + return s!=null && (s.equalsIgnoreCase("unicast") || s.equalsIgnoreCase("multicast")); } });