You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Andreas Reichel <an...@manticore-projects.com> on 2020/12/17 03:27:15 UTC

Netbeans 12.2 nb-javac can't parse correct java code (works with 12.1 and before)


Dear All,

unfortunately I face some serious problems with 12.2 and the nb-javac
plugin: 2 valid Java Classes will be marked as invalid code in the UI
for no reason.
It is completely valid code, which compiles fine in the shell. Also,
the same project opens perfectly fine in Netbeans 12.1 and before (see
screenshots for illustration).

Furthermore, I can reproduce this problem with the same code on 2
different linux machines. The interesting part is: It affects always
the same 2 classes, while hundreds of other classes validate and
compile without any issues.
Although I was unable to spot anythign exceptional about these 2
classes. I do not understand, what is going on.

I have attached the 2 classes, maybe someone wants to have a look at
it.
Please tell me, what further information I may provide.

Thank you in advance and best regards
Andreas




Re: Netbeans 12.2 nb-javac can't parse correct java code (works with 12.1 and before)

Posted by Javier Ortiz Bultron <ja...@gmail.com>.
Is this related to the issue I reported?

https://issues.apache.org/jira/plugins/servlet/mobile#issue/NETBEANS-4931

On Thu, Dec 17, 2020, 7:01 AM Geertjan Wielenga
<ge...@googlemail.com.invalid> wrote:

> Then change the value name “permits” to something different.
>
> Gj
>
> On Thu, 17 Dec 2020 at 13:44, Pieter van den Hombergh <
> pieter.van.den.hombergh@gmail.com> wrote:
>
>> I can confirm the bug. Turning of nbjavac has no effect in my setup
>> (Ubuntu 20.04. java 11).
>> The problem is present in 12.2 not in 12.1
>>
>>
>> On Thu, Dec 17, 2020 at 4:27 AM Andreas Reichel <
>> andreas@manticore-projects.com> wrote:
>>
>>>
>>>
>>> Dear All,
>>>
>>> unfortunately I face some serious problems with 12.2 and the nb-javac
>>> plugin: 2 valid Java Classes will be marked as invalid code in the UI for
>>> no reason.
>>> It is completely valid code, which compiles fine in the shell. Also, the
>>> same project opens perfectly fine in Netbeans 12.1 and before (see
>>> screenshots for illustration).
>>>
>>> Furthermore, I can reproduce this problem with the same code on 2
>>> different linux machines. The interesting part is: It affects always the
>>> same 2 classes, while hundreds of other classes validate and compile
>>> without any issues.
>>> Although I was unable to spot anythign exceptional about these 2
>>> classes. I do not understand, what is going on.
>>>
>>> I have attached the 2 classes, maybe someone wants to have a look at it.
>>> Please tell me, what further information I may provide.
>>>
>>> Thank you in advance and best regards
>>> Andreas
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>>> For additional commands, e-mail: users-help@netbeans.apache.org
>>>
>>> For further information about the NetBeans mailing lists, visit:
>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>>
>>
>> --
>> Pieter Van den Hombergh.
>> No software documentation is complete with out it's source code.
>>
>

Re: Netbeans 12.2 nb-javac can't parse correct java code (works with 12.1 and before)

Posted by Geertjan Wielenga <ge...@googlemail.com.INVALID>.
Then change the value name “permits” to something different.

Gj

On Thu, 17 Dec 2020 at 13:44, Pieter van den Hombergh <
pieter.van.den.hombergh@gmail.com> wrote:

> I can confirm the bug. Turning of nbjavac has no effect in my setup
> (Ubuntu 20.04. java 11).
> The problem is present in 12.2 not in 12.1
>
>
> On Thu, Dec 17, 2020 at 4:27 AM Andreas Reichel <
> andreas@manticore-projects.com> wrote:
>
>>
>>
>> Dear All,
>>
>> unfortunately I face some serious problems with 12.2 and the nb-javac
>> plugin: 2 valid Java Classes will be marked as invalid code in the UI for
>> no reason.
>> It is completely valid code, which compiles fine in the shell. Also, the
>> same project opens perfectly fine in Netbeans 12.1 and before (see
>> screenshots for illustration).
>>
>> Furthermore, I can reproduce this problem with the same code on 2
>> different linux machines. The interesting part is: It affects always the
>> same 2 classes, while hundreds of other classes validate and compile
>> without any issues.
>> Although I was unable to spot anythign exceptional about these 2 classes.
>> I do not understand, what is going on.
>>
>> I have attached the 2 classes, maybe someone wants to have a look at it.
>> Please tell me, what further information I may provide.
>>
>> Thank you in advance and best regards
>> Andreas
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: users-help@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
> --
> Pieter Van den Hombergh.
> No software documentation is complete with out it's source code.
>

Re: Netbeans 12.2 nb-javac can't parse correct java code (works with 12.1 and before)

Posted by Pieter van den Hombergh <pi...@gmail.com>.
I can confirm the bug. Turning of nbjavac has no effect in my setup (Ubuntu
20.04. java 11).
The problem is present in 12.2 not in 12.1


On Thu, Dec 17, 2020 at 4:27 AM Andreas Reichel <
andreas@manticore-projects.com> wrote:

>
>
> Dear All,
>
> unfortunately I face some serious problems with 12.2 and the nb-javac
> plugin: 2 valid Java Classes will be marked as invalid code in the UI for
> no reason.
> It is completely valid code, which compiles fine in the shell. Also, the
> same project opens perfectly fine in Netbeans 12.1 and before (see
> screenshots for illustration).
>
> Furthermore, I can reproduce this problem with the same code on 2
> different linux machines. The interesting part is: It affects always the
> same 2 classes, while hundreds of other classes validate and compile
> without any issues.
> Although I was unable to spot anythign exceptional about these 2 classes.
> I do not understand, what is going on.
>
> I have attached the 2 classes, maybe someone wants to have a look at it.
> Please tell me, what further information I may provide.
>
> Thank you in advance and best regards
> Andreas
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



-- 
Pieter Van den Hombergh.
No software documentation is complete with out it's source code.

Re: Netbeans 12.2 nb-javac can't parse correct java code (works with 12.1 and before)

Posted by Geertjan Wielenga <ge...@googlemail.com.INVALID>.
You'll have to start a new thread for a new topic -- with a clear subject
line, please.

Gj

On Thu, Dec 17, 2020 at 1:34 PM Peter Hull <pe...@gmail.com> wrote:

> On Thu, 17 Dec 2020 at 11:52, Geertjan Wielenga <
> geertjan.wielenga@googlemail.com> wrote:
>
>>
>> Yup, we’ve mailed back and forth on this and it’s clear this is the
>> problem.
>>
>> While we're on the subject, do you know how an updated nb-javac will be
> released (I assume it's still under Oracle's control?) given that the issue
> seems to have been fixed just yesterday?
>
>

Re: Netbeans 12.2 nb-javac can't parse correct java code (works with 12.1 and before)

Posted by Peter Hull <pe...@gmail.com>.
On Thu, 17 Dec 2020 at 11:52, Geertjan Wielenga <
geertjan.wielenga@googlemail.com> wrote:

>
> Yup, we’ve mailed back and forth on this and it’s clear this is the
> problem.
>
> While we're on the subject, do you know how an updated nb-javac will be
released (I assume it's still under Oracle's control?) given that the issue
seems to have been fixed just yesterday?

Re: Netbeans 12.2 nb-javac can't parse correct java code (works with 12.1 and before)

Posted by Geertjan Wielenga <ge...@googlemail.com.INVALID>.
Yup, we’ve mailed back and forth on this and it’s clear this is the problem.

Gj

On Thu, 17 Dec 2020 at 12:49, Peter Hull <pe...@gmail.com> wrote:

> 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 (works with 12.1 and before)

Posted by Peter Hull <pe...@gmail.com>.
 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 (works with 12.1 and before)

Posted by Andreas Reichel <an...@manticore-projects.com>.

On Thu, 2020-12-17 at 06:29 +0100, Geertjan Wielenga wrote:
> Do you need to use nb-javac?

Good Morning Geertjan.

Thank you for replying so fast.
I can run Netbeans 12.2 without that plugin of course, but somehow this
beats the purpose:

1) Netbeans urges the installation of this plugin every start (and I
always wondered, why it is not simply included)
2) Compile on Save requests this plugin
3) I actually do not care and just want an IDE with proper Syntax and
API Doc Helpers and Code Completion

I'd rather stick with Netbeans 12.1 if this plugin is failing. Just
thought that 12.2 was a stable release and was supposed to work.
I want to struggle with my own code, not with Netbeans please.

Best regards
Andreas

Re: Netbeans 12.2 nb-javac can't parse correct java code (works with 12.1 and before)

Posted by Geertjan Wielenga <ge...@googlemail.com.INVALID>.
Do you need to use nb-javac?

Gj

On Thu, 17 Dec 2020 at 04:27, Andreas Reichel <
andreas@manticore-projects.com> wrote:

>
>
> Dear All,
>
> unfortunately I face some serious problems with 12.2 and the nb-javac
> plugin: 2 valid Java Classes will be marked as invalid code in the UI for
> no reason.
> It is completely valid code, which compiles fine in the shell. Also, the
> same project opens perfectly fine in Netbeans 12.1 and before (see
> screenshots for illustration).
>
> Furthermore, I can reproduce this problem with the same code on 2
> different linux machines. The interesting part is: It affects always the
> same 2 classes, while hundreds of other classes validate and compile
> without any issues.
> Although I was unable to spot anythign exceptional about these 2 classes.
> I do not understand, what is going on.
>
> I have attached the 2 classes, maybe someone wants to have a look at it.
> Please tell me, what further information I may provide.
>
> Thank you in advance and best regards
> Andreas
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists