You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2012/01/16 23:08:27 UTC
svn commit: r1232193 - in /lucene/dev/branches/branch_3x/solr: CHANGES.txt
core/src/java/org/apache/solr/core/SolrConfig.java
solrj/src/java/org/apache/solr/common/SolrException.java
Author: erick
Date: Mon Jan 16 22:08:26 2012
New Revision: 1232193
URL: http://svn.apache.org/viewvc?rev=1232193&view=rev
Log:
Fixes for SOLR-3032. Deprecated the methods that will be removed in 4.x in this JIRA
Modified:
lucene/dev/branches/branch_3x/solr/CHANGES.txt
lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/core/SolrConfig.java
lucene/dev/branches/branch_3x/solr/solrj/src/java/org/apache/solr/common/SolrException.java
Modified: lucene/dev/branches/branch_3x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/CHANGES.txt?rev=1232193&r1=1232192&r2=1232193&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_3x/solr/CHANGES.txt Mon Jan 16 22:08:26 2012
@@ -105,6 +105,10 @@ Other Changes
* SOLR-2920: Refactor frequent conditional use of DefaultSolrParams and
AppendedSolrParams into factory methods.
(David Smiley via hossman)
+
+* Solr-3032: Deprecate logOnce from SolrException logOnce and all the supporting
+ structure will disappear in 4.0. Errors should be caught and logged at the
+ top-most level or logged and NOT propagated up the chain. (Erick Erickson)
Build
----------------------
Modified: lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/core/SolrConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/core/SolrConfig.java?rev=1232193&r1=1232192&r2=1232193&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/core/SolrConfig.java (original)
+++ lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/core/SolrConfig.java Mon Jan 16 22:08:26 2012
@@ -79,7 +79,11 @@ public class SolrConfig extends Config {
/**
* Singleton keeping track of configuration errors
+ * Simply going away in 4.x
+ * @deprecated should simply be removed from code, this funcitonality is handled now by
+ * logging from the top-most leve.
*/
+ @Deprecated
public static final Collection<Throwable> severeErrors = new HashSet<Throwable>();
/** Creates a default instance from the solrconfig.xml. */
Modified: lucene/dev/branches/branch_3x/solr/solrj/src/java/org/apache/solr/common/SolrException.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/solrj/src/java/org/apache/solr/common/SolrException.java?rev=1232193&r1=1232192&r2=1232193&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/solrj/src/java/org/apache/solr/common/SolrException.java (original)
+++ lucene/dev/branches/branch_3x/solr/solrj/src/java/org/apache/solr/common/SolrException.java Mon Jan 16 22:08:26 2012
@@ -54,17 +54,31 @@ public class SolrException extends Runti
return UNKNOWN;
}
};
-
+
+ /**
+ * @deprecated Logging should now occur from the top-most level, making this unnecessary in 4.x
+ */
+ @Deprecated
public boolean logged=false;
public SolrException(ErrorCode code, String msg) {
this(code, msg, null, false);
}
-
+
+ /**
+ * @deprecated Logging should now occur from the top-most level, making this unnecessary in 4.x.
+ * use {@link #SolrException(ErrorCode, String)}
+ */
+ @Deprecated
public SolrException(ErrorCode code, String msg, boolean alreadyLogged) {
this(code, msg, null, alreadyLogged);
}
+ /**
+ * @deprecated Logging should now occur from the top-most level, making this unnecessary in 4.x
+ * use {@link #SolrException(ErrorCode, String, Throwable)}
+ */
+ @Deprecated
public SolrException(ErrorCode code, String msg, Throwable th, boolean alreadyLogged) {
super(msg,th);
this.code=code.code;
@@ -160,6 +174,9 @@ public class SolrException extends Runti
log.error(stackTrace);
}
+ /**
+ * @deprecated use {@link #log(Logger, String, Throwable)}
+ */
public static void logOnce(Logger log, String msg, Throwable e) {
if (e instanceof SolrException) {
if(((SolrException)e).logged) return;