cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject git commit: Avoid going though URL creationg from String when computing MTOM/XOP multipart messages' CID
Date Mon, 14 Jul 2014 13:44:11 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 77b05b64a -> 5fd9993ea


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/5fd9993e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5fd9993e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5fd9993e

Branch: refs/heads/master
Commit: 5fd9993eaa1c9c59360085910271e1bbdea3959a
Parents: 77b05b6
Author: Alessio Soldano <asoldano@redhat.com>
Authored: Mon Jul 14 15:42:24 2014 +0200
Committer: Alessio Soldano <asoldano@redhat.com>
Committed: Mon Jul 14 15:43:22 2014 +0200

----------------------------------------------------------------------
 .../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/5fd9993e/core/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java b/core/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
index 37c9b2d..aee9c53 100644
--- a/core/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
+++ b/core/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");
     }


Mime
View raw message