Author: sebb
Date: Thu Aug 13 00:53:25 2015
New Revision: 1695638
URL: http://svn.apache.org/r1695638
Log:
Avoid unused warning from Findbugs
Modified:
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/EnclosingMethodAttributeTestCase.java
Modified:
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/EnclosingMethodAttributeTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/EnclosingMethodAttributeTestCase.java?rev=1695638&r1=1695637&r2=1695638&view=diff
==============================================================================
---
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/EnclosingMethodAttributeTestCase.java
(original)
+++
commons/proper/bcel/trunk/src/test/java/org/apache/commons/bcel6/EnclosingMethodAttributeTestCase.java
Thu Aug 13 00:53:25 2015
@@ -26,6 +26,7 @@ import org.apache.commons.bcel6.classfil
import org.apache.commons.bcel6.classfile.EnclosingMethod;
import org.apache.commons.bcel6.classfile.JavaClass;
import org.apache.commons.bcel6.util.SyntheticRepository;
+import org.junit.Assert;
public class EnclosingMethodAttributeTestCase extends AbstractTestCase
{
@@ -92,8 +93,8 @@ public class EnclosingMethodAttributeTes
clazz.dump(tfile);
// Read in the new version and check it is OK
SyntheticRepository repos2 = createRepos(".");
- @SuppressWarnings("unused")
JavaClass clazz2 = repos2.loadClass("AttributeTestClassEM02$1");
+ Assert.assertNotNull(clazz2); // Use the variable to avoid a warning
EnclosingMethod em = (EnclosingMethod) encMethodAttrs[0];
String enclosingClassName = em.getEnclosingClass().getBytes(pool);
assertTrue(