Apache OpenOffice (AOO) Bugzilla – Issue 75152
Java-UNO-Bridge loops at java-lang.Object as uno.Any parameter
Last modified: 2013-02-24 21:09:47 UTC
if a uno methods accepts uno.Any as parameter and you fill this parameter with java.lang.Object the Java-UNO-Bridge loops until stack overflow. Example: unoObject.method(java.lang.Object);
In jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java:1.19, writeValue recursively calls writeAnyValue, which uses TypeDescription.getTypeDescription to find out that a java.lang.Object is of UNO type ANY, so recursively again calls writeValue to write the same ANY value. While it is a violation of the Java UNO language binding specification to pass an instance of exact type java.lang.Object where a UNO ANY is required, it would be nice if this were detected with some RuntimeException instead of a StackOverflowError.
fixed as jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java:1.20.8.1 with tests at bridges/test/java_uno/any/TestAny.java:1.5.20.1 (see <http://wiki.services.openoffice.org/wiki/Uno/Binary/Modules/bridges#Tests>) on <http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fsb93>
verified through tests (see above)
.