Bug 976294 - regression: using a ResourceAdaptor (rar) which has properties that use primitives as arguments will fail to deploy
Summary: regression: using a ResourceAdaptor (rar) which has properties that use primi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JCA
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER4
: EAP 6.1.1
Assignee: Tom Fonteyne
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-20 10:05 UTC by Tom Fonteyne
Modified: 2018-12-02 17:03 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-16 20:27:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-1517 0 Major Resolved regression: using a ResourceAdaptor (rar) which has properties that use primitives as arguments will fail to deploy 2016-11-02 06:48:49 UTC

Description Tom Fonteyne 2013-06-20 10:05:26 UTC
org.jboss.as.connector.util.Injection.java:159

protected Method findMethod(Class<?> clz, String methodName, String propertyType) {
while (!clz.equals(Object.class)) {
List<Method> hits = null;
Method[] methods = clz.getDeclaredMethods();
for (int i = 0; i < methods.length; i++) {
Method method = methods[i];
if (methodName.equals(method.getName()) && method.getParameterTypes().length == 1) {
if (propertyType == null || propertyType.equals(method.getParameterTypes()[0].getName())) {

the above is not taking primitives into account.
Example, the IBM IMS connector ims1132.rar has:

<config-property>
<config-property-name>enableHASupport</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>true</config-property-value>
</config-property>

and the method:

public void setEnableHASupport(boolean isHAEnabled)

Our "FindMethod" will find this method but will fail to select it as it compares "java.lang.Boolean" with "boolean"

Comment 1 Tom Fonteyne 2013-06-20 10:32:01 UTC
this BZ raised to backport WFLY-1517 to EAP 6.x upstream

Comment 2 Tom Fonteyne 2013-06-20 11:02:38 UTC
pull request send:

https://github.com/jbossas/jboss-eap/pull/190

Comment 3 Tom Fonteyne 2013-06-21 14:47:27 UTC
New pull request send to 6.1.x branch as instructed by Carlo

https://github.com/jbossas/jboss-eap/pull/194

Comment 4 Vladimir Rastseluev 2013-08-01 06:37:19 UTC
Verified on EAP 6.1.1.ER4


Note You need to log in before you can comment on or make changes to this bug.