[Libreoffice-commits] core.git: jurt/com qadevOOo/tests
Noel Grandin
noel at peralex.com
Mon Aug 4 02:53:00 PDT 2014
jurt/com/sun/star/comp/loader/FactoryHelper.java | 21 ++--------
qadevOOo/tests/java/ifc/i18n/_XExtendedIndexEntrySupplier.java | 6 --
2 files changed, 7 insertions(+), 20 deletions(-)
New commits:
commit dc2cd08af181e8f29ac403a242a15cf4cf7a5bd2
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 4 10:10:02 2014 +0200
simplify some java static initializers
Change-Id: Ic767b655297bfb5fcfb5cd7878d7131a9cb6b2f1
diff --git a/jurt/com/sun/star/comp/loader/FactoryHelper.java b/jurt/com/sun/star/comp/loader/FactoryHelper.java
index 191aa1d..64ef51f 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 773ea0a..8f454c7 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();
}
More information about the Libreoffice-commits
mailing list