[
https://issues.apache.org/jira/browse/AXIS2-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581947#action_12581947
]
Michele Mazzucco commented on AXIS2-3441:
-----------------------------------------
Here it is
public class OptionsTest {
/**
* @param args
*/
public static void main(String[] args) throws AxisFault{
ServiceClient sender = new ServiceClient();
MessageContext msgCtx = new MessageContext();
msgCtx.getOptions().setProperty("TARGET_SERVICE", "SERVICE1");
msgCtx.getOptions().setProperty("TARGET_ACTION_MAPPING",
"urn:echo");
msgCtx.getOptions().setProperty("COOKIE", "cookie");
// somewhere in the axis2 code there is a call like this where
the parent is set to the same object
msgCtx.getOptions().setParent(msgCtx.getOptions());
Options options = new Options(msgCtx.getOptions());
System.out.println(options.getProperty("TARGET_SERVICE1"));
}
}
> Options.getProperty() causes StackOverflowError if the property is not defined
> ------------------------------------------------------------------------------
>
> Key: AXIS2-3441
> URL: https://issues.apache.org/jira/browse/AXIS2-3441
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3
> Environment: axis2 1.3, java 1.5
> Reporter: Michele Mazzucco
> Assignee: Deepal Jayasinghe
> Priority: Critical
>
> Options.getProperty() throws StackOverflowError if the key doesn't map to any
> value (or points to null). The same applies to almost all get methods (i.e.
> getReplyTo).
> The problem is that if the returned value is null the value is searched on
> the parent -- which is of the same type, and it never stops.
> java.lang.StackOverflowError
> at java.util.HashMap.get(HashMap.java:343)
> at org.apache.axis2.client.Options.getProperty(Options.java:346)
> at org.apache.axis2.client.Options.getProperty(Options.java:349)
> at org.apache.axis2.client.Options.getProperty(Options.java:349)
> at org.apache.axis2.client.Options.getProperty(Options.java:349)
> at org.apache.axis2.client.Options.getProperty(Options.java:349)
> .... and so on
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]