|
Line 25
Link Here
|
|
|
25 |
import org.omg.CORBA.MARSHAL; |
| 26 |
|
|
Line 179
Link Here
|
|
|
181 |
public void testFailOnNullEncodedString() throws Exception |
| 182 |
{ |
| 183 |
byte[] codedText = {0,0,0,0}; |
| 184 |
CDRInputStream stream = new CDRInputStream( orb, codedText ); |
| 185 |
try { |
| 186 |
stream.read_string(); |
| 187 |
fail("Null encoded string should have failed with an exception"); |
| 188 |
} catch (MARSHAL e) { |
| 189 |
assertNotNull(e.getMessage()); |
| 190 |
assertTrue("Not a MARSHALL exception: " + e.getMessage(), e.getMessage().matches("^.*invalid string size: 0.*$")); |
| 191 |
} |
| 192 |
} |
| 193 |
|
| 194 |
|