Author: nfilotto
Date: 2010-09-28 07:36:45 -0400 (Tue, 28 Sep 2010)
New Revision: 3206
Modified:
kernel/branches/2.2.4-GA-perf/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java
Log:
TESTFR-4: EXOJCR-750 ported
Modified:
kernel/branches/2.2.4-GA-perf/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java
===================================================================
---
kernel/branches/2.2.4-GA-perf/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java 2010-09-28
11:14:57 UTC (rev 3205)
+++
kernel/branches/2.2.4-GA-perf/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java 2010-09-28
11:36:45 UTC (rev 3206)
@@ -37,14 +37,23 @@
protected final int hashCode;
public QName(String namespace, String name)
- {
- this.namespace = (namespace != null ? namespace : "").intern();
- this.name = (name != null ? name : "");
-
- this.stringName = ("[" + this.namespace + "]" + this.name);
-
- int hk = 31 + this.namespace.hashCode();
- this.hashCode = hk * 31 + this.name.hashCode();
+ {
+ if (namespace == null)
+ {
+ namespace = "";
+ }
+ if (name == null)
+ {
+ name = "";
+ }
+ String stringName = ("[" + namespace + "]" + name);
+ int hashCode = (31 + namespace.hashCode()) * 31 + name.hashCode();
+
+ //
+ this.namespace = namespace;
+ this.name = name;
+ this.stringName = stringName;
+ this.hashCode = hashCode;
}
public String getNamespace()
Show replies by date