office-gobmx/ridljar
Damjan Jovanovic 3f84390f58 i#32546# - Java UnoRuntime.getUniqueKey/generateOid do not work reliably
In the Java UNO bridge, UnoRuntime.generateOid() generated the
object-specific part of the OID using java.lang.Object.hashCode(),
which is only 32 bits long, and is commonly overriden and could thus
return values from an even smaller range, so OID collisions were quite
likely.

This changes UnoRuntime.generateOid() to use 128 bit UUIDs for the
object-specific part of the OID, and store these in an object => oid
java.util.WeakHashMap, making OID collisions almost impossible.

Patch by: me
Suggested by: Stephan Bergmann (stephan dot bergmann dot secondary at
googlemail dot com)

(cherry picked from commit 6dd83d1c6c5c580d14ca3d0458be4020603ba118)

Change-Id: I8e851a7a69ac2defefa15e9a00118d8f9fc0da95
Reviewed-on: https://gerrit.libreoffice.org/41576
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-08-25 19:24:50 +02:00
..
com/sun/star i#32546# - Java UnoRuntime.getUniqueKey/generateOid do not work reliably 2017-08-25 19:24:50 +02:00
source/unoloader
test/com/sun/star
BUCK
CustomTarget_javamaker.mk
Jar_ridl.mk
Jar_unoloader.mk
JunitTest_typedesc.mk
JunitTest_uno.mk
JunitTest_util.mk
Makefile
Module_ridljar.mk
pom.ridl.xml
pom.unoloader.xml
README

Implements types for the Java Uno typesystem.