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 187343 - uncought error
Summary: uncought error
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 6.x
Hardware: PC Windows 7 x64
: P2 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 190698 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-08 17:15 UTC by 00jt
Modified: 2010-10-26 11:52 UTC (History)
1 user (show)

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 00jt 2010-06-08 17:15:54 UTC
I can have 2 classes with the same name inside a package as long as one class or both classes are an outer class within a separate class.. for example:


File 1:  test.java
--------------------------
package p1;

public class test{}

class otherClass{}
---------------------------



File 2: otherClass.java
---------------------------
package p1;

public class otherClass{}
---------------------------

This should be an error " 'otherClass' already defined in package p1"
But it does not give that error (unless i clean&build)

Unfortunately, i am able to "run" the code in Netbeans without any errors/warnings at all, and any usage of "otherClass" in some other class in package "p1" simply uses the class that was most recently used.
Comment 1 Dusan Balek 2010-07-20 11:42:30 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/8af0f812fa21

changeset d0a03aa040b9 in main/nb-javac
details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=d0a03aa040b9
Comment 2 Quality Engineering 2010-07-21 03:15:55 UTC
Integrated into 'main-golden', will be available in build *201007210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8af0f812fa21
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #187343: uncought duplicate class error - fixed.
Comment 3 Dusan Balek 2010-10-26 11:52:52 UTC
*** Bug 190698 has been marked as a duplicate of this bug. ***