| Summary: | CDRInputStream.read_string should handle 0 string size gracefully | ||
|---|---|---|---|
| Product: | JacORB | Reporter: | Fabiano Ghisla <fabiano.ghisla> |
| Component: | ORB | Assignee: | Nick Cross <rnc> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | rnc |
| Priority: | P2 | ||
| Version: | 2.3.1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
simple (but wrong) fix
trivial fix sample implementation of jacorb.interop.lax_null_string_encoding property unit test showing the property at work. |
||
|
Description
Fabiano Ghisla
2011-06-24 20:17:10 UTC
Created attachment 387 [details]
simple (but wrong) fix
Created attachment 388 [details]
trivial fix
This patch would unfortunately make JacORB non-compliant with the specification and may well break the unit tests. Which ORBs are non-compliant? An alternative and more compatible design would be to implement a jacorb property that would enable this behaviour. It should be defaulted to off so that JacORB is compliant out-of-the-box. This would also require changes to etc/jacorb_properties.template, the PDF documentation, doc/REL_NOTES, and ideally a unit test should also be added. Created attachment 389 [details]
sample implementation of jacorb.interop.lax_null_string_encoding property
Created attachment 390 [details]
unit test showing the property at work.
According to the vendor documentation, the ORB showing the wrong string encoding behaviour is Visibroker. I've implemented a (hopefully) proper fix following your suggestions. ProgrammerGuide documentation, release notes and jacorb_properties.template updated as per your request. Was unsure how to add the unit test, so I resorted in updating the existing regression testcase (to test the existing default behaviour), as well as creating a new one testing the actual behaviour when the flag is set. Thats great; thanks for your effort; I'll take a look at it. Bugzilla 904/JAC#639 Enable interop null string marshalling. doc/REL_NOTES doc/ProgrammingGuide/ProgrammingGuide.pdf doc/ProgrammingGuide/Configuration/configuration.tex etc/jacorb_properties.template src/org/jacorb/orb/CDRInputStream.java src/org/jacorb/orb/CDROutputStream.java test/regression/src/org/jacorb/test/orb/CDRInputStreamNullStringTest.java test/regression/src/org/jacorb/test/orb/CDRInputStreamTest.java |