Feature #1838
Binary Attachments in XOP
Status: | Resolved | Start date: | 04/11/2014 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | Java | |||
Target version: | - |
Description
Please review my patch for using binary attachments in XOPs
Associated revisions
Treat byte-array attachments specially in src/rsb/converter/XOPConverter.java
fixes #1838
Do not apply a converter when an attachment contains binary
data (i.e. ByteBuffer) anyway.
- src/rsb/transport/Attachment.java: updated documentation comments
- src/rsb/converter/XOPConverter.java (XOPConverter.deserialize): pass
payload through if it is just a binary blob; updated documentation
comment accordingly
(XOPConverter.serialize): similar - test/rsb/transport/XOPConverterTest.java
(XOPConverterTest.testDeSerializeStringAttachment):
new test; test special case for binary attachments
Signed-off-by: Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
History
#1 Updated by L. Ziegler almost 10 years ago
- Assignee deleted (
S. Wrede)
sorry, accidentally set assignee.
#2 Updated by J. Moringen almost 10 years ago
- Status changed from New to Feedback
General¶
- The commit message is much too terse; it should explain why the change is necessary and what gets changed
src/rsb/converter/XOPConverter.java¶
- I approve of extending the documentation comment of the class but I have a hard time understanding the new documentation string (which also has a typo)
if (!attachment.hasUrl() || !attachment.hasData()) { LOG.warning("received incomplete attachement!"); continue; }
Is there a reason for this not being treated as an error and throwing an exception?
test/rsb/transport/XOMXOPTest.java¶
Should be a separate commit.
src/rsb/transport/Attachment.java¶
Likewise for unrelated typo and warning fixes.
test/rsb/transport/XOPTest.java¶
Likewise.
test/rsb/transport/XOPConverterTest.java¶
Likewise for fixes in other test cases (if they are indeed unrelated)
#3 Updated by L. Ziegler almost 10 years ago
- File 0001-Added-an-exception-to-converting-attachments-when-th.patch added
- File 0002-Updated-documentation-for-updated-behavior-of-how-to.patch added
- File 0003-Added-unit-test-for-handling-binary-data-in-attachme.patch added
- File 0004-removed-strange-deprecation-warning-from-test.patch added
- File 0005-Suppressing-unnecessary-warning-in-test.patch added
- File 0006-Added-generic-to-deserialize-return-type-for-more-ty.patch added
- File 0007-fixed-generic-data-types-according-to-new-method-sig.patch added
I split up the commit and changed the documentation strings, as well as the error handling for incomplete attachments.
#4 Updated by L. Ziegler almost 10 years ago
Is this okay now? I could simply push the commits, since I have developer rights on this project.
#5 Updated by J. Moringen almost 10 years ago
I started applying and cleaning up these patches in some working copy but didn't push yet. Is this urgent?
#6 Updated by L. Ziegler almost 10 years ago
No, it's fine.
#7 Updated by L. Ziegler almost 10 years ago
- Status changed from Feedback to Resolved
- % Done changed from 0 to 100
Applied in changeset rsb-xml-java|commit:ab04313e398b342ea95a2dbe6014a85364d1d7c2.