aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2019-07-30 11:56:25 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-30 11:56:25 +0000
commitc7fe0ab72153acaed0a83157e4436b44bec3cc2c (patch)
treedd58e09ffe060388efc69245a9076914b81e492f /bpmn
parented0324962b3c0da2ff4a9719dfcb2f0891d4ce23 (diff)
parentda8c8edb6038db32bf00694ca83a3b6e3015a337 (diff)
Merge "Replaced constructor calls with valueOf() method calls to remove static analyzer warnings about inefficient constructor calls"
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/BaseTaskTest.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/BaseTaskTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/BaseTaskTest.java
index 49f373c01e..a9f33f20c5 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/BaseTaskTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/BaseTaskTest.java
@@ -38,9 +38,9 @@ public class BaseTaskTest {
private String anyValueString = "anyValue";
private String badValueString = "123abc";
private int anyValueInt = 123;
- private Integer anyValueInteger = new Integer(anyValueInt);
+ private Integer anyValueInteger = Integer.valueOf(anyValueInt);
private long anyValuelong = 123L;
- private Long anyValueLong = new Long(anyValuelong);
+ private Long anyValueLong = Long.valueOf(anyValuelong);
private DelegateExecution mockExecution;
private Expression mockExpression;
@@ -113,7 +113,7 @@ public class BaseTaskTest {
assertEquals(anyValueString, obj1.toString());
expectedException.expect(MissingInjectedFieldException.class);
- Object objectBoolean = new Boolean(true); // bad data
+ Object objectBoolean = Boolean.valueOf(true); // bad data
when(mockExpression.getValue(mockExecution)).thenReturn(objectBoolean);
obj2 = baseTask.getStringField(null, mockExecution, anyVariable);
}
@@ -134,7 +134,7 @@ public class BaseTaskTest {
@Test
public void testGetIntegerFieldAndMissingInjectedFieldException() throws Exception {
- objectInteger = new Integer(anyValueInt);
+ objectInteger = Integer.valueOf(anyValueInt);
when(mockExpression.getValue(mockExecution)).thenReturn(objectInteger);
obj1 = baseTask.getIntegerField(mockExpression, mockExecution, anyVariable);
assertEquals(anyValueInteger, (Integer) obj1);
@@ -154,7 +154,7 @@ public class BaseTaskTest {
@Test
public void testGetOptionalIntegerField() throws Exception {
- objectInteger = new Integer(anyValueInt);
+ objectInteger = Integer.valueOf(anyValueInt);
when(mockExpression.getValue(mockExecution)).thenReturn(objectInteger);
obj1 = baseTask.getOptionalIntegerField(mockExpression, mockExecution, anyVariable);
assertEquals(anyValueInteger, (Integer) obj1);
@@ -163,14 +163,14 @@ public class BaseTaskTest {
@Test
public void testGetOptionalIntegerFieldAndBadInjectedFieldException() throws Exception {
expectedException.expect(BadInjectedFieldException.class);
- objectBoolean = new Boolean(true);
+ objectBoolean = Boolean.valueOf(true);
when(mockExpression.getValue(mockExecution)).thenReturn(objectBoolean);
obj1 = baseTask.getOptionalIntegerField(mockExpression, mockExecution, anyVariable);
}
@Test
public void testGetLongFieldAndMissingInjectedFieldException() throws Exception {
- objectLong = new Long(anyValuelong);
+ objectLong = Long.valueOf(anyValuelong);
when(mockExpression.getValue(mockExecution)).thenReturn(objectLong);
obj1 = baseTask.getLongField(mockExpression, mockExecution, anyVariable);
assertEquals(anyValueLong, (Long) obj1);
@@ -189,7 +189,7 @@ public class BaseTaskTest {
@Test
public void testGetOptionalLongField() throws Exception {
- objectLong = new Long(anyValuelong);
+ objectLong = Long.valueOf(anyValuelong);
when(mockExpression.getValue(mockExecution)).thenReturn(objectLong);
obj1 = baseTask.getOptionalLongField(mockExpression, mockExecution, anyVariable);
assertEquals(anyValueLong, (Long) obj1);
@@ -198,7 +198,7 @@ public class BaseTaskTest {
@Test
public void testGetOptionalLongFieldAndBadInjectedFieldException() throws Exception {
expectedException.expect(BadInjectedFieldException.class);
- objectBoolean = new Boolean(true);
+ objectBoolean = Boolean.valueOf(true);
when(mockExpression.getValue(mockExecution)).thenReturn(objectBoolean);
obj1 = baseTask.getOptionalLongField(mockExpression, mockExecution, anyVariable);
}
@@ -233,7 +233,7 @@ public class BaseTaskTest {
@Test
public void testGetOptionalOutputFieldAndBadInjectedFieldException() throws Exception {
expectedException.expect(BadInjectedFieldException.class);
- objectBoolean = new Boolean(true);
+ objectBoolean = Boolean.valueOf(true);
when(mockExpression.getValue(mockExecution)).thenReturn(objectBoolean);
obj1 = baseTask.getOptionalOutputField(mockExpression, mockExecution, anyVariable);
}