You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by st...@apache.org on 2013/11/26 17:35:01 UTC

[2/4] git commit: The RE used to match name faild to match Chinese, well, probably all NON-ASCII characters, but they do can be used as the name identifier and part of URL

The RE used to match name faild to match Chinese, well, probably all NON-ASCII characters, but they do can be used as the name identifier and part of URL


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

Branch: refs/heads/maven
Commit: c2ec5a0bca27a94f670a1141137323778b16a86a
Parents: 214d546
Author: Strong Liu <st...@hibernate.org>
Authored: Mon Nov 25 23:29:51 2013 +0800
Committer: Strong Liu <st...@hibernate.org>
Committed: Mon Nov 25 23:29:51 2013 +0800

----------------------------------------------------------------------
 .../core/src/main/java/org/usergrid/persistence/Identifier.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c2ec5a0b/stack/core/src/main/java/org/usergrid/persistence/Identifier.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/Identifier.java b/stack/core/src/main/java/org/usergrid/persistence/Identifier.java
index 7139e43..e1d1e1d 100644
--- a/stack/core/src/main/java/org/usergrid/persistence/Identifier.java
+++ b/stack/core/src/main/java/org/usergrid/persistence/Identifier.java
@@ -38,7 +38,7 @@ public class Identifier implements Serializable {
     Object value;
 
     static Pattern emailRegEx = Pattern.compile( "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}" );
-    static Pattern nameRegEx = Pattern.compile( "[a-zA-Z0-9_\\-./]*" );
+    static Pattern nameRegEx = Pattern.compile( "[a-zA-Z0-9_\\-./\\u4e00-\\u9fa5]*" );
 
 
     private Identifier( Type type, Object value ) {
@@ -46,8 +46,7 @@ public class Identifier implements Serializable {
         this.value = value;
     }
 
-
-    public static Identifier from( Object obj ) {
+	public static Identifier from( Object obj ) {
         if ( obj == null ) {
             return null;
         }