This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 4b57eec519f SOLR-17931 : Removal of Deprecated Code (#3738)
4b57eec519f is described below

commit 4b57eec519f48ae6b50a5a3a35f02e97290dba89
Author: Eric Pugh <[email protected]>
AuthorDate: Thu Oct 9 12:22:43 2025 -0400

    SOLR-17931 : Removal of Deprecated Code (#3738)
---
 .../java/org/apache/solr/cloud/ZkController.java   |  4 ----
 .../solr/core/IndexDeletionPolicyWrapper.java      | 17 ---------------
 .../src/java/org/apache/solr/core/SolrCores.java   |  2 --
 .../solr/handler/admin/CoreAdminHandler.java       | 25 ++--------------------
 .../solr/handler/component/ResponseBuilder.java    |  3 +--
 .../org/apache/solr/internal/csv/CharBuffer.java   | 21 ++----------------
 .../apache/solr/internal/csv/CharBufferTest.java   |  3 ---
 7 files changed, 5 insertions(+), 70 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java 
b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
index d12732b123f..bc41a64136e 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -251,10 +251,6 @@ public class ZkController implements Closeable {
   private final ConcurrentHashMap<String, Throwable> replicasMetTragicEvent =
       new ConcurrentHashMap<>();
 
-  @Deprecated
-  // keeps track of replicas that have been asked to recover by leaders 
running on this node
-  private final Map<String, String> replicasInLeaderInitiatedRecovery = new 
HashMap<>();
-
   // keeps track of a list of objects that need to know a new ZooKeeper 
session was created after
   // expiration occurred ref is held as a HashSet since we clone the set 
before notifying to avoid
   // synchronizing too long
diff --git 
a/solr/core/src/java/org/apache/solr/core/IndexDeletionPolicyWrapper.java 
b/solr/core/src/java/org/apache/solr/core/IndexDeletionPolicyWrapper.java
index 130e41a8317..7846cab9a53 100644
--- a/solr/core/src/java/org/apache/solr/core/IndexDeletionPolicyWrapper.java
+++ b/solr/core/src/java/org/apache/solr/core/IndexDeletionPolicyWrapper.java
@@ -379,23 +379,6 @@ public final class IndexDeletionPolicyWrapper extends 
IndexDeletionPolicy {
     }
   }
 
-  /**
-   * Returns the commit with the specified generation <em>if it is known</em>.
-   *
-   * <p><b>NOTE:</b> This method makes no guarantee that the commit returned 
still exists as the
-   * moment this method completes. Callers are encouraged to use {@link 
#getAndSaveLatestCommit}
-   * instead.
-   *
-   * @param gen the generation of the commit point requested
-   * @return a commit point corresponding to the given version if available, 
or null if not yet
-   *     created or already deleted
-   * @deprecated use {@link #getAndSaveCommitPoint} instead
-   */
-  @Deprecated
-  public IndexCommit getCommitPoint(Long gen) {
-    return knownCommits.get(gen);
-  }
-
   /**
    * Returns a Map of all currently known commits, keyed by their generation.
    *
diff --git a/solr/core/src/java/org/apache/solr/core/SolrCores.java 
b/solr/core/src/java/org/apache/solr/core/SolrCores.java
index 6d4874ee230..18213cd55ea 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrCores.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrCores.java
@@ -145,8 +145,6 @@ class SolrCores {
    *     <p>A core may be non-transient but still lazily loaded. If it is 
"permanent" and lazy-load
    *     _and_ not yet loaded it will _not_ be returned by this call.
    *     <p>This list is a new copy, it can be modified by the caller (e.g. it 
can be sorted).
-   *     <p>Note: This is one of the places where SolrCloud is incompatible 
with Transient Cores.
-   *     This call is used in cancelRecoveries, transient cores don't 
participate.
    */
   @Deprecated
   public List<SolrCore> getCores() {
diff --git 
a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java 
b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
index a4ee0251fda..2dc90a2cc50 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
@@ -210,13 +210,8 @@ public class CoreAdminHandler extends RequestHandlerBase 
implements PermissionNa
       final String action = req.getParams().get(ACTION, 
STATUS.toString()).toLowerCase(Locale.ROOT);
       CoreAdminOp op = opMap.get(action);
       if (op == null) {
-        log.warn(
-            "action '{}' not found, calling custom action handler. "
-                + "If original intention was to target some custom behaviour "
-                + "use custom actions defined in 'solr.xml' instead",
-            action);
-        handleCustomAction(req, rsp);
-        return;
+        throw new SolrException(
+            SolrException.ErrorCode.BAD_REQUEST, "Unsupported operation: " + 
action);
       }
 
       final CallInfo callInfo = new CallInfo(this, req, rsp, op);
@@ -243,22 +238,6 @@ public class CoreAdminHandler extends RequestHandlerBase 
implements PermissionNa
     }
   }
 
-  /**
-   * Handle Custom Action.
-   *
-   * <p>This method could be overridden by derived classes to handle custom 
actions. <br>
-   * By default - this method throws a solr exception. Derived classes are 
free to write their
-   * derivation if necessary.
-   *
-   * @deprecated Use actions defined via {@code solr.xml} instead.
-   */
-  @Deprecated
-  protected void handleCustomAction(SolrQueryRequest req, SolrQueryResponse 
rsp) {
-    throw new SolrException(
-        SolrException.ErrorCode.BAD_REQUEST,
-        "Unsupported operation: " + req.getParams().get(ACTION));
-  }
-
   public static Map<String, String> paramToProp =
       Map.ofEntries(
           Map.entry(CoreAdminParams.CONFIG, CoreDescriptor.CORE_CONFIG),
diff --git 
a/solr/core/src/java/org/apache/solr/handler/component/ResponseBuilder.java 
b/solr/core/src/java/org/apache/solr/handler/component/ResponseBuilder.java
index c759ae3204a..8cf3f4b9310 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/ResponseBuilder.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/ResponseBuilder.java
@@ -130,8 +130,7 @@ public class ResponseBuilder {
   public static final int STAGE_GET_FIELDS = 3000;
   public static final int STAGE_DONE = Integer.MAX_VALUE;
 
-  // public access is deprecated, please use getStage and setStage instead.
-  @Deprecated public int stage; // What stage is this current request at?
+  private int stage; // What stage is this current request at?
 
   public int getStage() {
     return this.stage;
diff --git a/solr/core/src/java/org/apache/solr/internal/csv/CharBuffer.java 
b/solr/core/src/java/org/apache/solr/internal/csv/CharBuffer.java
index fac708a7f52..f9eb54ed22a 100644
--- a/solr/core/src/java/org/apache/solr/internal/csv/CharBuffer.java
+++ b/solr/core/src/java/org/apache/solr/internal/csv/CharBuffer.java
@@ -93,23 +93,6 @@ public class CharBuffer {
     append(s.toCharArray());
   }
 
-  /**
-   * Appends <code>sb</code> to the end of this CharBuffer. This method 
involves copying the new
-   * data once!
-   *
-   * @param sb the StringBuffer to append or null
-   */
-  @Deprecated
-  @SuppressWarnings("JdkObsolete")
-  public void append(final StringBuffer sb) {
-    if (sb == null) {
-      return;
-    }
-    provideCapacity(length + sb.length());
-    sb.getChars(0, sb.length(), c, length);
-    length += sb.length();
-  }
-
   /**
    * Appends <code>sb</code> to the end of this CharBuffer. This method 
involves copying the new
    * data once!
@@ -174,8 +157,8 @@ public class CharBuffer {
 
   /**
    * Returns the contents of the buffer as a char[]. The returned array may be 
the internal array of
-   * the buffer, so the caller must take care when modifying it. This method 
allows to avoid copying
-   * if the caller knows the exact capacity before.
+   * the buffer, so the caller must take care when modifying it. This method 
avoids copying if the
+   * caller knows the exact capacity before.
    */
   public char[] getCharacters() {
     if (c.length == length) {
diff --git 
a/solr/core/src/test/org/apache/solr/internal/csv/CharBufferTest.java 
b/solr/core/src/test/org/apache/solr/internal/csv/CharBufferTest.java
index b7054660b8d..ed9705db1e9 100644
--- a/solr/core/src/test/org/apache/solr/internal/csv/CharBufferTest.java
+++ b/solr/core/src/test/org/apache/solr/internal/csv/CharBufferTest.java
@@ -141,9 +141,6 @@ public class CharBufferTest extends SolrTestCaseJ4 {
   public void testAppendNull() {
     CharBuffer buffer = new CharBuffer(8);
 
-    buffer.append((StringBuffer) null);
-    assertEquals("", buffer.toString());
-
     buffer.append((String) null);
     assertEquals("", buffer.toString());
 

Reply via email to