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 16:57:27 UTC
[2/4] git commit: Avoid going though URL creationg from String when
computing MTOM/XOP multipart messages' CID
Avoid going though URL creationg from String when computing MTOM/XOP multipart messages' CID
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5f89d202
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5f89d202
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5f89d202
Branch: refs/heads/2.7.x-fixes
Commit: 5f89d20234c3786d354f8ab1f2b4ee1f9a421490
Parents: ee86e43
Author: Alessio Soldano <as...@redhat.com>
Authored: Mon Jul 14 15:42:24 2014 +0200
Committer: Daniel Kulp <dk...@apache.org>
Committed: Mon Jul 14 10:55:56 2014 -0400
----------------------------------------------------------------------
.../main/java/org/apache/cxf/attachment/AttachmentUtil.java | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/5f89d202/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java b/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
index 04db94d..893f050 100644
--- a/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
+++ b/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
@@ -197,13 +197,7 @@ public final class AttachmentUtil {
String name = ATT_UUID + "-" + String.valueOf(++counter);
if (ns != null && (ns.length() > 0)) {
- try {
- URI uri = new URI(ns);
- String host = uri.toURL().getHost();
- cid = host;
- } catch (Exception e) {
- cid = ns;
- }
+ cid = ns;
}
return URLEncoder.encode(name, "UTF-8") + "@" + URLEncoder.encode(cid, "UTF-8");
}