Copilot commented on code in PR #13890:
URL: https://github.com/apache/skywalking/pull/13890#discussion_r3354014923


##########
oap-server/server-library/library-module/src/main/java/org/apache/skywalking/oap/server/library/module/ModuleProvider.java:
##########
@@ -31,9 +31,9 @@
 public abstract class ModuleProvider implements ModuleServiceHolder {
     @Setter
     private ModuleManager manager;
-    @Setter(AccessLevel.PACKAGE)
+    @Setter(AccessLevel.PUBLIC)
     private ModuleDefine moduleDefine;
-    @Setter(AccessLevel.PACKAGE)
+    @Setter(AccessLevel.PUBLIC)
     private TerminalFriendlyTable bootingParameters;

Review Comment:
   Changing the Lombok setters for `moduleDefine` and `bootingParameters` from 
package-private to public widens `ModuleProvider`'s external API surface and 
allows arbitrary callers to mutate core wiring that is intended to be set only 
by `ModuleDefine.prepare(...)` within the 
`org.apache.skywalking.oap.server.library.module` package. This weakens 
encapsulation and can make module bootstrap behavior harder to reason about.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to