Bug 1050851

Summary: java.util.Collection subclasses used as import suggestions are not managed well
Product: [Retired] JBoss BPMS Platform 6 Reporter: Walter Medvedeo <wmedvede>
Component: Data ModelerAssignee: Walter Medvedeo <wmedvede>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Locker <jlocker>
Severity: urgent Docs Contact:
Priority: high    
Version: 6.0.0CC: etirelli, mbaluch, pzapataf, wmedvede
Target Milestone: ER1   
Target Release: 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:03:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screen1
none
Screen2 none

Description Walter Medvedeo 2014-01-09 08:51:17 UTC
Created attachment 847538 [details]
Screen1

When an import suggestion of class X is defined, and X is a subclass of java.util.Collection the following issue was detected.

1) Asuming we added for example an import suggestion of class X that extends java.util.Collection

2) Then we open the data modeller and add a property e.g. theList of type X. (see attached file Screen1)

3) save the model in order to generate the pojos

4) open again the datamodeler. We we go to the pojo that have the property "theList" we will see it wrong. (see attached file Screen2)

Comment 1 Walter Medvedeo 2014-01-09 08:51:57 UTC
Created attachment 847539 [details]
Screen2

Comment 3 Walter Medvedeo 2014-01-09 12:37:18 UTC
The following commit solves the issue in master branch:

https://github.com/droolsjbpm/kie-wb-common/commit/eb4a35e990317ca4dc19a0233d5dabd6272e834f

Comment 4 Walter Medvedeo 2014-01-13 17:24:39 UTC
This additional commit is the cherry-pick to the 6.0.x branch

http://github.com/droolsjbpm/kie-wb-common/commit/541417850

Comment 5 Marek Baluch 2014-03-13 08:29:55 UTC
Verified on 6.0.1.ER2.

Could not reproduce on 6.0.0.GA because the 'Create' new import button does not react to mouse events. But I was able to model the object with the array in 6.0.1.ER2 without the issue.