Bug 414527 - AbstractCompositeCollectionMapping wrongly returns isCollectionMapping()==true
Summary: AbstractCompositeCollectionMapping wrongly returns isCollectionMapping()==true
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-06 17:25 EDT by Andrei Ilitchev CLA
Modified: 2022-06-09 10:08 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Ilitchev CLA 2013-08-06 17:25:17 EDT
Hit this with ObjectArrayMapping.

AbstractCollectionmapping is not derived from CollectionMapping, therefore
if (mapping.isCollectionMapping()) {
  (CollectionMapping)mapping...

throws ClassCastException.
Comment 1 Tom Ware CLA 2013-08-19 10:17:05 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 2 Andrei Ilitchev CLA 2013-08-19 10:20:59 EDT
Note that currently the code relies in several places upon isCollectionMapping method for the mapping having ContainerPolicy.

The correct fix would introduce a new hasContainer method and a careful code examinatio of all calls to isCollectionMapping should follow to find the cases where hasContainer should be called instead.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:08:54 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink