Skip to content

Conversation

@ChudziudgiToJa
Copy link
Contributor

No description provided.

@ChudziudgiToJa ChudziudgiToJa requested a review from a team as a code owner October 28, 2025 18:53
@ChudziudgiToJa ChudziudgiToJa self-assigned this Oct 28, 2025
@ChudziudgiToJa ChudziudgiToJa added the 🔧 enhancement Enhances existing function label Oct 28, 2025
@ChudziudgiToJa ChudziudgiToJa changed the title refactor: Rename and restructure placeholders configuration classes GH-973 Rename and restructure placeholders configuration classes Oct 28, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully refactors the placeholder configuration by moving it from a separate file into the main config.yml. This is a good move for consolidation and simplifies management. The introduction of the PlaceholdersSettings interface is a great choice for decoupling the configuration from its usage. The overall implementation is solid. I have one minor suggestion to improve code clarity and maintainability.

Comment on lines +21 to +24
@Override
public Map<String, String> placeholders() {
return placeholders;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The explicit implementation of the placeholders() method is redundant. The class-level @Getter and @Accessors(fluent = true) annotations will instruct Lombok to generate an identical method that correctly implements the PlaceholdersSettings interface. Removing this manual override will make the code cleaner and less verbose, fully leveraging Lombok's capabilities for boilerplate reduction.


import java.util.Map;

public interface PlaceholdersSettings {
Copy link
Member

Choose a reason for hiding this comment

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

Ogolnie Settings odbieramy jako dane a nie zachowanie (MA SENS) w tym przypadku ten interfejs nie ma sensu dodaje tylko zloznosc bez zadnej wartosci bo nadal zalezy od konceptu Settings. Settings to tak naprawde tzw. Value object czyli javowy rekord/klasa. Interfejs to tylko kontrakt dla zachowan. Sens sie pojawia kiedy masz rozne zrodla konfiguracji wtedy Settings sam w sobie nadal jest value objectem

class PlaceholdersSetup {

@Subscribe(EternalInitializeEvent.class)
void setUp(PlaceholderRegistry placeholders, PlaceholdersConfiguration config) {
Copy link
Member

Choose a reason for hiding this comment

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

Musimy tez wiedziec czym jest Configuration vs Config bo raz jest tak raz tak sama w sobie paczka implementation to jest zwykly wyciek abstrakcji niekontrolowany

Comment on lines +11 to +12
@Getter
@Accessors(fluent = true)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@Getter
@Accessors(fluent = true)

Copy link
Member

@Jakubk15 Jakubk15 Nov 2, 2025

Choose a reason for hiding this comment

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

No, instead the author should remove the placeholders() getter explicitly. Annotations should be kept unless we are getting rid of the PlaceholdersSettings interface.


import java.util.Map;

public interface PlaceholdersSettings {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think an interface isn’t needed here. This is just a placeholders config, and at this point, I’m overengineering it.

Comment on lines +11 to +12
@Getter
@Accessors(fluent = true)
Copy link
Member

@Jakubk15 Jakubk15 Nov 2, 2025

Choose a reason for hiding this comment

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

No, instead the author should remove the placeholders() getter explicitly. Annotations should be kept unless we are getting rid of the PlaceholdersSettings interface.

@CitralFlo
Copy link
Member

Follow other reviews - nothing to add (Commander keeps tagging me)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 enhancement Enhances existing function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants