diff options
Diffstat (limited to 'plugins/plugins-context/context-schema')
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/plugins-context/context-schema/context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroObjectMapperFactory.java b/plugins/plugins-context/context-schema/context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroObjectMapperFactory.java index dd55f447d..22152a8da 100644 --- a/plugins/plugins-context/context-schema/context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroObjectMapperFactory.java +++ b/plugins/plugins-context/context-schema/context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroObjectMapperFactory.java @@ -90,7 +90,7 @@ public class AvroObjectMapperFactory { if (Schema.Type.NULL.equals(schema.getType())) { schema = types.get(1); } - if (Schema.Type.NULL.equals(schema.getType()) || Schema.Type.NULL.equals(schema.getType())) { + if (Schema.Type.NULL.equals(schema.getType())) { final String resultSting = userKey.getID() + ": Apex currently only supports UNION schema2 with 2 options, only one can be NULL, and the other cannot be another UNION"; LOGGER.warn(resultSting); diff --git a/plugins/plugins-context/context-schema/context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaHelper.java b/plugins/plugins-context/context-schema/context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaHelper.java index 2543dd154..831962042 100644 --- a/plugins/plugins-context/context-schema/context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaHelper.java +++ b/plugins/plugins-context/context-schema/context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaHelper.java @@ -153,7 +153,7 @@ public class AvroSchemaHelper extends AbstractSchemaHelper { objectString = (String) object; } } catch (final ClassCastException e) { - final String returnString = getUserKey().getID() + ": object \"" + object.toString() + "\" of type \"" + final String returnString = getUserKey().getID() + ": object \"" + object + "\" of type \"" + object.getClass().getCanonicalName() + "\" must be assignable to \"" + getSchemaClass().getCanonicalName() + "\" or be a Json string representation of it for Avro unmarshalling"; |