nbauma109 commented on PR #539:
URL: https://github.com/apache/commons-bcel/pull/539#issuecomment-6340458694

   @garydgregory All four points are addressed in 601010f.
   
   **Copying.** `copy(ConstantPool)` of both attributes now sets the given 
constant pool on the copy and replaces the entries with deep copies 
(`TypeAnnotationEntry.copy(ConstantPool)`, which rebuilds each entry and its 
`AnnotationEntry` against the given pool, keeping the indexes as `Unknown.copy` 
does). The test checks the pool of the attribute and of the copied annotations, 
that the entries and annotation objects differ, that changing the copy (adding 
an element value pair, replacing its table) leaves the original unchanged, and 
a copy of the invisible attribute.
   
   **Visiting.** `DescendingVisitor.visitTypeAnnotations` visits the 
`AnnotationEntry` of each entry, while the attribute is on the stack. The test 
counts 5 attribute callbacks and 6 annotation entry callbacks on the fixture, 
and checks through `predecessor()` that each annotation is visited within its 
attribute class.
   
   **TypeAnnotationEntry.** The constructor throws `IllegalArgumentException` 
for a type path that is not a sequence of pairs of bytes or has more than 255 
steps, and for a target info whose size does not match the target type (the 
`localvar_target` table is checked against its length); an undefined target 
type still throws `ClassFormatException`. Tests cover each case, and the 
255-step limit being accepted.
   
   **Javadoc.** `getTypePathLength()` now says an empty path is the outermost 
part of the type where an annotation is allowed (`@A Outer.Inner`, whereas 
`Outer.@A Inner` needs a step); `TARGET_CLASS_EXTENDS` covers the `extends` of 
an interface; the attribute summaries list the declarations, the supertypes, 
the type parameters and their bounds, and the expressions and local variables 
of a `Code` attribute, and the classes that hold the attributes.
   
   The default `mvn` goal passes.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to