Update of /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5363/src/com/mebigfatguy/fbcontrib/detect
Modified Files:
AbnormalFinallyBlockReturn.java BloatedSynchronizedBlock.java
Log Message:
picky warnings
Index: AbnormalFinallyBlockReturn.java
===================================================================
RCS file: /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/AbnormalFinallyBlockReturn.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- AbnormalFinallyBlockReturn.java 4 Jan 2006 02:40:42 -0000 1.8
+++ AbnormalFinallyBlockReturn.java 1 Mar 2006 04:52:03 -0000 1.9
@@ -36,9 +36,7 @@
*/
public class AbnormalFinallyBlockReturn extends BytecodeScanningDetector implements StatelessDetector {
private BugReporter bugReporter;
- private CodeException[] exc;
private List<FinallyBlockInfo> fbInfo = new ArrayList<FinallyBlockInfo>();
- private int majorVersion;
private int loadedReg;
/**
@@ -67,7 +65,7 @@
*/
@Override
public void visitClassContext(ClassContext classContext) {
- majorVersion = classContext.getJavaClass().getMajor();
+ int majorVersion = classContext.getJavaClass().getMajor();
if (majorVersion >= MAJOR_1_4)
super.visitClassContext(classContext);
}
@@ -82,7 +80,7 @@
fbInfo.clear();
loadedReg = -1;
- exc = obj.getExceptionTable();
+ CodeException[] exc = obj.getExceptionTable();
if (exc != null) {
for (CodeException ce : exc) {
if ((ce.getCatchType() == 0)
Index: BloatedSynchronizedBlock.java
===================================================================
RCS file: /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- BloatedSynchronizedBlock.java 6 Feb 2006 01:36:22 -0000 1.16
+++ BloatedSynchronizedBlock.java 1 Mar 2006 04:52:03 -0000 1.17
@@ -39,14 +39,14 @@
*/
public class BloatedSynchronizedBlock extends BytecodeScanningDetector implements StatelessDetector
{
- private BugReporter bugReporter;
+ private final BugReporter bugReporter;
private static final String BSB_MIN_SAFE_CODE_SIZE = "fb-contrib.bsb.minsize";
- private OpcodeStack stack = new OpcodeStack();
- private Set<Integer> unsafeAliases = new HashSet<Integer>();
- private Map<Integer, Integer> branchInfo = new HashMap<Integer, Integer>();
+ private final OpcodeStack stack = new OpcodeStack();
+ private final Set<Integer> unsafeAliases = new HashSet<Integer>();
+ private final Map<Integer, Integer> branchInfo = new HashMap<Integer, Integer>();
private int syncPC;
private boolean isStatic;
- private int minSafeCodeLength;
+ private final int minSafeCodeLength;
private boolean unsafeCallOccurred;
/**
@@ -63,8 +63,10 @@
* clone this detector so that it can be a StatelessDetector
*
* @return a clone of this object
+ *
+ * @throws CloneNotSupportedException never
*/
- public Object clone() throws CloneNotSupportedException {
+ public final Object clone() throws CloneNotSupportedException {
return super.clone();
}
|