Skip to content

Commit

Permalink
core: fix transferClientType deserialization
Browse files Browse the repository at this point in the history
The existence of the unusef toString method breaks jackson
deseralization for the transferClientType parameter. Since this
parameter should always be set and toString is not used, this patch
simply removes this method.

Bug-Url: https://bugzilla.redhat.com/2123008
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
  • Loading branch information
bennyz committed Sep 6, 2022
1 parent 27dc8ee commit c97ecc6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public static TransferClientType forValue(int value) {
public String toString() {
return description;
}

public boolean isBrowserTransfer() {
return this == TRANSFER_VIA_BROWSER;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.ovirt.engine.core.utils.serialization.json;

import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES;
import static com.fasterxml.jackson.databind.DeserializationFeature.READ_ENUMS_USING_TO_STRING;
import static com.fasterxml.jackson.databind.DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL;

import java.io.IOException;
Expand Down Expand Up @@ -56,7 +55,6 @@ public class JsonObjectDeserializer implements Deserializer {
formattedMapper.addMixIn(EngineFault.class, JsonEngineFaultMixIn.class);
formattedMapper.configure(FAIL_ON_UNKNOWN_PROPERTIES, false);
formattedMapper.configure(READ_UNKNOWN_ENUM_VALUES_AS_NULL, true);
formattedMapper.configure(READ_ENUMS_USING_TO_STRING, true);

formattedMapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance);
}
Expand Down

0 comments on commit c97ecc6

Please sign in to comment.