Lack of synchronization in the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ng string ) { ... This methods javadoc may be "Return UTF-8 encoded byte representation of a String" (PS: Sorry for filing this trivial issue but currently I work on a branch and I do not want to cause a mess here.) Generated stubs do not consistent with Call It seems that we do always have inconsistency with the methods in the Call API and the methods in the Stub. IMO, all the methods that are in Call should be made available via stub. Current stub seems doesnot contain methods like setTimeOut. So shall we fix this ? Plus, one solution for this recurring problem is to use properties to pass parameters via the Call api, so that there is no need to add methods whenever Call changes. I think its better to use the properties from here on. But we need to fix the current problem. CompoundRootAccessor hides exceptions thrown while setting Ognl properties and methods. See http://forums.opensymphony.com/thread.jspa?messageID=19550&#19550 for more description. In CompoundRootAccessor, the OgnlException thrown by an attempt to set a property is rethrown as a new RuntimeException like so (line 53): throw new RuntimeException(msg); I think it should be done either like this: throw new RuntimeException(msg, e); or preferably, like this: throw new RuntimeException(msg, e.getReason() ); Then in interceptors, the runtime exception would either contain the OgnlException wrapping the ultimate cause, or the ultimate cause itself. This would prevent anyone with custom exceptions thrown during property or method setting to retrieve those exceptions at the appropriate place in the interceptor. Context (line 53 labelled at left): public void setProperty(Map context, Object target, Object name, Object value) throws OgnlException { CompoundRoot root = (CompoundRoot) target; OgnlContext ognlContext = (OgnlContext) context; for (Iterator iterator = root.iterator(); iterator.hasNext();) { Object o = iterator.next(); if (o == null) { continue; } try { if (OgnlRuntime.hasSetProperty(ognlContext, o, name)) { OgnlRuntime.setProperty(ognlContext, o, name, value); return; } else if (o instanceof Map) { Map...
View Full Document

This document was uploaded on 10/12/2012.

Ask a homework question - tutors are online