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

Small Cleanup (mostly @Share / @Local) #276

Merged
merged 5 commits into from
Nov 7, 2023
Merged

Conversation

glowredman
Copy link
Member

See commit history.

@glowredman glowredman requested a review from a team November 6, 2023 20:53
@@ -18,13 +18,13 @@
@Mixin(ModuleHarvestCraft.class)
public class MixinHungerOverhaulModuleHarvestCraft {

private static final Map<Item, FoodValues> foodValuesMap = new HashMap<Item, FoodValues>() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not that I mind, but what's the objection to the anonymous inner class?

Copy link
Contributor

Choose a reason for hiding this comment

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

double braces initializer is a famous antipattern. it creates a one time class that boost the memory usage, slow down class loading, confuse junior developers and make certain static analysis tool very unhappy.

@Alexdoru
Copy link
Member

Alexdoru commented Nov 7, 2023

damn we love sugar

@glowredman glowredman merged commit 4d15352 into master Nov 7, 2023
@glowredman glowredman deleted the local-and-share branch November 7, 2023 18:27
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.

4 participants