Skip to content

Commit 6451016

Browse files
committed
run tests on java 7 and 8. fix java 7 tests issues.
1 parent 756c669 commit 6451016

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: java
22
jdk:
33
- openjdk7
44
- oraclejdk7
5+
- oraclejdk8
56
before_cache:
67
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
78
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

lib/src/test/java/com/auth0/jwtdecodejava/impl/HeaderImplTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ public class HeaderImplTest {
1616
@Rule
1717
public ExpectedException exception = ExpectedException.none();
1818

19+
@SuppressWarnings("Convert2Diamond")
1920
@Test
2021
public void shouldHaveUnmodifiableTree() throws Exception {
2122
exception.expect(UnsupportedOperationException.class);
22-
HeaderImpl header = new HeaderImpl(new HashMap<>());
23+
HeaderImpl header = new HeaderImpl(new HashMap<String, JsonNode>());
2324
header.getTree().put("something", null);
2425
}
2526

lib/src/test/java/com/auth0/jwtdecodejava/impl/PayloadImplTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ public void setUp() throws Exception {
3636
payload = new PayloadImpl("issuer", "subject", new String[]{"audience"}, expiresAt, notBefore, issuedAt, "jwtId", tree);
3737
}
3838

39+
@SuppressWarnings("Convert2Diamond")
3940
@Test
4041
public void shouldHaveUnmodifiableTree() throws Exception {
4142
exception.expect(UnsupportedOperationException.class);
42-
PayloadImpl payload = new PayloadImpl(null, null, null, null, null, null, null, new HashMap<>());
43+
PayloadImpl payload = new PayloadImpl(null, null, null, null, null, null, null, new HashMap<String, JsonNode>());
4344
payload.getTree().put("something", null);
4445
}
4546

0 commit comments

Comments
 (0)