diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-16 12:51:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-17 08:26:19 +0200 |
commit | 12b01b920f42666db84c8be1c9b6fd89a86eea4e (patch) | |
tree | 35a462009765a838e1381fe5d7614caed450daef /qadevOOo | |
parent | 3beae0f05d1c8c976dfcebe02c8830752d708c74 (diff) |
java: no need to call String.valueOf to append to a String
Change-Id: I5ef45b971d24dde814ab8cbb2e9503d9da4f0d73
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/convwatch/ConvWatch.java | 4 | ||||
-rw-r--r-- | qadevOOo/runner/convwatch/INIOutputter.java | 6 | ||||
-rw-r--r-- | qadevOOo/runner/convwatch/OfficePrint.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/convwatch/PRNCompare.java | 4 | ||||
-rw-r--r-- | qadevOOo/runner/convwatch/PerformanceContainer.java | 10 | ||||
-rw-r--r-- | qadevOOo/runner/convwatch/StatusHelper.java | 4 | ||||
-rw-r--r-- | qadevOOo/runner/convwatch/TimeHelper.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/JPEGComparator.java | 6 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/JPEGCreator.java | 4 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/PerformanceContainer.java | 14 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/TimeHelper.java | 2 | ||||
-rw-r--r-- | qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java | 2 |
13 files changed, 31 insertions, 31 deletions
diff --git a/qadevOOo/runner/convwatch/ConvWatch.java b/qadevOOo/runner/convwatch/ConvWatch.java index 4d23bae8e09b..b1591d40ac09 100644 --- a/qadevOOo/runner/convwatch/ConvWatch.java +++ b/qadevOOo/runner/convwatch/ConvWatch.java @@ -217,7 +217,7 @@ public class ConvWatch boolean bResultIsOk = true; // result over all pages for (int i=0;i<aList.length; i++) { - INIoutput.writeSection("page" + String.valueOf(i + 1)); // list start at point 0, but this is page 1 and so on... current_page = (i + 1) + INIoutput.writeSection("page" + (i + 1)); // list start at point 0, but this is page 1 and so on... current_page = (i + 1) aList[i].printStatus(); boolean bCurrentResult = true; // result over exact one page @@ -276,7 +276,7 @@ public class ConvWatch for (int i=0;i<aDiffDiffList.length; i++) { - INIoutput.writeSection("page" + String.valueOf(i + 1)); // list start at point 0, but this is page 1 and so on... current_page = (i + 1) + INIoutput.writeSection("page" + (i + 1)); // list start at point 0, but this is page 1 and so on... current_page = (i + 1) boolean bCurrentResult = (aDiffDiffList[i].nDiffStatus == StatusHelper.DIFF_NO_DIFFERENCES); // logic: nDiff==0 = true if there is no difference INIoutput.checkDiffDiffLine(aDiffDiffList[i], bCurrentResult); diff --git a/qadevOOo/runner/convwatch/INIOutputter.java b/qadevOOo/runner/convwatch/INIOutputter.java index 3c9745fbe198..416519b33ce7 100644 --- a/qadevOOo/runner/convwatch/INIOutputter.java +++ b/qadevOOo/runner/convwatch/INIOutputter.java @@ -120,7 +120,7 @@ public class INIOutputter m_aOut.write( "newgfx=" + _aStatus.m_sNewGfx + ls); m_aOut.write( "diffgfx=" + _aStatus.m_sDiffGfx + ls); - String sPercent = String.valueOf(_aStatus.nPercent) + "%"; + String sPercent = _aStatus.nPercent + "%"; if (_aStatus.nPercent > 0 && _aStatus.nPercent < 5) { sPercent += " (less 5% is ok)"; @@ -138,7 +138,7 @@ public class INIOutputter m_aOut.write( "new_BM_gfx=" + _aStatus.m_sNew_BM_Gfx + ls); m_aOut.write( "diff_BM_gfx=" + _aStatus.m_sDiff_BM_Gfx + ls); - String sPercent2 = String.valueOf(_aStatus.nPercent2) + "%"; + String sPercent2 = _aStatus.nPercent2 + "%"; if (_aStatus.nPercent2 > 0 && _aStatus.nPercent2 < 5) { sPercent2 += " (less 5% is ok)"; @@ -175,7 +175,7 @@ public class INIOutputter m_aOut.write( "newgfx=" + _aStatus.m_sNewGfx + ls); m_aOut.write( "diffgfx=" + _aStatus.m_sDiffGfx + ls); - String sPercent = String.valueOf(_aStatus.nPercent) + "%"; + String sPercent = _aStatus.nPercent + "%"; m_aOut.write("percent=" + sPercent + ls); // is the check positiv, in a defined range diff --git a/qadevOOo/runner/convwatch/OfficePrint.java b/qadevOOo/runner/convwatch/OfficePrint.java index 432620005573..ada4cb917e91 100644 --- a/qadevOOo/runner/convwatch/OfficePrint.java +++ b/qadevOOo/runner/convwatch/OfficePrint.java @@ -545,7 +545,7 @@ public class OfficePrint { String sPages = ""; if (_aGTA.getMaxPages() > 0) { - sPages = "1-" + String.valueOf(_aGTA.getMaxPages()); + sPages = "1-" + _aGTA.getMaxPages(); } if (_aGTA.getOnlyPages().length() != 0) { diff --git a/qadevOOo/runner/convwatch/PRNCompare.java b/qadevOOo/runner/convwatch/PRNCompare.java index 049c7e2a4d9d..bc542752cc2b 100644 --- a/qadevOOo/runner/convwatch/PRNCompare.java +++ b/qadevOOo/runner/convwatch/PRNCompare.java @@ -167,7 +167,7 @@ public class PRNCompare "-dNOPROMPT", "-dBATCH", "-sDEVICE=jpeg", - "-r" + String.valueOf(_nResolutionInDPI), + "-r" + _nResolutionInDPI, "-dNOPAUSE", "-sOutputFile=" + sJPGFilename, sOriginalFile @@ -497,7 +497,7 @@ public class PRNCompare } int nPercent = Math.abs(nNotBlackCount_DiffGraphic * 100 / nMinNotWhiteCount); - GlobalLogWriter.get().println( "Graphics check, pixel based:" + String.valueOf(nPercent) + "% pixel differ "); + GlobalLogWriter.get().println( "Graphics check, pixel based:" + nPercent + "% pixel differ "); return nPercent; } diff --git a/qadevOOo/runner/convwatch/PerformanceContainer.java b/qadevOOo/runner/convwatch/PerformanceContainer.java index f9747fcd017e..81cbb9511e3c 100644 --- a/qadevOOo/runner/convwatch/PerformanceContainer.java +++ b/qadevOOo/runner/convwatch/PerformanceContainer.java @@ -107,11 +107,11 @@ public class PerformanceContainer /* extends *//* implements */ { { String ls = System.getProperty("line.separator"); - out.write("loadtime=" + String.valueOf(m_nTime[ Load ]) + ls); - out.write("storetime=" + String.valueOf(m_nTime[ Store ]) + ls); - out.write("printtime=" + String.valueOf(m_nTime[ Print ]) + ls); - out.write("officestarttime=" + String.valueOf(m_nTime[ OfficeStart ]) + ls); - out.write("storeaspdftime=" + String.valueOf(m_nTime[ StoreAsPDF ]) + ls); + out.write("loadtime=" + (m_nTime[ Load ]) + ls); + out.write("storetime=" + (m_nTime[ Store ]) + ls); + out.write("printtime=" + (m_nTime[ Print ]) + ls); + out.write("officestarttime=" + (m_nTime[ OfficeStart ]) + ls); + out.write("storeaspdftime=" + (m_nTime[ StoreAsPDF ]) + ls); } private static double stringToDouble(String _sStr) diff --git a/qadevOOo/runner/convwatch/StatusHelper.java b/qadevOOo/runner/convwatch/StatusHelper.java index 939a64ae8108..ea3241f55011 100644 --- a/qadevOOo/runner/convwatch/StatusHelper.java +++ b/qadevOOo/runner/convwatch/StatusHelper.java @@ -69,7 +69,7 @@ public class StatusHelper } else if (nDiffStatus == DIFF_DIFFERENCES_FOUND) { - GlobalLogWriter.get().println("Files differ by " + String.valueOf(nPercent) + "%"); + GlobalLogWriter.get().println("Files differ by " + nPercent + "%"); } else if (nDiffStatus == DIFF_AFTER_MOVE_DONE_NO_PROBLEMS) { @@ -77,7 +77,7 @@ public class StatusHelper } else if (nDiffStatus == DIFF_AFTER_MOVE_DONE_DIFFERENCES_FOUND) { - GlobalLogWriter.get().println("A picture move is done, the files differ by " + String.valueOf(nPercent2) + " old was " + String.valueOf(nPercent) + "%"); + GlobalLogWriter.get().println("A picture move is done, the files differ by " + nPercent2 + " old was " + nPercent + "%"); } else { diff --git a/qadevOOo/runner/convwatch/TimeHelper.java b/qadevOOo/runner/convwatch/TimeHelper.java index 92f8033d4ad8..abb68b7c6abe 100644 --- a/qadevOOo/runner/convwatch/TimeHelper.java +++ b/qadevOOo/runner/convwatch/TimeHelper.java @@ -27,7 +27,7 @@ public class TimeHelper */ static void waitInSeconds(int _nSeconds, String _sReason) { - GlobalLogWriter.get().println("Wait " + String.valueOf(_nSeconds) + " sec. Reason: " + _sReason); + GlobalLogWriter.get().println("Wait " + _nSeconds + " sec. Reason: " + _sReason); try { java.lang.Thread.sleep(_nSeconds * 1000); } catch (InterruptedException e2) {} diff --git a/qadevOOo/runner/graphical/JPEGComparator.java b/qadevOOo/runner/graphical/JPEGComparator.java index 67267c914337..f793b527e607 100644 --- a/qadevOOo/runner/graphical/JPEGComparator.java +++ b/qadevOOo/runner/graphical/JPEGComparator.java @@ -243,7 +243,7 @@ public class JPEGComparator extends EnhancedComplexTestCase int nPages = aResultIniFile.getIntValue("global", "pages", 0); for (int i = 0; i < nPages; i++) { - String sCurrentPage = "page" + String.valueOf(i + 1); + String sCurrentPage = "page" + (i + 1); int nPercent = aResultIniFile.getIntValue(sCurrentPage, "percent", -1); if (nPercent == 0) { @@ -484,7 +484,7 @@ public class JPEGComparator extends EnhancedComplexTestCase aResultIni.insertValue("global", "dpi", aNameDPIPage.DPI); // write down flags for each page - String sSection = "page" + String.valueOf(nPage); + String sSection = "page" + nPage; aResultIni.insertValue(sSection, "oldgfx", sSource); aResultIni.insertValue(sSection, "newgfx", sDestination); @@ -548,7 +548,7 @@ public class JPEGComparator extends EnhancedComplexTestCase } int nPercent = Math.abs(nNotBlackCount_DiffGraphic * 100 / nMinNotWhiteCount); - GlobalLogWriter.println("Graphics check, pixel based:" + String.valueOf(nPercent) + "% pixel differ "); + GlobalLogWriter.println("Graphics check, pixel based:" + nPercent + "% pixel differ "); return nPercent; } diff --git a/qadevOOo/runner/graphical/JPEGCreator.java b/qadevOOo/runner/graphical/JPEGCreator.java index c33b09632850..b9570e9fe0a5 100644 --- a/qadevOOo/runner/graphical/JPEGCreator.java +++ b/qadevOOo/runner/graphical/JPEGCreator.java @@ -237,7 +237,7 @@ private static void convertToWidth340(String _sFrom, String _To) private String getJPEGName(String _sOutputPath, String _sBasename, int _nResolutionInDPI, String _sGS_PageOutput) { - String sName = _sBasename + "_" + String.valueOf(_nResolutionInDPI) + "DPI_" + _sGS_PageOutput + ".jpg"; + String sName = _sBasename + "_" + _nResolutionInDPI + "DPI_" + _sGS_PageOutput + ".jpg"; String sJPEGName = FileHelper.appendPath(_sOutputPath, sName); return sJPEGName; } @@ -281,7 +281,7 @@ private static void convertToWidth340(String _sFrom, String _To) "-dNOPROMPT", "-dBATCH", "-sDEVICE=jpeg", - "-r" + String.valueOf(_nResolutionInDPI), + "-r" + _nResolutionInDPI, "-dNOPAUSE", "-sOutputFile=" + sJPEGNameSchema, sPostscriptOrPDFFile diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java index 0e827b3b0a24..cd0dde453ade 100644 --- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java +++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java @@ -495,7 +495,7 @@ public class OpenOfficePostscriptCreator implements IOffice String sPages = ""; if (_aGTA.getMaxPages() > 0) { - sPages = "1-" + String.valueOf(_aGTA.getMaxPages()); + sPages = "1-" + _aGTA.getMaxPages(); } if (_aGTA.getOnlyPages().length() != 0) { diff --git a/qadevOOo/runner/graphical/PerformanceContainer.java b/qadevOOo/runner/graphical/PerformanceContainer.java index e21f68432be5..abb5eb91b245 100644 --- a/qadevOOo/runner/graphical/PerformanceContainer.java +++ b/qadevOOo/runner/graphical/PerformanceContainer.java @@ -110,13 +110,13 @@ public class PerformanceContainer /* extends *//* implements */ { public void print(PrintStream out) { - out.println("loadtime=" + String.valueOf(m_nTime[ Load ])); - out.println("storetime=" + String.valueOf(m_nTime[ Store ])); - out.println("printtime=" + String.valueOf(m_nTime[ Print ])); - out.println("officestarttime=" + String.valueOf(m_nTime[ OfficeStart ])); - out.println("officestoptime=" + String.valueOf(m_nTime[ OfficeStop ])); - out.println("storeaspdftime=" + String.valueOf(m_nTime[ StoreAsPDF ])); - out.println("alltime=" + String.valueOf(m_nTime[ AllTime ])); + out.println("loadtime=" + m_nTime[ Load ]); + out.println("storetime=" + m_nTime[ Store ]); + out.println("printtime=" + m_nTime[ Print ]); + out.println("officestarttime=" + m_nTime[ OfficeStart ]); + out.println("officestoptime=" + m_nTime[ OfficeStop ]); + out.println("storeaspdftime=" + m_nTime[ StoreAsPDF ]); + out.println("alltime=" + m_nTime[ AllTime ]); } public void print(IniFile _aIniFile, String _sSection) diff --git a/qadevOOo/runner/graphical/TimeHelper.java b/qadevOOo/runner/graphical/TimeHelper.java index 4d7e826848b5..6b885bb635b7 100644 --- a/qadevOOo/runner/graphical/TimeHelper.java +++ b/qadevOOo/runner/graphical/TimeHelper.java @@ -29,7 +29,7 @@ public class TimeHelper */ static void waitInSeconds(int _nSeconds, String _sReason) { - GlobalLogWriter.println("Wait 0.25 * " + String.valueOf(_nSeconds) + " sec. Reason: " + _sReason); + GlobalLogWriter.println("Wait 0.25 * " + _nSeconds + " sec. Reason: " + _sReason); try { java.lang.Thread.sleep(_nSeconds * 250); } catch (InterruptedException e2) {} diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java index deab847ff0a7..59c6370a72b0 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java @@ -174,7 +174,7 @@ public class XMLStylesImporter extends TestCase { boolean hasStyle = StyleFamilyName.hasByName(impStyleName); logF.println("Does style with name '" + impStyleName - + "' exist? " + String.valueOf(hasStyle) ); + + "' exist? " + hasStyle ); return hasStyle; } catch (com.sun.star.uno.Exception e) { logF.println("Exception while checking import :") ; |