Skip to content

Commit

Permalink
[jwtk#719] profile, assert=>requireNonNull, @SInCE
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarwell committed Apr 19, 2022
1 parent 0351fed commit 22ec763
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1287,8 +1287,7 @@ They are checked in order, and the first one found is used:
Jackson will force a sizable (> 1 MB) dependency to an Android application thus increasing the app download size for
mobile users.
If you want to use POJOs and a JSON-B compliant specification _**or**_ you want to use JJWT on a JakartaEE compliant application server, use
`io.jsonwebtoken:jjwt-jsonb`.
If you want to use POJOs and a JSON-B compliant specification _**or**_ you want to use JJWT on a JakartaEE compliant application server, use `io.jsonwebtoken:jjwt-jsonb`.
<a name="json-custom"></a>
### Custom JSON Processor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import static java.util.Objects.requireNonNull;

/**
* @since 0.10.0
* @since JJWT_RELEASE_VERSION
*/
public class JsonbDeserializer<T> implements Deserializer<T> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import static java.util.Objects.requireNonNull;

/**
* @since 0.10.0
* @since JJWT_RELEASE_VERSION
*/
public class JsonbSerializer<T> implements Serializer<T> {

Expand All @@ -49,7 +49,7 @@ public JsonbSerializer(Jsonb jsonb) {

@Override
public byte[] serialize(T t) throws SerializationException {
Assert.notNull(t, "Object to serialize cannot be null.");
requireNonNull(t, "Object to serialize cannot be null.");
try {
return writeValueAsBytes(t);
} catch (JsonbException jsonbException) {
Expand Down
13 changes: 12 additions & 1 deletion extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
<module>jackson</module>
<module>orgjson</module>
<module>gson</module>
<module>jsonb</module>
</modules>

<profiles>
<profile>
<id>java8</id>
<activation>
<jdk>[8,)</jdk>
</activation>
<modules>
<module>jsonb</module>
</modules>
</profile>
</profiles>
</project>

0 comments on commit 22ec763

Please sign in to comment.