Skip to content

Commit

Permalink
HSEARCH-1552 Simplify null marker handling and collection of simple t…
Browse files Browse the repository at this point in the history
…ypes
  • Loading branch information
emmanuelbernard committed Apr 14, 2014
1 parent f114517 commit a044cc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
Expand Up @@ -1308,17 +1308,7 @@ private FieldBridge guessNullEmbeddedBridge(XProperty member,
return null;
}

if ( EmbeddedTypeMetadata.Container.OBJECT == container ) {
return new NullEncodingFieldBridge( NULL_EMBEDDED_STRING_BRIDGE, indexNullAs );
}
else {
NumericField numericField = member.getAnnotation( NumericField.class );
FieldBridge fieldBridge = bridgeFactory.guessType( null, numericField, member, reflectionManager, configContext.getServiceManager() );
if ( fieldBridge instanceof StringBridge ) {
fieldBridge = new NullEncodingFieldBridge( (StringBridge) fieldBridge, indexNullAs );
}
return fieldBridge;
}
return new NullEncodingFieldBridge( NULL_EMBEDDED_STRING_BRIDGE, indexNullAs );
}

private void validateAllPathsEncountered(XProperty member, PathsContext updatedPathsContext) {
Expand Down
Expand Up @@ -101,7 +101,12 @@ public TrickedJavaReflectionManager(Class<T> class1) {

@Override
public Class toClass(XClass xClazz) {
return class1;
try {
return super.toClass( xClazz );
}
catch (IllegalArgumentException e) {
return class1;
}
}

@Override
Expand Down

0 comments on commit a044cc3

Please sign in to comment.