Issue Details (XML | Word | Printable)

Key: NUCCORE-1246
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Nick Caballero
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Core

TypeConverter cannot use basic inheritance

Created: 19/Aug/14 01:24 AM   Updated: 29/Aug/14 09:59 AM   Resolved: 19/Aug/14 08:30 AM
Component/s: Java Types
Affects Version/s: 4.0.1
Fix Version/s: 4.0.2

File Attachments: 1. Text File NUCCORE-1246.patch (2 kB)



 Description  « Hide
The {{TypeConverter}} interface is being checked for the data store type through reflection using {{getDeclaredMethods}}. Unfortunately, this makes it impossible to use if the type converter is extending a base class unless the type converter overrides the class.

The problem method is {{org.datanucleus.store.types.converters.TypeConverterHelper#getDatastoreTypeForTypeConverter}}

Sort Order: Ascending order - Click to sort in descending order
Nick Caballero added a comment - 19/Aug/14 01:27 AM
In order to avoid this, the child class must override the methods in the super class. However, the TypeConverterHelper should be using getMethod instead.

Nick Caballero added a comment - 19/Aug/14 01:36 AM
Attaching proposed patch

Andy Jefferson added a comment - 19/Aug/14 08:30 AM
GitHub master has this now, thx