Issue 75152 - Java-UNO-Bridge loops at java-lang.Object as uno.Any parameter
Summary: Java-UNO-Bridge loops at java-lang.Object as uno.Any parameter
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P4 Trivial
Target Milestone: ---
Assignee: Stephan Bergmann
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-06 12:02 UTC by chne
Modified: 2013-02-24 21:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description chne 2007-03-06 12:02:02 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);
Comment 1 Stephan Bergmann 2007-03-06 12:53:33 UTC
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.
Comment 2 Stephan Bergmann 2008-08-18 12:59:12 UTC
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>
Comment 3 Stephan Bergmann 2008-08-29 12:54:19 UTC
verified through tests (see above)
Comment 4 Stephan Bergmann 2008-10-29 14:56:38 UTC
.