Add files via upload

This commit is contained in:
soufiane-cheouati 2019-02-12 19:24:18 +00:00 committed by GitHub
parent e1241e741f
commit 669dc7804f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -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");
}
}