Skip to content

Commit 623a702

Browse files
authored
Merge pull request #142 from khmarbaise/issue-140
Fixes #140 - Replacing Deprecated Constructor Calls for Wrapper Classes
2 parents a11a1f2 + cc9ac38 commit 623a702

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

airline-core/src/test/java/com/github/rvesse/airline/tests/utils/ComparatorTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void float_comparator_negatives_01() {
3131
FloatComparator comparator = new FloatComparator();
3232

3333
Assert.assertTrue(-1f < 0f);
34-
Assert.assertTrue(new Float(-1f) < new Float(0f));
34+
Assert.assertTrue(-1f < 0f);
3535
Assert.assertEquals(comparator.compare(-1f, 0f), -1);
3636
}
3737

@@ -40,7 +40,7 @@ public void float_comparator_positives_01() {
4040
FloatComparator comparator = new FloatComparator();
4141

4242
Assert.assertTrue(1f > 0f);
43-
Assert.assertTrue(new Float(1f) > new Float(0f));
43+
Assert.assertTrue(1f > 0f);
4444
Assert.assertEquals(comparator.compare(1f, 0f), 1);
4545
}
4646

@@ -62,7 +62,7 @@ public void double_comparator_negatives_01() {
6262
DoubleComparator comparator = new DoubleComparator();
6363

6464
Assert.assertTrue(-1d < 0d);
65-
Assert.assertTrue(new Double(-1d) < new Double(0d));
65+
Assert.assertTrue(-1d < 0d);
6666
Assert.assertEquals(comparator.compare(-1d, 0d), -1);
6767
}
6868

@@ -71,7 +71,7 @@ public void double_comparator_positives_01() {
7171
DoubleComparator comparator = new DoubleComparator();
7272

7373
Assert.assertTrue(1d > 0d);
74-
Assert.assertTrue(new Double(1d) > new Double(0d));
74+
Assert.assertTrue(1d > 0d);
7575
Assert.assertEquals(comparator.compare(1d, 0d), 1);
7676
}
7777

airline-prompts/src/test/java/com/github/rvesse/airline/prompts/AbstractPromptTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ public void option_numeric_06() throws PromptException {
567567
//@formatter:on
568568

569569
Integer value = prompt.promptForOption(false);
570-
Assert.assertEquals(value, new Integer(100));
570+
Assert.assertEquals(value, 100);
571571
}
572572

573573
@Test
@@ -588,7 +588,7 @@ public void option_numeric_07() throws PromptException {
588588
// As numeric option selection is disabled we should get the actual
589589
// value 1
590590
Integer value = prompt.promptForOption(false);
591-
Assert.assertEquals(value, new Integer(1));
591+
Assert.assertEquals(value, 1);
592592
}
593593

594594
@Test
@@ -609,7 +609,7 @@ public void option_numeric_08() throws PromptException {
609609
// As numeric option selection is enabled we should get the value 100
610610
// because thats the value at index 1
611611
Integer value = prompt.promptForOption(false);
612-
Assert.assertEquals(value, new Integer(100));
612+
Assert.assertEquals(value, 100);
613613
}
614614

615615
@Test

0 commit comments

Comments
 (0)