Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
The current APIs
getText()
,getLong()
, etc return non-null values and if the column has a null value (isNull()
returnstrue
) then calling the get function is a bit undefined. It is undefined because of differences in platform (JVM vs native), it might throw a NPE (native) or it might return some default value (JVM).It is best if the behavior aligns on all platforms, throwing a NPE if the value in the column is null.
To improve the user experience a set of
get*OrNull()
APIs can be introduced to reduce the verbosity ofif (stmt.isNull(0)) null else stmt.getText(0)