You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/10/07 12:55:37 UTC

[GitHub] [commons-bcel] mureinik commented on a change in pull request #69: BCEL-343 Assertion improvement

mureinik commented on a change in pull request #69:
URL: https://github.com/apache/commons-bcel/pull/69#discussion_r500988579



##########
File path: src/test/java/org/apache/bcel/classfile/JDKClassDumpTestCase.java
##########
@@ -81,7 +80,8 @@ private void compare(final JavaClass jc, final InputStream inputStream, final St
             int i = 0;
             for (final int out : baos.toByteArray()) {
                 final int in = src.read();
-                assertEquals(in, out & 0xFF, name + ": Mismatch at " + i);
+                int j = i;

Review comment:
       Yes - values in a lambda expression must be final or effectively final, and `i` isn't, so I assigned it to `j`, which is (since it's scopped in the loop's body).
   
   Alternatively, we can leave the message as is and not replace it with a `Supplier`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org