diff --git a/jnosql-communication/jnosql-communication-core/src/main/java/org/eclipse/jnosql/communication/DefaultValue.java b/jnosql-communication/jnosql-communication-core/src/main/java/org/eclipse/jnosql/communication/DefaultValue.java index 5a5ddd426..18603c52e 100644 --- a/jnosql-communication/jnosql-communication-core/src/main/java/org/eclipse/jnosql/communication/DefaultValue.java +++ b/jnosql-communication/jnosql-communication-core/src/main/java/org/eclipse/jnosql/communication/DefaultValue.java @@ -54,7 +54,7 @@ public T get(TypeSupplier supplier) { if (REFERENCE_READER.test(Objects.requireNonNull(supplier, "supplier is required"))) { return REFERENCE_READER.convert(supplier, value); } - throw new UnsupportedOperationException("The type " + supplier + " is not supported"); + throw new UnsupportedOperationException("The type " + supplier.get().getTypeName() + " is not supported"); } @Override diff --git a/jnosql-communication/jnosql-communication-core/src/test/java/org/eclipse/jnosql/communication/DefaultValueTest.java b/jnosql-communication/jnosql-communication-core/src/test/java/org/eclipse/jnosql/communication/DefaultValueTest.java index fd51da648..ceb70ba4b 100644 --- a/jnosql-communication/jnosql-communication-core/src/test/java/org/eclipse/jnosql/communication/DefaultValueTest.java +++ b/jnosql-communication/jnosql-communication-core/src/test/java/org/eclipse/jnosql/communication/DefaultValueTest.java @@ -163,7 +163,7 @@ void shouldConvertMapIgnoringKeyValue() { Map> result = value.get(new TypeReference<>() { }); }).isInstanceOf(UnsupportedOperationException.class) - .hasMessage("The type TypeReference{type=java.util.Map>} is not supported"); + .hasMessage("The type java.util.Map> is not supported"); } @Test