You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2014/03/06 15:12:36 UTC

[4/4] git commit: Append character instead of String where possible. Add a check for null before interning the namespace

Append character instead of String where possible.
Add a check for null before interning the namespace


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

Branch: refs/heads/master
Commit: d2695345f52a9785e7338a1f6e823eec9dcc243d
Parents: 8c8f26b
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Mar 6 16:11:47 2014 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Mar 6 16:11:47 2014 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/wicket/markup/parser/XmlTag.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/d2695345/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlTag.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlTag.java b/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlTag.java
index cd3b6d3..8602db4 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlTag.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlTag.java
@@ -476,7 +476,7 @@ public class XmlTag
 	{
 		if (isMutable)
 		{
-			this.namespace = namespace.intern();
+			this.namespace = namespace != null ? namespace.intern() : null;
 		}
 		else
 		{
@@ -597,7 +597,7 @@ public class XmlTag
 				if ((key != null) &&
 					((attributeToBeIgnored == null) || !key.equalsIgnoreCase(attributeToBeIgnored)))
 				{
-					buffer.append(" ");
+					buffer.append(' ');
 					buffer.append(key);
 					CharSequence value = getAttribute(key);
 
@@ -607,7 +607,7 @@ public class XmlTag
 						buffer.append("=\"");
 						value = Strings.escapeMarkup(value);
 						buffer.append(value);
-						buffer.append("\"");
+						buffer.append('"');
 					}
 				}
 			}