Revision: 7189 Author: [email protected] Date: Wed Nov 25 09:28:34 2009 Log: Merge trunk @7183 into this branch Fix external issue 4260: FieldSerializer problems with non-Latin class names svn merge --ignore-ancestry -c7183 https://google-web-toolkit.googlecode.com/svn/trunk .
http://code.google.com/p/google-web-toolkit/source/detail?r=7189 Modified: /releases/2.0/branch-info.txt /releases/2.0/dev/core/src/com/google/gwt/dev/util/Name.java ======================================= --- /releases/2.0/branch-info.txt Wed Nov 25 09:21:15 2009 +++ /releases/2.0/branch-info.txt Wed Nov 25 09:28:34 2009 @@ -1080,3 +1080,7 @@ Prettifies the Compile Report dashboard by sorting permutation IDs in proper ascending order. Review by: jlabanca (desk review) merge --ignore-ancestry -c7184 https://google-web-toolkit.googlecode.com/svn/trunk . + +trunk @7183 was merged into this branch + Fix external issue 4260: FieldSerializer problems with non-Latin class names + svn merge --ignore-ancestry -c7183 https://google-web-toolkit.googlecode.com/svn/trunk . ======================================= --- /releases/2.0/dev/core/src/com/google/gwt/dev/util/Name.java Fri Jul 31 13:43:46 2009 +++ /releases/2.0/dev/core/src/com/google/gwt/dev/util/Name.java Wed Nov 25 09:28:34 2009 @@ -15,6 +15,8 @@ */ package com.google.gwt.dev.util; +import java.util.regex.Pattern; + /** * Utility methods for dealing with the various types of Java names. */ @@ -87,7 +89,7 @@ public static String toSourceName(String binaryName) { assert isBinaryName(binaryName); // don't change a trailing $ to a . - return binaryName.replaceAll("[$](\\w)", ".$1"); + return NON_TRAILING_DOLLAR.matcher(binaryName).replaceAll(".$1"); } private BinaryName() { @@ -167,7 +169,7 @@ public static String toSourceName(String internalName) { assert isInternalName(internalName); // don't change a trailing $ or slash to a . - return internalName.replaceAll("[$/](\\w)", ".$1"); + return NON_TRAILING_DOLLAR_SLASH.matcher(internalName).replaceAll(".$1"); } private InternalName() { @@ -219,9 +221,17 @@ public static String toSourceName(String dottedName) { // don't change a trailing $ to a . - return dottedName.replaceAll("[$](\\w)", ".$1"); + return NON_TRAILING_DOLLAR.matcher(dottedName).replaceAll(".$1"); } } + + // Non-trailing $ + private static final Pattern NON_TRAILING_DOLLAR = + Pattern.compile("[$](\\p{javaJavaIdentifierStart})"); + + // Non-trailing $ or / + private static final Pattern NON_TRAILING_DOLLAR_SLASH = + Pattern.compile("[$/](\\p{javaJavaIdentifierStart})"); /** * Get the binary name for a Java class. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
