]> source.dussan.org Git - aspectj.git/commitdiff
Unnecessary unboxing
authorLars Grefer <eclipse@larsgrefer.de>
Sat, 8 Aug 2020 01:16:40 +0000 (03:16 +0200)
committerLars Grefer <eclipse@larsgrefer.de>
Sat, 8 Aug 2020 01:16:40 +0000 (03:16 +0200)
Reports "unboxing", e.g. explicit unwrapping of wrapped primitive values. Unboxing is unnecessary under Java 5 and newer, and can be safely removed.

Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
30 files changed:
asm/src/main/java/org/aspectj/asm/AsmManager.java
asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java
asm/src/main/java/org/aspectj/asm/internal/ProgramElement.java
bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/ConstantPool.java
bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/FieldGen.java
org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjState.java
org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/IncrementalCase.java
org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java
org.aspectj.matcher/src/main/java/org/aspectj/weaver/ResolvedTypeMunger.java
org.aspectj.matcher/src/main/java/org/aspectj/weaver/SimpleAnnotationValue.java
org.aspectj.matcher/src/main/java/org/aspectj/weaver/World.java
org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/ModifiersPattern.java
org.aspectj.matcher/src/main/java/org/aspectj/weaver/tools/TraceFactory.java
runtime/src/main/java/org/aspectj/lang/Aspects.java
runtime/src/main/java/org/aspectj/lang/Aspects14.java
runtime/src/main/java/org/aspectj/runtime/internal/Conversions.java
taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapter.java
taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java
testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java
testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCase.java
testing/src/test/java/org/aspectj/testing/harness/bridge/CompilerRun.java
testing/src/test/java/org/aspectj/testing/harness/bridge/DirChanges.java
testing/src/test/java/org/aspectj/testing/harness/bridge/FlatSuiteReader.java
testing/src/test/java/org/aspectj/testing/harness/bridge/ParseTestCase.java
testing/src/test/java/org/aspectj/testing/util/IntRange.java
testing/src/test/java/org/aspectj/testing/util/ObjectChecker.java
testing/src/test/java/org/aspectj/testing/xml/SoftMessage.java
testing/src/test/java/org/aspectj/testing/xml/SoftSourceLocation.java
tests/src/test/java/org/aspectj/systemtest/ajc150/GenericsTests.java
util/src/main/java/org/aspectj/util/LangUtil.java

index d1b7ed3f2596f6f7fae06657c9c48e784b76253a..b8a8989cb5e2a7f3b5269e72ecf54bbb9123b977 100644 (file)
@@ -1191,7 +1191,7 @@ public class AsmManager implements IStructureModel {
                        if (ctr == null) {
                                nodeTypeCount.put(node, 1);
                        } else {
-                               ctr = ctr.intValue() + 1;
+                               ctr = ctr + 1;
                                nodeTypeCount.put(node, ctr);
                        }
                }
index 5e518c51f32377fe26763a052bd151a89d729190..53818534af6163df5828f8e9aff91f454fb0e2ba 100644 (file)
@@ -172,7 +172,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
                                                String existingHandle = object.getHandleIdentifier();
                                                int suffixPosition = existingHandle.indexOf('!');
                                                if (suffixPosition != -1) {
-                                                       count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+                                                       count = new Integer(existingHandle.substring(suffixPosition + 1)) + 1;
                                                } else {
                                                        if (count == 1) {
                                                                count = 2;
@@ -228,7 +228,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
                                                        String existingHandle = object.getHandleIdentifier();
                                                        int suffixPosition = existingHandle.indexOf('!');
                                                        if (suffixPosition != -1) {
-                                                               count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+                                                               count = new Integer(existingHandle.substring(suffixPosition + 1)) + 1;
                                                        } else {
                                                                if (count == 1) {
                                                                        count = 2;
@@ -280,7 +280,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
                                                        String existingHandle = object.getHandleIdentifier();
                                                        int suffixPosition = existingHandle.indexOf('!');
                                                        if (suffixPosition != -1) {
-                                                               count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+                                                               count = new Integer(existingHandle.substring(suffixPosition + 1)) + 1;
                                                        } else {
                                                                if (count == 1) {
                                                                        count = 2;
@@ -315,7 +315,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
                                                        int suffixPosition = existingHandle.lastIndexOf('!');
                                                        int lastSquareBracket = existingHandle.lastIndexOf('['); // type delimiter
                                                        if (suffixPosition != -1 && lastSquareBracket < suffixPosition) { // pr260384
-                                                               count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+                                                               count = new Integer(existingHandle.substring(suffixPosition + 1)) + 1;
                                                        } else {
                                                                if (count == 1) {
                                                                        count = 2;
@@ -335,7 +335,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
                                                        int suffixPosition = existingHandle.lastIndexOf('!');
                                                        int lastSquareBracket = existingHandle.lastIndexOf('['); // type delimiter
                                                        if (suffixPosition != -1 && lastSquareBracket < suffixPosition) { // pr260384
-                                                               count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+                                                               count = new Integer(existingHandle.substring(suffixPosition + 1)) + 1;
                                                        } else {
                                                                if (count == 1) {
                                                                        count = 2;
@@ -384,7 +384,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
                                        String existingHandle = object.getHandleIdentifier();
                                        int suffixPosition = existingHandle.indexOf('!');
                                        if (suffixPosition != -1) {
-                                               count = new Integer(existingHandle.substring(suffixPosition + 1)).intValue() + 1;
+                                               count = new Integer(existingHandle.substring(suffixPosition + 1)) + 1;
                                        } else {
                                                if (count == 1) {
                                                        count = 2;
index 77fe7a66b1ffd08c26d4b96e3f10072c189e1224..9842830cbb4eb6ffd2898e7881bbc6c80e437e65 100644 (file)
@@ -364,7 +364,7 @@ public class ProgramElement implements IProgramElement {
                if (b == null) {
                        return false;
                }
-               return b.booleanValue();
+               return b;
        }
 
        public String[] getRemovedAnnotationTypes() {
index 4108912122ab0202f0164d29ab0b057997647284..de8f9c650f27c472d945a3ba102d9e63cdd96d5e 100644 (file)
@@ -444,7 +444,7 @@ public class ConstantPool implements Node {
                String k = new StringBuffer().append(searchClassname).append(searchFieldname).append(searchSignature).toString();
                Integer pos = fieldCache.get(k);
                if (pos != null)
-                       return pos.intValue();
+                       return pos;
                for (int i = 1; i < poolSize; i++) {
                        Constant c = pool[i];
                        if (c != null && c.tag == Constants.CONSTANT_Fieldref) {
@@ -771,7 +771,7 @@ public class ConstantPool implements Node {
                String key = new StringBuffer().append(searchClassname).append(searchMethodName).append(searchSignature).toString();
                Integer cached = methodCache.get(key);
                if (cached != null)
-                       return cached.intValue();
+                       return cached;
                searchClassname = searchClassname.replace('.', '/');
                for (int i = 1; i < poolSize; i++) {
                        Constant c = pool[i];
index 50b9ac496e4f5af1b5a45701e62d99171b400b02..086f276ee412a3c2ffb7ec19fc4b89c28766e34f 100644 (file)
@@ -189,16 +189,16 @@ public class FieldGen extends FieldGenOrMethodGen {
                case Constants.T_BYTE:
                case Constants.T_BOOLEAN:
                case Constants.T_SHORT:
-                       return cp.addInteger(((Integer) value).intValue());
+                       return cp.addInteger((Integer) value);
 
                case Constants.T_FLOAT:
-                       return cp.addFloat(((Float) value).floatValue());
+                       return cp.addFloat((Float) value);
 
                case Constants.T_DOUBLE:
-                       return cp.addDouble(((Double) value).doubleValue());
+                       return cp.addDouble((Double) value);
 
                case Constants.T_LONG:
-                       return cp.addLong(((Long) value).longValue());
+                       return cp.addLong((Long) value);
 
                case Constants.T_REFERENCE:
                        return cp.addString(((String) value));
index 4c38f125cf44db487ed86fbab3aa2bda25157dcb..f4518ead371a4413834fa46cd6b06fb9cef27e0c 100644 (file)
@@ -820,7 +820,7 @@ public class AjState implements CompilerConfigurationChangeFlags, TypeDelegateRe
                Long l = structuralChangesSinceLastFullBuild.get(file.getAbsolutePath());
                long strucModTime = -1;
                if (l != null) {
-                       strucModTime = l.longValue();
+                       strucModTime = l;
                } else {
                        strucModTime = this.lastSuccessfulFullBuildTime;
                }
@@ -837,7 +837,7 @@ public class AjState implements CompilerConfigurationChangeFlags, TypeDelegateRe
                for (Map.Entry<String, Long> entry : entries) {
                        Long l = entry.getValue();
                        if (l != null) {
-                               long lvalue = l.longValue();
+                               long lvalue = l;
                                if (lvalue > lastSuccessfulBuildTime) {
                                        if (listenerDefined()) {
                                                getListener().recordDecision(
index 82682bb29862354dddcfb71acadba2697a262fa1..9f1162c9f9c2cef63aac1f50d0ff1f7a0753af14 100644 (file)
@@ -312,7 +312,7 @@ public class IncrementalCase { // XXX NOT bound to junit - bridge tests?
                        if (-1 != loc)
                                s = s.substring(loc + 1);
                        try {
-                               exp[i] = Integer.valueOf(s).intValue();
+                               exp[i] = Integer.valueOf(s);
                                sb.append(exp[i] + ((i < (exp.length - 1)) ? ", " : ""));
                        } catch (NumberFormatException e) {
                                info(handler, "bad " + label + ":" + expected[i]);
index 7aa97ad1eae14c2a71020f8bfcdbb3862f7a6b10..6bbc076b45f991fa5bd9eb464db0f05976a581b0 100644 (file)
@@ -1050,7 +1050,7 @@ public abstract class AjcTestCase extends TestCase {
        private static boolean getBoolean(String name, boolean def) {
                String defaultValue = String.valueOf(def);
                String value = System.getProperty(name, defaultValue);
-               return Boolean.valueOf(value).booleanValue();
+               return Boolean.valueOf(value);
        }
 
        /*
index 289547bbc6f193e1f2685fc1cc2475495ac5b0b8..86e06e767ee7446a1a68a8d7bcf6d84aed3532a0 100644 (file)
@@ -217,8 +217,8 @@ public abstract class ResolvedTypeMunger {
                                        File f = (File) ois.readObject();
                                        Integer ii = (Integer) ois.readObject();
                                        Integer offset = (Integer) ois.readObject();
-                                       ret = new SourceLocation(f, ii.intValue());
-                                       ret.setOffset(offset.intValue());
+                                       ret = new SourceLocation(f, ii);
+                                       ret.setOffset(offset);
                                }
                        } else {
                                boolean validLocation = b == 2;
index 27af4e8f5dddc19fb88700c2a2337a36d2143a05..32e55f6b4a8f62e2f88510ae8170d8278eddf172 100644 (file)
@@ -21,31 +21,31 @@ public class SimpleAnnotationValue extends AnnotationValue {
                super(kind);
                switch (kind) {
                case AnnotationValue.PRIMITIVE_BYTE:
-                       theByte = ((Byte) value).byteValue();
+                       theByte = (Byte) value;
                        break;
                case AnnotationValue.PRIMITIVE_CHAR:
-                       theChar = ((Character) value).charValue();
+                       theChar = (Character) value;
                        break;
                case AnnotationValue.PRIMITIVE_INT:
-                       theInt = ((Integer) value).intValue();
+                       theInt = (Integer) value;
                        break;
                case AnnotationValue.STRING:
                        theString = (String) value;
                        break;
                case AnnotationValue.PRIMITIVE_DOUBLE:
-                       theDouble = ((Double) value).doubleValue();
+                       theDouble = (Double) value;
                        break;
                case AnnotationValue.PRIMITIVE_FLOAT:
-                       theFloat = ((Float) value).floatValue();
+                       theFloat = (Float) value;
                        break;
                case AnnotationValue.PRIMITIVE_LONG:
-                       theLong = ((Long) value).longValue();
+                       theLong = (Long) value;
                        break;
                case AnnotationValue.PRIMITIVE_SHORT:
-                       theShort = ((Short) value).shortValue();
+                       theShort = (Short) value;
                        break;
                case AnnotationValue.PRIMITIVE_BOOLEAN:
-                       theBoolean = ((Boolean) value).booleanValue();
+                       theBoolean = (Boolean) value;
                        break;
                default:
                        throw new BCException("Not implemented for this kind: " + whatKindIsThis(kind));
index 32648268e4743e54d46c5586a355f5b2b81d9756..b2af422ff082f6c2a283a6980a310772c2d1fcc8 100644 (file)
@@ -1428,7 +1428,7 @@ public abstract class World implements Dump.INode {
                public int compareByPrecedence(ResolvedType firstAspect, ResolvedType secondAspect) {
                        PrecedenceCacheKey key = new PrecedenceCacheKey(firstAspect, secondAspect);
                        if (cachedResults.containsKey(key)) {
-                               return (cachedResults.get(key)).intValue();
+                               return cachedResults.get(key);
                        } else {
                                int order = 0;
                                DeclarePrecedence orderer = null; // Records the declare
index 83ad90528da6b242120f72c8c4c0021a19da8cb9..d4b747af39b8af5598720d53a267796914bbd543 100644 (file)
@@ -97,7 +97,7 @@ public class ModifiersPattern extends PatternNode {
                if (flag == null) {
                        return -1;
                }
-               return flag.intValue();
+               return flag;
        }
 
        public Object accept(PatternNodeVisitor visitor, Object data) {
index 6d819de507a17e70ba3cd17b9c81e1a99a443de4..e9b42fb83f3ba8dce092ef776de00910f47d4faf 100644 (file)
@@ -32,7 +32,7 @@ public abstract class TraceFactory {
     protected static boolean getBoolean(String name, boolean def) {
                String defaultValue = String.valueOf(def);
                String value = System.getProperty(name,defaultValue);
-               return Boolean.valueOf(value).booleanValue();
+               return Boolean.valueOf(value);
        }
 
        static {
index 726b7ed636be18d45b62d9990d3fac9d280b140b..ecc388bdbf88ede6138db3f6c5fcbdcae126a60b 100644 (file)
@@ -94,7 +94,7 @@ public class Aspects {
      */
     public static boolean hasAspect(Class<?> aspectClass) throws NoAspectBoundException {
         try {
-            return ((Boolean)getSingletonOrThreadHasAspect(aspectClass).invoke(null, EMPTY_OBJECT_ARRAY)).booleanValue();
+            return (Boolean) getSingletonOrThreadHasAspect(aspectClass).invoke(null, EMPTY_OBJECT_ARRAY);
         } catch (Exception e) {
             return false;
         }
@@ -108,7 +108,7 @@ public class Aspects {
      */
     public static boolean hasAspect(Class<?> aspectClass, Object perObject) throws NoAspectBoundException {
         try {
-            return ((Boolean)getPerObjectHasAspect(aspectClass).invoke(null, new Object[]{perObject})).booleanValue();
+            return (Boolean) getPerObjectHasAspect(aspectClass).invoke(null, new Object[]{perObject});
         } catch (Exception e) {
             return false;
         }
@@ -122,7 +122,7 @@ public class Aspects {
      */
     public static boolean hasAspect(Class<?> aspectClass, Class<?> perTypeWithin) throws NoAspectBoundException {
         try {
-            return ((Boolean)getPerTypeWithinHasAspect(aspectClass).invoke(null, new Object[]{perTypeWithin})).booleanValue();
+            return (Boolean) getPerTypeWithinHasAspect(aspectClass).invoke(null, new Object[]{perTypeWithin});
         } catch (Exception e) {
             return false;
         }
index b59374d76aa370f2c2e57614c3bcd37fe38471db..4ddb6b1232422645694cc3738f419060f186f302 100644 (file)
@@ -95,7 +95,7 @@ public class Aspects14 {
      */
     public static boolean hasAspect(Class aspectClass) throws NoAspectBoundException {
         try {
-            return ((Boolean)getSingletonOrThreadHasAspect(aspectClass).invoke(null, EMPTY_OBJECT_ARRAY)).booleanValue();
+            return (Boolean) getSingletonOrThreadHasAspect(aspectClass).invoke(null, EMPTY_OBJECT_ARRAY);
         } catch (Exception e) {
             return false;
         }
@@ -110,7 +110,7 @@ public class Aspects14 {
      */
     public static boolean hasAspect(Class aspectClass, Object perObject) throws NoAspectBoundException {
         try {
-            return ((Boolean)getPerObjectHasAspect(aspectClass).invoke(null, new Object[]{perObject})).booleanValue();
+            return (Boolean) getPerObjectHasAspect(aspectClass).invoke(null, new Object[]{perObject});
         } catch (Exception e) {
             return false;
         }
@@ -125,7 +125,7 @@ public class Aspects14 {
      */
     public static boolean hasAspect(Class aspectClass, Class perTypeWithin) throws NoAspectBoundException {
         try {
-            return ((Boolean)getPerTypeWithinHasAspect(aspectClass).invoke(null, new Object[]{perTypeWithin})).booleanValue();
+            return (Boolean) getPerTypeWithinHasAspect(aspectClass).invoke(null, new Object[]{perTypeWithin});
         } catch (Exception e) {
             return false;
         }
index 6fb5f916fe7dee32dabc1c032028a72f4863fc91..0d784266b22b9f2548decc6c6393a0d77fa66d80 100644 (file)
@@ -112,7 +112,7 @@ public final class Conversions {
                if (o == null) {
                        return 0;
                } else if (o instanceof Character) {
-                       return ((Character)o).charValue();
+                       return (Character) o;
                } else {
                        throw new ClassCastException(o.getClass().getName() +
                                        " can not be converted to char");
@@ -122,7 +122,7 @@ public final class Conversions {
                if (o == null) {
                        return false;
                } else if (o instanceof Boolean) {
-                       return ((Boolean)o).booleanValue();
+                       return (Boolean) o;
                } else {
                        throw new ClassCastException(o.getClass().getName() +
                                        " can not be converted to boolean");
index a64c5131ec70e7a27a25d0186600c33c07e28ce7..d74fa51348d948ab23291bef0cc34400a13e2471 100644 (file)
@@ -79,7 +79,7 @@ public class Ajc11CompilerAdapter implements CompilerAdapter {
         if (null == javac) {
             throw new IllegalStateException("null javac");
         }
-        if (!((Boolean) inSelfCall.get()).booleanValue()
+        if (!(Boolean) inSelfCall.get()
             && afterCleaningDirs()) {
             // if we are not re-calling ourself and we cleaned dirs,
             // then re-call javac to get the list of all source files.
index 0242b4d58588d1e69621340b7c20db44d60beabd..2516a2ac51ad2dbb3eeb82f6f9c6693ca7dab2be 100644 (file)
@@ -91,11 +91,11 @@ public class Ajc extends DefaultCompilerAdapter {
                                                     Project.MSG_WARN));
             System.setOut(logstr);
             System.setErr(logstr);
-            return ((Integer)main.getMethod
-                    ("compile", new Class[]{String[].class}).invoke
-                    (main.newInstance(), new Object[]{
-                        removeUnsupported(cline, logstr)
-                    })).intValue() == AJC_COMPILER_SUCCESS;
+            return (Integer) main.getMethod
+                                       ("compile", new Class[]{String[].class}).invoke
+                                       (main.newInstance(), new Object[]{
+                                                       removeUnsupported(cline, logstr)
+                                       }) == AJC_COMPILER_SUCCESS;
         } catch (Exception e) {
             if (e instanceof BuildException) {
                 throw (BuildException)e;
index 6c0a84fe9f8d430e7aa1d1653e01e54617473584..55295568ac0f13448d1155d51a3f7bc3b16cb4bf 100644 (file)
@@ -306,7 +306,7 @@ public class Harness {
                                                }
                                                Object value = result.status.getResult();
                                                if ((value instanceof Boolean)
-                                                               && !((Boolean) value).booleanValue()) {
+                                                               && !(Boolean) value) {
                                                        System.exit(-1);
                                                }
                                        }
index 0c5b6ddebeb30ba0d340572105bf45b9b64cb5da..38f85b2c90937c11175c9f38ddd0349357fe53d2 100644 (file)
@@ -201,7 +201,7 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
                if (clearTestAfterRun.isEmpty()) {
                        return false;
                }
-               boolean result = clearTestAfterRun.peek().booleanValue();
+               boolean result = clearTestAfterRun.peek();
                if (pop) {
                        clearTestAfterRun.pop();
                }
index 6c8b2ba5fbc2b9425e308fa1d62fc45e5c271e2e..7a5bff3df1ea4b79949dcc103a43131a2446d5b3 100644 (file)
@@ -1842,7 +1842,7 @@ public class CompilerRun implements IAjcRun {
                             compilerOption,
                             result);
                     }
-                    return result.booleanValue();
+                    return result;
                 }
             }
         } // CompilerRun.Spec.CRSOptions
index 95977aeee56924218d9c312bc3d8b4437eb93611..e3e60e0280f7eff4277ddad87a38d714e1301d26 100644 (file)
@@ -59,7 +59,7 @@ public class DirChanges {
     static {
         long delay = 10l;
         try {
-            delay = Long.getLong(DELAY_NAME).longValue();
+            delay = Long.getLong(DELAY_NAME);
             if ((delay > 40000) || (delay < 0)) {
                 delay = 10l;
             }
index 16d1d6d19438dd51538e9b2337f69e67605b16dd..28db821cb4b4c0ba2db635c0b24309021a0682d4 100644 (file)
@@ -267,7 +267,7 @@ public class FlatSuiteReader implements SFileReader.Maker {
             description.setLength(0);
             description.append((prefix + " " + suffix).trim());
             try {
-                result.setBugId(Integer.valueOf(pr).intValue());
+                result.setBugId(Integer.valueOf(pr));
             } catch (NumberFormatException e) {
                 throw new Error("unable to convert " + pr + " for " + result
                     + " at " + lineReader);
index ee07fe4f616b83e5185be3be59db4a3803711f34..7aaa1767c77be3d0b792c0f4c92281fd1945796e 100644 (file)
@@ -106,7 +106,7 @@ public class ParseTestCase extends TestCase {
         AjcTest.Spec test = new AjcTest.Spec();
         test.setDescription(title);
         test.setTestDirOffset(dir);
-        test.setBugId(Integer.valueOf(pr).intValue());
+        test.setBugId(Integer.valueOf(pr));
         test.setSourceLocation(sourceLocation);
                //AjcTest test = new AjcTest(title, dir, pr, sourceLocation);
                
@@ -175,7 +175,7 @@ public class ParseTestCase extends TestCase {
                        file = new File("XXX");  //XXX 
                }
                
-               int line = Integer.valueOf(getAttributeString(child, "line")).intValue();
+               int line = Integer.valueOf(getAttributeString(child, "line"));
                
                ISourceLocation sourceLocation = new SourceLocation(file, line, line, 0);
                
index 1f44f69bd864faac832ee61e12245b15ea03a4fa..4181e70183b9617b54d61ed9bddbd1962738228d 100644 (file)
@@ -82,7 +82,7 @@ public class IntRange implements IntValidator, ObjectChecker, Serializable {
     /** @return true if integer instanceof Integer with acceptable intValue */
     public final boolean isValid(Object integer) {
         return ((integer instanceof Integer)
-                && (acceptInt(((Integer) integer).intValue())));
+                && (acceptInt((Integer) integer)));
     }
     
     /** @return true if min <= value < max */
index 25985ae5eee6b2989b4f8b157bdcebceacd31625..e1f771b9daea9f91b7cd2e12fd8f8a2e0210216b 100644 (file)
@@ -34,7 +34,7 @@ public interface ObjectChecker {
     public static final ObjectChecker ANY_ZERO = new ObjectChecker() {
         public boolean isValid(Object input) { 
             if (input instanceof Integer) {
-                return (0 == ((Integer) input).intValue());
+                return (0 == (Integer) input);
             } else {
                 return true;
             }
index 2241904bd88640b76ce6bf73c5aa4c1d588d4ba9..969c8ecd8d0fc92d6d7ee3882c067ef88ad474d3 100644 (file)
@@ -294,7 +294,7 @@ public class SoftMessage implements IMessage {
                if (null != sourceLocation) {
                        throw new IllegalStateException("cannot set line after creating source location");
                }
-               this.line = Integer.valueOf(line).intValue();
+               this.line = Integer.valueOf(line);
                SourceLocation.validLine(this.line);
        }
 
index 17f5ae673e880582188b646db1eafa8e341f859e..3895f302e268ad3a55aade7edcd594669f3eb2cc 100644 (file)
@@ -109,7 +109,7 @@ public class SoftSourceLocation implements ISourceLocation  {
     }
     
     private int convert(String in) {
-        return Integer.valueOf(in).intValue();
+        return Integer.valueOf(in);
     }
 
        public String getLocationContext() {
index 847f67149a8e12b64171dc388aad5446272cefec..76c956965281d74f1bfdddcf1f98e1bb1c91f488 100644 (file)
@@ -930,7 +930,7 @@ public class GenericsTests extends XMLBasedAjcTestCase {
             java.lang.reflect.Method isBridge 
                 = java.lang.reflect.Method.class.getMethod("isBridge", noparms);
             Boolean result = (Boolean) isBridge.invoke(m, new Object[0]);
-            return result.booleanValue();
+            return result;
         } catch (Throwable t) {
             return false;
         }
index 49a65df52847a73c571526038ff0fdf982d0468b..ffdc0b66e6e2f558167cd70235ef0108dacd3414 100644 (file)
@@ -332,7 +332,7 @@ public class LangUtil {
                        try {
                                String value = System.getProperty(propertyName);
                                if (null != value) {
-                                       return Boolean.valueOf(value).booleanValue();
+                                       return Boolean.valueOf(value);
                                }
                        } catch (Throwable t) {
                                // default below