Reviewers: cromwellian,

Message:
This is a small clean up from the less name mangling patch that is just
fixing a variable name to be "internalName" instead of "binaryName".

I have another patch or two coming that is the same thing; pulling
peripheral, no-functionality-changes out of the name mangling patch to
make things simpler to review.



Please review this at http://gwt-code-reviews.appspot.com/1583803/

Affected files:
  M dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
M dev/core/test/com/google/gwt/dev/jjs/impl/AdditionalTypeProviderDelegateTest.java


Index: dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
diff --git a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java index 9f0c604913af233358fa8ee53f445e4ab8de0774..1ab2a23e5fa63ef5286dc907cf7744c3c837fa6c 100644
--- a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
+++ b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
@@ -103,11 +103,11 @@ public class JdtCompiler {
* Finds a new compilation unit on-the-fly for the requested type, if there
      * is an alternate mechanism for doing so.
      *
-     * @param binaryName the binary name of the requested type
+     * @param internalName the internal name of the requested type
* @return a unit answering the name, or <code>null</code> if no such unit
      *         can be created
      */
-    GeneratedUnit doFindAdditionalType(String binaryName);
+    GeneratedUnit doFindAdditionalType(String internalName);
   }

   /**
@@ -290,9 +290,9 @@ public class JdtCompiler {
     }

     public NameEnvironmentAnswer findType(char[][] compoundTypeName) {
- char[] binaryNameChars = CharOperation.concatWith(compoundTypeName, '/');
-      String binaryName = String.valueOf(binaryNameChars);
-      CompiledClass compiledClass = binaryTypes.get(binaryName);
+ char[] internalNameChars = CharOperation.concatWith(compoundTypeName, '/');
+      String internalName = String.valueOf(internalNameChars);
+      CompiledClass compiledClass = binaryTypes.get(internalName);
       try {
         if (compiledClass != null) {
           return compiledClass.getNameEnvironmentAnswer();
@@ -300,11 +300,11 @@ public class JdtCompiler {
       } catch (ClassFormatException ex) {
         // fall back to binary class
       }
-      if (isPackage(binaryName)) {
+      if (isPackage(internalName)) {
         return null;
       }
       if (additionalTypeProviderDelegate != null) {
- GeneratedUnit unit = additionalTypeProviderDelegate.doFindAdditionalType(binaryName); + GeneratedUnit unit = additionalTypeProviderDelegate.doFindAdditionalType(internalName);
         if (unit != null) {
           CompilationUnitBuilder b = CompilationUnitBuilder.create(unit);
           Adapter a = new Adapter(b);
@@ -312,7 +312,7 @@ public class JdtCompiler {
         }
       }
       try {
-        URL resource = getClassLoader().getResource(binaryName + ".class");
+ URL resource = getClassLoader().getResource(internalName + ".class");
         if (resource != null) {
           InputStream openStream = resource.openStream();
           try {
@@ -487,7 +487,7 @@ public class JdtCompiler {
   private AdditionalTypeProviderDelegate additionalTypeProviderDelegate;

   /**
-   * Maps dotted binary names to compiled classes.
+   * Maps internal names to compiled classes.
    */
private final Map<String, CompiledClass> binaryTypes = new HashMap<String, CompiledClass>();

Index: dev/core/test/com/google/gwt/dev/jjs/impl/AdditionalTypeProviderDelegateTest.java diff --git a/dev/core/test/com/google/gwt/dev/jjs/impl/AdditionalTypeProviderDelegateTest.java b/dev/core/test/com/google/gwt/dev/jjs/impl/AdditionalTypeProviderDelegateTest.java index 1962d883f889e10e56751f3cfaddf8a819c462cc..e781cc770c47c597850923692ae9c45cba4e7fe1 100644 --- a/dev/core/test/com/google/gwt/dev/jjs/impl/AdditionalTypeProviderDelegateTest.java +++ b/dev/core/test/com/google/gwt/dev/jjs/impl/AdditionalTypeProviderDelegateTest.java @@ -212,8 +212,8 @@ public class AdditionalTypeProviderDelegateTest extends OptimizerTestBase {
         return false;
       }

-      public GeneratedUnit doFindAdditionalType(String binaryName) {
-        if (binaryName.compareTo("myPackage/InsertedClass") == 0) {
+      public GeneratedUnit doFindAdditionalType(String internalName) {
+        if (internalName.compareTo("myPackage/InsertedClass") == 0) {
           return new JavaWrapperCompilationUnit();
       }
       return null;


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to