Commit baab1599 authored by Eric Bruneton's avatar Eric Bruneton

Improve the comments.

parent 06c799bf
Pipeline #1426 passed with stage
in 6 minutes and 8 seconds
......@@ -1994,6 +1994,9 @@ final class MethodWriter extends MethodVisitor {
currentExceptionOffset += 2;
}
}
// Don't copy the attributes yet, instead store their location in the source class reader so
// they can be copied later, in {@link #putMethodInfo}. Note that we skip the 6 header bytes
// of the method_info JVMS structure.
this.sourceOffset = methodInfoOffset + 6;
this.sourceLength = methodInfoLength - 6;
return true;
......
......@@ -42,8 +42,8 @@ import org.junit.jupiter.api.Test;
public class MethodWriterTest {
/**
* Tests that the non-static fields of Constants are the expected ones. This test is designed to
* fail each time new attributes are added to Constants, and serves as a reminder to update the
* Tests that the attribute name fields of Constants are the expected ones. This test is designed
* to fail each time new attributes are added to Constants, and serves as a reminder to update the
* {@link MethodWriter#canCopyMethodAttributes} method, if needed.
*/
@Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment