netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

'Organize Members' has random error result

Open neoedmund opened this issue 1 year ago • 0 comments

Apache NetBeans version

Apache NetBeans 22

What happened

When sorting members using 'organize member' function, most of the time it OK, but someting give error results also fail to compile.

Language / Project Type / NetBeans Component

No response

How to reproduce

I made a minimum test case

class A {
	
}
public class TestOrder1 {


	public static long inst,
			aaa,			 
			zzz;


	public final static A s = new A();
	
}

sorting this result in

class A {
	
}
public class TestOrder1 {



	public static long aaa,
			inst,			 
			zzz;


	public final static A s = new A();
	public static long inst,
			aaa,
			zzz;
	
}

which has duplicated items make compile fail

Did this work correctly in an earlier version?

No / Don't know

Operating System

Linux

JDK

JDK21

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

neoedmund avatar Sep 20 '24 01:09 neoedmund