Skip to content

Commit 22ec763

Browse files
committed
[#719] profile, assert=>requireNonNull, @SInCE
1 parent 0351fed commit 22ec763

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1287,8 +1287,7 @@ They are checked in order, and the first one found is used:
12871287
Jackson will force a sizable (> 1 MB) dependency to an Android application thus increasing the app download size for
12881288
mobile users.
12891289
1290-
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
1291-
`io.jsonwebtoken:jjwt-jsonb`.
1290+
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`.
12921291
12931292
<a name="json-custom"></a>
12941293
### Custom JSON Processor

extensions/jsonb/src/main/java/io/jsonwebtoken/jsonb/io/JsonbDeserializer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import static java.util.Objects.requireNonNull;
2626

2727
/**
28-
* @since 0.10.0
28+
* @since JJWT_RELEASE_VERSION
2929
*/
3030
public class JsonbDeserializer<T> implements Deserializer<T> {
3131

extensions/jsonb/src/main/java/io/jsonwebtoken/jsonb/io/JsonbSerializer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import static java.util.Objects.requireNonNull;
2929

3030
/**
31-
* @since 0.10.0
31+
* @since JJWT_RELEASE_VERSION
3232
*/
3333
public class JsonbSerializer<T> implements Serializer<T> {
3434

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

5050
@Override
5151
public byte[] serialize(T t) throws SerializationException {
52-
Assert.notNull(t, "Object to serialize cannot be null.");
52+
requireNonNull(t, "Object to serialize cannot be null.");
5353
try {
5454
return writeValueAsBytes(t);
5555
} catch (JsonbException jsonbException) {

extensions/pom.xml

+12-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@
3737
<module>jackson</module>
3838
<module>orgjson</module>
3939
<module>gson</module>
40-
<module>jsonb</module>
4140
</modules>
41+
42+
<profiles>
43+
<profile>
44+
<id>java8</id>
45+
<activation>
46+
<jdk>[8,)</jdk>
47+
</activation>
48+
<modules>
49+
<module>jsonb</module>
50+
</modules>
51+
</profile>
52+
</profiles>
4253
</project>

0 commit comments

Comments
 (0)