I think it's the use of the variable name 'permits' that is causing the error. The new sealed classes (see http://openjdk.java.net/jeps/360) thing uses permits as part of the class definition. I think it ought to be treated as a normal identifier when it's not part of class definition, but maybe nb-javac is wrongly treating it as a keyword? Anyway, as a work-around, if you rename 'permits' to something else the error squiggles go away.
- Re: Netbeans 12.2 nb-javac can't parse correct java code... Andreas Reichel
- Re: Netbeans 12.2 nb-javac can't parse correct java... Peter Hull
- Re: Netbeans 12.2 nb-javac can't parse correct ... Geertjan Wielenga
- Re: Netbeans 12.2 nb-javac can't parse corr... Peter Hull
- Re: Netbeans 12.2 nb-javac can't parse ... Geertjan Wielenga