Apache Solr open-source search software
SOLR-15703: Remove SolrException#log methods (#1533)
Kevin Risden4bc0fb351506
diff --git a/gradle/validation/forbidden-apis/java.solr.txt b/gradle/validation/forbidden-apis/java.solr.txtindex 0644e3ce014..b32c9fa8715 100644--- a/gradle/validation/forbidden-apis/java.solr.txt+++ b/gradle/validation/forbidden-apis/java.solr.txt@@ -26,7 +26,3 @@ java.util.LinkedHashMap#<init>(int)@defaultMessage Use CollectionUtil.newHashSet(int)java.util.HashSet#<init>(int)--@defaultMessage Use Logger directly-org.apache.solr.common.SolrException#log(**)-diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex bacaae2978a..8df1900ed2e 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -29,6 +29,7 @@ Deprecation Removals* SOLR-16601: Removed deprecated methods on the various Solr Clients. (Eric Pugh, Kevin Risden)+* SOLR-15703: Removed deprecated SolrException#log methods (Kevin Risden)---------------------(No changes)diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrException.java b/solr/solrj/src/java/org/apache/solr/common/SolrException.javaindex 2b6fae56063..e96bf302796 100644--- a/solr/solrj/src/java/org/apache/solr/common/SolrException.java+++ b/solr/solrj/src/java/org/apache/solr/common/SolrException.java@@ -18,7 +18,6 @@ package org.apache.solr.common;import java.util.Map;import org.apache.solr.common.util.NamedList;-import org.apache.solr.common.util.SuppressForbidden;import org.slf4j.Logger;import org.slf4j.MDC;@@ -133,57 +132,6 @@ public class SolrException extends RuntimeException {return getMetadata(ROOT_ERROR_CLASS);}- /**- * This method was initially created to aid in testing situations that were known to cause ERRORs.- * It should no longer be used by any new code.- *- * @deprecated Use the Logger directly- */- @Deprecated- @SuppressForbidden(reason = "self referencing")- public void log(Logger log) {- log(log, this);- }-- /**- * This method was initially created to aid in testing situations that were known to cause ERRORs.- * It should no longer be used by any new code.- *- * @deprecated Use the Logger directly- */- @Deprecated- public static void log(Logger log, Throwable e) {- if (log.isErrorEnabled()) {- log.error(e.toString(), e); // nowarn (we are inside of isErrorEnabled, toString as msg is ok)- }- }-- /**- * This method was initially created to aid in testing situations that were known to cause ERRORs.- * It should no longer be used by any new code.- *- * @deprecated Use the Logger directly- */- @Deprecated- public static void log(Logger log, String msg, Throwable e) {- if (log.isErrorEnabled()) {- log.error(msg, e);- }- }-- /**- * This method was initially created to aid in testing situations that were known to cause ERRORs.- * It should no longer be used by any new code.- *- * @deprecated Use the Logger directly- */- @Deprecated- public static void log(Logger log, String msg) {- if (log.isErrorEnabled()) {- log.error(msg);- }- }-// TODO: This doesn't handle cause loopspublic static Throwable getRootCause(Throwable t) {while (true) {