SOLR-135: previous build.xml didn't partition core/common code properly which ment we didn't notice CommonParams and DisMaxParams were using SolrCore for logging.

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@547455 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2007-06-14 23:54:23 +00:00
parent da41728b8e
commit 18d21bd455
3 changed files with 24 additions and 18 deletions

View File

@ -107,6 +107,7 @@
source="${java.compat.version}"
debug="on"
encoding="utf8"
sourcepath=""
classpathref="@{classpathref}">
<nested />
</javac>
@ -202,8 +203,11 @@
<solr-javac destdir="${dest}/common"
classpathref="compile.classpath">
<src path="${src}/java" />
<include name="org/apache/solr/common/**" />
<src>
<dirset dir="${src}/java">
<include name="org/apache/solr/common/**" />
</dirset>
</src>
</solr-javac>
</target>

View File

@ -18,10 +18,8 @@
package org.apache.solr.common.params;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.core.SolrCore;
import java.util.logging.Logger;
/**
* A collection on common params, both for Plugin initialization and
@ -30,6 +28,8 @@ import org.apache.solr.core.SolrCore;
@Deprecated
public class CommonParams {
public static Logger log = Logger.getLogger(CommonParams.class.getName());
@Deprecated
public static String FL = "fl";
/** default query field */
@ -95,7 +95,7 @@ public class CommonParams {
if (tmp instanceof String) {
fl = tmp.toString();
} else {
SolrCore.log.severe("init param is not a str: " + SolrParams.FL);
log.severe("init param is not a str: " + SolrParams.FL);
}
}
@ -104,7 +104,7 @@ public class CommonParams {
if (tmp instanceof String) {
df = tmp.toString();
} else {
SolrCore.log.severe("init param is not a str: " + SolrParams.DF);
log.severe("init param is not a str: " + SolrParams.DF);
}
}
@ -113,7 +113,7 @@ public class CommonParams {
if (tmp instanceof String) {
debugQuery = tmp.toString();
} else {
SolrCore.log.severe("init param is not a str: " + SolrParams.DEBUG_QUERY);
log.severe("init param is not a str: " + SolrParams.DEBUG_QUERY);
}
}
@ -122,7 +122,7 @@ public class CommonParams {
if (tmp instanceof String) {
explainOther = tmp.toString();
} else {
SolrCore.log.severe("init param is not a str: " + SolrParams.EXPLAIN_OTHER);
log.severe("init param is not a str: " + SolrParams.EXPLAIN_OTHER);
}
}

View File

@ -18,8 +18,8 @@
package org.apache.solr.common.params;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.core.SolrCore;
import java.util.logging.Logger;
/**
@ -28,6 +28,8 @@ import org.apache.solr.core.SolrCore;
*/
public class DisMaxParams extends CommonParams {
public static Logger log = Logger.getLogger(CommonParams.class.getName());
/** query and init param for tiebreaker value */
public static String TIE = "tie";
/** query and init param for query fields */
@ -130,7 +132,7 @@ public class DisMaxParams extends CommonParams {
if (tmp instanceof Float) {
tiebreaker = ((Float)tmp).floatValue();
} else {
SolrCore.log.severe("init param is not a float: " + TIE);
log.severe("init param is not a float: " + TIE);
}
}
@ -139,7 +141,7 @@ public class DisMaxParams extends CommonParams {
if (tmp instanceof String) {
qf = tmp.toString();
} else {
SolrCore.log.severe("init param is not a str: " + QF);
log.severe("init param is not a str: " + QF);
}
}
@ -148,7 +150,7 @@ public class DisMaxParams extends CommonParams {
if (tmp instanceof String) {
pf = tmp.toString();
} else {
SolrCore.log.severe("init param is not a str: " + PF);
log.severe("init param is not a str: " + PF);
}
}
@ -158,7 +160,7 @@ public class DisMaxParams extends CommonParams {
if (tmp instanceof String) {
mm = tmp.toString();
} else {
SolrCore.log.severe("init param is not a str: " + MM);
log.severe("init param is not a str: " + MM);
}
}
@ -167,7 +169,7 @@ public class DisMaxParams extends CommonParams {
if (tmp instanceof Integer) {
pslop = ((Integer)tmp).intValue();
} else {
SolrCore.log.severe("init param is not an int: " + PS);
log.severe("init param is not an int: " + PS);
}
}
@ -176,7 +178,7 @@ public class DisMaxParams extends CommonParams {
if (tmp instanceof String) {
bq = tmp.toString();
} else {
SolrCore.log.severe("init param is not a str: " + BQ);
log.severe("init param is not a str: " + BQ);
}
}
@ -185,7 +187,7 @@ public class DisMaxParams extends CommonParams {
if (tmp instanceof String) {
bf = tmp.toString();
} else {
SolrCore.log.severe("init param is not a str: " + BF);
log.severe("init param is not a str: " + BF);
}
}
@ -194,7 +196,7 @@ public class DisMaxParams extends CommonParams {
if (tmp instanceof String) {
fq = tmp.toString();
} else {
SolrCore.log.severe("init param is not a str: " + FQ);
log.severe("init param is not a str: " + FQ);
}
}