diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-04 10:10:02 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-04 11:52:16 +0200 |
commit | dc2cd08af181e8f29ac403a242a15cf4cf7a5bd2 (patch) | |
tree | f2391736f9ad0dbfae6f049051a2f140d370e9a2 | |
parent | Consistency around SdrMetricItem in svx/sdtditm.hxx (diff) | |
download | core-dc2cd08af181e8f29ac403a242a15cf4cf7a5bd2.tar.gz core-dc2cd08af181e8f29ac403a242a15cf4cf7a5bd2.zip |
simplify some java static initializers
Change-Id: Ic767b655297bfb5fcfb5cd7878d7131a9cb6b2f1
-rw-r--r-- | jurt/com/sun/star/comp/loader/FactoryHelper.java | 21 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java | 6 |
2 files changed, 7 insertions, 20 deletions
diff --git a/jurt/com/sun/star/comp/loader/FactoryHelper.java b/jurt/com/sun/star/comp/loader/FactoryHelper.java index 191aa1d9e833..64ef51fbca5f 100644 --- a/jurt/com/sun/star/comp/loader/FactoryHelper.java +++ b/jurt/com/sun/star/comp/loader/FactoryHelper.java @@ -55,17 +55,6 @@ public class FactoryHelper { static protected class Factory implements XSingleServiceFactory, XSingleComponentFactory, XServiceInfo, XTypeProvider { - protected static Class<?> __objectArray; - - static { - try { - __objectArray = Class.forName("[Ljava.lang.Object;"); - } - catch(ClassNotFoundException classNotFoundException) { - System.err.println(FactoryHelper.class.getName() + " exception occurred - " + classNotFoundException); - } - } - // private static final boolean DEBUG = false; protected XMultiServiceFactory _xMultiServiceFactory; @@ -92,7 +81,7 @@ public class FactoryHelper { if(parameters.length == 3 && parameters[0].equals(XComponentContext.class) && parameters[1].equals(XRegistryKey.class) - && parameters[2].equals(__objectArray)) { + && parameters[2].equals(Object[].class)) { _nCode = 0; _constructor = constructors[i]; } @@ -104,7 +93,7 @@ public class FactoryHelper { } else if(parameters.length == 2 && parameters[0].equals(XComponentContext.class) - && parameters[1].equals(__objectArray)) { + && parameters[1].equals(Object[].class)) { _nCode = 2; _constructor = constructors[i]; } @@ -117,7 +106,7 @@ public class FactoryHelper { else if(parameters.length == 3 && parameters[0].equals(XMultiServiceFactory.class) && parameters[1].equals(XRegistryKey.class) - && parameters[2].equals(__objectArray)) { + && parameters[2].equals(Object[].class)) { _nCode = 4; _constructor = constructors[i]; } @@ -129,7 +118,7 @@ public class FactoryHelper { } else if(parameters.length == 2 && parameters[0].equals(XMultiServiceFactory.class) - && parameters[1].equals(__objectArray)) { + && parameters[1].equals(Object[].class)) { _nCode = 6; _constructor = constructors[i]; } @@ -139,7 +128,7 @@ public class FactoryHelper { _constructor = constructors[i]; } else if(parameters.length == 1 - && parameters[0].equals(__objectArray)) { + && parameters[0].equals(Object[].class)) { _nCode = 8; _constructor = constructors[i]; } diff --git a/qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java b/qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java index 773ea0a1490f..8f454c7a2e75 100644 --- a/qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java +++ b/qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java @@ -220,12 +220,10 @@ public class _XExtendedIndexEntrySupplier extends MultiMethodTest { */ public static class UnicodeStringPair { final static int valCount = 78; - static String[] sStringEquivalence = null; - static char[] iUnicodeEquivalence = null; + static final String[] sStringEquivalence = new String[valCount]; + static final char[] iUnicodeEquivalence = new char[valCount]; static { - sStringEquivalence = new String[valCount]; - iUnicodeEquivalence = new char[valCount]; fillValues(); } |