From 669dc7804fe74c27c1db09631e45800952fb4ea7 Mon Sep 17 00:00:00 2001 From: soufiane-cheouati <46105138+soufiane-cheouati@users.noreply.github.com> Date: Tue, 12 Feb 2019 19:24:18 +0000 Subject: [PATCH] Add files via upload --- .../baeldung/customannotations/ObjectToJsonConverter.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core-java-8/src/main/java/com/baeldung/customannotations/ObjectToJsonConverter.java b/core-java-8/src/main/java/com/baeldung/customannotations/ObjectToJsonConverter.java index bcde225a3b..dd126be8ed 100644 --- a/core-java-8/src/main/java/com/baeldung/customannotations/ObjectToJsonConverter.java +++ b/core-java-8/src/main/java/com/baeldung/customannotations/ObjectToJsonConverter.java @@ -8,10 +8,8 @@ import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; -import com.sun.istack.internal.NotNull; - public class ObjectToJsonConverter { - public String convertToJson(@NotNull Object object) throws JsonSerializationException { + public String convertToJson(Object object) throws JsonSerializationException { try { checkIfSerializable(object); @@ -30,7 +28,7 @@ public class ObjectToJsonConverter { Class clazz = object.getClass(); if (!clazz.isAnnotationPresent(JsonSerializable.class)) { - throw new JsonSerializationException("The class" + clazz.getSimpleName() + " is not annotated with JsonSerializable"); + throw new JsonSerializationException("The class " + clazz.getSimpleName() + " is not annotated with JsonSerializable"); } }