chandanpasunoori / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

ValueString.get does not accept null strings but Transfer.readString may return them #546

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I run a request through jdbc to a external table of our own implementation
2.A string with length -1 is returned. Transfer.getValue() call readString 
which returns null
3.This null string is directly passed to ValueString.get where 
"if(s.isEmpty())" fails with a null pointer exception

What is the expected output? What do you see instead?

I expect to receive my ResultSet and I get an error instead

Please use labels and text to provide additional information.

Changing "if(s.isEmpty())" to "if(s==null || s.isEmpty())" fixes the problem.

Original issue reported on code.google.com by pascal.m...@density-tech.com on 29 Jan 2014 at 7:31

GoogleCodeExporter commented 9 years ago
Hi,

Could you tell me where exactly in Transfer.getValue() can readString return 
null? Could you provide a simple, reproducible test case?

Regards,
Thomas

Original comment by thomas.t...@gmail.com on 22 Feb 2014 at 7:37

GoogleCodeExporter commented 9 years ago
Closing as works for me.

Original comment by thomas.t...@gmail.com on 5 Apr 2014 at 12:19