[
https://jira.jboss.org/browse/JBPM-2717?page=com.atlassian.jira.plugin.sy...
]
Alejandro Guizar updated JBPM-2717:
-----------------------------------
Summary: Allow unboxing and widening primitive conversions in property
injection (was: "org.jbpm.pvm.internal.wire.WireException: couldn't initialize
object 'null': couldn't find property setter setXXX for value true" for
native boolean setters)
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
Issue Type: Feature Request (was: Bug)
Applied patch as proposed by Huisheng. Allowed widening primitive conversion in addition
to unboxing.
<!-- fp is a floating point property -->
<property name="fp">
<int value="10" />
</property>
Allow unboxing and widening primitive conversions in property
injection
-----------------------------------------------------------------------
Key: JBPM-2717
URL:
https://jira.jboss.org/browse/JBPM-2717
Project: jBPM
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.3
Environment: Windows Vista, java 1.6, jboss 4.2.2.GA
Reporter: Per Christian Henden
Assignee: Alejandro Guizar
Fix For: jBPM 4.4
Attachments: booleanPropertyBugTest.diff, JBPM-2717.patch, mylyn-context.zip
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
I ran into a problem with accessing boolean properties of an eventListener.
I've attached a patch to trunk of
./modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectWireTest.java that adds a
test that exposes this problem.
Basically, the example below fails with the error
"org.jbpm.pvm.internal.wire.WireException: couldn't initialize object
'null': couldn't find property setter setCreateXml for value true"
JPDL-fragment:
<event-listener expr="#{stateApprovalAction}">
<property name="createXml">
<true/>
</property>
</event-listener>
Java-fragment:
public void setCreateXml(boolean createXml) {
this.createXml = createXml;
}
Workaround: changing the Java-side to use a Boolean instead of a boolean for the method
parameter.
While there is a workaround, I will still suggest supporting both Boolean and
boolean-based setters.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira