This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 235658 - Organize Members leads to illegal forward declaration
Summary: Organize Members leads to illegal forward declaration
Status: RESOLVED DUPLICATE of bug 249199
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-08 19:49 UTC by _ gtzabari
Modified: 2015-03-11 15:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2013-09-08 19:49:31 UTC
Product Version: NetBeans IDE Dev (Build 201309060001)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b40
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

1. Given:

	public final NumberPath<Byte> id = createNumber("ID", Byte.class);
	public final com.mysema.query.sql.PrimaryKey<QDependencyTypes> constraint2 = createPrimaryKey(id);

2. I apply "Organize members" which sorts the fields according to alphabetic order:

	public final com.mysema.query.sql.PrimaryKey<QDependencyTypes> constraint2 = createPrimaryKey(id);
	public final NumberPath<Byte> id = createNumber("ID", Byte.class);

3. Javac complains "Illegal forward reference" for field constraint2.

Expected behavior: Sort members according to alphabetic order, except when doing so would violate compiler rules. In such a case, try to move the member as close as possible to its ideal position.
Comment 1 Dusan Balek 2015-03-11 15:23:43 UTC
Already fixed.

*** This bug has been marked as a duplicate of bug 249199 ***