Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Lou <[email protected]>
  • Loading branch information
mloufra committed Jan 23, 2023
1 parent 9274c46 commit 3428189
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions server/src/main/java/org/opensearch/common/settings/Setting.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import org.opensearch.common.Nullable;
import org.opensearch.common.Strings;
import org.opensearch.common.collect.Tuple;
import org.opensearch.common.io.stream.StreamInput;
import org.opensearch.common.io.stream.StreamOutput;
import org.opensearch.common.io.stream.Writeable;
import org.opensearch.common.regex.Regex;
Expand Down Expand Up @@ -1314,13 +1313,13 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeString(key);
out.writeFloat(minValue);
out.writeFloat(maxValue);
out.writeBoolean(isFiltered);
out.writeBoolean(isFiltered);
}

@Override
public Float apply(String s) {
return parseFloat(s, minValue, maxValue, key, isFiltered);
}
}
}

// Setting<Float> with fallback
Expand Down Expand Up @@ -1443,13 +1442,13 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeString(key);
out.writeInt(minValue);
out.writeInt(maxValue);
out.writeBoolean(isFiltered);
out.writeBoolean(isFiltered);
}

@Override
public Integer apply(String s) {
return parseInt(s, minValue, maxValue, key, isFiltered);
}
}
}

// Setting<Integer> with fallback
Expand Down Expand Up @@ -1564,13 +1563,13 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeString(key);
out.writeLong(minValue);
out.writeLong(maxValue);
out.writeBoolean(isFiltered);
out.writeBoolean(isFiltered);
}

@Override
public Long apply(String s) {
return parseLong(s, minValue, maxValue, key, isFiltered);
}
}
}

// Setting<Long> with fallback
Expand Down Expand Up @@ -1685,13 +1684,13 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeString(key);
out.writeDouble(minValue);
out.writeDouble(maxValue);
out.writeBoolean(isFiltered);
out.writeBoolean(isFiltered);
}

@Override
public Double apply(String s) {
return parseDouble(s, minValue, maxValue, key, isFiltered);
}
}
}

// Setting<Double> with fallback
Expand Down Expand Up @@ -2199,13 +2198,13 @@ public TimeValueParser(String key, TimeValue minValue, boolean isFiltered) {
public void writeTo(StreamOutput out) throws IOException {
out.writeString(key);
out.writeTimeValue(minValue);
out.writeBoolean(isFiltered);
out.writeBoolean(isFiltered);
}

@Override
public TimeValue apply(String s) {
return minTimeValueParser(key, minValue, isFiltered).apply(s);
}
}
}

public static Setting<TimeValue> timeSetting(
Expand Down

0 comments on commit 3428189

Please sign in to comment.