review request 8006139, add missing methods to javax.sql.rowset.serial.SQLInput/OutputImpl
Ulf Zibis
Ulf.Zibis at CoSoCo.de
Sun Jan 13 11:45:43 UTC 2013
Hi again,
as you imported java.net.URL, you do not need to outline it in the code any more, e.g. line 769.
Am 13.01.2013 12:13, schrieb Ulf Zibis:
> ... and again more general:
> xxx private <T> T readNext() throws SQLException {
> xxx T attrib = (T)getNextAttribute();
> xxx lastValueWasNull = attrib == null;
> xxx return attrib;
> xxx }
>
> 811 public String readNString() throws SQLException {
> 812 return readNext();
> 813 }
Again more simplified:
141 private <T> T getNextAttribute() throws SQLException {
142 if (++idx >= attrib.length) {
143 throw new SQLException("SQLInputImpl exception: Invalid read " +
144 "position");
145 } else {
146 lastValueWasNull = attrib[idx] == null;
146 return (T)attrib[idx];
147 }
148 }
811 public String readNString() throws SQLException {
812 return getNextAttribute();
813 }
-Ulf
More information about the core-libs-dev
mailing list