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 18952 - [Explorer View] Display effective access rights in the Explorer tree
Summary: [Explorer View] Display effective access rights in the Explorer tree
Status: RESOLVED DUPLICATE of bug 18206
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-28 16:39 UTC by carcassi
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description carcassi 2001-12-28 16:39:51 UTC
I have an interface with some methods defined. When I check on the explorer it 
says that these methods have default (package) access, while the default access 
in a interface should be public.

That is, in an interface the method:

void test()

is public, while in a class is default (package)

I noticed this because the Autocomment feature makes the same mistake, but I 
assumed the mistake should be in some parser that then feeds the information to 
all other components in NetBeans.
Comment 1 Svata Dedic 2002-01-02 09:34:22 UTC
Sorry, you are mistaken. "Default access" does not mean "package
private" - at least not by definition in the JLS. It means "package
private" for class members and "public" for interface members. The IDE
displays the access restrictions recorded in the source code; what you
are asking for is displaying effective access rights.
Comment 2 carcassi 2002-01-02 14:22:18 UTC
It seems we use different names... :-) Many books (ex. Thinking in 
Java) call the "package private" access "default" access. I'll use 
your definition.

So, you agree that default access in an interface means public, and 
not package private.

Now, try to autocomment an interface, in which you have a method that 
you left default. In AutoComment you have to select package to have 
it displayed.

It seems to me that throughout the IDE there are some inconsistencies 
on this subject. The icons in the explorer are correct, since the 
manual says that the golden lock is for default access, and not 
package access. But the debugger uses the golden lock on a button 
that has a tooltip that says "package private". The autocomment has 
the same button, but with a tooltop that says "package". But the 
golden lock in the explorer is "default". I haven't checked, but the 
Object browser might behave in the same way.

I think that fixing all of this shouldn't be considered an 
enhancement. But I'll let you decide... :-)
Comment 3 Svata Dedic 2002-01-02 16:29:07 UTC
Well, my terminology comes from language spec :-) and it indeed
defines different access for class members when access modifier is
omitted than for interface members.
I have put Hanz on CC:, he's responsible implementation in the
debugger. Object browser and explorer use the same visual code, so
they are consistent.
Comment 4 Svata Dedic 2002-05-21 17:50:29 UTC
Cleaning up before 4.0 planning
Comment 5 Jesse Glick 2002-06-07 20:36:38 UTC
See also issue #24405.
Comment 6 Marek Grummich 2002-07-19 16:53:38 UTC
Target milestone was changed from not determined to TBD
Comment 7 Martin Matula 2004-11-12 08:38:49 UTC

*** This issue has been marked as a duplicate of 18206 ***