Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ public boolean apply(@Nullable Duration sd) {
ConfigOption.Type.MASKABLE, "unicast", new Predicate<String>() {
@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"));
}
});

Expand Down