knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject [4/6] knox git commit: Revert "Revert "KNOX-690 fixing the encoding/decoding in the parser and template""
Date Sat, 17 Jun 2017 14:18:50 GMT
Revert "Revert "KNOX-690 fixing the encoding/decoding in the parser and template""

This reverts commit dfb96e1b4335a133007f9868f68a488a39c343ac.


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

Branch: refs/heads/master
Commit: 5bbc4f9ea80021f331039ffee3e92b1199886e34
Parents: dfb96e1
Author: Larry McCay <lmccay@hortonworks.com>
Authored: Tue Jun 13 17:41:16 2017 -0400
Committer: Larry McCay <lmccay@hortonworks.com>
Committed: Tue Jun 13 17:41:16 2017 -0400

----------------------------------------------------------------------
 .../gateway/util/urltemplate/Template.java       | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/5bbc4f9e/gateway-util-urltemplate/src/main/java/org/apache/hadoop/gateway/util/urltemplate/Template.java
----------------------------------------------------------------------
diff --git a/gateway-util-urltemplate/src/main/java/org/apache/hadoop/gateway/util/urltemplate/Template.java
b/gateway-util-urltemplate/src/main/java/org/apache/hadoop/gateway/util/urltemplate/Template.java
index 3cce86a..f2eba5a 100644
--- a/gateway-util-urltemplate/src/main/java/org/apache/hadoop/gateway/util/urltemplate/Template.java
+++ b/gateway-util-urltemplate/src/main/java/org/apache/hadoop/gateway/util/urltemplate/Template.java
@@ -312,14 +312,17 @@ public class Template {
   }
 
   public String toString() {
-    String s = null;
-    StringBuilder b = new StringBuilder();
-    buildScheme( b );
-    buildAuthority( b );
-    buildPath( b );
-    buildQuery( b );
-    buildFragment( b );
-    s = b.toString();
+    String s = image;
+    if( s == null ) {
+      StringBuilder b = new StringBuilder();
+      buildScheme( b );
+      buildAuthority( b );
+      buildPath( b );
+      buildQuery( b );
+      buildFragment( b );
+      s = b.toString();
+      //image = s;
+    }
     return s;
   }
 


Mime
View raw message