You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Chad Schoettger (JIRA)" <de...@beehive.apache.org> on 2006/02/13 20:54:42 UTC
[jira] Created: (BEEHIVE-1066) Method signature names may conflict
with local variables in generated controls files
Method signature names may conflict with local variables in generated controls files
------------------------------------------------------------------------------------
Key: BEEHIVE-1066
URL: http://issues.apache.org/jira/browse/BEEHIVE-1066
Project: Beehive
Type: Bug
Components: Controls
Versions: v1m1
Reporter: Chad Schoettger
Assigned to: Chad Schoettger
In the velocity templates used to generate controls, it is possible for there to be a name conflict (which causes a compilation error) if a user created control method contains a parameter with a name that happens to be the same as a local variable in the template.
For example,
/**
* Implements services.UpgradeTypesServerControl.getSetXmlObject
*/
public org.apache.xmlbeans.XmlObject getSetXmlObject(org.apache.xmlbeans.XmlObject t)
{
Object [] argArray = new Object[] { t };
Throwable thrown = null;
org.apache.beehive.controls.api.bean.Extensible target =
(org.apache.beehive.controls.api.bean.Extensible)ensureControl();
org.apache.xmlbeans.XmlObject retval = null;
try
{
preInvoke(_getSetXmlObjectMethod, argArray);
retval =
(org.apache.xmlbeans.XmlObject)
target.invoke(_getSetXmlObjectMethod, argArray)
;
}
catch (Throwable t)
{
//
// All exceptions are caught here, so postInvoke processing has visibility into
// the exception status. Errors, RuntimExceptions, or declared checked exceptions will
// be rethrown.
//
thrown = t;
if (t instanceof Error) throw (Error)t;
else if (t instanceof RuntimeException) throw (RuntimeException)t;
throw new java.lang.reflect.UndeclaredThrowableException(t);
}
finally
{
Object rv = retval;
postInvoke(_getSetXmlObjectMethod, argArray, rv, thrown);
}
return retval;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (BEEHIVE-1066) Method signature names may conflict
with local variables in generated controls files
Posted by "Chad Schoettger (JIRA)" <de...@beehive.apache.org>.
[ http://issues.apache.org/jira/browse/BEEHIVE-1066?page=all ]
Chad Schoettger resolved BEEHIVE-1066:
--------------------------------------
Resolution: Fixed
Assign To: Jacob Danner (was: Chad Schoettger)
Resolved svn rev 378038, added '__bc_' prefix to local variables in control's velocity templates.
> Method signature names may conflict with local variables in generated controls files
> ------------------------------------------------------------------------------------
>
> Key: BEEHIVE-1066
> URL: http://issues.apache.org/jira/browse/BEEHIVE-1066
> Project: Beehive
> Type: Bug
> Components: Controls
> Versions: v1m1
> Reporter: Chad Schoettger
> Assignee: Jacob Danner
>
> In the velocity templates used to generate controls, it is possible for there to be a name conflict (which causes a compilation error) if a user created control method contains a parameter with a name that happens to be the same as a local variable in the template.
> For example,
> /**
> * Implements services.UpgradeTypesServerControl.getSetXmlObject
> */
> public org.apache.xmlbeans.XmlObject getSetXmlObject(org.apache.xmlbeans.XmlObject t)
> {
> Object [] argArray = new Object[] { t };
> Throwable thrown = null;
> org.apache.beehive.controls.api.bean.Extensible target =
> (org.apache.beehive.controls.api.bean.Extensible)ensureControl();
> org.apache.xmlbeans.XmlObject retval = null;
>
> try
> {
> preInvoke(_getSetXmlObjectMethod, argArray);
>
> retval =
> (org.apache.xmlbeans.XmlObject)
> target.invoke(_getSetXmlObjectMethod, argArray)
> ;
> }
> catch (Throwable t)
> {
> //
> // All exceptions are caught here, so postInvoke processing has visibility into
> // the exception status. Errors, RuntimExceptions, or declared checked exceptions will
> // be rethrown.
> //
> thrown = t;
>
> if (t instanceof Error) throw (Error)t;
> else if (t instanceof RuntimeException) throw (RuntimeException)t;
>
> throw new java.lang.reflect.UndeclaredThrowableException(t);
> }
> finally
> {
> Object rv = retval;
> postInvoke(_getSetXmlObjectMethod, argArray, rv, thrown);
> }
> return retval;
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira