You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the setCharacterStream() method in the PgSQLXML class, the value sent to the database will be null.
The PgSQLXML.setCharacterStream() method needs to be altered to the following:
public synchronized Writer setCharacterStream() throws SQLException {
checkFreed();
initialize();
_active = true; //this line needs to be added
_stringWriter = new StringWriter();
return _stringWriter;
}
Details:
The PgSQLXML.setCharacterStream() code does not set the _active variable to true:
public synchronized Writer setCharacterStream() throws SQLException {
checkFreed();
initialize();
_stringWriter = new StringWriter();
return _stringWriter;
}
When the PgPreparedStatement reads the SQLXML object, it calls the getString() method:
When using the setCharacterStream() method in the PgSQLXML class, the value sent to the database will be null.
The
PgSQLXML.setCharacterStream()
method needs to be altered to the following:Details:
The
PgSQLXML.setCharacterStream()
code does not set the_active
variable to true:When the PgPreparedStatement reads the SQLXML object, it calls the getString() method:
This in turn will call
PgSQLXML.ensureInitialized()
to move the data to the_data
variable.However the
PgSQLXML.ensureInitialized()
method will simply return when_active
is false;The text was updated successfully, but these errors were encountered: