Skip to content

Commit 63b34d9

Browse files
committed
GH-193 Adapter MUST accept null and MAY return null
Signed-off-by: Markus KARG <markus@headcrashing.eu>
1 parent 077ab21 commit 63b34d9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

api/src/main/java/javax/json/bind/adapter/JsonbAdapter.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2018 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2019 Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -71,8 +71,8 @@ public interface JsonbAdapter<Original, Adapted> {
7171
* After conversion Adapted type will be mapped to JSON the standard way.
7272
*
7373
* @param obj
74-
* Object to convert.
75-
* @return Converted object which will be serialized to JSON.
74+
* Object to convert or {@code null}.
75+
* @return Converted object which will be serialized to JSON or {@code null}.
7676
* @throws Exception if there is an error during the conversion.
7777
*/
7878
Adapted adaptToJson(Original obj) throws Exception;
@@ -81,8 +81,8 @@ public interface JsonbAdapter<Original, Adapted> {
8181
* This method is used on deserialization only. It contains a conversion logic from type Adapted to type Original.
8282
*
8383
* @param obj
84-
* Object to convert.
85-
* @return Converted object representing pojo to be set into object graph.
84+
* Object to convert or {@code null}.
85+
* @return Converted object representing pojo to be set into object graph or {@code null}.
8686
* @throws Exception if there is an error during the conversion.
8787
*/
8888
Original adaptFromJson(Adapted obj) throws Exception;

0 commit comments

Comments
 (0)