redhat-developer / redhat-developer/vscode-java

No report for two Classes in the same package with same name

Open
#1,111 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug diagnostics
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

Just as the title says, eclipse will report it.

Environment
  • Operating System: Windows 10
  • JDK version: 1.8.0_161
  • Visual Studio Code version: 1.39.2
  • Java extension version: 0.51.0
Steps To Reproduce
// src/test/C1.java
package test;
public class C1 {}
class Same {}
// src/test/C2.java
package test;
public class C2 {}
class Same {}
Current Result

No problem dectected.
Fail to build.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using src/test/C1.java and src/test/C2.java, each declaring the same package-private class, and confirm that the extension reports no problem before the build fails. Trace the Java diagnostics entry point that handles duplicate classes, then verify that the duplicate-name problem is reported before or alongside the build failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.