Skip to content

Commit

Permalink
In XMLA driver, treat empty strings for integer attributes as nulls.
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@100 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed Jul 23, 2008
1 parent 8f0c269 commit f806186
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/org/olap4j/driver/xmla/XmlaOlap4jUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ static String stringElement(Element row, String name) {
}

static Integer integerElement(Element row, String name) {
return Integer.valueOf( stringElement(row, name) );
final String s = stringElement(row, name);
if (s == null || s.equals("")) {
return null;
} else {
return Integer.valueOf(s);
}
}

static int intElement(Element row, String name) {
Expand Down

0 comments on commit f806186

Please sign in to comment.