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 137431 - Redundant public modifier for interface methods when "create method" is used
Summary: Redundant public modifier for interface methods when "create method" is used
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: Other Solaris
: P3 blocker with 4 votes (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
: 182087 236167 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-17 13:54 UTC by modelka
Modified: 2013-11-25 23:18 UTC (History)
3 users (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 modelka 2008-06-17 13:54:13 UTC
From the JLS:
"It is permitted, but strongly discouraged as a matter of style, to redundantly specify the public modifier for
interface methods."
But when "Create method" is used the method is created with the 'public' modifier.

To reproduce:

1. Create the next interface:

public interface Visitor {

    void visit(String aThis);

}

2. Write somewhere
visitor.visit(new Integer(0));

3. Click "Create method visit(Integer) in ....

Result:

public interface Visitor {

    public void visit(Integer aThis);
    
    void visit(String aThis);
}

Should be:

public interface Visitor {

    void visit(Integer aThis);
    
    void visit(String aThis);
}
Comment 1 markiewb 2013-10-05 14:08:09 UTC
*** Bug 182087 has been marked as a duplicate of this bug. ***
Comment 2 markiewb 2013-11-25 23:18:44 UTC
*** Bug 236167 has been marked as a duplicate of this bug. ***