Fix deprecated warnings.

Number.valueOf instead of new Number

Change-Id: I7f39a94dc97bb2c1283f2146f1bfef35f2f4996d
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/bundles/org.eclipse.releng.build.tools.convert/src/org/eclipse/releng/build/tools/convert/dom/AbstractDOMConverter.java b/bundles/org.eclipse.releng.build.tools.convert/src/org/eclipse/releng/build/tools/convert/dom/AbstractDOMConverter.java
index 4db915c..361a1a7 100644
--- a/bundles/org.eclipse.releng.build.tools.convert/src/org/eclipse/releng/build/tools/convert/dom/AbstractDOMConverter.java
+++ b/bundles/org.eclipse.releng.build.tools.convert/src/org/eclipse/releng/build/tools/convert/dom/AbstractDOMConverter.java
@@ -1,10 +1,12 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2017 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2006, 2018 IBM Corporation and others. 
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
  * 
- * Contributors: IBM Corporation - initial API and implementation
+ * Contributors: 
+ *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 
 package org.eclipse.releng.build.tools.convert.dom;
@@ -117,7 +119,7 @@
                 final ChoiceFormat warningForm = new ChoiceFormat(warningsLimits, warningParts);
                 final String sourceFileName = extractRelativePath(problemsNode.sourceFileName, pluginName);
                 form.setFormatByArgumentIndex(1, warningForm);
-                final Object[] arguments = new Object[] { sourceFileName, new Integer(problemsNode.numberOfErrors), };
+                final Object[] arguments = new Object[] { sourceFileName, Integer.valueOf(problemsNode.numberOfErrors) };
                 writer.write(form.format(arguments));
                 for (int j = 0; j < length; j++) {
                     final ProblemNode problemNode = problemNodes[j];
@@ -160,7 +162,7 @@
                 final ChoiceFormat warningForm = new ChoiceFormat(warningsLimits, warningParts);
                 final String sourceFileName = extractRelativePath(problemsNode.sourceFileName, pluginName);
                 form.setFormatByArgumentIndex(1, warningForm);
-                final Object[] arguments = new Object[] { sourceFileName, new Integer(problemsNode.numberOfWarnings), };
+                final Object[] arguments = new Object[] { sourceFileName, Integer.valueOf(problemsNode.numberOfWarnings)};
                 writer.write(form.format(arguments));
                 for (int j = 0; j < length; j++) {
                     final ProblemNode problemNode = problemNodes[j];
@@ -203,7 +205,7 @@
                 final ChoiceFormat warningForm = new ChoiceFormat(warningsLimits, warningParts);
                 final String sourceFileName = extractRelativePath(problemsNode.sourceFileName, pluginName);
                 form.setFormatByArgumentIndex(1, warningForm);
-                final Object[] arguments = new Object[] { sourceFileName, new Integer(problemsNode.numberOfInfos), };
+                final Object[] arguments = new Object[] { sourceFileName, Integer.valueOf(problemsNode.numberOfInfos) };
                 writer.write(form.format(arguments));
                 for (int j = 0; j < length; j++) {
                     final ProblemNode problemNode = problemNodes[j];
@@ -246,7 +248,7 @@
                 final ChoiceFormat warningForm = new ChoiceFormat(warningsLimits, warningParts);
                 final String sourceFileName = extractRelativePath(problemsNode.sourceFileName, pluginName);
                 form.setFormatByArgumentIndex(1, warningForm);
-                final Object[] arguments = new Object[] { sourceFileName, new Integer(problemsNode.numberOfWarnings), };
+                final Object[] arguments = new Object[] { sourceFileName, Integer.valueOf(problemsNode.numberOfWarnings) };
                 writer.write(form.format(arguments));
                 for (int j = 0; j < length; j++) {
                     final ProblemNode problemNode = problemNodes[j];
@@ -289,7 +291,7 @@
                 final ChoiceFormat warningForm = new ChoiceFormat(warningsLimits, warningParts);
                 final String sourceFileName = extractRelativePath(problemsNode.sourceFileName, pluginName);
                 form.setFormatByArgumentIndex(1, warningForm);
-                final Object[] arguments = new Object[] { sourceFileName, new Integer(problemsNode.numberOfWarnings), };
+                final Object[] arguments = new Object[] { sourceFileName, Integer.valueOf(problemsNode.numberOfWarnings) };
                 writer.write(form.format(arguments));
                 for (int j = 0; j < length; j++) {
                     final ProblemNode problemNode = problemNodes[j];
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/BuildResults.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/BuildResults.java
index 2be34da..9f1d9de 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/BuildResults.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/BuildResults.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -384,7 +384,7 @@
      */
     void readData(DataInputStream stream) throws IOException {
         long timeBuild = stream.readLong();
-        this.date = new Long(timeBuild).toString();
+        this.date = Long.valueOf(timeBuild).toString();
         byte kind = stream.readByte();
         this.baseline = kind == 0;
         if (this.baseline) {
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ComponentResults.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ComponentResults.java
index 51a2a49..48ca27a 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ComponentResults.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ComponentResults.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -117,7 +117,7 @@
 //	String milestoneDate = Util.getMilestoneDate(milestoneIndex);
 	String currentBuildName = null;
 	int buildsLength= builds.length;
-	firstLine.add(0, new Integer(buildsLength));
+	firstLine.add(0, Integer.valueOf(buildsLength));
 	differences.add(firstLine);
 	for (int i=0; i<buildsLength; i++) {
 		List line = new ArrayList();
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/BuildResultsElement.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/BuildResultsElement.java
index 58f77ee..47852c0 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/BuildResultsElement.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/BuildResultsElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -226,7 +226,7 @@
 	    	return "none";
 	    }
 	    if (propKey.equals(P_ID_BUILD_IS_BASELINE))
-	        return new Boolean(buildResults.isBaseline());
+	        return Boolean.valueOf(buildResults.isBaseline());
 	    if (propKey.equals(P_ID_BUILD_FAILURE))
 	        return buildResults.getFailure();
 	    if (baselineResults != null) {
@@ -238,10 +238,10 @@
 			double delta = (baselineValue - buildValue) / baselineValue;
 			if (Double.isNaN(delta)) {
 			    if (propKey.equals(P_ID_BUILD_DELTA) || propKey.equals(P_ID_BUILD_ERROR)) {
-			        return new Double(Double.NaN);
+			        return Double.valueOf(Double.NaN);
 			    }
 			} else  if (propKey.equals(P_ID_BUILD_DELTA)) {
-				return new Double(delta);
+				return Double.valueOf(delta);
 		    } else {
 				long baselineCount = baselineResults.getCount();
 				long currentCount = buildResults.getCount();
@@ -250,7 +250,7 @@
 						double ttestValue = Util.computeTTest(baselineResults, buildResults);
 						int degreeOfFreedom = (int) (baselineResults.getCount()+buildResults.getCount()-2);
 						if (ttestValue >= 0 && StatisticsUtil.getStudentsT(degreeOfFreedom, StatisticsUtil.T90) >= ttestValue) {
-							return new Double(ttestValue);
+							return Double.valueOf(ttestValue);
 						}
 					}
 				    if (propKey.equals(P_ID_BUILD_ERROR)) {
@@ -259,11 +259,11 @@
 						double error = Double.isNaN(baselineError)
 								? currentError / baselineValue
 								: Math.sqrt(baselineError*baselineError + currentError*currentError) / baselineValue;
-				        return new Double(error);
+				        return Double.valueOf(error);
 				    }
 				} else {
 				    if (propKey.equals(P_ID_BUILD_ERROR))
-				        return new Double(-1);
+				        return Double.valueOf(-1);
 				}
 			}
 	    }
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ConfigResultsElement.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ConfigResultsElement.java
index 12e5d49..20bbb2f 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ConfigResultsElement.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ConfigResultsElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -218,16 +218,16 @@
 		return getBaselineBuild();
 	}
 	if (propKey.equals(P_ID_CONFIG_BASELINED)) {
-		return new Boolean(configResults.isBaselined());
+		return Boolean.valueOf(configResults.isBaselined());
 	}
 	if (propKey.equals(P_ID_CONFIG_VALID)) {
-		return new Boolean(configResults.isValid());
+		return Boolean.valueOf(configResults.isValid());
 	}
 	if (propKey.equals(P_ID_CONFIG_DELTA)) {
-		return new Double(configResults.getDelta());
+		return Double.valueOf(configResults.getDelta());
 	}
 	if (propKey.equals(P_ID_CONFIG_ERROR)) {
-		return new Double(configResults.getError());
+		return Double.valueOf(configResults.getError());
 	}
 	if (propKey.equals(P_ID_STATUS_ERROR)) {
 		if (getStatus() == MISSING) {
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/DimResultsElement.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/DimResultsElement.java
index 1859c12..869ec4c 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/DimResultsElement.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/DimResultsElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -118,16 +118,16 @@
     }
     if (propKey.equals(P_ID_COUNT)) {
 	    long count = buildResults.getCount(this.dim.getId());
-	    return new Double(count);
+	    return Double.valueOf(count);
     }
     if (propKey.equals(P_ID_AVERAGE))
-        return new Double(buildResults.getValue(this.dim.getId()));
+        return Double.valueOf(buildResults.getValue(this.dim.getId()));
     if (propKey.equals(P_ID_STDDEV))
-        return new Double(buildResults.getDeviation(this.dim.getId()));
+        return Double.valueOf(buildResults.getDeviation(this.dim.getId()));
     if (propKey.equals(P_ID_ERROR))
-        return new Double(buildResults.getError(this.dim.getId()));
+        return Double.valueOf(buildResults.getError(this.dim.getId()));
     if (propKey.equals(P_ID_HAD_VALUES))
-        return new Boolean(buildResults.hadValues());
+        return Boolean.valueOf(buildResults.hadValues());
     return super.getPropertyValue(propKey);
 }
 
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ResultsElement.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ResultsElement.java
index 691dfb6..fdf3784 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ResultsElement.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ResultsElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -313,12 +313,12 @@
 public Object getPropertyValue(Object propKey) {
 	if (propKey.equals(P_ID_STATUS_INFO)) {
 		if ((getStatus() & INFO_MASK) != 0) {
-			return new Integer(0);
+			return Integer.valueOf(0);
 		}
 	}
 	if (propKey.equals(P_ID_STATUS_WARNING)) {
 		if ((getStatus() & WARNING_MASK) != 0) {
-			return new Integer(0);
+			return Integer.valueOf(0);
 		}
 	}
 	if (propKey.equals(P_ID_STATUS_ERROR)) {