diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-05 14:53:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-05 14:55:16 +0200 |
commit | 3f50c6e050ea922cb720ec88a9f38c991b1906cd (patch) | |
tree | 3142aef5dcdb47f4de7b1dab7efa855ce391a477 /sw | |
parent | b73db446ac9681fdfc4ad602c6da7ce3e36a8588 (diff) |
java: remove ((unnecessary)) parentheses
Change-Id: I39fbe3a260c8dbfc203662c54eec4db064b88195
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/complex/writer/CheckIndexedPropertyValues.java | 11 | ||||
-rw-r--r-- | sw/qa/complex/writer/CheckNamedPropertyValues.java | 9 | ||||
-rw-r--r-- | sw/qa/complex/writer/TextPortionEnumerationTest.java | 6 |
3 files changed, 11 insertions, 15 deletions
diff --git a/sw/qa/complex/writer/CheckIndexedPropertyValues.java b/sw/qa/complex/writer/CheckIndexedPropertyValues.java index 338f7065e02c..83d58c46cb0c 100644 --- a/sw/qa/complex/writer/CheckIndexedPropertyValues.java +++ b/sw/qa/complex/writer/CheckIndexedPropertyValues.java @@ -35,12 +35,11 @@ public class CheckIndexedPropertyValues { @Test public void checkIndexedPropertyValues() throws com.sun.star.uno.Exception { - XIndexContainer xCont = UnoRuntime.queryInterface( - XIndexContainer.class, - (connection.getComponentContext().getServiceManager(). - createInstanceWithContext( - "com.sun.star.document.IndexedPropertyValues", - connection.getComponentContext()))); + Object instance = connection.getComponentContext().getServiceManager(). + createInstanceWithContext( + "com.sun.star.document.IndexedPropertyValues", + connection.getComponentContext()); + XIndexContainer xCont = UnoRuntime.queryInterface(XIndexContainer.class, instance); assertNotNull("XIndexContainer was queried but returned null.", xCont); PropertyValue[] prop1 = new PropertyValue[1]; diff --git a/sw/qa/complex/writer/CheckNamedPropertyValues.java b/sw/qa/complex/writer/CheckNamedPropertyValues.java index 602cab199482..d09ebb6b2f92 100644 --- a/sw/qa/complex/writer/CheckNamedPropertyValues.java +++ b/sw/qa/complex/writer/CheckNamedPropertyValues.java @@ -35,12 +35,9 @@ public class CheckNamedPropertyValues { @Test public void checkNamedPropertyValues() throws com.sun.star.uno.Exception { - XNameContainer xCont = UnoRuntime.queryInterface( - XNameContainer.class, - (connection.getComponentContext().getServiceManager(). - createInstanceWithContext( - "com.sun.star.document.NamedPropertyValues", - connection.getComponentContext()))); + Object instance = connection.getComponentContext().getServiceManager(). + createInstanceWithContext( "com.sun.star.document.NamedPropertyValues", connection.getComponentContext()); + XNameContainer xCont = UnoRuntime.queryInterface(XNameContainer.class, instance); assertNotNull("XNameContainer was queried but returned null.", xCont); PropertyValue[] prop1 = new PropertyValue[1]; diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java index f534dd263819..694d2f3f064f 100644 --- a/sw/qa/complex/writer/TextPortionEnumerationTest.java +++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java @@ -253,7 +253,7 @@ abstract class ContentNode extends TreeNode return super.toString() + "\tcontent: " + m_Content; } boolean equals(ContentNode other) { - return (other.m_Content.equals(m_Content)); + return other.m_Content.equals(m_Content); } } @@ -4145,8 +4145,8 @@ public class TextPortionEnumerationTest static boolean eq(StringPair i_Left, StringPair i_Right) { - return ((i_Left.First).equals(i_Right.First)) && - ((i_Left.Second).equals(i_Right.Second)); + return (i_Left.First.equals(i_Right.First)) && + (i_Left.Second.equals(i_Right.Second)); } @BeforeClass public static void setUpConnection() throws Exception { |