Skip to content

Commit

Permalink
Removing commented code
Browse files Browse the repository at this point in the history
Signed-off-by: Vacha Shah <[email protected]>
  • Loading branch information
VachaShah committed Oct 3, 2023
1 parent 0fd00e0 commit 57d408a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 32 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Dependencies

### Changed
- Migrated from checkstyle to spotless ([#645](https://github.com/opensearch-project/opensearch-java/pull/645))
- Migrated from checkstyle to spotless ([#648](https://github.com/opensearch-project/opensearch-java/pull/648))

### Deprecated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ protected static EnumSet<Event> allAcceptedEvents(JsonpDeserializer<?>... deseri
for (JsonpDeserializer<?> deserializer : deserializers) {

EnumSet<Event> set = deserializer.acceptedEvents();
// Disabled for now. Only happens with the experimental Union2 and is caused by string and number
// parsers leniency. Need to be replaced with a check on a preferred event type.
// if (!Collections.disjoint(result, set)) {
// throw new IllegalArgumentException("Deserializer accepted events are not disjoint");
// }

result.addAll(set);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,26 +278,4 @@ public void add(ObjIntConsumer<ObjectType> setter, String name, String... deprec
add(setter::accept, JsonpDeserializer.integerDeserializer(), name, deprecatedNames);
}

// Experiment: avoid boxing, allow multiple primitive parsers (e.g. int as number & string)
// public void add(
// ObjIntConsumer<ObjectType> setter,
// JsonpIntParser vp,
// String name, String... deprecatedNames
// ) {
// this.fieldDeserializers.put(name, new FieldDeserializer<ObjectType>(name, deprecatedNames) {
// @Override
// public void deserialize(JsonParser parser, JsonpMapper mapper, String fieldName, ObjectType object) {
// JsonpUtils.expectNextEvent(parser, Event.VALUE_NUMBER);
// setter.accept(object, vp.parse(parser));
// }
// });
// }
//
// public static class JsonpIntParser {
// public int parse(JsonParser parser) {
// JsonpUtils.expectNextEvent(parser, Event.VALUE_NUMBER);
// return parser.getInt();
// }
// }

}
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,6 @@ public JsonpDeserializer<Union> build() {
otherMembers.put(Event.START_OBJECT, objectMembers.remove(0));
}

// if (objectMembers.size() > 1) {
// System.out.println("multiple objects in " + buildFn);
// }

return new UnionDeserializer<>(objectMembers, otherMembers, buildFn);
}
}
Expand Down

0 comments on commit 57d408a

Please sign in to comment.