Permalink
Browse files

better check on types

  • Loading branch information...
1 parent ddd7261 commit 8c7ab7c72c33ab82c289823e30517ecdf6105b15 @peterneubauer committed Sep 7, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 server-api/src/main/java/org/neo4j/server/rest/repr/MappingWriter.java
@@ -35,8 +35,12 @@ protected boolean isInteractive()
ListWriter newList( RepresentationType type, String param )
{
- //if ( type.listName == null )
- // throw new IllegalStateException( "Invalid list type: " + type );
+ if ( type.valueName == "map" ) {
+ return newList( type.listName, param );
+ }
+ if ( type.listName == null ) {
+ throw new IllegalStateException( "Invalid list type: " + type );
+ }
return newList( type.listName, param );
}

0 comments on commit 8c7ab7c

Please sign in to comment.