Skip to content

Commit 99e7e16

Browse files
committed
try to make the compiler happy
1 parent 17ec36e commit 99e7e16

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/ConvertProcessor.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ public static Type fromString(String processorTag, String propertyName, String t
155155
}
156156
}
157157

158+
private final float ABS_MAX_EXACT_FLOAT = 0x1p24f - 1;
158159
private static boolean isExactIntegerFloat(Object value) {
159160
if (value instanceof Float == false) {
160161
return false;
@@ -163,6 +164,7 @@ private static boolean isExactIntegerFloat(Object value) {
163164
return v == (long) v && -ABS_MAX_EXACT_FLOAT <= v && v <= ABS_MAX_EXACT_FLOAT;
164165
}
165166

167+
private final double ABS_MAX_EXACT_DOUBLE = 0x1p53 - 1;
166168
private static boolean isExactIntegerDouble(Object value) {
167169
if (value instanceof Double == false) {
168170
return false;
@@ -179,9 +181,6 @@ private static boolean isExactIntegerDouble(Object value) {
179181
private final Type convertType;
180182
private final boolean ignoreMissing;
181183

182-
private final float ABS_MAX_EXACT_FLOAT = 0x1p24f - 1;
183-
private final double ABS_MAX_EXACT_DOUBLE = 0x1p53 - 1;
184-
185184
ConvertProcessor(String tag, String description, String field, String targetField, Type convertType, boolean ignoreMissing) {
186185
super(tag, description);
187186
this.field = field;

0 commit comments

Comments
 (0)