diff options
Diffstat (limited to 'odk')
3 files changed, 7 insertions, 14 deletions
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java index 253ca608b503..2c1aa7cce227 100644 --- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java +++ b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java @@ -190,10 +190,10 @@ public class DialogComponent { } public String[] getSupportedMethodNames() { - String[] retValue= new String[3]; - retValue[0]= aHandlerMethod1; - retValue[1]= aHandlerMethod2; - retValue[2]= aHandlerMethod3; + String[] retValue= new String[] { + aHandlerMethod1, + aHandlerMethod2, + aHandlerMethod3 }; return retValue; } diff --git a/odk/examples/DevelopersGuide/Config/ConfigExamples.java b/odk/examples/DevelopersGuide/Config/ConfigExamples.java index 510425d57e32..e197fd529897 100644 --- a/odk/examples/DevelopersGuide/Config/ConfigExamples.java +++ b/odk/examples/DevelopersGuide/Config/ConfigExamples.java @@ -401,10 +401,7 @@ public class ConfigExamples UnoRuntime.queryInterface(XMultiPropertySet.class, xSubdivision); // variables for multi-element access - String[] aElementNames = new String[2]; - - aElementNames[0] = "XAxis"; - aElementNames[1] = "YAxis"; + String[] aElementNames = new String[] { "XAxis", "YAxis" }; Object[] aElementValues = xSubdivProperties.getPropertyValues(aElementNames); @@ -869,9 +866,7 @@ public class ConfigExamples aSettings[0] = new com.sun.star.beans.NamedValue("HeaderLine",Boolean.TRUE); aSettings[1] = new com.sun.star.beans.NamedValue("FieldDelimiter",";"); - String [] aTableFilter = new String[2]; - aTableFilter[0] = "table.txt"; - aTableFilter[1] = "othertable.txt"; + String [] aTableFilter = new String[] { "table.txt", "othertable.txt" }; storeDataSource(sSampleDataSourceName,sSampleDataSourceURL,"",false,0,aSettings,aTableFilter); } diff --git a/odk/source/com/sun/star/lib/loader/InstallationFinder.java b/odk/source/com/sun/star/lib/loader/InstallationFinder.java index 05ba219bfe8b..d1f8738cbef9 100644 --- a/odk/source/com/sun/star/lib/loader/InstallationFinder.java +++ b/odk/source/com/sun/star/lib/loader/InstallationFinder.java @@ -291,9 +291,7 @@ final class InstallationFinder { String path = null; // start the which process - String[] cmdArray = new String[2]; - cmdArray[0] = WHICH; - cmdArray[1] = SOFFICE; + String[] cmdArray = new String[] { WHICH, SOFFICE }; Process proc = null; Runtime rt = Runtime.getRuntime(); try { |