Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
Signed-off-by: Kondaka <[email protected]>
  • Loading branch information
kkondaka committed Oct 21, 2024
1 parent 91849be commit 5e30e30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,22 @@ public Integer getFlags() {
*/
public abstract static class Builder<T extends JacksonEvent.Builder<T>> extends JacksonEvent.Builder<T> {

//protected final Map<String, Object> data;
//protected EventHandle eventHandle;
private final Map<String, Object> mdata;

public Builder() {
data = new HashMap<String, Object>();
if (data == null) {
data = new HashMap<String, Object>();
}
mdata = (HashMap<String, Object>)data;
eventHandle = null;
}

public void put(String key, Object value) {
((HashMap<String, Object>)data).put(key, value);
mdata.put(key, value);
}

public void computeIfAbsent(String key, Function<? super String,? extends Object> f) {
((HashMap<String, Object>)data).computeIfAbsent(key, f);
mdata.computeIfAbsent(key, f);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ void filter_will_deserialize_known_classes_which_are_nested_inside_other_objects
void filter_will_deserialize_known_Event_classes(final JacksonEvent.Builder jacksonEventBuilder) throws IOException, ClassNotFoundException {
final Event event = jacksonEventBuilder
.withEventType(UUID.randomUUID().toString())
.withData(Collections.singletonMap(UUID.randomUUID().toString(), UUID.randomUUID().toString()))
.build();
final PeerForwardingEvents peerForwardingEvents = new PeerForwardingEvents(Collections.singletonList(event), UUID.randomUUID().toString(), UUID.randomUUID().toString());
final byte[] serializedBytes = createByteArrayWithObject(peerForwardingEvents);
Expand Down Expand Up @@ -267,7 +266,6 @@ void all_subclasses_of_Event_are_verified_in_this_test_suite_to_be_acceptable_fo
.filter(b -> b instanceof JacksonEvent.Builder)
.map(b -> (JacksonEvent.Builder) b)
.map(b -> b.withEventType(UUID.randomUUID().toString()))
.map(b -> b.withData(Collections.singletonMap(UUID.randomUUID().toString(), UUID.randomUUID().toString())))
.map(b -> b.build())
.map(e -> e.getClass())
.collect(Collectors.toSet());
Expand Down Expand Up @@ -596,4 +594,4 @@ public Stream<? extends Arguments> provideArguments(final ExtensionContext conte
);
}
}
}
}

0 comments on commit 5e30e30

Please sign in to comment.