You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2014/07/14 23:41:27 UTC

git commit: Fix test failure

Repository: cxf
Updated Branches:
  refs/heads/2.6.x-fixes d4c640b4c -> bf8fea668


Fix test failure


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/bf8fea66
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/bf8fea66
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/bf8fea66

Branch: refs/heads/2.6.x-fixes
Commit: bf8fea668d23a2fc1bde471fad763ba63e112f11
Parents: d4c640b
Author: Daniel Kulp <dk...@apache.org>
Authored: Mon Jul 14 17:38:23 2014 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Mon Jul 14 17:38:23 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/attachment/AttachmentDataSource.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/bf8fea66/api/src/main/java/org/apache/cxf/attachment/AttachmentDataSource.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/attachment/AttachmentDataSource.java b/api/src/main/java/org/apache/cxf/attachment/AttachmentDataSource.java
index d1b64b8..be4cf82 100644
--- a/api/src/main/java/org/apache/cxf/attachment/AttachmentDataSource.java
+++ b/api/src/main/java/org/apache/cxf/attachment/AttachmentDataSource.java
@@ -47,7 +47,7 @@ public class AttachmentDataSource implements DataSource {
         return cache != null;
     }
     public void cache(Message message) throws IOException {
-        if (cache == null) {
+        if (cache == null && ins != null) {
             cache = new CachedOutputStream();
             AttachmentUtil.setStreamedAttachmentProperties(message, cache);
             try {