Skip to content

Java TSG: Package names are not correctly processed #234

Open
@ghost

Description

Repro case

// File: src/main/java/example/one/A.java
package com.example.one;

import com.example.two.B;

public class A {
    public void method() {
        B instance = new B();
        instance.method();
    }
}
// File: src/main/java/example/two/B.java
package com.example.two;

public class B {
   public void method() {}
}
  1. Find the definition of instance.method from A.java
    This is expected to work correctly, and it does.

  2. Now replace the following in B.java

-- package com.example.two;
++ package com.cheese.two;
  1. Find the definition of instance.method from A.java

Expected result

No definition should be found, as packages do not match.

Actual result

Wrong definition is found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions