summaryrefslogtreecommitdiff
path: root/jurt
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-03-10 15:00:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-03-10 17:39:56 +0100
commit7078dbb906fa2b5be38781a4141aba5fe279b3ad (patch)
tree67e98de157fcf2b0a8262999983ec2de9808a785 /jurt
parent90b27c9493f4225e1612364b5813971b45b681a6 (diff)
jurt: simplify deprecated XTypeProvider.getImplementationId
Change-Id: I6fc237a3274f51b282804b9a08fc063694376780
Diffstat (limited to 'jurt')
-rw-r--r--jurt/com/sun/star/comp/loader/FactoryHelper.java23
-rw-r--r--jurt/test/com/sun/star/uno/AnyConverter_Test.java2
2 files changed, 2 insertions, 23 deletions
diff --git a/jurt/com/sun/star/comp/loader/FactoryHelper.java b/jurt/com/sun/star/comp/loader/FactoryHelper.java
index ea7536a218e9..861f4e910733 100644
--- a/jurt/com/sun/star/comp/loader/FactoryHelper.java
+++ b/jurt/com/sun/star/comp/loader/FactoryHelper.java
@@ -74,9 +74,6 @@ public class FactoryHelper {
protected Constructor<?> _constructor;
protected String _implName;
protected String _serviceName;
- // keeps the Id for XTypeProvider
- protected static Object _mutex= new Object();
- private static byte[] _implementationId;
protected Factory(Class<?> implClass,
String serviceName,
@@ -387,25 +384,7 @@ public class FactoryHelper {
//XTypeProvider
public byte[] getImplementationId()
{
- synchronized (_mutex)
- {
- if (_implementationId == null)
- {
- int hash = hashCode();
- String sName= getClass().getName();
- byte[] arName= sName.getBytes();
- int nNameLength= arName.length;
-
- _implementationId= new byte[ 4 + nNameLength];
- _implementationId[0]= (byte)(hash & 0xff);
- _implementationId[1]= (byte)((hash >>> 8) & 0xff);
- _implementationId[2]= (byte)((hash >>> 16) & 0xff);
- _implementationId[3]= (byte)((hash >>>24) & 0xff);
-
- System.arraycopy(arName, 0, _implementationId, 4, nNameLength);
- }
- }
- return _implementationId;
+ return new byte[0];
}
//XTypeProvider
public com.sun.star.uno.Type[] getTypes()
diff --git a/jurt/test/com/sun/star/uno/AnyConverter_Test.java b/jurt/test/com/sun/star/uno/AnyConverter_Test.java
index 26492f12de06..b9eee47ccc8f 100644
--- a/jurt/test/com/sun/star/uno/AnyConverter_Test.java
+++ b/jurt/test/com/sun/star/uno/AnyConverter_Test.java
@@ -874,7 +874,7 @@ class ATypeProvider implements com.sun.star.lang.XTypeProvider
public byte[] getImplementationId()
{
- return new byte[]{1,2,3};
+ return new byte[0];
}
public com.sun.star.uno.Type[] getTypes()