[Fb-contrib-commit] SF.net SVN: fb-contrib: [810] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/d
Brought to you by:
dbrosius
From: <dbr...@us...> - 2007-02-01 07:58:42
|
Revision: 810 http://svn.sourceforge.net/fb-contrib/?rev=810&view=rev Author: dbrosius Date: 2007-01-31 23:58:41 -0800 (Wed, 31 Jan 2007) Log Message: ----------- make 1.4 compatible Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseSplit.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2007-01-31 03:45:16 UTC (rev 809) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2007-02-01 07:58:41 UTC (rev 810) @@ -94,11 +94,11 @@ ignoreRegs.clear(); Method method = getMethod(); if (!method.isStatic()) - ignoreRegs.add(Integer.valueOf(0)); + ignoreRegs.add(Integer14.valueOf(0)); int[] parmRegs = RegisterUtils.getParameterRegisters(method); for (int parm : parmRegs) { - ignoreRegs.add(Integer.valueOf(parm)); + ignoreRegs.add(Integer14.valueOf(parm)); } rootScopeBlock = new ScopeBlock(0, obj.getLength()); @@ -106,7 +106,7 @@ CodeException[] exceptions = obj.getExceptionTable(); if (exceptions != null) { for (CodeException ex : exceptions) { - catchHandlers.add(Integer.valueOf(ex.getHandlerPC())); + catchHandlers.add(Integer14.valueOf(ex.getHandlerPC())); } } @@ -143,7 +143,7 @@ || ((seen >= FSTORE_0) && (seen <= FSTORE_1)) || ((seen >= DSTORE_0) && (seen <= DSTORE_1))) { int reg = RegisterUtils.getStoreReg(this, seen); - Integer iReg = Integer.valueOf(reg); + Integer iReg = Integer14.valueOf(reg); int pc = getPC(); if (catchHandlers.contains(Integer14.valueOf(pc))) ignoreRegs.add(iReg); @@ -171,18 +171,18 @@ || ((seen >= FLOAD_0) && (seen <= FLOAD_1)) || ((seen >= DLOAD_0) && (seen <= DLOAD_1))) { int reg = RegisterUtils.getLoadReg(this, seen); - if (!ignoreRegs.contains(Integer.valueOf(reg))) { + if (!ignoreRegs.contains(Integer14.valueOf(reg))) { ScopeBlock sb = findScopeBlock(rootScopeBlock, getPC()); if (sb != null) sb.addLoad(reg, getPC()); else - ignoreRegs.add(Integer.valueOf(reg)); + ignoreRegs.add(Integer14.valueOf(reg)); } } else if (((seen >= IFEQ) && (seen <= GOTO)) || (seen == GOTO_W)) { int target = getBranchTarget(); if (target > getPC()) { if ((seen == GOTO) || (seen == GOTO_W)) { - Integer nextPC = Integer.valueOf(getNextPC()); + Integer nextPC = Integer14.valueOf(getNextPC()); if (!switchTargets.contains(nextPC)) { ScopeBlock sb = findScopeBlockWithTarget(rootScopeBlock, getPC(), getNextPC()); if (sb == null) { @@ -226,8 +226,8 @@ int[] offsets = getSwitchOffsets(); List<Integer> targets = new ArrayList<Integer>(); for (int i = 0; i < offsets.length; i++) - targets.add(Integer.valueOf(offsets[i] + pc)); - Integer defOffset = Integer.valueOf(getDefaultSwitchOffset() + pc); + targets.add(Integer14.valueOf(offsets[i] + pc)); + Integer defOffset = Integer14.valueOf(getDefaultSwitchOffset() + pc); if (!targets.contains(defOffset)) targets.add(defOffset); Collections.sort(targets); Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseSplit.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseSplit.java 2007-01-31 03:45:16 UTC (rev 809) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseSplit.java 2007-02-01 07:58:41 UTC (rev 810) @@ -24,6 +24,7 @@ import org.apache.bcel.classfile.Code; import org.apache.bcel.classfile.JavaClass; +import com.mebigfatguy.fbcontrib.utils.Integer14; import com.mebigfatguy.fbcontrib.utils.RegisterUtils; import edu.umd.cs.findbugs.BugInstance; @@ -103,7 +104,7 @@ if ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3))) { int reg = RegisterUtils.getALoadReg(this, seen); - Integer type = regValueType.get(Integer.valueOf(reg)); + Integer type = regValueType.get(Integer14.valueOf(reg)); if (type != null) state = type.intValue(); else @@ -114,14 +115,14 @@ if (stack.getStackDepth() > 0) { OpcodeStack.Item item = stack.getStackItem(0); int reg = RegisterUtils.getAStoreReg(this, seen); - regValueType.put(Integer.valueOf(reg), (Integer)item.getUserValue()); + regValueType.put(Integer14.valueOf(reg), (Integer)item.getUserValue()); } state = SEEN_NOTHING; return; } if ((seen == ILOAD) || ((seen >= ILOAD_0) && (seen <= ILOAD_3))) { int reg = RegisterUtils.getLoadReg(this, seen); - Integer type = regValueType.get(Integer.valueOf(reg)); + Integer type = regValueType.get(Integer14.valueOf(reg)); if (type != null) state = type.intValue(); else @@ -132,7 +133,7 @@ if (stack.getStackDepth() > 0) { OpcodeStack.Item item = stack.getStackItem(0); int reg = RegisterUtils.getStoreReg(this, seen); - regValueType.put(Integer.valueOf(reg), (Integer)item.getUserValue()); + regValueType.put(Integer14.valueOf(reg), (Integer)item.getUserValue()); } state = SEEN_NOTHING; return; @@ -226,7 +227,7 @@ if (state != SEEN_NOTHING) { if (stack.getStackDepth() > 0) { OpcodeStack.Item item = stack.getStackItem(0); - item.setUserValue(Integer.valueOf(state)); + item.setUserValue(Integer14.valueOf(state)); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |