Skip to content

Fix duplicate class error from mismatched package declarations - #1

Draft
mahdi-y with Copilot wants to merge 2 commits into
mainfrom
copilot/update-user-interface
Draft

Fix duplicate class error from mismatched package declarations#1
mahdi-y with Copilot wants to merge 2 commits into
mainfrom
copilot/update-user-interface

Conversation

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown

Build failed with duplicate class Controller.Home due to incorrect package declarations. Files in src/main/java/controller/ (lowercase) declared package Controller; (uppercase), conflicting with files in src/main/java/Controller/.

Changes

  • Consolidated 8 controller files into correct Controller/ directory based on package declaration
  • Removed duplicate Home.java from lowercase controller/ directory
  • Deleted empty controller/ directory

Technical Context

Java package names must match directory structure. All files declared package Controller; but were split across two directories differing only in case:

controller/Home.java:     package Controller;  // ❌ directory mismatch
Controller/Home.java:     package Controller;  // ✅ correct

This created duplicate class definitions on case-sensitive filesystems, failing compilation.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: mahdi-y <100856863+mahdi-y@users.noreply.github.com>
Copilot AI changed the title [WIP] Update user interface for better user experience Fix duplicate class error from mismatched package declarations Feb 11, 2026
Copilot AI requested a review from mahdi-y February 11, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants