lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject [16/19] lucene-solr:feature/autoscaling: LUCENE-7739: Fix places where we unnecessarily boxed while parsing a numeric value according to FindBugs
Date Thu, 16 Mar 2017 08:12:38 GMT
LUCENE-7739: Fix places where we unnecessarily boxed while parsing a numeric value according
to FindBugs


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/10b7be59
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/10b7be59
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/10b7be59

Branch: refs/heads/feature/autoscaling
Commit: 10b7be59f71de5789e47eee60426018dc342e333
Parents: 9f72056
Author: Mike McCandless <mikemccand@apache.org>
Authored: Wed Mar 15 06:08:10 2017 -0400
Committer: Shalin Shekhar Mangar <shalin@apache.org>
Committed: Thu Mar 16 13:41:50 2017 +0530

----------------------------------------------------------------------
 lucene/CHANGES.txt                                  |  4 ++++
 .../benchmark/byTask/feeds/EnwikiContentSource.java |  2 +-
 .../benchmark/byTask/tasks/ForceMergeTask.java      |  2 +-
 .../test/org/apache/lucene/util/fst/TestFSTs.java   |  4 ++--
 .../apache/lucene/search/join/TestBlockJoin.java    |  2 +-
 .../search/TestDiversifiedTopDocsCollector.java     |  2 +-
 .../lucene/queries/function/TestValueSources.java   |  6 +++---
 .../lucene/queryparser/classic/QueryParserBase.java |  6 +++---
 .../standard/parser/StandardSyntaxParser.java       |  8 ++++----
 .../standard/parser/StandardSyntaxParser.jj         |  8 ++++----
 .../queryparser/surround/parser/QueryParser.java    |  2 +-
 .../queryparser/surround/parser/QueryParser.jj      |  2 +-
 .../xml/builders/PointRangeQueryBuilder.java        | 16 ++++++++--------
 .../lucene/queryparser/classic/TestQueryParser.java |  2 +-
 .../queryparser/xml/CoreParserTestIndexData.java    |  2 +-
 .../analytics/util/RangeEndpointCalculator.java     |  8 ++++----
 .../handler/dataimport/MailEntityProcessor.java     |  2 +-
 .../src/java/org/apache/solr/response/PageTool.java |  2 +-
 .../java/org/apache/solr/handler/IndexFetcher.java  |  6 +++---
 .../org/apache/solr/handler/ReplicationHandler.java |  2 +-
 .../solr/handler/component/RangeFacetRequest.java   |  8 ++++----
 .../org/apache/solr/parser/SolrQueryParserBase.java |  4 ++--
 .../org/apache/solr/search/facet/FacetRange.java    |  8 ++++----
 .../processor/TolerantUpdateProcessorFactory.java   |  2 +-
 .../java/org/apache/solr/util/DateMathParser.java   |  2 +-
 .../java/org/apache/solr/util/SolrPluginUtils.java  |  4 ++--
 .../solr/core/snapshots/TestSolrCloudSnapshots.java |  2 +-
 .../solr/core/snapshots/TestSolrCoreSnapshots.java  |  2 +-
 .../apache/solr/search/TestSolrFieldCacheMBean.java |  4 ++--
 .../apache/solr/search/mlt/CloudMLTQParserTest.java | 14 +++++++-------
 30 files changed, 71 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 62f4763..bd38f3f 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -259,6 +259,10 @@ Optimizations
 * LUCENE-7742: Fix places where we were unboxing and then re-boxing
   according to FindBugs (Daniel Jelinski via Mike McCandless)
 
+* LUCENE-7739: Fix places where we unnecessarily boxed while parsing
+  a numeric value according to FindBugs (Daniel Jelinski via Mike
+  McCandless)
+
 Build
 
 * LUCENE-7653: Update randomizedtesting to version 2.5.0. (Dawid Weiss)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiContentSource.java
----------------------------------------------------------------------
diff --git a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiContentSource.java
b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiContentSource.java
index a933e56..7258476 100644
--- a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiContentSource.java
+++ b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiContentSource.java
@@ -101,7 +101,7 @@ public class EnwikiContentSource extends ContentSource {
 
       buffer.append(original.substring(8, 10));
       buffer.append('-');
-      buffer.append(months[Integer.valueOf(original.substring(5, 7)).intValue() - 1]);
+      buffer.append(months[Integer.parseInt(original.substring(5, 7)) - 1]);
       buffer.append('-');
       buffer.append(original.substring(0, 4));
       buffer.append(' ');

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ForceMergeTask.java
----------------------------------------------------------------------
diff --git a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ForceMergeTask.java
b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ForceMergeTask.java
index 40a3637..292642f 100644
--- a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ForceMergeTask.java
+++ b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ForceMergeTask.java
@@ -46,7 +46,7 @@ public class ForceMergeTask extends PerfTask {
   @Override
   public void setParams(String params) {
     super.setParams(params);
-    maxNumSegments = Double.valueOf(params).intValue();
+    maxNumSegments = (int)Double.parseDouble(params);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java b/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java
index dcce285..7a8e5f5 100644
--- a/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java
+++ b/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java
@@ -624,10 +624,10 @@ public class TestFSTs extends LuceneTestCase {
     int idx = 0;
     while (idx < args.length) {
       if (args[idx].equals("-prune")) {
-        prune = Integer.valueOf(args[1 + idx]);
+        prune = Integer.parseInt(args[1 + idx]);
         idx++;
       } else if (args[idx].equals("-limit")) {
-        limit = Integer.valueOf(args[1 + idx]);
+        limit = Integer.parseInt(args[1 + idx]);
         idx++;
       } else if (args[idx].equals("-utf8")) {
         inputMode = 0;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java b/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
index a13e66f..da3c20e 100644
--- a/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
+++ b/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
@@ -1011,7 +1011,7 @@ public class TestBlockJoin extends LuceneTestCase {
     TopDocs childHits = new TopDocs(0, new ScoreDoc[0], 0f);
     for (ScoreDoc controlHit : controlHits.scoreDocs) {
       Document controlDoc = r.document(controlHit.doc);
-      int parentID = Integer.valueOf(controlDoc.get("parentID"));
+      int parentID = Integer.parseInt(controlDoc.get("parentID"));
       if (parentID != currentParentID) {
         assertEquals(childHitSlot, childHits.scoreDocs.length);
         currentParentID = parentID;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/misc/src/test/org/apache/lucene/search/TestDiversifiedTopDocsCollector.java
----------------------------------------------------------------------
diff --git a/lucene/misc/src/test/org/apache/lucene/search/TestDiversifiedTopDocsCollector.java
b/lucene/misc/src/test/org/apache/lucene/search/TestDiversifiedTopDocsCollector.java
index 043141a..f07793a 100644
--- a/lucene/misc/src/test/org/apache/lucene/search/TestDiversifiedTopDocsCollector.java
+++ b/lucene/misc/src/test/org/apache/lucene/search/TestDiversifiedTopDocsCollector.java
@@ -392,7 +392,7 @@ public class TestDiversifiedTopDocsCollector extends LuceneTestCase {
     for (int i = 0; i < hitsOfThe60s.length; i++) {
       String cols[] = hitsOfThe60s[i].split("\t");
       Record record = new Record(String.valueOf(i), cols[0], cols[1], cols[2],
-          Float.valueOf(cols[3]));
+          Float.parseFloat(cols[3]));
       parsedRecords.put(record.id, record);
       idField.setStringValue(record.id);
       yearField.setStringValue(record.year);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/queries/src/test/org/apache/lucene/queries/function/TestValueSources.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/test/org/apache/lucene/queries/function/TestValueSources.java
b/lucene/queries/src/test/org/apache/lucene/queries/function/TestValueSources.java
index e008293..8008590 100644
--- a/lucene/queries/src/test/org/apache/lucene/queries/function/TestValueSources.java
+++ b/lucene/queries/src/test/org/apache/lucene/queries/function/TestValueSources.java
@@ -123,9 +123,9 @@ public class TestValueSources extends LuceneTestCase {
       document.add(new StringField("id", doc[0], Field.Store.NO));
       document.add(new SortedDocValuesField("id", new BytesRef(doc[0])));
       document.add(new NumericDocValuesField("double", Double.doubleToRawLongBits(Double.parseDouble(doc[1]))));
-      document.add(new NumericDocValuesField("float", Float.floatToRawIntBits(Float.valueOf(doc[2]))));
-      document.add(new NumericDocValuesField("int", Integer.valueOf(doc[3])));
-      document.add(new NumericDocValuesField("long", Long.valueOf(doc[4])));
+      document.add(new NumericDocValuesField("float", Float.floatToRawIntBits(Float.parseFloat(doc[2]))));
+      document.add(new NumericDocValuesField("int", Integer.parseInt(doc[3])));
+      document.add(new NumericDocValuesField("long", Long.parseLong(doc[4])));
       document.add(new StringField("string", doc[5], Field.Store.NO));
       document.add(new SortedDocValuesField("string", new BytesRef(doc[5])));
       document.add(new TextField("text", doc[6], Field.Store.NO));

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
index 3cfa7d0..cff9efa 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
@@ -837,7 +837,7 @@ public abstract class QueryParserBase extends QueryBuilder implements
CommonQuer
     Query q;
     float fms = fuzzyMinSim;
     try {
-      fms = Float.valueOf(fuzzySlop.image.substring(1)).floatValue();
+      fms = Float.parseFloat(fuzzySlop.image.substring(1));
     } catch (Exception ignored) { }
     if(fms < 0.0f){
       throw new ParseException("Minimum similarity for a FuzzyQuery has to be between 0.0f
and 1.0f !");
@@ -853,7 +853,7 @@ public abstract class QueryParserBase extends QueryBuilder implements
CommonQuer
     int s = phraseSlop;  // default
     if (fuzzySlop != null) {
       try {
-        s = Float.valueOf(fuzzySlop.image.substring(1)).intValue();
+        s = (int)Float.parseFloat(fuzzySlop.image.substring(1));
       }
       catch (Exception ignored) { }
     }
@@ -865,7 +865,7 @@ public abstract class QueryParserBase extends QueryBuilder implements
CommonQuer
     if (boost != null) {
       float f = (float) 1.0;
       try {
-        f = Float.valueOf(boost.image).floatValue();
+        f = Float.parseFloat(boost.image);
       }
       catch (Exception ignored) {
     /* Should this be handled somehow? (defaults to "no boost", if

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java
b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java
index ed0d67c..8ba34a6 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java
@@ -466,7 +466,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC
       if (boost != null) {
       float f = (float)1.0;
       try {
-        f = Float.valueOf(boost.image).floatValue();
+        f = Float.parseFloat(boost.image);
         // avoid boosting null queries, such as those caused by stop words
           if (q != null) {
             q = new BoostQueryNode(q, f);
@@ -542,7 +542,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC
        if (fuzzy) {
            float fms = defaultMinSimilarity;
            try {
-            fms = Float.valueOf(fuzzySlop.image.substring(1)).floatValue();
+            fms = Float.parseFloat(fuzzySlop.image.substring(1));
            } catch (Exception ignored) { }
            if(fms < 0.0f){
                 {if (true) throw new ParseException(new MessageImpl(QueryParserMessages.INVALID_SYNTAX_FUZZY_LIMITS));}
@@ -661,7 +661,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC
 
          if (fuzzySlop != null) {
            try {
-             phraseSlop = Float.valueOf(fuzzySlop.image.substring(1)).intValue();
+             phraseSlop = (int)Float.parseFloat(fuzzySlop.image.substring(1));
              q = new SlopQueryNode(q, phraseSlop);
            }
            catch (Exception ignored) {
@@ -679,7 +679,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC
     if (boost != null) {
       float f = (float)1.0;
       try {
-        f = Float.valueOf(boost.image).floatValue();
+        f = Float.parseFloat(boost.image);
         // avoid boosting null queries, such as those caused by stop words
           if (q != null) {
             q = new BoostQueryNode(q, f);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.jj
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.jj
b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.jj
index 868b257..b53bab3 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.jj
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.jj
@@ -391,7 +391,7 @@ QueryNode Clause(CharSequence field) : {
       if (boost != null) {
       float f = (float)1.0;
       try {
-        f = Float.valueOf(boost.image).floatValue();
+        f = Float.parseFloat(boost.image);
         // avoid boosting null queries, such as those caused by stop words
           if (q != null) {
             q = new BoostQueryNode(q, f);
@@ -431,7 +431,7 @@ QueryNode Term(CharSequence field) : {
        if (fuzzy) {
            float fms = defaultMinSimilarity;
            try {
-            fms = Float.valueOf(fuzzySlop.image.substring(1)).floatValue();
+            fms = Float.parseFloat(fuzzySlop.image.substring(1));
            } catch (Exception ignored) { }
            if(fms < 0.0f){
                 throw new ParseException(new MessageImpl(QueryParserMessages.INVALID_SYNTAX_FUZZY_LIMITS));
@@ -472,7 +472,7 @@ QueryNode Term(CharSequence field) : {
 
          if (fuzzySlop != null) {
            try {
-             phraseSlop = Float.valueOf(fuzzySlop.image.substring(1)).intValue();
+             phraseSlop = (int)Float.parseFloat(fuzzySlop.image.substring(1));
              q = new SlopQueryNode(q, phraseSlop);    
            }
            catch (Exception ignored) {
@@ -488,7 +488,7 @@ QueryNode Term(CharSequence field) : {
     if (boost != null) {
       float f = (float)1.0;
       try {
-        f = Float.valueOf(boost.image).floatValue();
+        f = Float.parseFloat(boost.image);
         // avoid boosting null queries, such as those caused by stop words
           if (q != null) {
             q = new BoostQueryNode(q, f);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java
b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java
index bd91f04..f0f4b34 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java
@@ -481,7 +481,7 @@ public class QueryParser implements QueryParserConstants {
       weight = jj_consume_token(NUMBER);
       float f;
       try {
-        f = Float.valueOf(weight.image).floatValue();
+        f = Float.parseFloat(weight.image);
       } catch (Exception floatExc) {
         {if (true) throw new ParseException(boostErrorMessage + weight.image + " (" + floatExc
+ ")");}
       }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj
b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj
index d63189d..857cca1 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj
@@ -460,7 +460,7 @@ void OptionalWeights(SrndQuery q) : {
   ( <CARAT> weight=<NUMBER> {
       float f;
       try {
-        f = Float.valueOf(weight.image).floatValue();
+        f = Float.parseFloat(weight.image);
       } catch (Exception floatExc) {
         throw new ParseException(boostErrorMessage + weight.image + " (" + floatExc + ")");
       }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/PointRangeQueryBuilder.java
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/PointRangeQueryBuilder.java
b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/PointRangeQueryBuilder.java
index 82f7039..1297ad4 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/PointRangeQueryBuilder.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/PointRangeQueryBuilder.java
@@ -79,20 +79,20 @@ public class PointRangeQueryBuilder implements QueryBuilder {
     try {
       if (type.equalsIgnoreCase("int")) {
         return IntPoint.newRangeQuery(field,
-            (lowerTerm == null ? Integer.MIN_VALUE : Integer.valueOf(lowerTerm)),
-            (upperTerm == null ? Integer.MAX_VALUE : Integer.valueOf(upperTerm)));
+            (lowerTerm == null ? Integer.MIN_VALUE : Integer.parseInt(lowerTerm)),
+            (upperTerm == null ? Integer.MAX_VALUE : Integer.parseInt(upperTerm)));
       } else if (type.equalsIgnoreCase("long")) {
         return LongPoint.newRangeQuery(field,
-            (lowerTerm == null ? Long.MIN_VALUE : Long.valueOf(lowerTerm)),
-            (upperTerm == null ? Long.MAX_VALUE : Long.valueOf(upperTerm)));
+            (lowerTerm == null ? Long.MIN_VALUE : Long.parseLong(lowerTerm)),
+            (upperTerm == null ? Long.MAX_VALUE : Long.parseLong(upperTerm)));
       } else if (type.equalsIgnoreCase("double")) {
         return DoublePoint.newRangeQuery(field,
-            (lowerTerm == null ? Double.NEGATIVE_INFINITY : Double.valueOf(lowerTerm)),
-            (upperTerm == null ? Double.POSITIVE_INFINITY : Double.valueOf(upperTerm)));
+            (lowerTerm == null ? Double.NEGATIVE_INFINITY : Double.parseDouble(lowerTerm)),
+            (upperTerm == null ? Double.POSITIVE_INFINITY : Double.parseDouble(upperTerm)));
       } else if (type.equalsIgnoreCase("float")) {
         return FloatPoint.newRangeQuery(field,
-            (lowerTerm == null ? Float.NEGATIVE_INFINITY : Float.valueOf(lowerTerm)),
-            (upperTerm == null ? Float.POSITIVE_INFINITY : Float.valueOf(upperTerm)));
+            (lowerTerm == null ? Float.NEGATIVE_INFINITY : Float.parseFloat(lowerTerm)),
+            (upperTerm == null ? Float.POSITIVE_INFINITY : Float.parseFloat(upperTerm)));
       } else {
         throw new ParserException("type attribute must be one of: [long, int, double, float]");
       }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/queryparser/src/test/org/apache/lucene/queryparser/classic/TestQueryParser.java
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/classic/TestQueryParser.java
b/lucene/queryparser/src/test/org/apache/lucene/queryparser/classic/TestQueryParser.java
index e8533e0..3450794 100644
--- a/lucene/queryparser/src/test/org/apache/lucene/queryparser/classic/TestQueryParser.java
+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/classic/TestQueryParser.java
@@ -193,7 +193,7 @@ public class TestQueryParser extends QueryParserTestBase {
         if(fuzzySlop.image.endsWith("€")) {
           float fms = fuzzyMinSim;
           try {
-            fms = Float.valueOf(fuzzySlop.image.substring(1, fuzzySlop.image.length()-1)).floatValue();
+            fms = Float.parseFloat(fuzzySlop.image.substring(1, fuzzySlop.image.length()-1));
           } catch (Exception ignored) { }
           float value = Float.parseFloat(termImage);
           return getRangeQuery(qfield, Float.toString(value-fms/2.f), Float.toString(value+fms/2.f),
true, true);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/CoreParserTestIndexData.java
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/CoreParserTestIndexData.java
b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/CoreParserTestIndexData.java
index 5fa1523..4756888 100644
--- a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/CoreParserTestIndexData.java
+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/CoreParserTestIndexData.java
@@ -52,7 +52,7 @@ class CoreParserTestIndexData implements Closeable {
       Document doc = new Document();
       doc.add(LuceneTestCase.newTextField("date", date, Field.Store.YES));
       doc.add(LuceneTestCase.newTextField("contents", content, Field.Store.YES));
-      doc.add(new IntPoint("date3", Integer.valueOf(date)));
+      doc.add(new IntPoint("date3", Integer.parseInt(date)));
       writer.addDocument(doc);
       line = d.readLine();
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/contrib/analytics/src/java/org/apache/solr/analytics/util/RangeEndpointCalculator.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/util/RangeEndpointCalculator.java
b/solr/contrib/analytics/src/java/org/apache/solr/analytics/util/RangeEndpointCalculator.java
index c3c2088..fa29022 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/util/RangeEndpointCalculator.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/util/RangeEndpointCalculator.java
@@ -265,7 +265,7 @@ public abstract class RangeEndpointCalculator<T extends Comparable<T>>
{
     
     @Override
     public Float parseAndAddGap(Float value, String gap) {
-      return new Float(value.floatValue() + Float.valueOf(gap).floatValue());
+      return new Float(value.floatValue() + Float.parseFloat(gap));
     }
     
   }
@@ -281,7 +281,7 @@ public abstract class RangeEndpointCalculator<T extends Comparable<T>>
{
     
     @Override
     public Double parseAndAddGap(Double value, String gap) {
-      return new Double(value.doubleValue() + Double.valueOf(gap).doubleValue());
+      return new Double(value.doubleValue() + Double.parseDouble(gap));
     }
     
   }
@@ -297,7 +297,7 @@ public abstract class RangeEndpointCalculator<T extends Comparable<T>>
{
     
     @Override
     public Integer parseAndAddGap(Integer value, String gap) {
-      return new Integer(value.intValue() + Integer.valueOf(gap).intValue());
+      return new Integer(value.intValue() + Integer.parseInt(gap));
     }
     
   }
@@ -313,7 +313,7 @@ public abstract class RangeEndpointCalculator<T extends Comparable<T>>
{
     
     @Override
     public Long parseAndAddGap(Long value, String gap) {
-      return new Long(value.longValue() + Long.valueOf(gap).longValue());
+      return new Long(value.longValue() + Long.parseLong(gap));
     }
     
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
----------------------------------------------------------------------
diff --git a/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
b/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
index 0258c33..7545eac 100644
--- a/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
+++ b/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
@@ -843,7 +843,7 @@ public class MailEntityProcessor extends EntityProcessorBase {
       String val = context.getEntityAttribute(prop);
       if (val != null) {
         val = context.replaceTokens(val);
-        v = Integer.valueOf(val);
+        v = Integer.parseInt(val);
       }
     } catch (NumberFormatException e) {
       // do nothing

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java
----------------------------------------------------------------------
diff --git a/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java b/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java
index 1947f36..48dc826 100644
--- a/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java
+++ b/solr/contrib/velocity/src/java/org/apache/solr/response/PageTool.java
@@ -38,7 +38,7 @@ public class PageTool {
     String rows = request.getParams().get("rows");
 
     if (rows != null) {
-      results_per_page = new Integer(rows);
+      results_per_page = Integer.parseInt(rows);
     }
     //TODO: Handle group by results
     Object docs = response.getResponse();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
index a07496f..33e8091 100644
--- a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
+++ b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
@@ -697,7 +697,7 @@ public class IndexFetcher {
 
       int indexCount = 1, confFilesCount = 1;
       if (props.containsKey(TIMES_INDEX_REPLICATED)) {
-        indexCount = Integer.valueOf(props.getProperty(TIMES_INDEX_REPLICATED)) + 1;
+        indexCount = Integer.parseInt(props.getProperty(TIMES_INDEX_REPLICATED)) + 1;
       }
       StringBuilder sb = readToStringBuilder(replicationTime, props.getProperty(INDEX_REPLICATED_AT_LIST));
       props.setProperty(INDEX_REPLICATED_AT_LIST, sb.toString());
@@ -708,7 +708,7 @@ public class IndexFetcher {
         props.setProperty(CONF_FILES_REPLICATED, confFiles.toString());
         props.setProperty(CONF_FILES_REPLICATED_AT, String.valueOf(replicationTime));
         if (props.containsKey(TIMES_CONFIG_REPLICATED)) {
-          confFilesCount = Integer.valueOf(props.getProperty(TIMES_CONFIG_REPLICATED)) +
1;
+          confFilesCount = Integer.parseInt(props.getProperty(TIMES_CONFIG_REPLICATED)) +
1;
         }
         props.setProperty(TIMES_CONFIG_REPLICATED, String.valueOf(confFilesCount));
       }
@@ -717,7 +717,7 @@ public class IndexFetcher {
       if (!successfulInstall) {
         int numFailures = 1;
         if (props.containsKey(TIMES_FAILED)) {
-          numFailures = Integer.valueOf(props.getProperty(TIMES_FAILED)) + 1;
+          numFailures = Integer.parseInt(props.getProperty(TIMES_FAILED)) + 1;
         }
         props.setProperty(TIMES_FAILED, String.valueOf(numFailures));
         props.setProperty(REPLICATION_FAILED_AT, String.valueOf(replicationTime));

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
index e40b2c3..4f6a408 100644
--- a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
@@ -1075,7 +1075,7 @@ public class ReplicationHandler extends RequestHandlerBase implements
SolrCoreAw
       String ss[] = s.split(",");
       List<String> l = new ArrayList<>();
       for (String s1 : ss) {
-        l.add(new Date(Long.valueOf(s1)).toString());
+        l.add(new Date(Long.parseLong(s1)).toString());
       }
       nl.add(key, l);
     } else {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/core/src/java/org/apache/solr/handler/component/RangeFacetRequest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/RangeFacetRequest.java b/solr/core/src/java/org/apache/solr/handler/component/RangeFacetRequest.java
index 3ac7300..c234866 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/RangeFacetRequest.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/RangeFacetRequest.java
@@ -659,7 +659,7 @@ public class RangeFacetRequest extends FacetComponent.FacetBase {
 
     @Override
     public Float parseAndAddGap(Float value, String gap) {
-      return new Float(value.floatValue() + Float.valueOf(gap).floatValue());
+      return new Float(value.floatValue() + Float.parseFloat(gap));
     }
   }
 
@@ -677,7 +677,7 @@ public class RangeFacetRequest extends FacetComponent.FacetBase {
 
     @Override
     public Double parseAndAddGap(Double value, String gap) {
-      return new Double(value.doubleValue() + Double.valueOf(gap).doubleValue());
+      return new Double(value.doubleValue() + Double.parseDouble(gap));
     }
   }
 
@@ -695,7 +695,7 @@ public class RangeFacetRequest extends FacetComponent.FacetBase {
 
     @Override
     public Integer parseAndAddGap(Integer value, String gap) {
-      return new Integer(value.intValue() + Integer.valueOf(gap).intValue());
+      return new Integer(value.intValue() + Integer.parseInt(gap));
     }
   }
 
@@ -713,7 +713,7 @@ public class RangeFacetRequest extends FacetComponent.FacetBase {
 
     @Override
     public Long parseAndAddGap(Long value, String gap) {
-      return new Long(value.longValue() + Long.valueOf(gap).longValue());
+      return new Long(value.longValue() + Long.parseLong(gap));
     }
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java b/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java
index 84ffcb9..cb3b1ee 100644
--- a/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java
+++ b/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java
@@ -623,7 +623,7 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
     } else if (fuzzy) {
       float fms = fuzzyMinSim;
       try {
-        fms = Float.valueOf(fuzzySlop.image.substring(1)).floatValue();
+        fms = Float.parseFloat(fuzzySlop.image.substring(1));
       } catch (Exception ignored) { }
       if(fms < 0.0f){
         throw new SyntaxError("Minimum similarity for a FuzzyQuery has to be between 0.0f
and 1.0f !");
@@ -644,7 +644,7 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
     int s = phraseSlop;  // default
     if (fuzzySlop != null) {
       try {
-        s = Float.valueOf(fuzzySlop.image.substring(1)).intValue();
+        s = (int)Float.parseFloat(fuzzySlop.image.substring(1));
       }
       catch (Exception ignored) { }
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/core/src/java/org/apache/solr/search/facet/FacetRange.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetRange.java b/solr/core/src/java/org/apache/solr/search/facet/FacetRange.java
index 276af5f..a50fa2c 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/FacetRange.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetRange.java
@@ -499,7 +499,7 @@ class FacetRangeProcessor extends FacetProcessor<FacetRange> {
     }
     @Override
     public Float parseAndAddGap(Comparable value, String gap) {
-      return new Float(((Number)value).floatValue() + Float.valueOf(gap).floatValue());
+      return new Float(((Number)value).floatValue() + Float.parseFloat(gap));
     }
   }
   private static class DoubleCalc extends Calc {
@@ -520,7 +520,7 @@ class FacetRangeProcessor extends FacetProcessor<FacetRange> {
     }
     @Override
     public Double parseAndAddGap(Comparable value, String gap) {
-      return new Double(((Number)value).doubleValue() + Double.valueOf(gap).doubleValue());
+      return new Double(((Number)value).doubleValue() + Double.parseDouble(gap));
     }
   }
   private static class IntCalc extends Calc {
@@ -532,7 +532,7 @@ class FacetRangeProcessor extends FacetProcessor<FacetRange> {
     }
     @Override
     public Integer parseAndAddGap(Comparable value, String gap) {
-      return new Integer(((Number)value).intValue() + Integer.valueOf(gap).intValue());
+      return new Integer(((Number)value).intValue() + Integer.parseInt(gap));
     }
   }
   private static class LongCalc extends Calc {
@@ -544,7 +544,7 @@ class FacetRangeProcessor extends FacetProcessor<FacetRange> {
     }
     @Override
     public Long parseAndAddGap(Comparable value, String gap) {
-      return new Long(((Number)value).longValue() + Long.valueOf(gap).longValue());
+      return new Long(((Number)value).longValue() + Long.parseLong(gap));
     }
   }
   private static class DateCalc extends Calc {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/core/src/java/org/apache/solr/update/processor/TolerantUpdateProcessorFactory.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/processor/TolerantUpdateProcessorFactory.java
b/solr/core/src/java/org/apache/solr/update/processor/TolerantUpdateProcessorFactory.java
index b642d89..8ee5ff2 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/TolerantUpdateProcessorFactory.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/TolerantUpdateProcessorFactory.java
@@ -99,7 +99,7 @@ public class TolerantUpdateProcessorFactory extends UpdateRequestProcessorFactor
     Object maxErrorsObj = args.get(MAX_ERRORS_PARAM); 
     if (maxErrorsObj != null) {
       try {
-        defaultMaxErrors = Integer.valueOf(maxErrorsObj.toString());
+        defaultMaxErrors = Integer.parseInt(maxErrorsObj.toString());
       } catch (Exception e) {
         throw new SolrException(ErrorCode.SERVER_ERROR, "Unnable to parse maxErrors parameter:
" + maxErrorsObj, e);
       }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/core/src/java/org/apache/solr/util/DateMathParser.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/util/DateMathParser.java b/solr/core/src/java/org/apache/solr/util/DateMathParser.java
index 643fde8..2124d1d 100644
--- a/solr/core/src/java/org/apache/solr/util/DateMathParser.java
+++ b/solr/core/src/java/org/apache/solr/util/DateMathParser.java
@@ -381,7 +381,7 @@ public class DateMathParser  {
         }
         int val = 0;
         try {
-          val = Integer.valueOf(ops[pos++]);
+          val = Integer.parseInt(ops[pos++]);
         } catch (NumberFormatException e) {
           throw new ParseException
             ("Not a Number: \"" + ops[pos-1] + "\"", pos-1);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java b/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java
index 9386600..4445e07 100644
--- a/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java
+++ b/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java
@@ -583,8 +583,8 @@ public class SolrPluginUtils {
         String[] fieldAndSlopVsBoost = caratPattern.split(s);
         String[] fieldVsSlop = tildePattern.split(fieldAndSlopVsBoost[0]);
         String field = fieldVsSlop[0];
-        int slop  = (2 == fieldVsSlop.length) ? Integer.valueOf(fieldVsSlop[1]) : defaultSlop;
-        Float boost = (1 == fieldAndSlopVsBoost.length) ? 1  : Float.valueOf(fieldAndSlopVsBoost[1]);
+        int slop  = (2 == fieldVsSlop.length) ? Integer.parseInt(fieldVsSlop[1]) : defaultSlop;
+        float boost = (1 == fieldAndSlopVsBoost.length) ? 1  : Float.parseFloat(fieldAndSlopVsBoost[1]);
         FieldParams fp = new FieldParams(field,wordGrams,slop,boost);
         out.add(fp);
       }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCloudSnapshots.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCloudSnapshots.java
b/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCloudSnapshots.java
index bb56a94..9503ee4 100644
--- a/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCloudSnapshots.java
+++ b/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCloudSnapshots.java
@@ -295,7 +295,7 @@ public class TestSolrCloudSnapshots extends SolrCloudTestCase {
     for(int i = 0 ; i < apiResult.size(); i++) {
       String commitName = apiResult.getName(i);
       String indexDirPath = (String)((NamedList)apiResult.get(commitName)).get(SolrSnapshotManager.INDEX_DIR_PATH);
-      long genNumber = Long.valueOf((String)((NamedList)apiResult.get(commitName)).get(SolrSnapshotManager.GENERATION_NUM));
+      long genNumber = Long.parseLong((String)((NamedList)apiResult.get(commitName)).get(SolrSnapshotManager.GENERATION_NUM));
       result.add(new SnapshotMetaData(commitName, indexDirPath, genNumber));
     }
     return result;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCoreSnapshots.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCoreSnapshots.java
b/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCoreSnapshots.java
index da6dbac..7a9b0bb 100644
--- a/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCoreSnapshots.java
+++ b/solr/core/src/test/org/apache/solr/core/snapshots/TestSolrCoreSnapshots.java
@@ -293,7 +293,7 @@ public class TestSolrCoreSnapshots extends SolrCloudTestCase {
     for(int i = 0 ; i < apiResult.size(); i++) {
       String commitName = apiResult.getName(i);
       String indexDirPath = (String)((NamedList)apiResult.get(commitName)).get("indexDirPath");
-      long genNumber = Long.valueOf((String)((NamedList)apiResult.get(commitName)).get("generation"));
+      long genNumber = Long.parseLong((String)((NamedList)apiResult.get(commitName)).get("generation"));
       result.add(new SnapshotMetaData(commitName, indexDirPath, genNumber));
     }
     return result;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/core/src/test/org/apache/solr/search/TestSolrFieldCacheMBean.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/TestSolrFieldCacheMBean.java b/solr/core/src/test/org/apache/solr/search/TestSolrFieldCacheMBean.java
index 35bdec6..d11c919 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSolrFieldCacheMBean.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSolrFieldCacheMBean.java
@@ -68,7 +68,7 @@ public class TestSolrFieldCacheMBean extends SolrTestCaseJ4 {
   private void assertEntryListIncluded(boolean checkJmx) {
     SolrFieldCacheMBean mbean = new SolrFieldCacheMBean();
     NamedList stats = checkJmx ? mbean.getStatisticsForJmx() : mbean.getStatistics();
-    assert(new Integer(stats.get("entries_count").toString()) > 0);
+    assert(Integer.parseInt(stats.get("entries_count").toString()) > 0);
     assertNotNull(stats.get("total_size"));
     assertNotNull(stats.get("entry#0"));
   }
@@ -76,7 +76,7 @@ public class TestSolrFieldCacheMBean extends SolrTestCaseJ4 {
   private void assertEntryListNotIncluded(boolean checkJmx) {
     SolrFieldCacheMBean mbean = new SolrFieldCacheMBean();
     NamedList stats = checkJmx ? mbean.getStatisticsForJmx() : mbean.getStatistics();
-    assert(new Integer(stats.get("entries_count").toString()) > 0);
+    assert(Integer.parseInt(stats.get("entries_count").toString()) > 0);
     assertNull(stats.get("total_size"));
     assertNull(stats.get("entry#0"));
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/10b7be59/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java b/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java
index e3a8d7b..f502f24 100644
--- a/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java
+++ b/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java
@@ -102,7 +102,7 @@ public class CloudMLTQParserTest extends SolrCloudTestCase {
     int[] actualIds = new int[10];
     int i = 0;
     for (SolrDocument solrDocument : solrDocuments) {
-      actualIds[i++] = Integer.valueOf(String.valueOf(solrDocument.getFieldValue("id")));
+      actualIds[i++] = Integer.parseInt(String.valueOf(solrDocument.getFieldValue("id")));
     }
     assertArrayEquals(expectedIds, actualIds);
 
@@ -117,7 +117,7 @@ public class CloudMLTQParserTest extends SolrCloudTestCase {
     int[] actualIds = new int[solrDocuments.size()];
     int i = 0;
     for (SolrDocument solrDocument : solrDocuments) {
-      actualIds[i++] = Integer.valueOf(String.valueOf(solrDocument.getFieldValue("id")));
+      actualIds[i++] = Integer.parseInt(String.valueOf(solrDocument.getFieldValue("id")));
     }
     assertArrayEquals(expectedIds, actualIds);
 
@@ -127,7 +127,7 @@ public class CloudMLTQParserTest extends SolrCloudTestCase {
     actualIds = new int[solrDocuments.size()];
     i = 0;
     for (SolrDocument solrDocument : solrDocuments) {
-      actualIds[i++] = Integer.valueOf(String.valueOf(solrDocument.getFieldValue("id")));
+      actualIds[i++] = Integer.parseInt(String.valueOf(solrDocument.getFieldValue("id")));
     }
     System.out.println("DEBUG ACTUAL IDS 1: " + Arrays.toString(actualIds));
     assertArrayEquals(expectedIds, actualIds);
@@ -138,7 +138,7 @@ public class CloudMLTQParserTest extends SolrCloudTestCase {
     actualIds = new int[solrDocuments.size()];
     i = 0;
     for (SolrDocument solrDocument : solrDocuments) {
-      actualIds[i++] = Integer.valueOf(String.valueOf(solrDocument.getFieldValue("id")));
+      actualIds[i++] = Integer.parseInt(String.valueOf(solrDocument.getFieldValue("id")));
     }
     System.out.println("DEBUG ACTUAL IDS 2: " + Arrays.toString(actualIds));
     assertArrayEquals(expectedIds, actualIds);
@@ -154,7 +154,7 @@ public class CloudMLTQParserTest extends SolrCloudTestCase {
     int[] actualIds = new int[solrDocuments.size()];
     int i = 0;
     for (SolrDocument solrDocument : solrDocuments) {
-      actualIds[i++] = Integer.valueOf(String.valueOf(solrDocument.getFieldValue("id")));
+      actualIds[i++] = Integer.parseInt(String.valueOf(solrDocument.getFieldValue("id")));
     }
     assertArrayEquals(expectedIds, actualIds);
 
@@ -184,7 +184,7 @@ public class CloudMLTQParserTest extends SolrCloudTestCase {
     int[] actualIds = new int[solrDocuments.size()];
     int i = 0;
     for (SolrDocument solrDocument : solrDocuments) {
-      actualIds[i++] = Integer.valueOf(String.valueOf(solrDocument.getFieldValue("id")));
+      actualIds[i++] = Integer.parseInt(String.valueOf(solrDocument.getFieldValue("id")));
     }
 
     assertArrayEquals(expectedIds, actualIds);
@@ -236,7 +236,7 @@ public class CloudMLTQParserTest extends SolrCloudTestCase {
     int i = 0;
     StringBuilder sb = new StringBuilder();
     for (SolrDocument solrDocument : solrDocuments) {
-      actualIds[i++] =  Integer.valueOf(String.valueOf(solrDocument.getFieldValue("id")));
+      actualIds[i++] =  Integer.parseInt(String.valueOf(solrDocument.getFieldValue("id")));
       sb.append(actualIds[i-1]).append(", ");
     }
     assertArrayEquals(expectedIds, actualIds);


Mime
View raw message