]
Emmanuel Bernard resolved HSEARCH-149.
--------------------------------------
Resolution: Fixed
Fix Version/s: 3.0.1
Default FieldBridge for enums passing wrong class to EnumBridge
constructor
---------------------------------------------------------------------------
Key: HSEARCH-149
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-149
Project: Hibernate Search
Issue Type: Bug
Components: mapping
Affects Versions: 3.0.0.GA
Reporter: Marcio Silva
Fix For: 3.0.1
Default FieldBridge for enums introduced in HSEARCH-2 added the following block to
BridgeFactory:
119 + if ( bridge == null && returnType.isEnum() ) {
120 + bridge = new TwoWayString2FieldBridgeAdaptor(
121 + new EnumBridge( (Class<? extends
Enum>) returnType.getClass() )
122 + );
123 + }
This results in errors unmarshalling as the class passed to the EnumBridge constructor
will be the XClass implementation class for the returnType variable.
The code probably needs to load the class by name from returnType, or cast returnType to
a JavaXClass to utilize the toClass() method instead of getClass()
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: