Feature #1838

Binary Attachments in XOP

Added by L. Ziegler almost 10 years ago. Updated almost 10 years ago.

Status:ResolvedStart date:04/11/2014
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:Java
Target version:-

Description

Please review my patch for using binary attachments in XOPs

0001-special-rule-for-binary-attachements.patch Magnifier (13.2 KB) L. Ziegler, 04/11/2014 02:00 PM

0001-Added-an-exception-to-converting-attachments-when-th.patch Magnifier (5.94 KB) L. Ziegler, 04/11/2014 03:37 PM

0002-Updated-documentation-for-updated-behavior-of-how-to.patch Magnifier (1.39 KB) L. Ziegler, 04/11/2014 03:37 PM

0004-removed-strange-deprecation-warning-from-test.patch Magnifier (709 Bytes) L. Ziegler, 04/11/2014 03:37 PM

0005-Suppressing-unnecessary-warning-in-test.patch Magnifier (819 Bytes) L. Ziegler, 04/11/2014 03:37 PM

0006-Added-generic-to-deserialize-return-type-for-more-ty.patch Magnifier (985 Bytes) L. Ziegler, 04/11/2014 03:37 PM

0003-Added-unit-test-for-handling-binary-data-in-attachme.patch Magnifier (2.64 KB) L. Ziegler, 04/11/2014 03:37 PM

0007-fixed-generic-data-types-according-to-new-method-sig.patch Magnifier (2.44 KB) L. Ziegler, 04/11/2014 03:37 PM

Associated revisions

Revision ab04313e
Added by L. Ziegler almost 10 years ago

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 <>

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)

#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.

Also available in: Atom PDF