Permalink
Browse files

fixed MatchClauseUnitTest

  • Loading branch information...
jexp committed Sep 23, 2011
1 parent 73cf0ce commit 05996a3480451f4089a98fbbfa16b9f9f53d2d7e
@@ -55,9 +55,10 @@ public RelationshipInfo(String type, Direction direction, TypeInformation<?> typ
}
private boolean isNodeEntity(TypeInformation<?> targetType) {
- if (targetType.getType().isAnnotationPresent(NodeEntity.class)) return true;
- if (targetType.getType().isAnnotationPresent(RelationshipEntity.class)) return false;
- throw new MappingException("Target type for relationship "+ type +" field is invalid "+targetType);
+ final Class<?> type = targetType.getType();
+ if (type.isAnnotationPresent(NodeEntity.class)) return true;
+ if (type.isAnnotationPresent(RelationshipEntity.class)) return false;
+ throw new MappingException("Target type for relationship "+ this.type +" field is invalid "+type);
}
public static RelationshipInfo fromField(Field field, TypeInformation<?> typeInformation) {
@@ -76,6 +76,7 @@ public void stopsAtNonRelationShipProperty() {
private Group group;
}
+ @NodeEntity
class Group {
@Indexed

0 comments on commit 05996a3

Please sign in to comment.