Community
Participate
Working Groups
Build Identifier: I20110525-0800 1. Create a mapping file and add a type mapping to it 2. In the JPA structure pane, right-click an attribute and add it to the XML 3. Again right-click the added attribute and try to change the type of it to many-to-one or one-to-one The following NPE is thrown: java.lang.NullPointerException at java.lang.String.compareTo(Unknown Source) at java.lang.String.compareTo(Unknown Source) at java.util.Arrays.mergeSort(Unknown Source) at java.util.Arrays.sort(Unknown Source) at java.util.Collections.sort(Unknown Source) at org.eclipse.jpt.common.utility.internal.CollectionTools.sort(CollectionTools.java:1953) The full stack trace is attached. Reproducible: Always
Created attachment 196988 [details] Stack Trace
Created attachment 197639 [details] proposed patch against head This patch filters out mapsId choices with a null mapping name. I approached it this way because it is possible to set a mapping name to null in the orm.xml so we would have to prevent this NPE in that case as well.
checked in to HEAD for 3.0.1
Verified in Build I-3.4.0-20110731180834 Verified you can add an attribute to a mapping file and change it to one-to-one or many-to-one type without error. see the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.0.1