diff options
author | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-08 03:14:13 +0200 |
---|---|---|
committer | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-08 03:14:13 +0200 |
commit | f33600d4d5507f3aa02d7cacfc34fe910d6b858f (patch) | |
tree | 797427a7536d5e9fc927faceec4963754ab0133b /testing | |
parent | c1c373f4278426308689db61f7758185e8f0401b (diff) | |
download | aspectj-f33600d4d5507f3aa02d7cacfc34fe910d6b858f.tar.gz aspectj-f33600d4d5507f3aa02d7cacfc34fe910d6b858f.zip |
Unnecessary boxing
Reports explicit boxing, i.e. wrapping of primitive values in objects. Explicit manual boxing is unnecessary under Java 5 and newer, and can be safely removed.
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Diffstat (limited to 'testing')
3 files changed, 5 insertions, 5 deletions
diff --git a/testing/src/test/java/org/aspectj/internal/tools/ant/taskdefs/Ajctest.java b/testing/src/test/java/org/aspectj/internal/tools/ant/taskdefs/Ajctest.java index 67e73ed6c..bbe264846 100644 --- a/testing/src/test/java/org/aspectj/internal/tools/ant/taskdefs/Ajctest.java +++ b/testing/src/test/java/org/aspectj/internal/tools/ant/taskdefs/Ajctest.java @@ -812,7 +812,7 @@ public class Ajctest extends Task implements PropertyChangeListener { List<Argument> bothargs = new Vector<>(args); bothargs.addAll(testset.args); List<List<Arg>> argcombo = argcombo(bothargs); - argcombos.add(new Integer(argcombo.size())); + argcombos.add(argcombo.size()); testsetToArgcombo.put(testset, argcombo); } while (!testsetToArgcombo.isEmpty()) { @@ -1786,7 +1786,7 @@ public class Ajctest extends Task implements PropertyChangeListener { public void add(Failure f, String taskname, String type, int num, long time) { model.addRow(new Object[]{taskname, type, - new Integer(num), date(time)}); + num, date(time)}); failures.add(f); } } diff --git a/testing/src/test/java/org/aspectj/testing/harness/bridge/JavaRun.java b/testing/src/test/java/org/aspectj/testing/harness/bridge/JavaRun.java index db7428816..92aaec667 100644 --- a/testing/src/test/java/org/aspectj/testing/harness/bridge/JavaRun.java +++ b/testing/src/test/java/org/aspectj/testing/harness/bridge/JavaRun.java @@ -208,7 +208,7 @@ public class JavaRun implements IAjcRun { } if (thrown instanceof RunSecurityManager.ExitCalledException) { int i = ((RunSecurityManager.ExitCalledException) thrown).exitCode; - status.finish(new Integer(i)); + status.finish(i); } else if (thrown instanceof RunSecurityManager.AwtUsedException) { MessageUtil.fail(status, "test code should not use the AWT event queue"); throw (RunSecurityManager.AwtUsedException) thrown; @@ -224,7 +224,7 @@ public class JavaRun implements IAjcRun { } } catch (RunSecurityManager.ExitCalledException e) { // XXX need to update run validator (a) to accept null result or (b) to require zero result, and set 0 if completed normally - status.finish(new Integer(e.exitCode)); + status.finish(e.exitCode); } catch (ClassNotFoundException e) { String[] classes = FileUtil.listFiles(sandbox.classesDir); MessageUtil.info(status, "sandbox.classes: " + Arrays.asList(classes)); diff --git a/testing/src/test/java/org/aspectj/testing/util/LinkCheck.java b/testing/src/test/java/org/aspectj/testing/util/LinkCheck.java index fd1edaf6f..d7f6de21a 100644 --- a/testing/src/test/java/org/aspectj/testing/util/LinkCheck.java +++ b/testing/src/test/java/org/aspectj/testing/util/LinkCheck.java @@ -382,7 +382,7 @@ public class LinkCheck { } private void checkingLinks(int i) { - info("checkingLinks", new Integer(i)); + info("checkingLinks", i); } private void checkingLink(Link link) { |