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 68951 - Extending a default constractor-less class, wrong hints appears.
Summary: Extending a default constractor-less class, wrong hints appears.
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-18 17:13 UTC by naoki
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (2.99 KB, image/png)
2005-11-23 13:18 UTC, naoki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description naoki 2005-11-18 17:13:34 UTC
Hints bulb appears incorrectly on constructor when its super class does not have 
 default constructor and be in other package.
The bulb says "Add import for the class".

-- some/Some.java --
package some;
public class Some{
  public Some(int a){//has a constructor with param. 
                     //default constractor is not defined.
  }
}
-- other/Other.java --
package other;
import some.Some;
public class Other{
  public Other(){//the bulb "Add import for some.Some" appears.
  }
}
Comment 1 naoki 2005-11-18 17:28:43 UTC
sorry.
Other class extneds Some.

-- other/Other.java --
public class Other extends Some{
  ...
Comment 2 Pavel Flaska 2005-11-22 13:37:48 UTC
I just tried it and it works correctly. Are you able to reproduce it again?
Comment 3 naoki 2005-11-23 13:18:35 UTC
Created attachment 27198 [details]
Screenshot
Comment 4 Tomas Hurka 2005-11-23 13:23:44 UTC
Please provide exact steps how to reproduce, because we are not able to reproduce it here. Which build of 
Netbeans are you using?
Comment 5 Tomas Hurka 2005-11-23 13:28:17 UTC
What is the error reported by compiler on the line: public Other(){  ?

 
Comment 6 naoki 2005-11-23 13:33:25 UTC
I am using Beta 2.
The steps is that,
first I create "Some" class in "some" package,
and create "Other" class in "other" package.

The error reported in that line is "Symbol not found, symbol:Constractor Some()
".
It is right.
# JDK I use is translated for Japanese. 
# So I re-translate it. the message might be defferent from yours.
Comment 7 Tomas Hurka 2005-11-23 13:56:19 UTC
I see. This is probably caused by the fact that you are running Netbeans with Japanese locale. Can you 
please try to run NetBeans with English locale to see if you are still able to reproduce it? Thanks.
Comment 8 naoki 2005-11-23 14:20:35 UTC
Yes, I tried it with "-J-Duser.language=en" in netbeans.conf, That goes right.
Does it depend on error message?
Comment 9 Tomas Hurka 2005-11-23 14:32:19 UTC
Yes, the hint is derived from error message. It should be language independent, but it does not work in 
this case. :-(
Comment 10 Tomas Hurka 2005-11-23 15:31:13 UTC
naoki, thanks for catching this problem.

Fixed in trunk.
Checking in external/gjast.jar;
/cvs/java/external/gjast.jar,v  <--  gjast.jar
new revision: 1.9; previous revision: 1.8
done
Checking in hints/src/org/netbeans/modules/java/hints/JavaHintsProvider.java;
/cvs/java/hints/src/org/netbeans/modules/java/hints/JavaHintsProvider.java,v  <--  
JavaHintsProvider.java
new revision: 1.54; previous revision: 1.53
done
Comment 11 naoki 2005-11-24 22:44:19 UTC
I'd tried it with the newest daily build in Japanese locale, I found that it 
works well. :-D
Thank you. 
Comment 12 Tomas Hurka 2005-11-25 09:15:23 UTC
ok.
Comment 13 Quality Engineering 2007-09-20 09:50:28 UTC
Reorganization of java component