summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorDamjan Jovanovic <damjan@apache.org>2017-08-20 06:22:29 +0000
committerDamjan Jovanovic <damjan@apache.org>2017-08-20 06:22:29 +0000
commit6dd83d1c6c5c580d14ca3d0458be4020603ba118 (patch)
treeae206ee37278203185bf5d82782d30be154a5ca6 /xmloff
parent4c25b8d3ebe3a76793d40182f02d635b5b667321 (diff)
#i32546# - 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)
Notes
Diffstat (limited to 'xmloff')
0 files changed, 0 insertions, 0 deletions