mbien opened a new pull request, #7581:
URL: https://github.com/apache/netbeans/pull/7581

   generates a final class as workaround instead of throwing an exception
   
   fixes https://github.com/apache/netbeans/issues/7570 (see for reproducer)
   
   
   So i tried to implement this properly at first, but there is some magic 
behind the scenes in the javac impl which kept generating final classes even 
though everything seemed to be correct. I had this in `TreeFactory` which works 
analog to `Enum`:
   ```java
       public ClassTree Record(ModifiersTree modifiers, 
                CharSequence simpleName,
                List<? extends Tree> implementsClauses,
                List<? extends Tree> memberDecls) {
           long flags = getBitFlags(modifiers.getFlags()) | Flags.RECORD;
           return Class(flags, (com.sun.tools.javac.util.List<JCAnnotation>) 
modifiers.getAnnotations(), simpleName, 
Collections.<TypeParameterTree>emptyList(), null, implementsClauses, 
memberDecls);
       }
   ```
   
   since this had no effect, I decided to change this back to a minimal impact 
quickfix which simply calls `make.Class` right away, without introducing public 
API changes. This would also have to be updated to extend 
`AbstractElementVisitor14` as the todo indicates.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to