Konstantin Glazkov created WFLY-7050:
----------------------------------------
Summary: JDK ORB char conversion preceeded by empty string conversion fails
with ArrayIndexOutOfBoundsException
Key: WFLY-7050
URL:
https://issues.jboss.org/browse/WFLY-7050
Project: WildFly
Issue Type: Bug
Components: IIOP
Affects Versions: 10.1.0.Final
Reporter: Konstantin Glazkov
Assignee: Tomasz Adamski
Attachments: empty_string_followed_by_char_conversion_suggested_fix.patch,
empty_string_followed_by_char_conversion_unit_test_fix.patch
If IDL structure contains string and char fields, and generated *Helper#write method looks
like
ostream.write_string (value.string_field); //empty string
ostream.write_char (value.char_field); //any char
without non-empty strings before char field, then write_char method will fail with
stacktrace:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at
com.sun.corba.se.impl.encoding.CodeSetConversion$JavaCTBConverter.convert(CodeSetConversion.java:206)
[openjdk-orb-8.0.6.Final.jar:8.0.6.Final]
at
com.sun.corba.se.impl.encoding.CDROutputStream_1_0.write_char(CDROutputStream_1_0.java:318)
[openjdk-orb-8.0.6.Final.jar:8.0.6.Final]
at
com.sun.corba.se.impl.encoding.CDROutputStream.write_char(CDROutputStream.java:138)
[openjdk-orb-8.0.6.Final.jar:8.0.6.Final]
at SomeClassHelper.write(SomeClassHelper.java:<some line>)
Suggested fix is in attachment
"empty_string_followed_by_char_conversion_suggested_fix.patch"
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)