From 3f50c6e050ea922cb720ec88a9f38c991b1906cd Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 5 Nov 2015 14:53:35 +0200 Subject: java: remove ((unnecessary)) parentheses Change-Id: I39fbe3a260c8dbfc203662c54eec4db064b88195 --- qadevOOo/runner/complexlib/ComplexTestCase.java | 2 +- qadevOOo/runner/helper/BuildEnvTools.java | 2 +- qadevOOo/runner/util/InstCreator.java | 2 +- qadevOOo/runner/util/ValueChanger.java | 2 +- qadevOOo/runner/util/utils.java | 2 +- qadevOOo/tests/java/ifc/awt/_XControl.java | 2 +- qadevOOo/tests/java/ifc/beans/_XIntrospection.java | 2 +- qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java | 3 +-- qadevOOo/tests/java/ifc/beans/_XPropertyState.java | 6 +++--- qadevOOo/tests/java/ifc/chart/_XDiagram.java | 2 +- qadevOOo/tests/java/ifc/connection/_XAcceptor.java | 3 +-- qadevOOo/tests/java/ifc/i18n/_XCalendar.java | 2 +- qadevOOo/tests/java/ifc/i18n/_XLocaleData.java | 10 +++++----- qadevOOo/tests/java/ifc/io/_XPersistObject.java | 2 +- .../tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java | 13 ++++++------- .../tests/java/ifc/sdb/_XSingleSelectQueryComposer.java | 14 +++++++------- qadevOOo/tests/java/ifc/sdbc/_XWarningsSupplier.java | 2 +- qadevOOo/tests/java/ifc/text/_XFootnote.java | 2 +- qadevOOo/tests/java/ifc/text/_XPagePrintable.java | 2 +- qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java | 2 +- qadevOOo/tests/java/mod/_forms/GenericModelTest.java | 4 ++-- qadevOOo/tests/java/mod/_forms/OCheckBoxControl.java | 2 +- qadevOOo/tests/java/mod/_forms/OComboBoxControl.java | 2 +- qadevOOo/tests/java/mod/_forms/ODatabaseForm.java | 13 +++++-------- qadevOOo/tests/java/mod/_forms/ODateControl.java | 2 +- qadevOOo/tests/java/mod/_forms/OEditControl.java | 2 +- qadevOOo/tests/java/mod/_forms/OFileControlModel.java | 2 +- qadevOOo/tests/java/mod/_forms/OFormattedControl.java | 2 +- qadevOOo/tests/java/mod/_forms/OFormsCollection.java | 2 +- qadevOOo/tests/java/mod/_forms/OGridControlModel.java | 2 +- qadevOOo/tests/java/mod/_forms/OGroupBoxControl.java | 2 +- qadevOOo/tests/java/mod/_forms/OHiddenModel.java | 4 ++-- qadevOOo/tests/java/mod/_forms/OImageButtonControl.java | 2 +- qadevOOo/tests/java/mod/_forms/OImageControlControl.java | 2 +- qadevOOo/tests/java/mod/_forms/OListBoxControl.java | 2 +- qadevOOo/tests/java/mod/_forms/ONumericControl.java | 2 +- qadevOOo/tests/java/mod/_forms/OPatternControl.java | 2 +- qadevOOo/tests/java/mod/_forms/ORadioButtonControl.java | 2 +- qadevOOo/tests/java/mod/_forms/OScrollBarModel.java | 2 +- qadevOOo/tests/java/mod/_forms/OSpinButtonModel.java | 2 +- qadevOOo/tests/java/mod/_forms/OTimeControl.java | 4 ++-- .../tests/java/mod/_sd/SdXCustomPresentationAccess.java | 3 +-- qadevOOo/tests/java/mod/_sw/SwXMailMerge.java | 2 +- qadevOOo/tests/java/mod/_sw/SwXTextPortion.java | 2 +- qadevOOo/tests/java/mod/_sw/SwXTextPortionEnumeration.java | 2 +- qadevOOo/tests/java/mod/_toolkit/TabController.java | 7 ++----- 46 files changed, 71 insertions(+), 81 deletions(-) (limited to 'qadevOOo') diff --git a/qadevOOo/runner/complexlib/ComplexTestCase.java b/qadevOOo/runner/complexlib/ComplexTestCase.java index 56bc0b986198..4ece6ae2b610 100644 --- a/qadevOOo/runner/complexlib/ComplexTestCase.java +++ b/qadevOOo/runner/complexlib/ComplexTestCase.java @@ -119,7 +119,7 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest int posLeftParenthesis = entryName.indexOf('('); if (posLeftParenthesis != -1) { - String sParameter = (entryName.substring(posLeftParenthesis + 1, entryName.indexOf(')'))); + String sParameter = entryName.substring(posLeftParenthesis + 1, entryName.indexOf(')')); mTestMethodName = entryName; parameter = new String[] { sParameter }; entryName = entryName.substring(0, posLeftParenthesis); diff --git a/qadevOOo/runner/helper/BuildEnvTools.java b/qadevOOo/runner/helper/BuildEnvTools.java index 2c10aa70cad7..b967ee7f5872 100644 --- a/qadevOOo/runner/helper/BuildEnvTools.java +++ b/qadevOOo/runner/helper/BuildEnvTools.java @@ -83,7 +83,7 @@ public class BuildEnvTools { error = true; } - mCygwin = (param.getBool(PropertyName.CYGWIN)); + mCygwin = param.getBool(PropertyName.CYGWIN); if (error) { throw new ParameterNotFoundException(msg); diff --git a/qadevOOo/runner/util/InstCreator.java b/qadevOOo/runner/util/InstCreator.java index de40b07c03b1..d517f0cd1e8c 100644 --- a/qadevOOo/runner/util/InstCreator.java +++ b/qadevOOo/runner/util/InstCreator.java @@ -88,7 +88,7 @@ public class InstCreator implements XInstCreator { XFootnotesSupplier oTTS = UnoRuntime.queryInterface( XFootnotesSupplier.class, xParent ); - return( oTTS.getFootnotes() ); + return oTTS.getFootnotes(); } if ( iDsc instanceof TextSectionDsc ) { diff --git a/qadevOOo/runner/util/ValueChanger.java b/qadevOOo/runner/util/ValueChanger.java index 008b98295f8d..ec796aec5757 100644 --- a/qadevOOo/runner/util/ValueChanger.java +++ b/qadevOOo/runner/util/ValueChanger.java @@ -153,7 +153,7 @@ public class ValueChanger { com.sun.star.style.TabAlign TA1 = com.sun.star.style.TabAlign.CENTER; com.sun.star.style.TabAlign TA2 = com.sun.star.style.TabAlign.RIGHT; - if ((TSold.Alignment).equals(TA1)) + if (TSold.Alignment.equals(TA1)) TS.Alignment = TA2; else TS.Alignment = TA1; diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java index dc019a4fcbfb..2ca7351db781 100644 --- a/qadevOOo/runner/util/utils.java +++ b/qadevOOo/runner/util/utils.java @@ -537,7 +537,7 @@ public class utils { public static boolean isVoid(Object aObject) { if (aObject instanceof com.sun.star.uno.Any) { com.sun.star.uno.Any oAny = (com.sun.star.uno.Any) aObject; - return (oAny.getType().getTypeName().equals("void")); + return oAny.getType().getTypeName().equals("void"); } else { return false; } diff --git a/qadevOOo/tests/java/ifc/awt/_XControl.java b/qadevOOo/tests/java/ifc/awt/_XControl.java index 1dd1da4361f2..0f3c06a25e71 100644 --- a/qadevOOo/tests/java/ifc/awt/_XControl.java +++ b/qadevOOo/tests/java/ifc/awt/_XControl.java @@ -158,7 +158,7 @@ public class _XControl extends MultiMethodTest { requiredMethod("setModel()"); XControlModel the_model = (XControlModel) tEnv.getObjRelation("MODEL"); XControlModel get = oObj.getModel(); - boolean res = (get.equals(the_model)); + boolean res = get.equals(the_model); if (!res) { log.println("getting: "+get.toString()); log.println("expected: "+the_model.toString()); diff --git a/qadevOOo/tests/java/ifc/beans/_XIntrospection.java b/qadevOOo/tests/java/ifc/beans/_XIntrospection.java index c8c96edbc8b6..79d7d1767dbd 100644 --- a/qadevOOo/tests/java/ifc/beans/_XIntrospection.java +++ b/qadevOOo/tests/java/ifc/beans/_XIntrospection.java @@ -44,7 +44,7 @@ public class _XIntrospection extends MultiMethodTest { public void _inspect() { boolean result = true; XIntrospectionAccess xIA = oObj.inspect(oObj); - result = (xIA.hasMethod("acquire",1)); + result = xIA.hasMethod("acquire",1); tRes.tested("inspect()",result); } diff --git a/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java b/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java index 80b96398e0dc..c74f93d7fac8 100644 --- a/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java +++ b/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java @@ -155,8 +155,7 @@ public class _XMultiPropertyStates extends MultiMethodTest { the_first[0] = propName; log.println("Setting " + propName + " to default"); oObj.setPropertiesToDefault(the_first); - result = (oObj.getPropertyStates(the_first)[0].equals - (PropertyState.DEFAULT_VALUE)); + result = oObj.getPropertyStates(the_first)[0].equals(PropertyState.DEFAULT_VALUE); } catch (com.sun.star.beans.UnknownPropertyException e) { log.println("some properties seem to be unknown: " + e.toString()); } diff --git a/qadevOOo/tests/java/ifc/beans/_XPropertyState.java b/qadevOOo/tests/java/ifc/beans/_XPropertyState.java index b7df9cc7c23a..ca7337a7417a 100644 --- a/qadevOOo/tests/java/ifc/beans/_XPropertyState.java +++ b/qadevOOo/tests/java/ifc/beans/_XPropertyState.java @@ -119,7 +119,7 @@ public class _XPropertyState extends MultiMethodTest { boolean result = true ; String localName = pName; if (localName == null) { - localName = (propertySetInfo.getProperties()[0]).Name; + localName = propertySetInfo.getProperties()[0].Name; } try { propDef = oObj.getPropertyDefault(localName); @@ -147,7 +147,7 @@ public class _XPropertyState extends MultiMethodTest { String localName = pName; if (localName == null) { - localName = (propertySetInfo.getProperties()[0]).Name; + localName = propertySetInfo.getProperties()[0].Name; } try { @@ -175,7 +175,7 @@ public class _XPropertyState extends MultiMethodTest { String localName = pName; if (localName == null) { - localName = (propertySetInfo.getProperties()[0]).Name; + localName = propertySetInfo.getProperties()[0].Name; } try { diff --git a/qadevOOo/tests/java/ifc/chart/_XDiagram.java b/qadevOOo/tests/java/ifc/chart/_XDiagram.java index 3d02e7399924..de51ea2e1082 100644 --- a/qadevOOo/tests/java/ifc/chart/_XDiagram.java +++ b/qadevOOo/tests/java/ifc/chart/_XDiagram.java @@ -73,7 +73,7 @@ public class _XDiagram extends MultiMethodTest { String stype = oObj.getDiagramType(); log.println("Current Diagram Type is " + stype); - result = (stype.startsWith("com.sun.star.chart.")); + result = stype.startsWith("com.sun.star.chart."); tRes.tested("getDiagramType()", result); } diff --git a/qadevOOo/tests/java/ifc/connection/_XAcceptor.java b/qadevOOo/tests/java/ifc/connection/_XAcceptor.java index d8f7610654da..686f09a9ead4 100644 --- a/qadevOOo/tests/java/ifc/connection/_XAcceptor.java +++ b/qadevOOo/tests/java/ifc/connection/_XAcceptor.java @@ -125,8 +125,7 @@ public class _XAcceptor extends MultiMethodTest { // creating services required try { - Object oConnector = (tParam.getMSF()). - createInstance("com.sun.star.connection.Connector") ; + Object oConnector = tParam.getMSF().createInstance("com.sun.star.connection.Connector") ; xConnector = UnoRuntime.queryInterface (XConnector.class, oConnector) ; diff --git a/qadevOOo/tests/java/ifc/i18n/_XCalendar.java b/qadevOOo/tests/java/ifc/i18n/_XCalendar.java index 102bf7fc9b28..e04595adbb8c 100644 --- a/qadevOOo/tests/java/ifc/i18n/_XCalendar.java +++ b/qadevOOo/tests/java/ifc/i18n/_XCalendar.java @@ -324,7 +324,7 @@ public class _XCalendar extends MultiMethodTest { log.println("*** " + lang + " ... FAILED ***"); log.println(error); } - res &= (error.equals("")); + res &= error.equals(""); } tRes.tested("setValue()", res); diff --git a/qadevOOo/tests/java/ifc/i18n/_XLocaleData.java b/qadevOOo/tests/java/ifc/i18n/_XLocaleData.java index d94daef71f99..e7060dcb2aae 100644 --- a/qadevOOo/tests/java/ifc/i18n/_XLocaleData.java +++ b/qadevOOo/tests/java/ifc/i18n/_XLocaleData.java @@ -233,7 +233,7 @@ public class _XLocaleData extends MultiMethodTest { for (int i=0;i<7;i++) { Implementation[] impl = oObj.getCollatorImplementations(getLocale(i)); for (int j=0;j