[
https://issues.apache.org/jira/browse/DERBY-2782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502863
]
Kathey Marsden commented on DERBY-2782:
---------------------------------------
I am not sure what changed in 10.3, but I question if the test has valid input.
Here is the read method for the stream. I am not sure that this would always
be a valid character. The new test StreamTest uses real characters instead of
this cast.
Does anyone have thoughts on whether cbuf[i] = (char) (wroteLength % 0x10000L)
always represents a valid character?
public int read( char[] cbuf,
int off,
int len ){
if(wroteLength >= total)
return -1;
int i;
for(i = off ;
i < off + len &&
wroteLength < total ;
i++, wroteLength ++){
cbuf[i] = (char) (wroteLength % 0x10000L);
}
return i - off;
}
> 10.2 client Stream.java test fails when run against 10.3 with Java
> exception: 'Reversed byte-order mark: sun.io.MalformedInputException'.
> ------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2782
> URL: https://issues.apache.org/jira/browse/DERBY-2782
> Project: Derby
> Issue Type: Bug
> Affects Versions: 10.3.0.0
> Reporter: Kathey Marsden
>
> The jdbcapi/Stream.java test run with client and 10.2.1.6 derbyTesting.jar
> and 10.3 product jars fails with
> Java exception: 'Reversed byte-order mark: sun.io.MalformedInputException'.
>
> java.sql.SQLException: An unexpected exception was thrown
> at
> org.apache.derby.client.am.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:46)
> at
> org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:362)
> at
> org.apache.derby.client.am.PreparedStatement.executeUpdate(PreparedStatement.java:391)
> at
> org.apache.derbyTesting.functionTests.tests.jdbcapi.Stream.createLargeClobTestData(Unknown
> Source)
> at
> org.apache.derbyTesting.functionTests.tests.jdbcapi.Stream.createTestData(Unknown
> Source)
> at
> org.apache.derbyTesting.functionTests.tests.jdbcapi.Stream.createTestTables(Unknown
> Source)
> at
> org.apache.derbyTesting.functionTests.tests.jdbcapi.Stream.main(Unknown
> Source)
> Caused by: org.apache.derby.client.am.SqlException: An unexpected exception
> was thrown
> at
> org.apache.derby.client.am.Statement.completeExecute(Statement.java:1498)
> at
> org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(NetStatementReply.java:304)
> at
> org.apache.derby.client.net.NetStatementReply.readExecute(NetStatementReply.java:70)
> at
> org.apache.derby.client.net.StatementReply.readExecute(StatementReply.java:55)
> at
> org.apache.derby.client.net.NetPreparedStatement.readExecute_(NetPreparedStatement.java:183)
> at
> org.apache.derby.client.am.PreparedStatement.readExecute(PreparedStatement.java:1795)
> at
> org.apache.derby.client.am.PreparedStatement.flowExecute(PreparedStatement.java:2115)
> at
> org.apache.derby.client.am.PreparedStatement.executeUpdateX(PreparedStatement.java:396)
> at
> org.apache.derby.client.am.PreparedStatement.executeUpdate(PreparedStatement.java:382)
> ... 4 more
> Caused by: org.apache.derby.client.am.SqlException: Java exception: 'Reversed
> byte-order mark: sun.io.MalformedInputException'.
> at org.apache.derby.client.am.SqlException.<init>(SqlException.java:290)
> at org.apache.derby.client.am.SqlException.<init>(SqlException.java:264)
> ... 13 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.