diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-05 13:19:44 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-08 09:48:19 +0200 |
commit | b6a83e99c8f4442c3c96198ac816dcb99419a67e (patch) | |
tree | 680dc3e55306b355983aa8c810f610015a95bf5d /extensions/qa | |
parent | 8f020a45fa69c9458844b8b621df2e0b15ec3d16 (diff) |
java: remove redundant null checks
Change-Id: Ia42e5ed715fbd3f5b84029a9844da55f307c6260
Diffstat (limited to 'extensions/qa')
-rw-r--r-- | extensions/qa/integration/extensions/ComponentFactory.java | 2 | ||||
-rw-r--r-- | extensions/qa/integration/extensions/ObjectInspector.java | 15 |
2 files changed, 7 insertions, 10 deletions
diff --git a/extensions/qa/integration/extensions/ComponentFactory.java b/extensions/qa/integration/extensions/ComponentFactory.java index 5a449dfda3cc..170e19a43667 100644 --- a/extensions/qa/integration/extensions/ComponentFactory.java +++ b/extensions/qa/integration/extensions/ComponentFactory.java @@ -40,7 +40,7 @@ public class ComponentFactory implements XSingleComponentFactory catch ( java.lang.ClassNotFoundException e ) { } Constructor ctors[] = _handlerClass.getConstructors(); - for ( int i = 0; i < ctors.length && ctors != null; ++i) + for ( int i = 0; i < ctors.length; ++i) { Class ctorParams[] = ctors[i].getParameterTypes(); if ( ( ctorParams.length == 1 ) && ( ctorParams[0].equals( XComponentContext.class ) ) ) diff --git a/extensions/qa/integration/extensions/ObjectInspector.java b/extensions/qa/integration/extensions/ObjectInspector.java index 4dac96782a46..9db57723ba9b 100644 --- a/extensions/qa/integration/extensions/ObjectInspector.java +++ b/extensions/qa/integration/extensions/ObjectInspector.java @@ -129,16 +129,13 @@ public class ObjectInspector extends complexlib.ComplexTestCase private void closeExistentInspector() { Frame existentInspectorFrame = new Frame( m_desktop.findFrame( m_inspectorFrameName, 255 ) ); - if ( existentInspectorFrame != null ) + try { - try - { - existentInspectorFrame.close( true ); - } - catch( com.sun.star.util.CloseVetoException e ) - { - failed( "could not close the existent inspector frame" ); - } + existentInspectorFrame.close( true ); + } + catch( com.sun.star.util.CloseVetoException e ) + { + failed( "could not close the existent inspector frame" ); } } |