
|
If you were logged in you would be able to see more operations.
|
|
|
Hibernate3
Created: 04/Apr/07 03:47 AM
Updated: 14/Aug/07 02:54 PM
|
|
| Component/s: |
core
|
| Affects Version/s: |
3.2.3
|
| Fix Version/s: |
3.3.0.CR1,
3.2.6
|
|
|
The following code block will throw a NullPointerException when targetComponentValues should be determines and target[i] contains a NULL value.
else if ( types[i].isComponentType() ) {
// need to extract the component values and check for subtype replacements...
AbstractComponentType componentType = ( AbstractComponentType ) types[i];
Type[] subtypes = componentType.getSubtypes();
Object[] origComponentValues = original[i] == null ? new Object[subtypes.length] : componentType.getPropertyValues( original[i], session );
Object[] targetComponentValues = componentType.getPropertyValues( target[i], session );
replaceAssociations( origComponentValues, targetComponentValues, subtypes, session, null, copyCache, foreignKeyDirection );
This problem can be fixed the same way as it is prevented when origComponentValues are determined (see following line)
Object[] targetComponentValues = target[i] == null ? new Object[subtypes.length] : componentType.getPropertyValues( target[i], session );
copied[i] = target[i];
}
The problem did not exist in Version 3.2.2
|
|
Description
|
The following code block will throw a NullPointerException when targetComponentValues should be determines and target[i] contains a NULL value.
else if ( types[i].isComponentType() ) {
// need to extract the component values and check for subtype replacements...
AbstractComponentType componentType = ( AbstractComponentType ) types[i];
Type[] subtypes = componentType.getSubtypes();
Object[] origComponentValues = original[i] == null ? new Object[subtypes.length] : componentType.getPropertyValues( original[i], session );
Object[] targetComponentValues = componentType.getPropertyValues( target[i], session );
replaceAssociations( origComponentValues, targetComponentValues, subtypes, session, null, copyCache, foreignKeyDirection );
This problem can be fixed the same way as it is prevented when origComponentValues are determined (see following line)
Object[] targetComponentValues = target[i] == null ? new Object[subtypes.length] : componentType.getPropertyValues( target[i], session );
copied[i] = target[i];
}
The problem did not exist in Version 3.2.2 |
Show » |
|