Hi,

because bugparade is not working, I post this here :-(

There could be:

public <T> T read() throws SQLException;
public <T> void write(T obj) throws SQLException;

Alternatively, maybe readObject(), writeObject() could be re-engineered with 
generic API.

All other methods then could be deprecated !

E.g. in javax.sql.rowset.serial.SQLInputImpl the code simply could be:
(private getNextAttribute() could be dropped)

    // rename Object[] attrib to attribs !!!

    public <T> T readObject() throws SQLException {
        if (++idx >= attribs.length) {
            throw new SQLException("SQLInputImpl exception: Invalid read " +
                                   "position");
        }
        Object attrib = attribs[idx];
        lastValueWasNull = attrib == null;
        if (attrib instanceof Struct) {
            ...
            ...
            ...
        }
        return (T)attrib;
    }


-Ulf

Reply via email to