Skip to content

Commit

Permalink
Fixes a faulty handling of potentially null objects returned by the J…
Browse files Browse the repository at this point in the history
…VM API.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@278 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Sep 30, 2009
1 parent 2293cc2 commit a6297b9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/org/olap4j/driver/xmla/proxy/XmlaOlap4jHttpProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,12 @@ public byte[] getResponse(URL url, String request)
new ByteArrayOutputStream();
final byte[] buf = new byte[1024];
int count;
while ((count = errorStream.read(buf)) > 0) {
baos.write(buf, 0, count);
if (errorStream != null) {
while ((count = errorStream.read(buf)) > 0) {
baos.write(buf, 0, count);
}
errorStream.close();
}
errorStream.close();
baos.close();
} catch (IOException ex) {
// Well, we tried. No point notifying the user here.
Expand Down

0 comments on commit a6297b9

Please sign in to comment.