From 7078dbb906fa2b5be38781a4141aba5fe279b3ad Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 10 Mar 2014 15:00:16 +0100 Subject: jurt: simplify deprecated XTypeProvider.getImplementationId Change-Id: I6fc237a3274f51b282804b9a08fc063694376780 --- jurt/com/sun/star/comp/loader/FactoryHelper.java | 23 +---------------------- jurt/test/com/sun/star/uno/AnyConverter_Test.java | 2 +- 2 files changed, 2 insertions(+), 23 deletions(-) (limited to 'jurt') 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() -- cgit v1.2.3