Skip to content

Commit

Permalink
fixed null collections
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmhess committed Oct 9, 2015
1 parent f79d821 commit 4e8135d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/datastax/loader/parser/ListParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public ListParser(Parser inParser, char inCollectionDelim,
}

public Object parse(String toparse) throws ParseException {
if (null == toparse)
return null;
if (!toparse.startsWith(Character.toString(collectionBegin)))
throw new ParseException("Must begin with " + collectionBegin
+ "\n", 0);
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/datastax/loader/parser/MapParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public MapParser(Parser inKeyParser, Parser inValueParser,
elements = new HashMap<Object,Object>();
}
public Object parse(String toparse) throws ParseException {
if (null == toparse)
return null;
if (!toparse.startsWith(Character.toString(collectionBegin)))
throw new ParseException("Must begin with " + collectionBegin
+ "\n", 0);
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/datastax/loader/parser/SetParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public SetParser(Parser inParser, char inCollectionDelim,
elements = new HashSet<Object>();
}
public Object parse(String toparse) throws ParseException {
if (null == toparse)
return null;
if (!toparse.startsWith(Character.toString(collectionBegin)))
throw new ParseException("Must begin with " + collectionBegin
+ "\n", 0);
Expand Down

0 comments on commit 4e8135d

Please sign in to comment.