From 28f5e1b27c4150847cc4c2654c55d2881574a81a Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Mon, 15 Aug 2011 02:49:39 +0200 Subject: Some PMD cleaning --- forms/qa/integration/forms/FormControlTest.java | 6 ++++-- .../qa/complex/accelerators/AcceleratorsConfigurationTest.java | 3 +-- l10ntools/source/filter/utils/FileHelper.java | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/forms/qa/integration/forms/FormControlTest.java b/forms/qa/integration/forms/FormControlTest.java index 7fdf68dea796..6c455a8064f4 100644 --- a/forms/qa/integration/forms/FormControlTest.java +++ b/forms/qa/integration/forms/FormControlTest.java @@ -679,10 +679,12 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE { try { - if ( fieldName.equals( "f_time" ) ) + if ( ( "f_time" ).equals(fieldName) ) // http://bugs.mysql.com/bug.php?id=5681 return true; - + if (fieldName == null) { + return false; + } int currentValue = ((Integer)getControlModel( fieldName ).getPropertyValue( propertyName )).intValue(); if ( currentValue != requiredValue ) { diff --git a/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java b/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java index b0d89ad81858..4a476be4ab96 100755 --- a/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java +++ b/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java @@ -836,8 +836,7 @@ public class AcceleratorsConfigurationTest private XMultiServiceFactory getMSF() { - final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); - return xMSF1; + return(UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager())); } // setup and close connections diff --git a/l10ntools/source/filter/utils/FileHelper.java b/l10ntools/source/filter/utils/FileHelper.java index 38019cf628df..239711cfbc57 100644 --- a/l10ntools/source/filter/utils/FileHelper.java +++ b/l10ntools/source/filter/utils/FileHelper.java @@ -80,8 +80,8 @@ public class FileHelper // => correct this problem first, otherwise office can't use these URL's if( (sFileURL != null ) && - (sFileURL.startsWith("file:/") == true ) && - (sFileURL.startsWith("file://") == false) + (sFileURL.startsWith("file:/")) && + (!sFileURL.startsWith("file://")) ) { java.lang.StringBuffer sWorkBuffer = new java.lang.StringBuffer(sFileURL); -- cgit