You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Richard Grin <Ri...@univ-cotedazur.fr> on 2019/11/28 13:05:36 UTC

Abstract methods not implemented

Hello,

If I write this code:

Comparator<Town> c = new Comparator<>() {

};

I get an error "<anonymous ...> is not abstract and does not override 
abstract method Compare(Town, Town) in Comparator. It's normal, but, if 
I click on the red button at the left of the code, and then on 
"implement all abstract method", nothing happens.

Is it a known problem?

Richard



Re: Abstract methods not implemented

Posted by Ty Young <yo...@gmail.com>.
On 11/28/19 11:19 PM, Geertjan Wielenga wrote:
>
> Does uninstalling nb-javac solve this problem?
>
> Gj
>


FWIW, it works for me(TM) on Netbeans 11.2 on JDK 14 and nb-javac 
installed.


Although... there *is* a bug with anonymous methods. Doing:


Comparator<Integer> c = new Comparator<>() {};


prompts you to select which interface methods to implement as 
expected(compare is the minimum that has to be implemented, but there 
are defaults that can be overridden). However, doing:


Comparator<Integer> c = new Comparator<>();


does not.


...but I don't think OP's problem is because of *that* bug but rather 
another bug that has existed since at least Netbeans 8.2: The thread(s) 
responsible for editor error highlighting and alt+enter prompts gets 
stuck and the only way to fix it is by restarting the IDE. Don't know 
why it happens.


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


Re: Abstract methods not implemented

Posted by Richard Grin <Ri...@univ-cotedazur.fr>.
It is not installed. Perhaps I must install it?

Richard

Le 29/11/2019 à 06:19, Geertjan Wielenga a écrit :

Does uninstalling nb-javac solve this problem?

Gj


On Fri, 29 Nov 2019 at 05:24, William Reynolds <wn...@stellarscience.com>> wrote:
Yes, its' a known bug in 11.2.
https://issues.apache.org/jira/browse/NETBEANS-3340 (it has been
reported numerous times, each one which links back to 3300).

I've had to go back to 11.1, since this bug makes the ide unusable.

On 11/28/2019 6:05 AM, Richard Grin wrote:
> Hello,
>
> If I write this code:
>
> Comparator<Town> c = new Comparator<>() {
>
> };
>
> I get an error "<anonymous ...> is not abstract and does not override
> abstract method Compare(Town, Town) in Comparator. It's normal, but, if
> I click on the red button at the left of the code, and then on
> "implement all abstract method", nothing happens.
>
> Is it a known problem?
>
> Richard
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org<ma...@netbeans.apache.org>
> For additional commands, e-mail: users-help@netbeans.apache.org<ma...@netbeans.apache.org>
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>

--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreynolds@stellarscience.com<ma...@stellarscience.com>
www.stellarscience.com<http://www.stellarscience.com>
877-763-8268 x710 (v)


Re: Abstract methods not implemented

Posted by Geertjan Wielenga <ge...@apache.org>.
Does uninstalling nb-javac solve this problem?

Gj


On Fri, 29 Nov 2019 at 05:24, William Reynolds <
wnreynolds@stellarscience.com> wrote:

> Yes, its' a known bug in 11.2.
> https://issues.apache.org/jira/browse/NETBEANS-3340 (it has been
> reported numerous times, each one which links back to 3300).
>
> I've had to go back to 11.1, since this bug makes the ide unusable.
>
> On 11/28/2019 6:05 AM, Richard Grin wrote:
> > Hello,
> >
> > If I write this code:
> >
> > Comparator<Town> c = new Comparator<>() {
> >
> > };
> >
> > I get an error "<anonymous ...> is not abstract and does not override
> > abstract method Compare(Town, Town) in Comparator. It's normal, but, if
> > I click on the red button at the left of the code, and then on
> > "implement all abstract method", nothing happens.
> >
> > Is it a known problem?
> >
> > Richard
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
>
> --
> William Reynolds, Ph.D.
> Stellar Science, LLC
> wnreynolds@stellarscience.com
> www.stellarscience.com
> 877-763-8268 x710 (v)
>
>

Re: Abstract methods not implemented

Posted by William Reynolds <wn...@stellarscience.com>.
Yes, its' a known bug in 11.2. 
https://issues.apache.org/jira/browse/NETBEANS-3340 (it has been 
reported numerous times, each one which links back to 3300).

I've had to go back to 11.1, since this bug makes the ide unusable.

On 11/28/2019 6:05 AM, Richard Grin wrote:
> Hello,
> 
> If I write this code:
> 
> Comparator<Town> c = new Comparator<>() {
> 
> };
> 
> I get an error "<anonymous ...> is not abstract and does not override
> abstract method Compare(Town, Town) in Comparator. It's normal, but, if
> I click on the red button at the left of the code, and then on
> "implement all abstract method", nothing happens.
> 
> Is it a known problem?
> 
> Richard
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 

-- 
William Reynolds, Ph.D.
Stellar Science, LLC
wnreynolds@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)