Copilot commented on code in PR #12922:
URL: https://github.com/apache/gravitino/pull/12922#discussion_r3946940744


##########
server-common/src/main/java/org/apache/gravitino/server/web/JettyServer.java:
##########
@@ -493,7 +504,14 @@ public ThreadPool getThreadPool() {
     return server.getThreadPool();
   }
 
-  public void addCustomFilters(String pathSpec) {
+  /**
+   * Registers every configured custom filter, binding each one's single 
{@link FilterHolder} to all
+   * of {@code pathSpecs} in one pass — so a filter whose {@code init()} isn't 
safe to run more than
+   * once per JVM only runs it once, regardless of how many paths it's bound 
to.
+   *
+   * @param pathSpecs the pathSpecs to bind each configured custom filter to
+   */
+  public void addCustomFilters(String... pathSpecs) {
     for (String filterName : serverConfig.getCustomFilters()) {

Review Comment:
   `JettyServer.addCustomFilters` changed from a single-`String` overload to 
only a varargs `String...` method. Even though source calls still compile, this 
is a binary-incompatible change for any already-compiled downstream code (would 
get `NoSuchMethodError` at runtime). Consider restoring the original 
`addCustomFilters(String pathSpec)` overload and delegating to the new varargs 
method to preserve binary compatibility.



-- 
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