Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor usages of blacklist and whitelist #5296

Conversation

VincentDondain
Copy link

@VincentDondain VincentDondain commented Jan 28, 2025

Fixes #5275

Refactor usages of 'whitelist' and 'blacklist' to 'allowlist' and 'denylist'.

  • Rename ExternalApiWhitelist.java to ExternalApiAllowlist.java and update class name and references.
  • Update ServerConnectListManager.java to use 'allowlist' and 'denylist' instead of 'whitelist' and 'blacklist'.
  • Update SelectGameScreen.java to use 'allowlist' and 'denylist' instead of 'whitelist' and 'blacklist'.
  • Update SubtypeLayoutBuilder.java to use 'allowlist' instead of 'whitelist'.
  • Add ModuleEnvironmentTest.java to test the new ExternalApiAllowlist class.

For more details, open the Copilot Workspace session.

Fixes MovingBlocks#5275

Refactor usages of 'whitelist' and 'blacklist' to 'allowlist' and 'denylist'.

* Rename `ExternalApiWhitelist.java` to `ExternalApiAllowlist.java` and update class name and references.
* Update `ServerConnectListManager.java` to use 'allowlist' and 'denylist' instead of 'whitelist' and 'blacklist'.
* Update `SelectGameScreen.java` to use 'allowlist' and 'denylist' instead of 'whitelist' and 'blacklist'.
* Update `SubtypeLayoutBuilder.java` to use 'allowlist' instead of 'whitelist'.
* Add `ModuleEnvironmentTest.java` to test the new `ExternalApiAllowlist` class.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/MovingBlocks/Terasology/issues/5275?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link
Contributor

@BenjaminAmos BenjaminAmos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate you trying but this is generally just poor-quality.

You have removed all the copyright notices from every file you touched. That is not acceptable and in violation of the project's licence. Please reinstate them.

Please also take into account the backwards-compatibility concerns I mentioned in #5277 (review).

You have also introduced a unit test under engine/src/main/java/, which is not a test source root. That was never going to compile.

I would advise not using copilot-like tools to do everything for you at this stage. They are not quite there yet. Please scrutinise the output closely as a human being who hopefully has an understanding of what was produced before sending it to other people in-future.

@VincentDondain
Copy link
Author

Fair enough closing as duplicate of #5277

@VincentDondain VincentDondain deleted the refactor-allowlist-denylist branch January 28, 2025 22:23
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.

Refactor usages of blacklist and whitelist
2 participants