Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 260253

Summary: [clean up] Cleanup wizard does not remove this qualifiers if method exists multiple times
Product: [Eclipse Project] JDT Reporter: Ulli Hafner <Knut.Friedhelm>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ulli Hafner CLA 2009-01-07 08:48:51 EST
Build ID: I20081211-1908

Steps To Reproduce:
1. Create class

package com.avaloq.ui.internal;


public class Foo {
    /**
     * Creates a new instance of {@link Foo}.
     */
    public Foo() {
        this.foo("foo");
        this.foo(42);
        this.getClass();
        this.hashCode();
    }

    public void foo(final String foo) {

    }

    public void foo(final int foo) {

    }
}

2. Call Clean Wizard or On Save Cleanup (option remove this on methods is true)
3. Result is 

    /**
     * Creates a new instance of {@link Foo}.
     */
    public Foo() {
        this.foo("foo");
        this.foo(42);
        this.getClass();
        hashCode();
    }

but should be 

    /**
     * Creates a new instance of {@link Foo}.
     */
    public Foo() {
        foo("foo");
        foo(42);
        getClass();
        hashCode();
    }
Comment 1 Dani Megert CLA 2009-01-07 09:18:55 EST

*** This bug has been marked as a duplicate of bug 240136 ***