NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Uncaught error in Netbeans

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
00jt



Joined: 28 Mar 2009
Posts: 18

PostPosted: Mon Jun 07, 2010 4:51 pm    Post subject: Uncaught error in Netbeans Reply with quote

I have been doing some heavy testing of Java libraries, which involved making many tests (i test the tests in netbeans, and try to get the same results on my own).

Anyhow, During one such test i found an error with Netbeans.


Consider the following java files

p1.java
Code:

public class p1 {

            public static String foo(){
                return "Test1";
            }       
}



p2.java

Code:
public class p2 {
}

class p1{ // outer class within the file p2.java

 
           public static String foo(){
                return "Test2";
            }
}



I then have this test Class

testClass.java

Code:


public class testClass {

    public static  void main(String [] args)
    {
        System.out.println(p1.foo());
    }
}



Now, this should be an error "p1 is already defined in package".

Unfortunately, i can "run" the code without building with no errors.
(note: Build&Clean does give an error)

If p2.java was the last modified file, then Netbeans prints out "Test2".
However if p1.java was the last modified file, then Netbeans prints out "Test1".


- JT
Back to top
00jt



Joined: 28 Mar 2009
Posts: 18

PostPosted: Mon Jun 07, 2010 5:54 pm    Post subject: Reply with quote

Note, someone suggested I try it in Eclipse.

Eclipse catches the error. Confused

I really prefer Netbeans though....
Back to top
00jt



Joined: 28 Mar 2009
Posts: 18

PostPosted: Tue Jun 08, 2010 3:02 pm    Post subject: Reply with quote

is there a "bugs" forum? or is this an acceptable place?
Back to top
Jeff Rubinoff
Posted via mailing list.





PostPosted: Tue Jun 08, 2010 3:47 pm    Post subject: Re: Uncaught error in Netbeans Reply with quote

On 6/8/2010 5:02 PM, 00jt wrote:
Quote:
is there a "bugs" forum? or is this an acceptable place?





Please report bugs at http://netbeans.org/community/issues.html. You
need to register with a NetBeans account.
Back to top
00jt



Joined: 28 Mar 2009
Posts: 18

PostPosted: Tue Jun 08, 2010 4:14 pm    Post subject: Re: Uncaught error in Netbeans Reply with quote

Jeff Rubinoff wrote:
On 6/8/2010 5:02 PM, 00jt wrote:
Quote:
is there a "bugs" forum? or is this an acceptable place?





Please report bugs at http://netbeans.org/community/issues.html. You
need to register with a NetBeans account.


"Page not found"

EDIT
The link doesn't work, but i found the page... weird
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo