Skip to content
Merged
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 @@ -54,6 +54,6 @@ static Proxy buildProxy(String proxy) throws UserException {
* @return whether the arguments describe a potentially valid proxy.
*/
static boolean validateProxy(String hostname, String port) {
return Strings.isNullOrEmpty(hostname) == false && port != null && port.matches("^\\d+$") != false;
return Strings.isNullOrEmpty(hostname) == false && port != null && port.matches("^\\d+$");
}
}
2 changes: 1 addition & 1 deletion libs/h3/src/main/java/org/elasticsearch/h3/H3Index.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private static boolean h3ToFaceIjkWithInitializedFijk(long h, FaceIJK fijk) {
final int res = H3Index.H3_get_resolution(h);

// center base cell hierarchy is entirely on this face
final boolean possibleOverage = BaseCells.isBaseCellPentagon(H3_get_base_cell(h)) != false
final boolean possibleOverage = BaseCells.isBaseCellPentagon(H3_get_base_cell(h))
|| (res != 0 && (fijk.coord.i != 0 || fijk.coord.j != 0 || fijk.coord.k != 0));

for (int r = 1; r <= res; r++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ private static Edge[] ring(

// if the polygon is tiny, the computed area can result in zero. In that case
// we assume orientation is correct
boolean orientation = signedArea == 0 ? handedness != false : signedArea < 0;
boolean orientation = signedArea == 0 ? handedness : signedArea < 0;

// OGC requires shell as ccw (Right-Handedness) and holes as cw (Left-Handedness)
// since GeoJSON doesn't specify (and doesn't need to) GEO core will assume OGC standards
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public boolean equals(Object o) {
IndexRoutingTable that = (IndexRoutingTable) o;

if (index.equals(that.index) == false) return false;
return Arrays.equals(shards, that.shards) != false;
return Arrays.equals(shards, that.shards);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ public boolean equals(Object o) {
IndexShardRoutingTable that = (IndexShardRoutingTable) o;

if (shardId.equals(that.shardId) == false) return false;
return Arrays.equals(shards, that.shards) != false;
return Arrays.equals(shards, that.shards);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private static Edge[] ring(
}
// if the polygon is tiny, the computed area can result in zero. In that case
// we assume orientation is correct
boolean orientation = signedArea == 0 ? handedness != false : signedArea < 0;
boolean orientation = signedArea == 0 ? handedness : signedArea < 0;

// OGC requires shell as ccw (Right-Handedness) and holes as cw (Left-Handedness)
// since GeoJSON doesn't specify (and doesn't need to) GEO core will assume OGC standards
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ public void updateShardState(
);
}

if (newRouting.active() != false && state != IndexShardState.STARTED && state != IndexShardState.CLOSED) {
if (newRouting.active() && state != IndexShardState.STARTED && state != IndexShardState.CLOSED) {
// If cluster.no_master_block: all then we remove all shards locally whenever there's no master, but there might still be
// a shard-started message in flight. When the new master is elected we start to recover our shards again and the stale
// shard-started message could arrive and move this shard to STARTED in the cluster state too soon. This is pretty rare so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static Decision shouldFilter(
RoutingAllocation allocation
) {
List<String> tierPreference = indexMd.getTierPreference();
if (tierPreference.isEmpty() != false) {
if (tierPreference.isEmpty()) {
return YES_PASSES;
}
Optional<String> tier = preferredTierFunction.apply(tierPreference, allocation.nodes(), allocation.desiredNodes());
Expand Down