[Libreoffice-commits] core.git: 15 commits - bean/com forms/qa framework/qa javaunohelper/test jurt/com jvmfwk/plugins odk/examples odk/source qadevOOo/runner qadevOOo/tests reportbuilder/java sc/qa scripting/java scripting/workben stoc/test testtools/com toolkit/qa toolkit/test vcl/qa wizards/com xmerge/source
Noel Grandin
noel at peralex.com
Tue Oct 7 04:20:43 PDT 2014
bean/com/sun/star/comp/beans/LocalOfficeWindow.java | 5 -
forms/qa/integration/forms/ListBox.java | 4 -
framework/qa/complex/framework/autosave/Protocol.java | 4 -
javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java | 2
jurt/com/sun/star/comp/loader/JavaLoader.java | 2
jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java | 2
odk/examples/DevelopersGuide/FirstSteps/FirstConnection.java | 2
odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java | 2
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java | 4 -
odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java | 2
odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java | 2
odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminationTest.java | 2
odk/examples/java/Storage/Test01.java | 2
odk/examples/java/Storage/Test04.java | 2
odk/examples/java/Storage/Test05.java | 2
odk/examples/java/Storage/Test07.java | 2
odk/examples/java/Storage/Test08.java | 2
odk/examples/java/Storage/Test09.java | 2
odk/source/com/sun/star/lib/loader/InstallationFinder.java | 4 -
qadevOOo/runner/convwatch/DB.java | 2
qadevOOo/runner/convwatch/DocumentConverter.java | 2
qadevOOo/runner/convwatch/EnhancedComplexTestCase.java | 8 +-
qadevOOo/runner/convwatch/GraphicalTestArguments.java | 34 +++++-----
qadevOOo/runner/convwatch/MSOfficePrint.java | 8 +-
qadevOOo/runner/convwatch/OfficePrint.java | 12 +--
qadevOOo/runner/convwatch/PerformanceContainer.java | 2
qadevOOo/runner/graphical/EnhancedComplexTestCase.java | 2
qadevOOo/runner/graphical/IniFile.java | 2
qadevOOo/runner/graphical/MSOfficePostscriptCreator.java | 4 -
qadevOOo/runner/graphical/Office.java | 12 +--
qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java | 8 +-
qadevOOo/runner/graphical/ParameterHelper.java | 12 +--
qadevOOo/runner/graphical/PerformanceContainer.java | 2
qadevOOo/runner/helper/APIDescGetter.java | 4 -
qadevOOo/runner/helper/OfficeProvider.java | 2
qadevOOo/runner/lib/Parameters.java | 2
qadevOOo/runner/share/DescGetter.java | 4 -
qadevOOo/runner/util/AccessibilityTools.java | 4 -
qadevOOo/runner/util/RegistryTools.java | 4 -
qadevOOo/runner/util/SysUtils.java | 2
qadevOOo/runner/util/XMLTools.java | 4 -
qadevOOo/runner/util/compare/DocComparatorFactory.java | 4 -
qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java | 4 -
qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java | 2
qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java | 2
qadevOOo/tests/java/ifc/frame/_XDesktop.java | 2
qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java | 2
qadevOOo/tests/java/ifc/sheet/_TableAutoFormatField.java | 2
qadevOOo/tests/java/ifc/sheet/_XAreaLink.java | 4 -
qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java | 2
qadevOOo/tests/java/ifc/sheet/_XScenarioEnhanced.java | 10 +-
qadevOOo/tests/java/ifc/style/_PageStyle.java | 19 -----
qadevOOo/tests/java/ifc/table/_XCellCursor.java | 6 -
qadevOOo/tests/java/ifc/table/_XTableColumns.java | 6 -
qadevOOo/tests/java/ifc/util/_XSearchDescriptor.java | 2
qadevOOo/tests/java/ifc/util/_XURLTransformer.java | 12 +--
qadevOOo/tests/java/mod/_cpld/DLLComponentLoader.java | 2
qadevOOo/tests/java/mod/_sc/ScStyleFamilyObj.java | 2
qadevOOo/tests/java/mod/_shlibloader/uno/DLLComponentLoader.java | 2
qadevOOo/tests/java/mod/_sw/SwXStyleFamily.java | 2
reportbuilder/java/org/libreoffice/report/StorageRepository.java | 2
reportbuilder/java/org/libreoffice/report/pentaho/output/ImageProducer.java | 4 -
sc/qa/complex/sc/CalcRTL.java | 19 ++---
scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java | 6 -
scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java | 3
scripting/java/org/openoffice/idesupport/CommandLineTools.java | 10 +-
scripting/java/org/openoffice/idesupport/JavaFinder.java | 3
scripting/java/org/openoffice/idesupport/LocalOffice.java | 18 ++---
scripting/java/org/openoffice/idesupport/ui/MethodPanel.java | 2
scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolder.java | 5 -
scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoader.java | 4 -
scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java | 4 -
scripting/workben/installer/Banner.java | 5 -
stoc/test/javavm/testapplet/TestApplet.java | 5 -
testtools/com/sun/star/comp/bridge/TestComponent.java | 2
toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java | 2
toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java | 4 -
toolkit/test/accessibility/AccTreeNode.java | 2
toolkit/test/accessibility/AccessibilityTreeModelBase.java | 4 -
toolkit/test/accessibility/AccessibleTextHandler.java | 3
toolkit/test/accessibility/Canvas.java | 2
vcl/qa/complex/memCheck/CheckMemoryUsage.java | 2
wizards/com/sun/star/wizards/common/FileAccess.java | 2
wizards/com/sun/star/wizards/db/QueryMetaData.java | 2
wizards/com/sun/star/wizards/form/FormDocument.java | 2
wizards/com/sun/star/wizards/report/ReportTextImplementation.java | 2
wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java | 2
wizards/com/sun/star/wizards/ui/CommandFieldSelection.java | 2
wizards/com/sun/star/wizards/ui/WizardDialog.java | 2
wizards/com/sun/star/wizards/ui/event/MethodInvocation.java | 2
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java | 4 -
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java | 2
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java | 2
xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java | 2
94 files changed, 178 insertions(+), 231 deletions(-)
New commits:
commit e189c61376a867c30adf385d435f2ff391d26187
Author: Noel Grandin <noel at peralex.com>
Date: Thu Aug 21 09:07:31 2014 +0200
LocalOffice should be an abstract class
Change-Id: I9531b64dc8cb2545dfc41ae4d69007eced8f2d26
diff --git a/scripting/java/org/openoffice/idesupport/LocalOffice.java b/scripting/java/org/openoffice/idesupport/LocalOffice.java
index f6d0814..0c05cd0 100644
--- a/scripting/java/org/openoffice/idesupport/LocalOffice.java
+++ b/scripting/java/org/openoffice/idesupport/LocalOffice.java
@@ -24,13 +24,12 @@ import java.net.ConnectException;
* LocalOffice represents a connection to the local office.
*
* This class allows to get access to some scripting framework
- * releated functionality of the locally running office. The
+ * related functionality of the locally running office. The
* office has to be started with options appropriate for establishing
* local connection.
*/
-public class LocalOffice {
-
-
+public abstract class LocalOffice
+{
/**
* Connects to the running office.
*
@@ -38,21 +37,18 @@ public class LocalOffice {
* to the office distribution.
* @param port is a communication port.
*/
- protected void connect(String officePath, int port)
- throws ConnectException {
- }
+ protected abstract void connect(String officePath, int port)
+ throws ConnectException;
/**
* Closes the connection to the running office.
*/
- public void disconnect() {
- }
+ public abstract void disconnect();
/**
* Refresh the script storage.
*
* @param uri is an identifier of storage has to be refreshed.
*/
- public void refreshStorage(String uri) {
- }
+ public abstract void refreshStorage(String uri);
}
commit 821386a80f8b31f1ec32aa258c113183ef4c4881
Author: Noel Grandin <noel at peralex.com>
Date: Thu Aug 21 09:05:27 2014 +0200
java: simplify some for loops to while loops
Change-Id: I323ab12c634d3baa4f624b63d7d483112c23192c
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java b/jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java
index 3f7bc48..bf3aef0 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java
+++ b/jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java
@@ -64,7 +64,7 @@ public class JREProperties
Properties p = System.getProperties();
Enumeration e = p.propertyNames();
- for (; e.hasMoreElements() ;) {
+ while (e.hasMoreElements()) {
String sProp = (String) e.nextElement();
String sCompleteProp = sProp + "=" + p.getProperty(sProp);
char[] arChars = new char[sCompleteProp.length()];
diff --git a/qadevOOo/runner/helper/APIDescGetter.java b/qadevOOo/runner/helper/APIDescGetter.java
index 978af46..4171dc2 100644
--- a/qadevOOo/runner/helper/APIDescGetter.java
+++ b/qadevOOo/runner/helper/APIDescGetter.java
@@ -724,7 +724,7 @@ public class APIDescGetter extends DescGetter
ArrayList<String> namesList = new ArrayList<String>();
StringTokenizer st = new StringTokenizer(job, ",");
- for (; st.hasMoreTokens();)
+ while (st.hasMoreTokens())
{
String token = st.nextToken();
@@ -742,7 +742,7 @@ public class APIDescGetter extends DescGetter
ArrayList<String> namesList = new ArrayList<String>();
StringTokenizer st = new StringTokenizer(job, ",");
- for (; st.hasMoreTokens();)
+ while (st.hasMoreTokens())
{
namesList.add(st.nextToken());
}
diff --git a/qadevOOo/runner/share/DescGetter.java b/qadevOOo/runner/share/DescGetter.java
index ad0ce13..53e0f93 100644
--- a/qadevOOo/runner/share/DescGetter.java
+++ b/qadevOOo/runner/share/DescGetter.java
@@ -168,7 +168,7 @@ public abstract class DescGetter
ArrayList<String> namesList = new ArrayList<String>();
StringTokenizer st = new StringTokenizer(job, ",");
- for (; st.hasMoreTokens();)
+ while (st.hasMoreTokens())
{
String token = st.nextToken();
diff --git a/qadevOOo/tests/java/ifc/frame/_XDesktop.java b/qadevOOo/tests/java/ifc/frame/_XDesktop.java
index 207d091..ac14571 100644
--- a/qadevOOo/tests/java/ifc/frame/_XDesktop.java
+++ b/qadevOOo/tests/java/ifc/frame/_XDesktop.java
@@ -56,7 +56,7 @@ public class _XDesktop extends MultiMethodTest {
boolean result = false;
try {
- for (; xEnum.hasMoreElements();) {
+ while (xEnum.hasMoreElements()) {
try {
AnyConverter.toObject(
new Type(XInterface.class), xEnum.nextElement());
commit 58e5a71c2e66f053876ebbe37fa4ae383af2d8fc
Author: Noel Grandin <noel at peralex.com>
Date: Thu Aug 21 08:40:13 2014 +0200
while loop that ends in a return is more accurately an if block
Change-Id: I94b74b46b185e1061b6b72acdf3d9dc0c1d122c8
diff --git a/qadevOOo/runner/convwatch/DB.java b/qadevOOo/runner/convwatch/DB.java
index 808c8ce..70a2559 100644
--- a/qadevOOo/runner/convwatch/DB.java
+++ b/qadevOOo/runner/convwatch/DB.java
@@ -349,7 +349,7 @@ public class DB extends DBHelper
String sResult = aResultList.get(i);
StringTokenizer aTokenizer = new StringTokenizer(sResult,",",false);
- while (aTokenizer.hasMoreTokens())
+ if (aTokenizer.hasMoreTokens())
{
String sToken = aTokenizer.nextToken();
int nIndex = sToken.indexOf("uuid()=");
commit 68fa1410975ccecc35db8a97669f0fbe5ef9b451
Author: Noel Grandin <noel at peralex.com>
Date: Thu Aug 21 08:27:25 2014 +0200
java: use isEmpty() instead of "size() == 0"
Change-Id: I23e1038246999b0744d8e9ae83b66fa1f7dafa99
diff --git a/qadevOOo/runner/graphical/IniFile.java b/qadevOOo/runner/graphical/IniFile.java
index 8c3e6f3..16bf0ad 100644
--- a/qadevOOo/runner/graphical/IniFile.java
+++ b/qadevOOo/runner/graphical/IniFile.java
@@ -52,7 +52,7 @@ public class IniFile implements Enumeration<String>
public void insertFirstComment(String[] _aList)
{
- if (m_aList.size() == 0)
+ if (m_aList.isEmpty())
{
// can only insert if there is nothing else already in the ini file
for (int i = 0; i < _aList.length; i++)
diff --git a/qadevOOo/runner/share/DescGetter.java b/qadevOOo/runner/share/DescGetter.java
index e9bd0d5..ad0ce13 100644
--- a/qadevOOo/runner/share/DescGetter.java
+++ b/qadevOOo/runner/share/DescGetter.java
@@ -153,7 +153,7 @@ public abstract class DescGetter
}
}
- if (entryList.size() == 0)
+ if (entryList.isEmpty())
{
return null;
}
diff --git a/qadevOOo/runner/util/XMLTools.java b/qadevOOo/runner/util/XMLTools.java
index 5f43f06..ce15982 100644
--- a/qadevOOo/runner/util/XMLTools.java
+++ b/qadevOOo/runner/util/XMLTools.java
@@ -289,7 +289,7 @@ public class XMLTools {
public void endElement(String name) {
super.endElement(name);
if (wellFormed) {
- if (tagStack.size() == 0) {
+ if (tagStack.isEmpty()) {
wellFormed = false ;
printError("No tags to close (bad closing tag </" + name + ">)") ;
} else {
@@ -718,7 +718,7 @@ public class XMLTools {
if (!isWellFormed())
log.println("!!! Some errors were found in XML structure") ;
- boolean result = tags.size() == 0 && chars.size() == 0 && isWellFormed();
+ boolean result = tags.isEmpty() && chars.size() == 0 && isWellFormed();
reset();
return result;
}
diff --git a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
index 2c36a57..db30afb 100644
--- a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
+++ b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
@@ -218,9 +218,9 @@ public class ScriptMetaData extends ScriptEntry {
if (url != null) {
classPathVec.add(url);
}
- }
+ }
- return classPathVec.toArray(new URL[classPathVec.size()]);
+ return classPathVec.toArray(new URL[classPathVec.size()]);
} catch (Exception e) {
LogUtils.DEBUG("Failed to build class path " + e.toString());
LogUtils.DEBUG(LogUtils.getTrace(e));
@@ -320,4 +320,4 @@ public class ScriptMetaData extends ScriptEntry {
LogUtils.DEBUG("Creating script url for " + sUrl);
return createURL(sUrl);
}
-}
\ No newline at end of file
+}
diff --git a/scripting/java/org/openoffice/idesupport/CommandLineTools.java b/scripting/java/org/openoffice/idesupport/CommandLineTools.java
index 5b9050c..85995cd 100644
--- a/scripting/java/org/openoffice/idesupport/CommandLineTools.java
+++ b/scripting/java/org/openoffice/idesupport/CommandLineTools.java
@@ -284,7 +284,7 @@ public class CommandLineTools {
}
if (scripts != null) {
- if (scripts.size() == 0)
+ if (scripts.isEmpty())
throw new Exception("No valid scripts found");
ParcelDescriptor desc = new ParcelDescriptor(parcelxml, language);
diff --git a/scripting/java/org/openoffice/idesupport/JavaFinder.java b/scripting/java/org/openoffice/idesupport/JavaFinder.java
index e9385fd..b1139ab 100644
--- a/scripting/java/org/openoffice/idesupport/JavaFinder.java
+++ b/scripting/java/org/openoffice/idesupport/JavaFinder.java
@@ -191,8 +191,7 @@ public class JavaFinder implements MethodFinder {
private String[] findClassNames(File basedir) {
ArrayList<File> classFiles = findFiles(basedir, CLASS_SUFFIX);
-
- if (classFiles == null || classFiles.size() == 0)
+ if(classFiles == null || classFiles.isEmpty())
return null;
ArrayList<File> javaFiles = findFiles(basedir, JAVA_SUFFIX);
diff --git a/toolkit/test/accessibility/AccTreeNode.java b/toolkit/test/accessibility/AccTreeNode.java
index 73eb9a7..136f872 100644
--- a/toolkit/test/accessibility/AccTreeNode.java
+++ b/toolkit/test/accessibility/AccTreeNode.java
@@ -281,7 +281,7 @@ class AccTreeNode
@Override
public boolean isLeaf()
{
- return (maHandlers.size() == 0);
+ return maHandlers.isEmpty();
}
@Override
diff --git a/toolkit/test/accessibility/Canvas.java b/toolkit/test/accessibility/Canvas.java
index d815f9d..c600a9e 100644
--- a/toolkit/test/accessibility/Canvas.java
+++ b/toolkit/test/accessibility/Canvas.java
@@ -98,7 +98,7 @@ class Canvas
{
aObject = new CanvasShape (aNode);
// Update bounding box that includes all objects.
- if (maObjects.size() == 0)
+ if (maObjects.isEmpty())
maBoundingBox = aObject.getBBox();
else
maBoundingBox = maBoundingBox.union (aObject.getBBox());
diff --git a/vcl/qa/complex/memCheck/CheckMemoryUsage.java b/vcl/qa/complex/memCheck/CheckMemoryUsage.java
index 3b119c4..ad0e249 100644
--- a/vcl/qa/complex/memCheck/CheckMemoryUsage.java
+++ b/vcl/qa/complex/memCheck/CheckMemoryUsage.java
@@ -153,7 +153,7 @@ public class CheckMemoryUsage /* extends ComplexTestCase */
}
}
// if no param given, set defaults.
- if (v.size() == 0)
+ if (v.isEmpty())
{
v.add(sWriterDoc);
v.add(sCalcDoc);
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java b/wizards/com/sun/star/wizards/common/FileAccess.java
index 862f1b8..a44c786 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.java
+++ b/wizards/com/sun/star/wizards/common/FileAccess.java
@@ -632,7 +632,7 @@ public class FileAccess
throws NoValidPathException
{
String[][] LocLayoutFiles = new String[2][];
- if (FolderName.size() == 0)
+ if (FolderName.isEmpty())
{
throw new NoValidPathException(null, "Path not given.");
}
diff --git a/wizards/com/sun/star/wizards/form/FormDocument.java b/wizards/com/sun/star/wizards/form/FormDocument.java
index eb2a997..15d526f 100644
--- a/wizards/com/sun/star/wizards/form/FormDocument.java
+++ b/wizards/com/sun/star/wizards/form/FormDocument.java
@@ -141,7 +141,7 @@ public class FormDocument extends TextDocument
adjustPageStyle();
if (_baddParentForm)
{
- if (oControlForms.size() == 0)
+ if (oControlForms.isEmpty())
{
final ControlForm aMainControlForm = new ControlForm(this, SOMAINFORM, aMainFormPoint, getMainFormSize(FormWizard.AS_GRID));
oControlForms.add(aMainControlForm);
commit 81968336ea6433293c603110a75bd13d5898c0eb
Author: Noel Grandin <noel at peralex.com>
Date: Thu Aug 21 08:24:17 2014 +0200
java: use equalsIgnoreCase() instead of toLowerCase().equals()
Change-Id: I8f4afc7e15a9d85d99ea80edbbbd2b507b254ddc
diff --git a/odk/source/com/sun/star/lib/loader/InstallationFinder.java b/odk/source/com/sun/star/lib/loader/InstallationFinder.java
index 343ca54..c889443 100644
--- a/odk/source/com/sun/star/lib/loader/InstallationFinder.java
+++ b/odk/source/com/sun/star/lib/loader/InstallationFinder.java
@@ -448,7 +448,7 @@ final class InstallationFinder {
String prefix = "file://";
if (oooUrl.length() < prefix.length()
- || !oooUrl.substring(0, prefix.length()).toLowerCase().equals(
+ || !oooUrl.substring(0, prefix.length()).equalsIgnoreCase(
prefix))
{
return null;
@@ -459,7 +459,7 @@ final class InstallationFinder {
n = oooUrl.length();
}
String host = oooUrl.substring(prefix.length(), n);
- if (host.length() != 0 && !host.toLowerCase().equals("localhost")) {
+ if (host.length() != 0 && !host.equalsIgnoreCase("localhost")) {
return null;
}
buf.append(host);
diff --git a/qadevOOo/runner/convwatch/DocumentConverter.java b/qadevOOo/runner/convwatch/DocumentConverter.java
index 6325215..00df1ed 100644
--- a/qadevOOo/runner/convwatch/DocumentConverter.java
+++ b/qadevOOo/runner/convwatch/DocumentConverter.java
@@ -197,7 +197,7 @@ public class DocumentConverter extends EnhancedComplexTestCase
}
GraphicalTestArguments aGTA = getGraphicalTestArguments();
- if (aGTA.getOfficeProgram().toLowerCase().equals("msoffice"))
+ if (aGTA.getOfficeProgram().equalsIgnoreCase("msoffice"))
{
// ReferenceType is MSOffice
GlobalLogWriter.get().println("USE MSOFFICE AS EXPORT FORMAT.");
diff --git a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
index 7146680..47e23fc 100644
--- a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
@@ -79,8 +79,8 @@ public abstract class EnhancedComplexTestCase extends ComplexTestCase
{
sNEEDCHECK = "false";
}
- if (sNEEDCHECK.toLowerCase().equals("yes") ||
- sNEEDCHECK.toLowerCase().equals("true"))
+ if (sNEEDCHECK.equalsIgnoreCase("yes") ||
+ sNEEDCHECK.equalsIgnoreCase("true"))
{
return true;
}
@@ -92,11 +92,11 @@ public abstract class EnhancedComplexTestCase extends ComplexTestCase
public GraphicalTestArguments getGraphicalTestArguments()
{
GraphicalTestArguments aGTA = new GraphicalTestArguments(param);
- if (aGTA.getImportFilterName() != null && aGTA.getImportFilterName().toLowerCase().equals("help"))
+ if (aGTA.getImportFilterName() != null && aGTA.getImportFilterName().equalsIgnoreCase("help"))
{
aGTA = null;
}
- if (aGTA.getExportFilterName() != null && aGTA.getExportFilterName().toLowerCase().equals("help"))
+ if (aGTA.getExportFilterName() != null && aGTA.getExportFilterName().equalsIgnoreCase("help"))
{
aGTA = null;
}
diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
index d52add3..49fb1e0 100644
--- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java
+++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
@@ -143,8 +143,8 @@ public class GraphicalTestArguments
{
sRECURSIVE = "true";
}
- if (sRECURSIVE.toLowerCase().equals("no") ||
- sRECURSIVE.toLowerCase().equals("false"))
+ if (sRECURSIVE.equalsIgnoreCase("no") ||
+ sRECURSIVE.equalsIgnoreCase("false"))
{
m_bIncludeSubdirectories = false;
}
@@ -166,7 +166,7 @@ public class GraphicalTestArguments
{
m_sImportFilterName = sImportFilterName;
- if (sImportFilterName.toLowerCase().equals("help"))
+ if (sImportFilterName.equalsIgnoreCase("help"))
{
showInternalFilterName(sImportFilterName, getMultiServiceFactory() );
GlobalLogWriter.get().println("Must quit.");
@@ -177,7 +177,7 @@ public class GraphicalTestArguments
if (sExportFilterName != null && sExportFilterName.length() > 0)
{
m_sExportFilterName = sExportFilterName;
- if (sExportFilterName.toLowerCase().equals("help"))
+ if (sExportFilterName.equalsIgnoreCase("help"))
{
showInternalFilterName(sExportFilterName, getMultiServiceFactory() );
GlobalLogWriter.get().println("Must quit.");
@@ -196,8 +196,8 @@ public class GraphicalTestArguments
{
sREUSE_OFFICE = "false";
}
- if (sREUSE_OFFICE.toLowerCase().equals("yes") ||
- sREUSE_OFFICE.toLowerCase().equals("true"))
+ if (sREUSE_OFFICE.equalsIgnoreCase("yes") ||
+ sREUSE_OFFICE.equalsIgnoreCase("true"))
{
m_bResuseOffice = true;
}
@@ -224,13 +224,13 @@ public class GraphicalTestArguments
// m_tWithBorderMove = TriState.UNSET;
m_tWithBorderMove = TriState.FALSE;
}
- if (sWithBorderMove.toLowerCase().equals("yes") ||
- sWithBorderMove.toLowerCase().equals("true"))
+ if (sWithBorderMove.equalsIgnoreCase("yes") ||
+ sWithBorderMove.equalsIgnoreCase("true"))
{
m_tWithBorderMove = TriState.TRUE;
}
- else if (sWithBorderMove.toLowerCase().equals("no") ||
- sWithBorderMove.toLowerCase().equals("false"))
+ else if (sWithBorderMove.equalsIgnoreCase("no") ||
+ sWithBorderMove.equalsIgnoreCase("false"))
{
m_tWithBorderMove = TriState.FALSE;
}
@@ -262,8 +262,8 @@ public class GraphicalTestArguments
String sOfficeViewable = (String)param.get(PropertyName.OFFICE_VIEWABLE);
if (sOfficeViewable != null)
{
- if (sOfficeViewable.toLowerCase().equals("yes") ||
- sOfficeViewable.toLowerCase().equals("true"))
+ if (sOfficeViewable.equalsIgnoreCase("yes") ||
+ sOfficeViewable.equalsIgnoreCase("true"))
{
setViewable();
}
@@ -276,8 +276,8 @@ public class GraphicalTestArguments
String sCreateDefault = (String)param.get(PropertyName.CREATE_DEFAULT);
if (sCreateDefault != null)
{
- if (sCreateDefault.toLowerCase().equals("yes") ||
- sCreateDefault.toLowerCase().equals("true"))
+ if (sCreateDefault.equalsIgnoreCase("yes") ||
+ sCreateDefault.equalsIgnoreCase("true"))
{
m_bCreateDefaultReference = true;
}
@@ -334,7 +334,7 @@ public class GraphicalTestArguments
if (aNameAccess != null)
{
- if (_sFilterName.toLowerCase().equals("help"))
+ if (_sFilterName.equalsIgnoreCase("help"))
{
GlobalLogWriter.get().println("Show all possible ElementNames from current version." );
String[] aElementNames = aNameAccess.getElementNames();
@@ -372,8 +372,8 @@ public class GraphicalTestArguments
XMultiServiceFactory xMSF = m_aCurrentParams.getMSF();
// check if MultiServiceFactory is given
- if (getReferenceType().toLowerCase().equals("pdf") ||
- getReferenceType().toLowerCase().equals("ooo"))
+ if (getReferenceType().equalsIgnoreCase("pdf") ||
+ getReferenceType().equalsIgnoreCase("ooo"))
{
if (xMSF == null)
{
diff --git a/qadevOOo/runner/convwatch/MSOfficePrint.java b/qadevOOo/runner/convwatch/MSOfficePrint.java
index b80bdf5..62d8c54 100644
--- a/qadevOOo/runner/convwatch/MSOfficePrint.java
+++ b/qadevOOo/runner/convwatch/MSOfficePrint.java
@@ -115,10 +115,10 @@ public class MSOfficePrint
else if (isPowerPointDocument(sDocumentSuffix))
{
}
- else if (sDocumentSuffix.toLowerCase().equals(".xml"))
+ else if (sDocumentSuffix.equalsIgnoreCase(".xml"))
{
// special case, if xml we prefer word, but with DEFAULT_XML_FORMAT_APP=excel it's changeable.
- if (_aGTA.getDefaultXMLFormatApp().toLowerCase().equals("excel"))
+ if (_aGTA.getDefaultXMLFormatApp().equalsIgnoreCase("excel"))
{
aStartCommand = createExcelStoreHelper();
}
@@ -169,7 +169,7 @@ public class MSOfficePrint
{
aStartCommand = createPowerPointPrintHelper();
}
- else if (sDocumentSuffix.toLowerCase().equals(".xml"))
+ else if (sDocumentSuffix.equalsIgnoreCase(".xml"))
{
// TODO: Open XML File and check if we need excel or word
String sOfficeType = getOfficeType(_sInputFile);
diff --git a/qadevOOo/runner/convwatch/OfficePrint.java b/qadevOOo/runner/convwatch/OfficePrint.java
index 38273ec..75f117e 100644
--- a/qadevOOo/runner/convwatch/OfficePrint.java
+++ b/qadevOOo/runner/convwatch/OfficePrint.java
@@ -699,16 +699,16 @@ public class OfficePrint {
return true;
}
- if (_aGTA.getReferenceType().toLowerCase().equals("msoffice"))
+ if (_aGTA.getReferenceType().equalsIgnoreCase("msoffice"))
{
sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename);
}
- else if (_aGTA.getReferenceType().toLowerCase().equals("pdf"))
+ else if (_aGTA.getReferenceType().equalsIgnoreCase("pdf"))
{
// TODO: If we rename the stored file to *.pdf, we have to be sure that we use *.pdf also as a available reference
sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename );
}
- else if (_aGTA.getReferenceType().toLowerCase().equals("ooo"))
+ else if (_aGTA.getReferenceType().equalsIgnoreCase("ooo"))
{
sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename );
}
@@ -737,16 +737,16 @@ public class OfficePrint {
}
- if (_aGTA.getReferenceType().toLowerCase().equals("ooo"))
+ if (_aGTA.getReferenceType().equalsIgnoreCase("ooo"))
{
bBack = printToFileWithOOo(_aGTA, _sInputFileURL, _sOutputFileURL, _sPrintFileURL);
}
- else if (_aGTA.getReferenceType().toLowerCase().equals("pdf"))
+ else if (_aGTA.getReferenceType().equalsIgnoreCase("pdf"))
{
GlobalLogWriter.get().println("USE PDF AS EXPORT FORMAT.");
bBack = storeAsPDF(_aGTA, _sInputFileURL, _sPrintFileURL);
}
- else if (_aGTA.getReferenceType().toLowerCase().equals("msoffice"))
+ else if (_aGTA.getReferenceType().equalsIgnoreCase("msoffice"))
{
if (MSOfficePrint.isMSOfficeDocumentFormat(_sInputFileURL))
{
diff --git a/qadevOOo/runner/graphical/EnhancedComplexTestCase.java b/qadevOOo/runner/graphical/EnhancedComplexTestCase.java
index dcde844..6f61d4f 100644
--- a/qadevOOo/runner/graphical/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/graphical/EnhancedComplexTestCase.java
@@ -158,7 +158,7 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
File aInputPathWithPDF = new File(sInputPathWithPDF);
if (aInputPathWithPDF.exists() &&
- _aParam.getReferenceType().toLowerCase().equals("pdf"))
+ _aParam.getReferenceType().equalsIgnoreCase("pdf"))
{
// create PDF only if a pdf file exists and creatortype is set to PDF
callEntry(sInputPathWithPDF, _aParam);
diff --git a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
index 9e2a9c3..19955a5 100644
--- a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
@@ -185,7 +185,7 @@ public class MSOfficePostscriptCreator implements IOffice
{
aStartCommand = createPowerPointPrintHelper();
}
- else if (sDocumentSuffix.toLowerCase().equals(".xml"))
+ else if (sDocumentSuffix.equalsIgnoreCase(".xml"))
{
// TODO: Open XML File and check if we need excel or word
String sOfficeType = getOfficeType(_sInputFile);
diff --git a/qadevOOo/runner/graphical/Office.java b/qadevOOo/runner/graphical/Office.java
index 0a08986..0cba0f6 100644
--- a/qadevOOo/runner/graphical/Office.java
+++ b/qadevOOo/runner/graphical/Office.java
@@ -32,14 +32,14 @@ public class Office implements IOffice
m_aParameterHelper = _aParam;
m_sResult = _sResult;
- if (_aParam.getReferenceType().toLowerCase().equals("ooo") ||
- _aParam.getReferenceType().toLowerCase().equals("o3") ||
- _aParam.getReferenceType().toLowerCase().equals("ps") ||
- _aParam.getReferenceType().toLowerCase().equals("pdf"))
+ if (_aParam.getReferenceType().equalsIgnoreCase("ooo") ||
+ _aParam.getReferenceType().equalsIgnoreCase("o3") ||
+ _aParam.getReferenceType().equalsIgnoreCase("ps") ||
+ _aParam.getReferenceType().equalsIgnoreCase("pdf"))
{
m_aOffice = new OpenOfficePostscriptCreator(_aParam, m_sResult);
}
- else if (_aParam.getReferenceType().toLowerCase().equals("msoffice"))
+ else if (_aParam.getReferenceType().equalsIgnoreCase("msoffice"))
{
m_aOffice = new MSOfficePostscriptCreator(_aParam, m_sResult);
}
@@ -67,7 +67,7 @@ public class Office implements IOffice
{
if (sDocumentSuffix.toLowerCase().endsWith(".odb"))
{
- if (m_aParameterHelper.getReferenceType().toLowerCase().equals("msoffice"))
+ if (m_aParameterHelper.getReferenceType().equalsIgnoreCase("msoffice"))
{
// we can't handle .odb with msoffice
return;
diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
index 7dc60e8..2ab3910 100644
--- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
@@ -89,9 +89,9 @@ public class OpenOfficePostscriptCreator implements IOffice
if (m_aDocument != null)
{
String sDocumentName = FileHelper.appendPath(m_sOutputURL, m_sBasename);
- if (m_aParameterHelper.getReferenceType().toLowerCase().equals("ooo") ||
- m_aParameterHelper.getReferenceType().toLowerCase().equals("o3") ||
- m_aParameterHelper.getReferenceType().toLowerCase().equals("ps") )
+ if (m_aParameterHelper.getReferenceType().equalsIgnoreCase("ooo") ||
+ m_aParameterHelper.getReferenceType().equalsIgnoreCase("o3") ||
+ m_aParameterHelper.getReferenceType().equalsIgnoreCase("ps") )
{
String sPrintURL = sDocumentName + ".ps";
@@ -99,7 +99,7 @@ public class OpenOfficePostscriptCreator implements IOffice
String sBasename = FileHelper.getBasename(sPrintURL);
FileHelper.addBasenameToIndex(m_sOutputURL, sBasename, "OOo", "postscript", m_sDocumentName);
}
- else if (m_aParameterHelper.getReferenceType().toLowerCase().equals("pdf"))
+ else if (m_aParameterHelper.getReferenceType().equalsIgnoreCase("pdf"))
{
String sPDFURL = sDocumentName + ".pdf";
storeAsPDF(m_aParameterHelper, m_aDocument, sPDFURL);
diff --git a/qadevOOo/runner/graphical/ParameterHelper.java b/qadevOOo/runner/graphical/ParameterHelper.java
index ec7c4b3..6658564 100644
--- a/qadevOOo/runner/graphical/ParameterHelper.java
+++ b/qadevOOo/runner/graphical/ParameterHelper.java
@@ -135,8 +135,8 @@ public class ParameterHelper
{
sRECURSIVE = "true";
}
- if (sRECURSIVE.toLowerCase().equals("no") ||
- sRECURSIVE.toLowerCase().equals("false"))
+ if (sRECURSIVE.equalsIgnoreCase("no") ||
+ sRECURSIVE.equalsIgnoreCase("false"))
{
m_bIncludeSubdirectories = false;
}
@@ -219,10 +219,10 @@ public class ParameterHelper
XMultiServiceFactory xMSF = m_aCurrentParams.getMSF();
// check if MultiServiceFactory is given
- if (getReferenceType().toLowerCase().equals("pdf") ||
- getReferenceType().toLowerCase().equals("ps") ||
- getReferenceType().toLowerCase().equals("ooo") ||
- getReferenceType().toLowerCase().equals("o3") )
+ if (getReferenceType().equalsIgnoreCase("pdf") ||
+ getReferenceType().equalsIgnoreCase("ps") ||
+ getReferenceType().equalsIgnoreCase("ooo") ||
+ getReferenceType().equalsIgnoreCase("o3") )
{
if (xMSF == null)
{
diff --git a/qadevOOo/runner/util/compare/DocComparatorFactory.java b/qadevOOo/runner/util/compare/DocComparatorFactory.java
index a6f2162..9b6413c 100644
--- a/qadevOOo/runner/util/compare/DocComparatorFactory.java
+++ b/qadevOOo/runner/util/compare/DocComparatorFactory.java
@@ -29,11 +29,11 @@ public class DocComparatorFactory
*/
static public DocComparator createComparator(String s, TestParameters aParams) throws IllegalArgumentException
{
- if (s.toLowerCase().equals("gfx") || s.toLowerCase().equals("graphical"))
+ if (s.equalsIgnoreCase("gfx") || s.equalsIgnoreCase("graphical"))
{
return GraphicalComparator.getInstance(aParams);
}
- else if (s.toLowerCase().equals("pdf"))
+ else if (s.equalsIgnoreCase("pdf"))
{
throw new IllegalArgumentException("PDF not implemented yet.");
}
diff --git a/scripting/java/org/openoffice/idesupport/CommandLineTools.java b/scripting/java/org/openoffice/idesupport/CommandLineTools.java
index 522828e..5b9050c 100644
--- a/scripting/java/org/openoffice/idesupport/CommandLineTools.java
+++ b/scripting/java/org/openoffice/idesupport/CommandLineTools.java
@@ -187,7 +187,7 @@ public class CommandLineTools {
StringTokenizer tokenizer = new StringTokenizer(language, "=");
this.language = tokenizer.nextToken();
- if (this.language.toLowerCase().equals("java")) {
+ if (this.language.equalsIgnoreCase("java")) {
this.finder = JavaFinder.getInstance();
return;
}
diff --git a/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java b/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java
index 1d0fec3..9bedf51 100644
--- a/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java
+++ b/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java
@@ -88,7 +88,7 @@ public class MethodPanel extends JPanel {
if (language == null)
finder = JavaFinder.getInstance(classpath);
- else if (language.toLowerCase().equals("beanshell"))
+ else if (language.equalsIgnoreCase("beanshell"))
finder = new ExtensionFinder(language, new String[] {".bsh"});
else
finder = JavaFinder.getInstance(classpath);
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolder.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolder.java
index 9243df8..7ac5ce1 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolder.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolder.java
@@ -75,9 +75,10 @@ public class ParcelContentsFolder extends DataFolder {
public static void createEmptyScript(DataFolder parent, String language) {
String sourceFile = "Templates/OfficeScripting/EmptyScript/Empty";
- if (language.toLowerCase().equals("java")) {
+ if (language.equalsIgnoreCase("java")) {
sourceFile += ".java";
- } else if (language.toLowerCase().equals("beanshell")) {
+ }
+ else if (language.equalsIgnoreCase("beanshell")) {
sourceFile += ".bsh";
} else {
NotifyDescriptor d = new NotifyDescriptor.Message(
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
index aa1037b..e95ac8c 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
@@ -1575,7 +1575,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
closeDesignTemplate();
String sName = FileAccess.getFilename(LayoutTemplatePath);
- if (sName.toLowerCase().equals("default.otr_")
+ if (sName.equalsIgnoreCase("default.otr_")
|| LayoutTemplatePath.equals("DefaultLayoutOfHeaders"))
{
// this is the default layout, we don't want to have a layout for this.
commit f9be44340a1fbabb67c7a33d8c9b4766a56c1fde
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 20 15:32:38 2014 +0200
java: use equals() to compare Strings, not ==
Change-Id: Ia41a4899fb82df7b580a020765404c4ef0cddfa2
diff --git a/odk/examples/java/Storage/Test01.java b/odk/examples/java/Storage/Test01.java
index b2e94b3..ed2d1e9 100644
--- a/odk/examples/java/Storage/Test01.java
+++ b/odk/examples/java/Storage/Test01.java
@@ -40,7 +40,7 @@ public class Test01 implements StorageTest {
try
{
String sTempFileURL = m_aTestHelper.CreateTempFile( m_xMSF );
- if ( sTempFileURL == null || sTempFileURL == "" )
+ if ( sTempFileURL == null || sTempFileURL.equals("") )
{
m_aTestHelper.Error( "No valid temporary file was created!" );
return false;
diff --git a/odk/examples/java/Storage/Test04.java b/odk/examples/java/Storage/Test04.java
index 79a55dc..2390a91 100644
--- a/odk/examples/java/Storage/Test04.java
+++ b/odk/examples/java/Storage/Test04.java
@@ -41,7 +41,7 @@ public class Test04 implements StorageTest {
try
{
String sTempFileURL = m_aTestHelper.CreateTempFile( m_xMSF );
- if ( sTempFileURL == null || sTempFileURL == "" )
+ if ( sTempFileURL == null || sTempFileURL.equals("") )
{
m_aTestHelper.Error( "No valid temporary file was created!" );
return false;
diff --git a/odk/examples/java/Storage/Test05.java b/odk/examples/java/Storage/Test05.java
index b0c84ae..571251b 100644
--- a/odk/examples/java/Storage/Test05.java
+++ b/odk/examples/java/Storage/Test05.java
@@ -42,7 +42,7 @@ public class Test05 implements StorageTest {
try
{
String sTempFileURL = m_aTestHelper.CreateTempFile( m_xMSF );
- if ( sTempFileURL == null || sTempFileURL == "" )
+ if ( sTempFileURL == null || sTempFileURL.equals("") )
{
m_aTestHelper.Error( "No valid temporary file was created!" );
return false;
diff --git a/odk/examples/java/Storage/Test07.java b/odk/examples/java/Storage/Test07.java
index 7ae850f..c892688 100644
--- a/odk/examples/java/Storage/Test07.java
+++ b/odk/examples/java/Storage/Test07.java
@@ -40,7 +40,7 @@ public class Test07 implements StorageTest {
try
{
String sTempFileURL = m_aTestHelper.CreateTempFile( m_xMSF );
- if ( sTempFileURL == null || sTempFileURL == "" )
+ if ( sTempFileURL == null || sTempFileURL.equals("") )
{
m_aTestHelper.Error( "No valid temporary file was created!" );
return false;
diff --git a/odk/examples/java/Storage/Test08.java b/odk/examples/java/Storage/Test08.java
index adc911c..43e9423 100644
--- a/odk/examples/java/Storage/Test08.java
+++ b/odk/examples/java/Storage/Test08.java
@@ -119,7 +119,7 @@ public class Test08 implements StorageTest {
// create temporary file
String sTempFileURL = m_aTestHelper.CreateTempFile( m_xMSF );
- if ( sTempFileURL == null || sTempFileURL == "" )
+ if ( sTempFileURL == null || sTempFileURL.equals("") )
{
m_aTestHelper.Error( "No valid temporary file was created!" );
return false;
diff --git a/odk/examples/java/Storage/Test09.java b/odk/examples/java/Storage/Test09.java
index 171ce6f..5e59562 100644
--- a/odk/examples/java/Storage/Test09.java
+++ b/odk/examples/java/Storage/Test09.java
@@ -61,7 +61,7 @@ public class Test09 implements StorageTest {
// create temporary file
String sTempFileURL = m_aTestHelper.CreateTempFile( m_xMSF );
- if ( sTempFileURL == null || sTempFileURL == "" )
+ if ( sTempFileURL == null || sTempFileURL.equals( "" ) )
{
m_aTestHelper.Error( "No valid temporary file was created!" );
return false;
diff --git a/qadevOOo/tests/java/ifc/sheet/_TableAutoFormatField.java b/qadevOOo/tests/java/ifc/sheet/_TableAutoFormatField.java
index fc21d22..5b946e7 100644
--- a/qadevOOo/tests/java/ifc/sheet/_TableAutoFormatField.java
+++ b/qadevOOo/tests/java/ifc/sheet/_TableAutoFormatField.java
@@ -98,7 +98,7 @@ public class _TableAutoFormatField extends MultiPropertyTest {
testProperty("CharLocale", new PropertyTester() {
@Override
protected Object getNewValue(String p, Object old) {
- return old == null || ((Locale)old).Language == "de" ?
+ return old == null || ((Locale)old).Language.equals( "de" ) ?
new Locale("es", "ES", "") : new Locale("de", "DE", "") ;
}
}) ;
diff --git a/qadevOOo/tests/java/mod/_cpld/DLLComponentLoader.java b/qadevOOo/tests/java/mod/_cpld/DLLComponentLoader.java
index 9f5202a..480c0e3 100644
--- a/qadevOOo/tests/java/mod/_cpld/DLLComponentLoader.java
+++ b/qadevOOo/tests/java/mod/_cpld/DLLComponentLoader.java
@@ -88,7 +88,7 @@ public class DLLComponentLoader extends TestCase {
tEnv.addObjRelation("ImplementationLoader",
"com.sun.star.loader.SharedLibrary") ;
String os = (String) Param.get("OS");
- if (os == null || os == "")
+ if (os == null || os.equals(""))
throw new StatusException(
"Couldn't determine operating system for naming convention.",
new NullPointerException());
diff --git a/qadevOOo/tests/java/mod/_shlibloader/uno/DLLComponentLoader.java b/qadevOOo/tests/java/mod/_shlibloader/uno/DLLComponentLoader.java
index 6bf6ba4..dd7df76 100644
--- a/qadevOOo/tests/java/mod/_shlibloader/uno/DLLComponentLoader.java
+++ b/qadevOOo/tests/java/mod/_shlibloader/uno/DLLComponentLoader.java
@@ -87,7 +87,7 @@ public class DLLComponentLoader extends TestCase {
tEnv.addObjRelation("ImplementationLoader",
"com.sun.star.loader.SharedLibrary") ;
String os = (String) Param.get("OS");
- if (os == null || os == "")
+ if (os == null || os.equals(""))
throw new StatusException(
"Couldn't determine operating system for naming convention.",
new NullPointerException());
commit dc53e3027bb1a278164f15d0a31f20c15608d10e
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 20 15:30:36 2014 +0200
java: simplify conditions involving logical negation
Change-Id: Ib45e58273e650ef9a31dbdb5f71e995a5976f50e
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
index fbaf25e..4c273e9 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
@@ -275,8 +275,8 @@ public class SampleHyphenator extends ComponentBase implements
// check if hyphenation pos is valid,
// a value of -1 indicates that hyphenation is not possible
if ( nHyphenationPos != -1 &&
- !(nHyphenationPos < nHyphMinLeading) &&
- !(nHyphenationPos >= aWord.length() - nHyphMinTrailing))
+ (nHyphenationPos > nHyphMinLeading) &&
+ (nHyphenationPos < aWord.length() - nHyphMinTrailing))
{
xRes = new XHyphenatedWord_impl(aWord, aLocale,
nHyphenationPos, aHyphenatedWord, nHyphenPos);
diff --git a/qadevOOo/runner/convwatch/MSOfficePrint.java b/qadevOOo/runner/convwatch/MSOfficePrint.java
index 8216782..b80bdf5 100644
--- a/qadevOOo/runner/convwatch/MSOfficePrint.java
+++ b/qadevOOo/runner/convwatch/MSOfficePrint.java
@@ -788,7 +788,7 @@ public class MSOfficePrint
if (aLine != null)
{
aLine = aLine.trim();
- if ( (! (aLine.length() < 2) ) &&
+ if ( (aLine.length() >= 2 ) &&
(! aLine.startsWith("#")) &&
(! aLine.startsWith(";")) )
{
diff --git a/qadevOOo/runner/convwatch/PerformanceContainer.java b/qadevOOo/runner/convwatch/PerformanceContainer.java
index 9db65e0..f9747fc 100644
--- a/qadevOOo/runner/convwatch/PerformanceContainer.java
+++ b/qadevOOo/runner/convwatch/PerformanceContainer.java
@@ -161,7 +161,7 @@ public class PerformanceContainer /* extends *//* implements */ {
{
sLine = aRandomAccessFile.readLine();
if ( (sLine != null) &&
- (! (sLine.length() < 2) ) &&
+ (sLine.length() >= 2 ) &&
(! sLine.startsWith("#")))
{
if (sLine.startsWith("WordStartTime="))
diff --git a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
index aeebf69..9e2a9c3 100644
--- a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
@@ -635,7 +635,7 @@ public class MSOfficePostscriptCreator implements IOffice
if (aLine != null)
{
aLine = aLine.trim();
- if ( (! (aLine.length() < 2) ) &&
+ if ( (aLine.length() >= 2 ) &&
(! aLine.startsWith("#")) &&
(! aLine.startsWith(";")) )
{
diff --git a/qadevOOo/runner/graphical/PerformanceContainer.java b/qadevOOo/runner/graphical/PerformanceContainer.java
index 9291d01..e21f684 100644
--- a/qadevOOo/runner/graphical/PerformanceContainer.java
+++ b/qadevOOo/runner/graphical/PerformanceContainer.java
@@ -177,7 +177,7 @@ public class PerformanceContainer /* extends *//* implements */ {
{
sLine = aRandomAccessFile.readLine();
if ( (sLine != null) &&
- (! (sLine.length() < 2) ) &&
+ (sLine.length() >= 2 ) &&
(! sLine.startsWith("#")))
{
if (sLine.startsWith("WordStartTime="))
diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java
index d5ac4ba..58fdd01 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -671,7 +671,7 @@ public class OfficeProvider implements AppProvider
if (sep.equalsIgnoreCase("\\"))
{
- if (!(idx2 < 0))
+ if (idx2 >= 0)
{
sysDir = sysDir.substring(1);
}
diff --git a/qadevOOo/tests/java/ifc/sheet/_XAreaLink.java b/qadevOOo/tests/java/ifc/sheet/_XAreaLink.java
index ea20c57..c5026eb 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XAreaLink.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XAreaLink.java
@@ -49,7 +49,7 @@ public class _XAreaLink extends MultiMethodTest {
log.println("testing getDestArea()");
boolean bResult = false;
oORAdd = oObj.getDestArea();
- if (!(oORAdd == null)){ bResult = true; }
+ if (oORAdd != null){ bResult = true; }
tRes.tested("getDestArea()", bResult) ;
}
@@ -63,7 +63,7 @@ public class _XAreaLink extends MultiMethodTest {
boolean bResult = false;
String src = null;
src = oObj.getSourceArea() ;
- if (!(src == null)){ bResult = true; }
+ if (src != null){ bResult = true; }
tRes.tested("getSourceArea()", bResult) ;
}
diff --git a/qadevOOo/tests/java/ifc/sheet/_XScenarioEnhanced.java b/qadevOOo/tests/java/ifc/sheet/_XScenarioEnhanced.java
index 162121c..e573ea4 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XScenarioEnhanced.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XScenarioEnhanced.java
@@ -40,35 +40,35 @@ public class _XScenarioEnhanced extends MultiMethodTest {
CellRangeAddress first = getting[0];
- if (!(first.Sheet == 1)) {
+ if (first.Sheet != 1) {
log.println(
"wrong RangeAddress is returned, expected Sheet=0 and got " +
first.Sheet);
res = false;
}
- if (!(first.StartColumn == 0)) {
+ if (first.StartColumn != 0) {
log.println(
"wrong RangeAddress is returned, expected StartColumn=0 and got " +
first.StartColumn);
res = false;
}
- if (!(first.EndColumn == 10)) {
+ if (first.EndColumn != 10) {
log.println(
"wrong RangeAddress is returned, expected EndColumn=10 and got " +
first.EndColumn);
res = false;
}
- if (!(first.StartRow == 0)) {
+ if (first.StartRow != 0) {
log.println(
"wrong RangeAddress is returned, expected StartRow=0 and got " +
first.StartRow);
res = false;
}
- if (!(first.EndRow == 10)) {
+ if (first.EndRow != 10) {
log.println(
"wrong RangeAddress is returned, expected EndRow=10 and got " +
first.EndRow);
diff --git a/qadevOOo/tests/java/ifc/table/_XCellCursor.java b/qadevOOo/tests/java/ifc/table/_XCellCursor.java
index ff7971a..9c2591f 100644
--- a/qadevOOo/tests/java/ifc/table/_XCellCursor.java
+++ b/qadevOOo/tests/java/ifc/table/_XCellCursor.java
@@ -77,7 +77,7 @@ public class _XCellCursor extends MultiMethodTest {
oAddr = oRange.getRangeAddress();
startCol2 = oAddr.StartColumn;
- if (!(startCol == startCol2)){
+ if (startCol != startCol2){
bResult = true;
}
tRes.tested( "gotoNext()", bResult );
@@ -105,7 +105,7 @@ public class _XCellCursor extends MultiMethodTest {
oAddr = oRange.getRangeAddress();
startRow2 = oAddr.StartRow;
startCol2 = oAddr.StartColumn;
- if (!(startCol == startCol2) || (startRow == startRow2)){
+ if ((startCol != startCol2) || (startRow == startRow2)){
bResult = true;
}
tRes.tested( "gotoOffset()", bResult );
@@ -131,7 +131,7 @@ public class _XCellCursor extends MultiMethodTest {
oAddr = oRange.getRangeAddress();
startCol2 = oAddr.StartColumn;
- if (!(startCol == startCol2)){
+ if (startCol != startCol2){
bResult = true;
}
tRes.tested( "gotoPrevious()", bResult );
diff --git a/qadevOOo/tests/java/ifc/util/_XSearchDescriptor.java b/qadevOOo/tests/java/ifc/util/_XSearchDescriptor.java
index b9a8f55..bc7fc15 100644
--- a/qadevOOo/tests/java/ifc/util/_XSearchDescriptor.java
+++ b/qadevOOo/tests/java/ifc/util/_XSearchDescriptor.java
@@ -49,7 +49,7 @@ public class _XSearchDescriptor extends MultiMethodTest {
log.println("test for getSearchString() ");
searchStr = oObj.getSearchString();
- if (!(searchStr == null)){ bResult = true; }
+ if (searchStr != null){ bResult = true; }
tRes.tested("getSearchString()", bResult);
}
diff --git a/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java b/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
index 969f791..05384a7 100644
--- a/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
+++ b/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
@@ -117,8 +117,7 @@ public class UCBStreamHandler extends URLStreamHandler {
try {
String sUrl = url.toString();
-
- if (!(sUrl.lastIndexOf(separator) == -1)) {
+ if ( sUrl.lastIndexOf(separator) != -1 ) {
String path = sUrl.substring(0, sUrl.lastIndexOf(separator));
if (m_xSimpleFileAccess.isReadOnly(path)) {
diff --git a/wizards/com/sun/star/wizards/db/QueryMetaData.java b/wizards/com/sun/star/wizards/db/QueryMetaData.java
index 4b994ac..a098eea 100644
--- a/wizards/com/sun/star/wizards/db/QueryMetaData.java
+++ b/wizards/com/sun/star/wizards/db/QueryMetaData.java
@@ -125,7 +125,7 @@ public class QueryMetaData extends CommandMetaData
for (int n = 0; n < FieldColumns.length; n++)
{
String sDisplayFieldName = FieldColumns[n].getDisplayFieldName();
- if (!(JavaTools.FieldInList(_DisplayFieldNames, sDisplayFieldName) > -1))
+ if (JavaTools.FieldInList(_DisplayFieldNames, sDisplayFieldName) <= -1)
{
oRemainingFieldColumns.add(FieldColumns[n]);
}
diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
index 57d1215..da043ee 100644
--- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
+++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
@@ -373,7 +373,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
CurDBColumn = getDoc().DBColumnsVector.get(ColIndex);
addLinkedTextSection(xTextCursor, ReportTextDocument.COPYOFGROUPSECTION + Integer.toString(ColIndex + 1), CurDBColumn, CurGroupValue);
OldGroupFieldValues[ColIndex] = CurGroupValue;
- breset = !(ColIndex == GroupFieldCount - 1);
+ breset = ColIndex != GroupFieldCount - 1;
}
}
getRecordParser().getcurrentRecordData(DataVector);
diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
index 80b5b9c..a67928a 100644
--- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
+++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
@@ -343,7 +343,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator<
public void toggleCommandListBox(String[] _NewItems)
{
- boolean bdoenable = !(QueryMetaData.getIncludedCommandNames(_NewItems).length >= CurDBMetaData.getMaxTablesInSelect());
+ boolean bdoenable = QueryMetaData.getIncludedCommandNames(_NewItems).length < CurDBMetaData.getMaxTablesInSelect();
toggleCommandListBox(bdoenable);
}
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java
index 6ed54d9..f7a6864 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.java
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java
@@ -593,7 +593,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
}
else
{
- enableNextButton(!(getCurrentStep() == nMaxStep));
+ enableNextButton(getCurrentStep() != nMaxStep);
}
}
}
diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java
index 1924573..5ac4f0e 100644
--- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java
+++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java
@@ -59,7 +59,7 @@ public class MethodInvocation
{
mMethod = method;
mObject = obj;
- mWithParam = !(paramClass == null);
+ mWithParam = paramClass != null;
}
/**
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java
index f6d6cf2..27f87f0 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java
@@ -164,7 +164,7 @@ public class Format implements Cloneable {
public boolean getAttribute(int attribute) {
if ((mask & attribute) == 0)
return false;
- return (!((attributes & attribute) == 0));
+ return ((attributes & attribute) != 0);
}
/**
@@ -431,4 +431,4 @@ public class Format implements Cloneable {
return true;
}
-}
\ No newline at end of file
+}
commit 726fc58d0cbdb0fa6d71e5c896889a7c5b64cd9c
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 20 15:26:20 2014 +0200
java: log exceptions correctly, using the right version of WARN
Change-Id: Ide21786d5275802ee60de2d5f056aa08cc8497ca
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/ImageProducer.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/ImageProducer.java
index c7c5a36..ae1a827 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/output/ImageProducer.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/ImageProducer.java
@@ -435,11 +435,11 @@ public class ImageProducer
}
catch (IOException e)
{
- LOGGER.warn("Failed to load image from local input-repository" + e);
+ LOGGER.warn("Failed to load image from local input-repository", e);
}
catch (ReportExecutionException e)
{
- LOGGER.warn("Failed to create image from local input-repository" + e);
+ LOGGER.warn("Failed to create image from local input-repository", e);
}
if (!preserveIRI)
commit f635ba068428c66cf979816606fea5ee6f241f78
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 20 15:22:11 2014 +0200
java: remove some unnecessary intermediary object creation
Change-Id: Id4949fa08546e710fbf9bd0c7e3bf62979f29c83
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
index 84c2a8a..d481fbf 100644
--- a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
+++ b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
@@ -264,9 +264,8 @@ public class LocalOfficeWindow
if (getNativeWindowSystemType() == SystemDependent.SYSTEM_XWINDOW )
{
String vendor = System.getProperty("java.vendor");
- if ((vendor.equals("Sun Microsystems Inc.")
- || vendor.equals("Oracle Corporation"))
- && Boolean.parseBoolean(System.getProperty("sun.awt.xembedserver")))
+ if ((vendor.equals("Sun Microsystems Inc.") || vendor.equals("Oracle Corporation"))
+ && Boolean.getBoolean("sun.awt.xembedserver"))
{
xembed = new NamedValue(
"XEMBED",
diff --git a/framework/qa/complex/framework/autosave/Protocol.java b/framework/qa/complex/framework/autosave/Protocol.java
index 77b1dc6..144aea8 100644
--- a/framework/qa/complex/framework/autosave/Protocol.java
+++ b/framework/qa/complex/framework/autosave/Protocol.java
@@ -279,9 +279,9 @@ public class Protocol extends JComponent
// insert line number
if (m_nLine % MARK_DIFF == 0)
- impl_generateColoredHTMLCell(sLine, Long.valueOf(m_nLine).toString(), BGCOLOR_LINECOL, FGCOLOR_LINECOL_MARKED, true);
+ impl_generateColoredHTMLCell(sLine, Long.toString(m_nLine), BGCOLOR_LINECOL, FGCOLOR_LINECOL_MARKED, true);
else
- impl_generateColoredHTMLCell(sLine, Long.valueOf(m_nLine).toString(), BGCOLOR_LINECOL, FGCOLOR_LINECOL_NORMAL, false);
+ impl_generateColoredHTMLCell(sLine, Long.toString(m_nLine), BGCOLOR_LINECOL, FGCOLOR_LINECOL_NORMAL, false);
// add time stamp
impl_generateColoredHTMLCell(sLine, m_aStamp.toString()+" ", BGCOLOR_TIMESTAMP, FGCOLOR_TIMESTAMP, false);
diff --git a/qadevOOo/tests/java/ifc/util/_XURLTransformer.java b/qadevOOo/tests/java/ifc/util/_XURLTransformer.java
index d827f96..3955cb9 100644
--- a/qadevOOo/tests/java/ifc/util/_XURLTransformer.java
+++ b/qadevOOo/tests/java/ifc/util/_XURLTransformer.java
@@ -72,7 +72,7 @@ public class _XURLTransformer extends MultiMethodTest {
url[0].Protocol = "http://";
url[0].Server = server;
- url[0].Port = Integer.valueOf(port).shortValue();
+ url[0].Port = Short.parseShort(port);
url[0].Path = path;
url[0].Name = name;
url[0].Arguments = arguments;
@@ -99,7 +99,7 @@ public class _XURLTransformer extends MultiMethodTest {
url[0].User = user;
url[0].Password = password;
url[0].Server = server;
- url[0].Port = Integer.valueOf(port).shortValue();
+ url[0].Port = Short.parseShort(port);
url[0].Path = path;
url[0].Name = name;
url[0].Main = "ftp://" + user + ":" + password + "@" + server + ":" +
@@ -164,7 +164,7 @@ public class _XURLTransformer extends MultiMethodTest {
res = false;
}
- if (url[0].Port != Integer.valueOf(port).shortValue()) {
+ if (url[0].Port != Short.parseShort(port)) {
log.println("parseStrict works wrong");
log.println("port field : " + url[0].Port);
log.println("expected : " + port);
@@ -235,7 +235,7 @@ public class _XURLTransformer extends MultiMethodTest {
res = false;
}
- if (url[0].Port != Integer.valueOf(port).shortValue()) {
+ if (url[0].Port != Short.parseShort(port)) {
log.println("parseStrict works wrong");
log.println("port field : " + url[0].Port);
log.println("expected : " + port);
@@ -304,7 +304,7 @@ public class _XURLTransformer extends MultiMethodTest {
res = false;
}
- if (url[0].Port != Integer.valueOf(port).shortValue()) {
+ if (url[0].Port != Short.parseShort(port)) {
log.println("parseSmart works wrong");
log.println("port field : " + url[0].Port);
log.println("expected : " + port);
@@ -377,7 +377,7 @@ public class _XURLTransformer extends MultiMethodTest {
res = false;
}
- if (url[0].Port != Integer.valueOf(port).shortValue()) {
+ if (url[0].Port != Short.parseShort(port)) {
log.println("parseSmart works wrong");
log.println("port field : " + url[0].Port);
log.println("expected : " + port);
diff --git a/qadevOOo/tests/java/mod/_sc/ScStyleFamilyObj.java b/qadevOOo/tests/java/mod/_sc/ScStyleFamilyObj.java
index 5d778e1..a9d8505 100644
--- a/qadevOOo/tests/java/mod/_sc/ScStyleFamilyObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScStyleFamilyObj.java
@@ -182,7 +182,7 @@ public class ScStyleFamilyObj extends TestCase {
}
log.println( "adding XNameReplaceINDEX as mod relation to environment" );
- tEnv.addObjRelation("XNameReplaceINDEX", Integer.valueOf(2*THRCNT).toString());
+ tEnv.addObjRelation("XNameReplaceINDEX", Integer.toString(2*THRCNT));
// INSTANCEn : _XNameContainer; _XNameReplace
log.println( "adding INSTANCEn as mod relation to environment" );
diff --git a/qadevOOo/tests/java/mod/_sw/SwXStyleFamily.java b/qadevOOo/tests/java/mod/_sw/SwXStyleFamily.java
index 8d34505..cf84e00 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXStyleFamily.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXStyleFamily.java
@@ -166,7 +166,7 @@ public class SwXStyleFamily extends TestCase {
if ((String)Param.get("THRCNT") != null) {
THRCNT = Integer.parseInt((String)Param.get("THRCNT"));
}
- String nr = Integer.valueOf(THRCNT+1).toString();
+ String nr = Integer.toString(THRCNT+1);
log.println( "adding NameReplaceIndex as mod relation to environment" );
tEnv.addObjRelation("XNameReplaceINDEX", nr);
diff --git a/sc/qa/complex/sc/CalcRTL.java b/sc/qa/complex/sc/CalcRTL.java
index 5921372..9176d5c 100644
--- a/sc/qa/complex/sc/CalcRTL.java
+++ b/sc/qa/complex/sc/CalcRTL.java
@@ -163,21 +163,16 @@ public class CalcRTL /* extends ComplexTestCase */
assertTrue("Anchor has changed",
(previous[0].equals(RL_TB[0]) && previous[0].equals(LR_TB[0])));
assertEquals("HoriOrientPosition has changed",
- 2100, (Integer.valueOf(previous[1]).intValue() + Integer.valueOf(
- RL_TB[1])
- .intValue() +
- Integer.valueOf(LR_TB[1]).intValue()));
+ 2100, Integer.parseInt(previous[1]) + Integer.parseInt(RL_TB[1]) +
+ Integer.parseInt(LR_TB[1]));
assertEquals("VertOrientPosition has changed",
- 3*Integer.valueOf(previous[2]).intValue(),
- (Integer.valueOf(previous[2]).intValue() + Integer.valueOf(
- RL_TB[2])
- .intValue() +
- Integer.valueOf(LR_TB[2]).intValue()));
+ 3*Integer.parseInt(previous[2]),
+ (Integer.parseInt(previous[2]) + Integer.parseInt(RL_TB[2]) +
+ Integer.parseInt(LR_TB[2])));
assertTrue("x-position hasn't changed",
(previous[3].equals(LR_TB[3]) &&
- ((Integer.valueOf(previous[3]).intValue() * (-1)) -
- oShape.getSize().Width != Integer.valueOf(LR_TB[2])
- .intValue())));
+ ((Integer.parseInt(previous[3]) * (-1)) -
+ oShape.getSize().Width != Integer.parseInt(LR_TB[2]))));
assertTrue("Couldn't close document", closeSpreadsheetDocument());
}
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java
index 8be248c..ce16440 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java
@@ -226,4 +226,4 @@ public class IteratorRowCompare implements DiffAlgorithm {
return splitRow;
}
-}
\ No newline at end of file
+}
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java
index 6aa6d25..491f1ac 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java
@@ -239,4 +239,4 @@ public final class PositionBaseRowMerge implements NodeMergeAlgorithm {
}
}
}
-}
\ No newline at end of file
+}
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java
index 980e01e..d72c702 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java
@@ -119,4 +119,4 @@ public class OfficeUtil implements OfficeConstants {
Node nodes[] = nodeVec.toArray(new Node[nodeVec.size()]);
return nodes;
}
-}
\ No newline at end of file
+}
commit 02ace92aba684238622610776b2c618aa04c7a02
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 20 14:56:25 2014 +0200
java: optimise calls to toArray
passing in a correctly sized array requires one less allocation
Change-Id: I6198d226d9b630c99c4e8b6e3d0fdf890c495b44
diff --git a/forms/qa/integration/forms/ListBox.java b/forms/qa/integration/forms/ListBox.java
index a6e5326..96a9d72 100644
--- a/forms/qa/integration/forms/ListBox.java
+++ b/forms/qa/integration/forms/ListBox.java
@@ -229,9 +229,7 @@ public class ListBox extends TestCase
}
// create the table taking all those foreign keys
- m_database.createTable( new HsqlTableDescriptor(
- m_foreignKeyTableName,
- foreignKeyColumns.toArray( new HsqlColumnDescriptor[foreignKeyColumns.size()] ) ) );
+ m_database.createTable( new HsqlTableDescriptor( m_foreignKeyTableName, foreignKeyColumns.toArray( new HsqlColumnDescriptor[foreignKeyColumns.size()] ) ) );
// fill in some data
foreignKeyInsertSQL.append( ")" );
XPreparedStatement statement = connection.prepareStatement( foreignKeyInsertSQL.toString() );
diff --git a/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java b/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java
index d8d64f1..84c263e 100644
--- a/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java
+++ b/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java
@@ -304,7 +304,7 @@ public class CheckModuleAPI extends ComplexTestCase
moduleNames.add(sModuleName);
}
}
- names = moduleNames.toArray(new String[0]);
+ names = moduleNames.toArray(new String[moduleNames.size()]);
}
catch (ParameterNotFoundException ex)
{
@@ -465,7 +465,7 @@ public class CheckModuleAPI extends ComplexTestCase
}
}
- final String[] names = moduleNames.toArray(new String[0]);
+ final String[] names = moduleNames.toArray(new String[moduleNames.size()]);
return names;
}
diff --git a/scripting/java/org/openoffice/idesupport/CommandLineTools.java b/scripting/java/org/openoffice/idesupport/CommandLineTools.java
index 8fa9269..522828e 100644
--- a/scripting/java/org/openoffice/idesupport/CommandLineTools.java
+++ b/scripting/java/org/openoffice/idesupport/CommandLineTools.java
@@ -174,7 +174,7 @@ public class CommandLineTools {
private boolean verbose = false;
private String language = null;
private MethodFinder finder = null;
- private ArrayList scripts = null;
+ private ArrayList<ScriptEntry> scripts = null;
private HashMap properties = new HashMap(3);
public GenerateCommand(String basedir) {
@@ -288,9 +288,7 @@ public class CommandLineTools {
throw new Exception("No valid scripts found");
ParcelDescriptor desc = new ParcelDescriptor(parcelxml, language);
- desc.setScriptEntries((ScriptEntry[])scripts.toArray(new
- ScriptEntry[scripts.size()]));
-
+ desc.setScriptEntries(scripts.toArray(new ScriptEntry[scripts.size()]));
if (properties.size() != 0) {
Enumeration enumer = properties.keys();
commit 04ace01ec5f4c18a294a10f68bb42bddda3b29c4
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 20 14:48:54 2014 +0200
java: remove unnecessary adding of empty strings
Change-Id: I3825ea5fb1eb34ca52659350e202f95abea945a9
diff --git a/qadevOOo/runner/util/AccessibilityTools.java b/qadevOOo/runner/util/AccessibilityTools.java
index c700000..76136e6 100644
--- a/qadevOOo/runner/util/AccessibilityTools.java
+++ b/qadevOOo/runner/util/AccessibilityTools.java
@@ -331,7 +331,7 @@ public class AccessibilityTools {
XAccessibleContext.class, AC);
if (xAC != null) {
- return "" + xAC.getAccessibleRole() + "," +
+ return xAC.getAccessibleRole() + "," +
xAC.getAccessibleName() + "(" +
xAC.getAccessibleDescription() + "):";
}
@@ -345,7 +345,7 @@ public class AccessibilityTools {
xAC = xA.getAccessibleContext();
- return "" + xAC.getAccessibleRole() + "," + xAC.getAccessibleName() +
+ return xAC.getAccessibleRole() + "," + xAC.getAccessibleName() +
"(" + xAC.getAccessibleDescription() + ")";
}
diff --git a/qadevOOo/runner/util/RegistryTools.java b/qadevOOo/runner/util/RegistryTools.java
index 65eacf4..72ef5e7 100644
--- a/qadevOOo/runner/util/RegistryTools.java
+++ b/qadevOOo/runner/util/RegistryTools.java
@@ -321,7 +321,7 @@ public class RegistryTools {
out.print("[BINARY] = {") ;
byte[] bin = key.getBinaryValue() ;
for (int i = 0; i < bin.length; i++)
- out.print("" + bin[i] + ",") ;
+ out.print(bin[i] + ",") ;
out.println("}") ;
} else
if (type.equals(RegistryValueType.ASCIILIST)) {
@@ -342,7 +342,7 @@ public class RegistryTools {
out.print("[LONGLIST] = {") ;
int[] list = key.getLongListValue() ;
for (int i = 0; i < list.length; i++)
- out.print("" + list[i] + ",") ;
+ out.print(list[i] + ",") ;
out.println("}") ;
} else {
out.println("") ;
diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java
index 927658b..cabf818 100644
--- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java
+++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java
@@ -64,7 +64,7 @@ public class _XAccessibleContext extends MultiMethodTest {
*/
public void _getAccessibleChildCount() {
childCount = oObj.getAccessibleChildCount();
- log.println("" + childCount + " children found.");
+ log.println(childCount + " children found.");
tRes.tested("getAccessibleChildCount()", childCount > -1);
}
diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java
index e436233..63de455 100644
--- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java
+++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java
@@ -87,7 +87,7 @@ public class _XAccessibleValue extends MultiMethodTest {
}
if (curVal < minVal || maxVal < curVal) {
- log.println("" + (curVal - minVal) + "," + (maxVal - curVal));
+ log.println((curVal - minVal) + "," + (maxVal - curVal));
log.println("Current value " + curVal + " is not in range ["
+ minVal + "," + maxVal + "]");
result = false;
diff --git a/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java b/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java
index cd8ef6b..dcdca9f 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java
@@ -574,7 +574,7 @@ public class _XBreakIterator extends MultiMethodTest {
locale, charType);
iPos = endPos;
vCharBlockBounds.add(new Boundary(startPos, endPos));
- log.println("" + vCharBlockBounds.size() + "). Bounds: ["
+ log.println(vCharBlockBounds.size() + "). Bounds: ["
+ startPos + "," + endPos + "]; Type = " + charType);
vCharBlockTypes.add(Short.valueOf(charType));
}
diff --git a/qadevOOo/tests/java/ifc/table/_XTableColumns.java b/qadevOOo/tests/java/ifc/table/_XTableColumns.java
index dbe6753..d0d1b03 100644
--- a/qadevOOo/tests/java/ifc/table/_XTableColumns.java
+++ b/qadevOOo/tests/java/ifc/table/_XTableColumns.java
@@ -327,8 +327,8 @@ public class _XTableColumns extends MultiMethodTest {
throws com.sun.star.lang.IndexOutOfBoundsException {
for (int i = 0; i <= lastColumn && i < 3; i++) {
- setCellText(xRange.getCellByPosition(i, 0), "" + i + "a");
- setCellText(xRange.getCellByPosition(i, 1), "" + i + "b");
+ setCellText(xRange.getCellByPosition(i, 0), i + "a");
+ setCellText(xRange.getCellByPosition(i, 1), i + "b");
}
for (int i = 3; i <= lastColumn && i < 10; i++) {
@@ -355,7 +355,7 @@ public class _XTableColumns extends MultiMethodTest {
String c1 = getCellText(xCellRange.getCellByPosition(col, 0));
String c2 = getCellText(xCellRange.getCellByPosition(col, 1));
- if (!((""+ idx + "a").equals(c1) && (""+ idx + "b").equals(c2))) {
+ if (!((idx + "a").equals(c1) && (idx + "b").equals(c2))) {
log.println("FAILED for column " + col + " and index " + idx + "("
+ c1 + "," + c2 + ")");
diff --git a/testtools/com/sun/star/comp/bridge/TestComponent.java b/testtools/com/sun/star/comp/bridge/TestComponent.java
index 89af4ba..4a5c076 100644
--- a/testtools/com/sun/star/comp/bridge/TestComponent.java
+++ b/testtools/com/sun/star/comp/bridge/TestComponent.java
@@ -887,7 +887,7 @@ public class TestComponent {
checkEqual(33, multi.fn33());
checkEqual(41 * 4, multi.fn41(4));
checkEqual(61 * 6, multi.fn61(6));
- checkEqual("62" + "", multi.fn62(""));
+ checkEqual("62", multi.fn62(""));
checkEqual(71 * 7, multi.fn71(7));
checkEqual("72" + "g", multi.fn72("g"));
checkEqual(73, multi.fn73());
diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java
index 112f968..e750ab0 100644
--- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java
+++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java
@@ -63,7 +63,7 @@ public class _XAccessibleContext {
*/
public boolean _getAccessibleChildCount() {
childCount = oObj.getAccessibleChildCount();
- System.out.println("" + childCount + " children found.");
+ System.out.println(childCount + " children found.");
return childCount > -1;
}
diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java
index b18a405..4d54ef1 100644
--- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java
+++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java
@@ -959,7 +959,7 @@ public class _XAccessibleText {
try {
System.out.println("copyText(0,chCount):");
locRes = oObj.copyText(0, chCount);
- System.out.println(""+locRes);
+ System.out.println(locRes);
res &= locRes;
String cbText = null;
@@ -976,7 +976,7 @@ public class _XAccessibleText {
if (chCount > 2) {
System.out.println("copyText(1,chCount-1):");
locRes = oObj.copyText(1, chCount - 1);
- System.out.println(""+locRes);
+ System.out.println(locRes);
res &= locRes;
try {
diff --git a/toolkit/test/accessibility/AccessibleTextHandler.java b/toolkit/test/accessibility/AccessibleTextHandler.java
index b8bf1a2..2190253 100644
--- a/toolkit/test/accessibility/AccessibleTextHandler.java
+++ b/toolkit/test/accessibility/AccessibleTextHandler.java
@@ -166,8 +166,7 @@ class AccessibleTextHandler extends NodeHandler
{
return "[" + nStart + "," + nEnd + "] "
+ "\"" + sWord + "\" \t"
- + "(" + sBefore + ","
- + "" + sBehind + ")";
+ + "(" + sBefore + "," + sBehind + ")";
}
/** Create a text node that lists all strings of a particular text type
commit 060956beaa577c6da46b74dd2f6f4a82a59b884d
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 20 13:51:14 2014 +0200
fix classname in logger
Change-Id: Id4d954059d63036b78cfeb7b14a7ebd8eae73f46
diff --git a/reportbuilder/java/org/libreoffice/report/StorageRepository.java b/reportbuilder/java/org/libreoffice/report/StorageRepository.java
index dbb1266..2f3e424 100644
--- a/reportbuilder/java/org/libreoffice/report/StorageRepository.java
+++ b/reportbuilder/java/org/libreoffice/report/StorageRepository.java
@@ -49,7 +49,7 @@ import org.apache.commons.logging.LogFactory;
public class StorageRepository implements InputRepository, OutputRepository
{
- private static final Log LOGGER = LogFactory.getLog(SDBCReportDataFactory.class);
+ private static final Log LOGGER = LogFactory.getLog(StorageRepository.class);
private static final String REPORT_PROCESSING_FAILED = "ReportProcessing failed";
private XStorage input;
private XStorage output;
commit 610f3388c781055fcfc3f1ea8a027b1b9cbc5bae
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 20 13:48:58 2014 +0200
java: no need to check for null before calling instanceof
the instanceof check returns false when passed a null value
Change-Id: I7742d0d9cf25ef23d9adee7328f701c7efeea8b5
diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java
index 9ceb74d..62ccaa4 100644
--- a/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java
+++ b/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java
@@ -1603,7 +1603,7 @@ class util
static boolean isVoidAny(Object obj)
{
boolean ret= false;
- if( obj != null && obj instanceof Any)
+ if(obj instanceof Any)
{
Any a= (Any) obj;
if( a.getType().getTypeClass().equals( TypeClass.INTERFACE)
diff --git a/jurt/com/sun/star/comp/loader/JavaLoader.java b/jurt/com/sun/star/comp/loader/JavaLoader.java
index 4298d0b..7649d10 100644
--- a/jurt/com/sun/star/comp/loader/JavaLoader.java
+++ b/jurt/com/sun/star/comp/loader/JavaLoader.java
@@ -323,7 +323,7 @@ public class JavaLoader implements XImplementationLoader,
try {
if (null != compfac_method) {
Object ret = compfac_method.invoke( clazz, new Object [] { implementationName } );
- if (null == ret || !(ret instanceof XSingleComponentFactory))
+ if (!(ret instanceof XSingleComponentFactory))
throw new CannotActivateFactoryException(
"No factory object for " + implementationName );
diff --git a/qadevOOo/runner/lib/Parameters.java b/qadevOOo/runner/lib/Parameters.java
index 8c05d77..0e1f6ea 100644
--- a/qadevOOo/runner/lib/Parameters.java
+++ b/qadevOOo/runner/lib/Parameters.java
@@ -71,7 +71,7 @@ public class Parameters implements XPropertySet {
public String get(String paramName) {
Object res = parameters.get(paramName);
- if (res != null && res instanceof String)
+ if (res instanceof String)
return (String)res;
if (defaults != null)
diff --git a/qadevOOo/runner/util/SysUtils.java b/qadevOOo/runner/util/SysUtils.java
index fbcd0cc..cf4b3b5 100644
--- a/qadevOOo/runner/util/SysUtils.java
+++ b/qadevOOo/runner/util/SysUtils.java
@@ -61,7 +61,7 @@ public class SysUtils {
for (int i = 0; i < dfs.length; i++) {
if (dfs[i].MimeType.startsWith("text/plain")) {
Object data = xTrans.getTransferData(dfs[i]);
- if (data != null && data instanceof String) {
+ if (data instanceof String) {
return (String) data;
}
}
diff --git a/qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java b/qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java
index 36761c3..bc8129f 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java
@@ -95,7 +95,7 @@ public class _XCellRangesQuery extends MultiMethodTest {
// and the environment has to be disposed: this is necessary for objects
// that do not make entries on the sheet themselves
Object o = tEnv.getObjRelation("XCellRangesQuery.CREATEENTRIES");
- if (o != null && o instanceof Boolean) {
+ if (o instanceof Boolean) {
bMakeEntriesAndDispose = ((Boolean)o).booleanValue();
}
if(bMakeEntriesAndDispose) {
diff --git a/toolkit/test/accessibility/AccessibilityTreeModelBase.java b/toolkit/test/accessibility/AccessibilityTreeModelBase.java
index b15379e..5ff2d96 100644
--- a/toolkit/test/accessibility/AccessibilityTreeModelBase.java
+++ b/toolkit/test/accessibility/AccessibilityTreeModelBase.java
@@ -52,7 +52,7 @@ public class AccessibilityTreeModelBase
Object aChild = null;
try
{
- if (aParent != null && aParent instanceof AccessibleTreeNode)
+ if (aParent instanceof AccessibleTreeNode)
aChild = ((AccessibleTreeNode)aParent).getChild(nIndex);
else
System.out.println ("getChild called for unknown parent node");
@@ -69,7 +69,7 @@ public class AccessibilityTreeModelBase
Object aChild = null;
try
{
- if (aParent != null && aParent instanceof AccessibleTreeNode)
+ if (aParent instanceof AccessibleTreeNode)
aChild = ((AccessibleTreeNode)aParent).getChildNoCreate(nIndex);
else
System.out.println ("getChild called for unknown parent node");
commit 831051f55e22e909cc140e3ec4d1aae282a92fcd
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 20 13:46:56 2014 +0200
java: remove useless overriding methods
that only call their superclass method
Change-Id: I9be2f69be132eec7918964f504c50df0ae8401a2
diff --git a/qadevOOo/tests/java/ifc/style/_PageStyle.java b/qadevOOo/tests/java/ifc/style/_PageStyle.java
index 6450346..ad3521e 100644
--- a/qadevOOo/tests/java/ifc/style/_PageStyle.java
+++ b/qadevOOo/tests/java/ifc/style/_PageStyle.java
@@ -27,23 +27,4 @@ import ifc.style._PageProperties;
*/
public class _PageStyle extends _PageProperties {
- /**
- * This property is system dependent and printer dependent.
- * Test is used from _PageProperties
- * @see ifc.style._PageProperties
- */
- @Override
- public void _PrinterPaperTray() {
- super._PrinterPaperTray();
- }
-
- /**
- * Create some valid user defined attributes
- * Test is used from _PageProperties
- * @see ifc.style._PageProperties
- */
- @Override
- public void _UserDefinedAttributes() {
- super._UserDefinedAttributes();
- }
}
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoader.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoader.java
index 4943a4f..77a0e49 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoader.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelContentsFolderDataLoader.java
@@ -40,10 +40,6 @@ public class ParcelContentsFolderDataLoader extends UniFileLoader {
return "Office Script Parcel Contents";
}
- protected void initialize() {
- super.initialize();
- }
-
protected FileObject findPrimaryFile(FileObject fo) {
if (!fo.isFolder() ||
!fo.getName().equals(ParcelZipper.CONTENTS_DIRNAME) ||
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java
index 965d11b..64b26c2 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java
@@ -47,10 +47,6 @@ public class ParcelFolderDataLoader extends UniFileLoader {
return "Office Script Parcel Folder";
}
- protected void initialize() {
- super.initialize();
- }
-
protected FileObject findPrimaryFile(FileObject fo) {
if (!fo.isFolder())
return null;
diff --git a/scripting/workben/installer/Banner.java b/scripting/workben/installer/Banner.java
index d9945ac..79e28a7 100644
--- a/scripting/workben/installer/Banner.java
+++ b/scripting/workben/installer/Banner.java
@@ -34,11 +34,6 @@ public class Banner extends Canvas {
}
@Override
- public void update(Graphics g) {
- super.update(g);
- }
-
- @Override
public Dimension getPreferredSize() {
return new Dimension(137, 358);
}
diff --git a/stoc/test/javavm/testapplet/TestApplet.java b/stoc/test/javavm/testapplet/TestApplet.java
index ad090f3..662c1ed 100644
--- a/stoc/test/javavm/testapplet/TestApplet.java
+++ b/stoc/test/javavm/testapplet/TestApplet.java
@@ -56,9 +56,4 @@ public class TestApplet extends java.applet.Applet {
}
}
-
- @Override
- public void paint( Graphics g) {
- super.paint( g);
- }
}
commit 222505c41f32eb39598243e319c6c4c95a851f27
Author: Noel Grandin <noel at peralex.com>
Date: Wed Aug 20 13:44:28 2014 +0200
java: no need to explicitly extend java.lang.Object
Change-Id: I635d1f99aa104909bd53a49c18efd433b9b9cb98
diff --git a/odk/examples/DevelopersGuide/FirstSteps/FirstConnection.java b/odk/examples/DevelopersGuide/FirstSteps/FirstConnection.java
index d38357f..e4b3dff 100644
--- a/odk/examples/DevelopersGuide/FirstSteps/FirstConnection.java
+++ b/odk/examples/DevelopersGuide/FirstSteps/FirstConnection.java
@@ -32,7 +32,7 @@
*
*************************************************************************/
-public class FirstConnection extends java.lang.Object {
+public class FirstConnection {
public static void main(String[] args) {
try {
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java b/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
index d600609..406cdcb 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
@@ -45,7 +45,7 @@ import com.sun.star.text.XTextDocument;
* Provides example code how to enable/disable
* commands.
*/
-public class DisableCommandsTest extends java.lang.Object {
+public class DisableCommandsTest {
/*
* A list of command names
diff --git a/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java b/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java
index a25ae74..6a46745 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java
@@ -41,7 +41,7 @@ import com.sun.star.util.thePathSettings;
* Provides example code how to access and use the
* path pathsettings servce.
*/
-public class PathSettingsTest extends java.lang.Object {
+public class PathSettingsTest {
/*
* List of pre-defined path variables supported by
diff --git a/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java b/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java
index 8f02684..5e0b999 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/PathSubstitutionTest.java
@@ -37,7 +37,7 @@ import com.sun.star.uno.XComponentContext;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.util.XStringSubstitution;
-public class PathSubstitutionTest extends java.lang.Object {
+public class PathSubstitutionTest {
/*
* List of pre-defined path variables supported by
diff --git a/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminationTest.java b/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminationTest.java
index 1dc59d3..23c4922 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminationTest.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/TerminationTest/TerminationTest.java
@@ -37,7 +37,7 @@ import com.sun.star.uno.XComponentContext;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.frame.XDesktop;
-public class TerminationTest extends java.lang.Object {
+public class TerminationTest {
private static boolean atWork = false;
/**
More information about the Libreoffice-commits
mailing list