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 /jurt | |
parent | 768d32cf5b7dc35ab1b93e898e1bb5beab43c27c (diff) |
simplify some java static initializers
Change-Id: Ic767b655297bfb5fcfb5cd7878d7131a9cb6b2f1
Diffstat (limited to 'jurt')
-rw-r--r-- | jurt/com/sun/star/comp/loader/FactoryHelper.java | 21 |
1 files changed, 5 insertions, 16 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]; } |