Skip to content

Commit

Permalink
Merge pull request #136 from Xceptance/#135-update-to-java-11
Browse files Browse the repository at this point in the history
#135 update to java 11
  • Loading branch information
occupant23 authored Aug 28, 2020
2 parents e2e34b1 + 8d18317 commit 51a71d9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source.version>1.8</maven.compiler.source.version>
<maven.compiler.target.version>1.8</maven.compiler.target.version>
<maven.compiler.source.version>11</maven.compiler.source.version>
<maven.compiler.target.version>11</maven.compiler.target.version>
<surefire.version>2.22.2</surefire.version>
<allure.version>2.13.5</allure.version>
<cucumber.version>5.7.0</cucumber.version>
Expand Down Expand Up @@ -135,6 +135,7 @@
</executions>
<configuration>
<source>8</source>
<detectJavaApiLink>false</detectJavaApiLink>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@ public static <T extends StatementBuilder> T instantiate(Class<T> clazz)
{
try
{
return clazz.newInstance();
return clazz.getDeclaredConstructor().newInstance();
}
catch (InstantiationException e)
{
throw new RuntimeException(e);
}
catch (IllegalAccessException e)
catch (ReflectiveOperationException e)
{
throw new RuntimeException(e);
}
Expand All @@ -56,7 +52,7 @@ public static <T extends Annotation> List<T> getAnnotations(AnnotatedElement obj
{
annotations.addAll(Arrays.asList((T[]) annotation.getClass().getMethod("value").invoke(annotation)));
}
catch (Exception e)
catch (ReflectiveOperationException e)
{
throw new RuntimeException(e);
}
Expand Down Expand Up @@ -92,7 +88,7 @@ public static <T extends Annotation> List<T> getDeclaredAnnotations(AnnotatedEle
{
annotations.addAll(Arrays.asList((T[]) annotation.getClass().getMethod("value").invoke(annotation)));
}
catch (Exception e)
catch (ReflectiveOperationException e)
{
throw new RuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public void testGetClass() throws Exception
Assert.assertEquals("1234567890", testCompound.getClubCardNumber());
Assert.assertEquals(null, testCompound.getNotSet());
Assert.assertEquals(null, testCompound.getNullValue());
Assert.assertEquals(new Double(12.34), testCompound.getNumberValue());
Assert.assertEquals(Double.valueOf(12.34), testCompound.getNumberValue());
Assert.assertEquals("containing strange things like spaces and äüø", testCompound.getDescription());
Assert.assertEquals("4111111111111111", testCompound.getCreditCard().getCardNumber());
Assert.assertEquals("123", testCompound.getCreditCard().getCcv());
Expand All @@ -235,7 +235,7 @@ public void testGetClass() throws Exception
public void testGetByPath() throws Exception
{
Double numberValue = DataUtils.get("$.numberValue", Double.class);
Assert.assertEquals(new Double(12.34), numberValue);
Assert.assertEquals(Double.valueOf(12.34), numberValue);

String description = DataUtils.get("$.description", String.class);
Assert.assertEquals("containing strange things like spaces and äüø", description);
Expand Down Expand Up @@ -276,7 +276,7 @@ public void testGetClassByPath() throws Exception
Assert.assertEquals("1234567890", testCompound.getClubCardNumber());
Assert.assertEquals(null, testCompound.getNotSet());
Assert.assertEquals(null, testCompound.getNullValue());
Assert.assertEquals(new Double(12.34), testCompound.getNumberValue());
Assert.assertEquals(Double.valueOf(12.34), testCompound.getNumberValue());
Assert.assertEquals("containing strange things like spaces and äüø", testCompound.getDescription());
Assert.assertEquals("4111111111111111", testCompound.getCreditCard().getCardNumber());
Assert.assertEquals("123", testCompound.getCreditCard().getCcv());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public void testGetClass() throws Exception
Assert.assertEquals(null, testCompound.getNotSet());
// our XML parer does not support explicit null value
// Assert.assertEquals(null, testCompound.getNullValue());
Assert.assertEquals(new Double(12.34), testCompound.getNumberValue());
Assert.assertEquals(Double.valueOf(12.34), testCompound.getNumberValue());
Assert.assertEquals("containing strange things like spaces and äüø", testCompound.getDescription());
Assert.assertEquals("4111111111111111", testCompound.getCreditCard().getCardNumber());
Assert.assertEquals("123", testCompound.getCreditCard().getCcv());
Expand All @@ -235,7 +235,7 @@ public void testGetClass() throws Exception
public void testGetByPath() throws Exception
{
Double numberValue = DataUtils.get("$.numberValue", Double.class);
Assert.assertEquals(new Double(12.34), numberValue);
Assert.assertEquals(Double.valueOf(12.34), numberValue);

String description = DataUtils.get("$.description", String.class);
Assert.assertEquals("containing strange things like spaces and äüø", description);
Expand Down Expand Up @@ -277,7 +277,7 @@ public void testGetClassByPath() throws Exception
Assert.assertEquals(null, testCompound.getNotSet());
// our XML parer does not support explicit null value
// Assert.assertEquals(null, testCompound.getNullValue());
Assert.assertEquals(new Double(12.34), testCompound.getNumberValue());
Assert.assertEquals(Double.valueOf(12.34), testCompound.getNumberValue());
Assert.assertEquals("containing strange things like spaces and äüø", testCompound.getDescription());
Assert.assertEquals("4111111111111111", testCompound.getCreditCard().getCardNumber());
Assert.assertEquals("123", testCompound.getCreditCard().getCcv());
Expand Down

0 comments on commit 51a71d9

Please sign in to comment.