cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/4] git commit: Avoid going though URL creationg from String when computing MTOM/XOP multipart messages' CID
Date Mon, 14 Jul 2014 15:08:39 GMT
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/40359e56
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/40359e56
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/40359e56

Branch: refs/heads/2.6.x-fixes
Commit: 40359e56376f60e63b2cfa4930cb187c11e5e54d
Parents: 12e653e
Author: Alessio Soldano <asoldano@redhat.com>
Authored: Mon Jul 14 15:42:24 2014 +0200
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Mon Jul 14 11:06:35 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/40359e56/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 bfbbf70..238d493 100644
--- a/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
+++ b/api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
@@ -202,13 +202,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