Revision: 10422
Author:   [email protected]
Date:     Wed Jul  6 13:03:16 2011
Log: UnifyAst correctly handles polymorphic overrides with mixed default/public access.

GWT AST now tracks method access. This is used by UnifyAst to correctly compute overrides. Before, UnifyAst would allow a public method to override a default-access method in a different package, which is illegal.
http://gwt-code-reviews.appspot.com/1470803/

http://code.google.com/p/google-web-toolkit/source/detail?r=10422

Added:
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifier.java
Modified:
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JConstructor.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/BuildTypeMap.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/JsoDevirtualizer.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/MakeCallsStatic.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ReferenceMapper.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ResolveRebinds.java
/trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ToStringGenerationVisitor.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java
 /trunk/dev/core/test/com/google/gwt/dev/jjs/impl/PrunerTest.java

=======================================
--- /dev/null
+++ /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifier.java Wed Jul 6 13:03:16 2011
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2011 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.google.gwt.dev.jjs.ast;
+
+import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
+
+/**
+ * The Java access modifiers.
+ */
+public enum AccessModifier {
+  /*
+ * DO NOT SORT. Will break ordinal-based serialization in JMethod. If this is
+   * updated, you must bump the AST serialization version.
+   */
+  PUBLIC, PROTECTED, DEFAULT, PRIVATE;
+
+  static {
+    assert PUBLIC.ordinal() == 0;
+    assert PROTECTED.ordinal() == 1;
+    assert DEFAULT.ordinal() == 2;
+    assert PRIVATE.ordinal() == 3;
+  }
+
+  public static AccessModifier fromMethodBinding(MethodBinding b) {
+    if (b.isPublic()) {
+      return PUBLIC;
+    } else if (b.isProtected()) {
+      return PROTECTED;
+    } else if (b.isPrivate()) {
+      return PRIVATE;
+    }
+    assert b.isDefault();
+    return DEFAULT;
+  }
+}
=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JConstructor.java Thu May 26 06:00:55 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JConstructor.java Wed Jul 6 13:03:16 2011
@@ -50,8 +50,9 @@
   private boolean isEmpty = false;

   public JConstructor(SourceInfo info, JClassType enclosingType) {
+    // Access only matters for virtual methods, just use public.
super(info, enclosingType.getShortName(), enclosingType, JPrimitiveType.VOID, false, false,
-        true, false);
+        true, AccessModifier.PUBLIC);
   }

   @Override
=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java Fri Jun 3 15:55:09 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java Wed Jul 6 13:03:16 2011
@@ -60,7 +60,7 @@
   }

public static final JMethod NULL_METHOD = new JMethod(SourceOrigin.UNKNOWN, "nullMethod", null,
-      JNullType.INSTANCE, false, false, true, false);
+      JNullType.INSTANCE, false, false, true, AccessModifier.PUBLIC);

   private static final String TRACE_METHOD_WILDCARD = "*";

@@ -90,6 +90,12 @@

   protected transient String signature;

+  /**
+   * The access modifier; stored as an int to reduce memory / serialization
+   * footprint.
+   */
+  private int access;
+
   /**
    * Special serialization treatment.
    */
@@ -97,7 +103,6 @@
   private final JDeclaredType enclosingType;
   private boolean isAbstract;
   private boolean isFinal;
-  private final boolean isPrivate;
   private final boolean isStatic;
   private boolean isSynthetic = false;
   private final String name;
@@ -124,7 +129,7 @@
    * These are only supposed to be constructed by JProgram.
    */
public JMethod(SourceInfo info, String name, JDeclaredType enclosingType, JType returnType, - boolean isAbstract, boolean isStatic, boolean isFinal, boolean isPrivate) { + boolean isAbstract, boolean isStatic, boolean isFinal, AccessModifier access) {
     super(info);
     this.name = StringInterner.get().intern(name);
     this.enclosingType = enclosingType;
@@ -132,7 +137,7 @@
     this.isAbstract = isAbstract;
     this.isStatic = isStatic;
     this.isFinal = isFinal;
-    this.isPrivate = isPrivate;
+    this.access = access.ordinal();
   }

   /**
@@ -145,7 +150,7 @@
     this.signature = signature;
     this.isAbstract = false;
     this.isStatic = false;
-    this.isPrivate = false;
+    this.access = AccessModifier.PUBLIC.ordinal();
   }

   /**
@@ -195,6 +200,10 @@
     }
     setOriginalTypes(returnType, paramTypes);
   }
+
+  public AccessModifier getAccess() {
+    return AccessModifier.values()[access];
+  }

   public JAbstractMethodBody getBody() {
     assert !isExternal() : "External types do not have method bodies.";
@@ -257,6 +266,10 @@
   public boolean isAbstract() {
     return isAbstract;
   }
+
+  public boolean isDefault() {
+    return access == AccessModifier.DEFAULT.ordinal();
+  }

   public boolean isExternal() {
     return getEnclosingType() != null && getEnclosingType().isExternal();
@@ -275,7 +288,7 @@
   }

   public boolean isPrivate() {
-    return isPrivate;
+    return access == AccessModifier.PRIVATE.ordinal();
   }

   public boolean isStatic() {
=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java Tue Jun 7 11:03:06 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java Wed Jul 6 13:03:16 2011
@@ -482,21 +482,21 @@
   }

public JMethod createMethod(SourceInfo info, String name, JDeclaredType enclosingType, - JType returnType, boolean isAbstract, boolean isStatic, boolean isFinal, boolean isPrivate,
-      boolean isNative) {
+ JType returnType, boolean isAbstract, boolean isStatic, boolean isFinal,
+      AccessModifier access, boolean isNative) {
     assert (name != null);
     assert (enclosingType != null);
     assert (returnType != null);
     assert (!isAbstract || !isNative);
     JMethod x =
- new JMethod(info, name, enclosingType, returnType, isAbstract, isStatic, isFinal, isPrivate); + new JMethod(info, name, enclosingType, returnType, isAbstract, isStatic, isFinal, access);
     if (isNative) {
       x.setBody(new JsniMethodBody(info));
     } else if (!isAbstract) {
       x.setBody(new JMethodBody(info));
     }

-    if (!isPrivate && indexedTypes.containsValue(enclosingType)) {
+ if (access != AccessModifier.PRIVATE && indexedTypes.containsValue(enclosingType)) {
       indexedMethods.put(enclosingType.getShortName() + '.' + name, x);
     }

=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/BuildTypeMap.java Tue Jun 14 15:18:26 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/BuildTypeMap.java Wed Jul 6 13:03:16 2011
@@ -22,6 +22,7 @@
 import com.google.gwt.dev.jjs.InternalCompilerException;
 import com.google.gwt.dev.jjs.SourceInfo;
 import com.google.gwt.dev.jjs.SourceOrigin;
+import com.google.gwt.dev.jjs.ast.AccessModifier;
 import com.google.gwt.dev.jjs.ast.JClassType;
 import com.google.gwt.dev.jjs.ast.JConstructor;
 import com.google.gwt.dev.jjs.ast.JDeclaredType;
@@ -676,7 +677,7 @@
     SourceInfo child = info.makeChild();
     JMethod clinit =
program.createMethod(child, "$clinit", newType, program.getTypeVoid(), false, true, true,
-            true, false);
+            AccessModifier.PRIVATE, false);
     clinit.freezeParamTypes();
     clinit.setSynthetic();
     child.addCorrelation(info.getCorrelator().by(clinit));
@@ -685,7 +686,7 @@
       child = info.makeChild();
       JMethod init =
program.createMethod(child, "$init", newType, program.getTypeVoid(), false, false, true,
-              true, false);
+              AccessModifier.PRIVATE, false);
       init.freezeParamTypes();
       init.setSynthetic();
       child.addCorrelation(info.getCorrelator().by(init));
@@ -767,7 +768,7 @@
         SourceInfo info = type.getSourceInfo().makeChild();
         JMethod getClassMethod =
program.createMethod(info, "getClass", type, program.getTypeJavaLangClass(), false,
-                false, false, false, false);
+                false, false, AccessModifier.PUBLIC, false);
         assert (type.getMethods().get(2) == getClassMethod);
         getClassMethod.freezeParamTypes();
         getClassMethod.setSynthetic();
@@ -951,7 +952,8 @@
     JType returnType = getType(b.returnType);
     JMethod newMethod =
program.createMethod(info, String.valueOf(b.selector), enclosingType, returnType, b - .isAbstract(), b.isStatic(), b.isFinal(), b.isPrivate(), b.isNative()); + .isAbstract(), b.isStatic(), b.isFinal(), AccessModifier.fromMethodBinding(b), b
+            .isNative());
     addThrownExceptions(b, newMethod);
     if (b.isSynthetic()) {
       newMethod.setSynthetic();
=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java Tue Jun 7 04:42:44 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java Wed Jul 6 13:03:16 2011
@@ -21,6 +21,7 @@
 import com.google.gwt.dev.jjs.JJSOptions;
 import com.google.gwt.dev.jjs.SourceInfo;
 import com.google.gwt.dev.jjs.SourceOrigin;
+import com.google.gwt.dev.jjs.ast.AccessModifier;
 import com.google.gwt.dev.jjs.ast.Context;
 import com.google.gwt.dev.jjs.ast.JArrayLength;
 import com.google.gwt.dev.jjs.ast.JArrayRef;
@@ -2055,7 +2056,7 @@
       JMethod bridgeMethod =
program.createMethod(info, String.valueOf(jdtBridgeMethod.selector), clazz, (JType) typeMap.get(jdtBridgeMethod.returnType.erasure()), false, false, implmeth
-                  .isFinal(), false, false);
+                  .isFinal(), implmeth.getAccess(), false);
       bridgeMethod.setSynthetic();
       int paramIdx = 0;
       List<JParameter> implParams = implmeth.getParams();
@@ -2742,7 +2743,7 @@
JDeclarationStatement declStmt = new JDeclarationStatement(methodInfo, mapRef, call);
         JMethod clinit =
program.createMethod(methodInfo, "$clinit", mapClass, program.getTypeVoid(), false,
-                true, true, true, false);
+                true, true, AccessModifier.PRIVATE, false);
         clinit.freezeParamTypes();
         methodInfo.addCorrelation(methodInfo.getCorrelator().by(clinit));
         JBlock clinitBlock = ((JMethodBody) clinit.getBody()).getBlock();
=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java Thu Jun 23 09:22:06 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java Wed Jul 6 13:03:16 2011
@@ -21,6 +21,7 @@
 import com.google.gwt.dev.jjs.InternalCompilerException;
 import com.google.gwt.dev.jjs.SourceInfo;
 import com.google.gwt.dev.jjs.SourceOrigin;
+import com.google.gwt.dev.jjs.ast.AccessModifier;
 import com.google.gwt.dev.jjs.ast.JAbsentArrayDimension;
 import com.google.gwt.dev.jjs.ast.JArrayLength;
 import com.google.gwt.dev.jjs.ast.JArrayRef;
@@ -1999,7 +2000,8 @@
       SourceInfo info = implmeth.getSourceInfo();
       JMethod bridgeMethod =
           new JMethod(info, implmeth.getName(), curClass.type, typeMap
- .get(jdtBridgeMethod.returnType), false, false, implmeth.isFinal(), false); + .get(jdtBridgeMethod.returnType), false, false, implmeth.isFinal(), implmeth
+              .getAccess());
       typeMap.setMethod(jdtBridgeMethod, bridgeMethod);
       bridgeMethod.setBody(new JMethodBody(info));
       curClass.type.addMethod(bridgeMethod);
@@ -2684,7 +2686,7 @@
JDeclarationStatement declStmt = new JDeclarationStatement(info, mapRef, call);
         JMethod clinit =
createSyntheticMethod(info, "$clinit", mapClass, JPrimitiveType.VOID, false, true,
-                true, true);
+                true, AccessModifier.PRIVATE);
         JBlock clinitBlock = ((JMethodBody) clinit.getBody()).getBlock();
         clinitBlock.addStmt(declStmt);
       }
@@ -2765,7 +2767,7 @@
    *
    * TODO(zundel): something much more awesome?
    */
-  private static final long AST_VERSION = 1;
+  private static final long AST_VERSION = 2;

   private static final char[] _STRING = "_String".toCharArray();
   private static final String ARRAY_LENGTH_FIELD = "length";
@@ -3023,16 +3025,19 @@
        * is always in slot 1.
        */
       assert type.getMethods().size() == 0;
- createSyntheticMethod(info, "$clinit", type, JPrimitiveType.VOID, false, true, true, true); + createSyntheticMethod(info, "$clinit", type, JPrimitiveType.VOID, false, true, true,
+          AccessModifier.PRIVATE);

       if (type instanceof JClassType) {
         assert type.getMethods().size() == 1;
- createSyntheticMethod(info, "$init", type, JPrimitiveType.VOID, false, false, true, true); + createSyntheticMethod(info, "$init", type, JPrimitiveType.VOID, false, false, true,
+            AccessModifier.PRIVATE);

         // Add a getClass() implementation for all non-Object classes.
if (type != javaLangObject && !JSORestrictionsChecker.isJsoSubclass(binding)) {
           assert type.getMethods().size() == 2;
- createSyntheticMethod(info, "getClass", type, javaLangClass, false, false, false, false); + createSyntheticMethod(info, "getClass", type, javaLangClass, false, false, false,
+              AccessModifier.PUBLIC);
         }
       }

@@ -3125,7 +3130,7 @@
     } else {
       method =
new JMethod(info, intern(b.selector), enclosingType, typeMap.get(b.returnType), b
-              .isAbstract(), b.isStatic(), b.isFinal(), b.isPrivate());
+ .isAbstract(), b.isStatic(), b.isFinal(), AccessModifier.fromMethodBinding(b));
     }

     // User args.
@@ -3182,9 +3187,9 @@
   }

private JMethod createSyntheticMethod(SourceInfo info, String name, JDeclaredType enclosingType, - JType returnType, boolean isAbstract, boolean isStatic, boolean isFinal, boolean isPrivate) { + JType returnType, boolean isAbstract, boolean isStatic, boolean isFinal, AccessModifier access) {
     JMethod method =
- new JMethod(info, name, enclosingType, returnType, isAbstract, isStatic, isFinal, isPrivate); + new JMethod(info, name, enclosingType, returnType, isAbstract, isStatic, isFinal, access);
     method.freezeParamTypes();
     method.setSynthetic();
     method.setBody(new JMethodBody(info));
=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/JsoDevirtualizer.java Tue Apr 19 10:10:18 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/JsoDevirtualizer.java Wed Jul 6 13:03:16 2011
@@ -17,6 +17,7 @@

 import com.google.gwt.dev.jjs.SourceInfo;
 import com.google.gwt.dev.jjs.SourceOrigin;
+import com.google.gwt.dev.jjs.ast.AccessModifier;
 import com.google.gwt.dev.jjs.ast.Context;
 import com.google.gwt.dev.jjs.ast.JClassType;
 import com.google.gwt.dev.jjs.ast.JConditional;
@@ -226,7 +227,7 @@
     String name = polyMethod.getName() + "__devirtual$";
     JMethod newMethod =
program.createMethod(sourceInfo, name, jsoType, polyMethod.getType(), false, true, true,
-            false, false);
+            AccessModifier.PUBLIC, false);
     newMethod.setSynthetic();

     // Setup parameters.
=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/MakeCallsStatic.java Thu Jun 2 11:49:52 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/MakeCallsStatic.java Wed Jul 6 13:03:16 2011
@@ -155,7 +155,7 @@
        */
       JMethod newMethod =
new JMethod(sourceInfo, newName, enclosingType, returnType, false, true, true, x
-              .isPrivate());
+              .getAccess());
       newMethod.setSynthetic();
       newMethod.addThrownExceptions(x.getThrownExceptions());

=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ReferenceMapper.java Fri Jun 24 15:51:33 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ReferenceMapper.java Wed Jul 6 13:03:16 2011
@@ -18,6 +18,7 @@
 import com.google.gwt.dev.jjs.InternalCompilerException;
 import com.google.gwt.dev.jjs.SourceInfo;
 import com.google.gwt.dev.jjs.SourceOrigin;
+import com.google.gwt.dev.jjs.ast.AccessModifier;
 import com.google.gwt.dev.jjs.ast.JArrayType;
 import com.google.gwt.dev.jjs.ast.JClassType;
 import com.google.gwt.dev.jjs.ast.JConstructor;
@@ -168,7 +169,7 @@
       // Emulate clinit method for super clinit calls.
       JMethod clinit =
new JMethod(SourceOrigin.UNKNOWN, "$clinit", declType, JPrimitiveType.VOID, false, true,
-              true, true);
+              true, AccessModifier.PRIVATE);
       clinit.freezeParamTypes();
       clinit.setSynthetic();
       declType.addMethod(clinit);
@@ -238,7 +239,7 @@
     JDeclaredType enclosingType = (JDeclaredType) get(b.declaringClass);
     JMethod method =
new JMethod(info, intern(b.selector), enclosingType, get(b.returnType), b.isAbstract(), b
-            .isStatic(), b.isFinal(), b.isPrivate());
+            .isStatic(), b.isFinal(), AccessModifier.fromMethodBinding(b));
     enclosingType.addMethod(method);
     if (paramNames == null) {
       mapParameters(info, method, b, 0);
=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ResolveRebinds.java Wed Apr 27 14:46:52 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ResolveRebinds.java Wed Jul 6 13:03:16 2011
@@ -17,6 +17,7 @@

 import com.google.gwt.dev.jjs.InternalCompilerException;
 import com.google.gwt.dev.jjs.SourceInfo;
+import com.google.gwt.dev.jjs.ast.AccessModifier;
 import com.google.gwt.dev.jjs.ast.Context;
 import com.google.gwt.dev.jjs.ast.JBlock;
 import com.google.gwt.dev.jjs.ast.JCaseStatement;
@@ -199,7 +200,8 @@
     SourceInfo info = program.createSourceInfoSynthetic(getClass());
     toReturn =
program.createMethod(info, requestType.replace("_", "_1").replace('.', '_'), holderType, - program.getTypeJavaLangObject().getNonNull(), false, true, true, false, false); + program.getTypeJavaLangObject().getNonNull(), false, true, true,
+            AccessModifier.PUBLIC, false);
     toReturn.freezeParamTypes();
     info.addCorrelation(info.getCorrelator().by(toReturn));
     rebindMethods.put(requestType, toReturn);
=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ToStringGenerationVisitor.java Tue May 17 07:35:44 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/ToStringGenerationVisitor.java Wed Jul 6 13:03:16 2011
@@ -1063,10 +1063,18 @@

   protected void printMethodHeader(JMethod x) {
     // Modifiers
-    if (x.isPrivate()) {
-      print(CHARS_PRIVATE);
-    } else {
-      print(CHARS_PUBLIC);
+    switch (x.getAccess()) {
+      case PUBLIC:
+        print(CHARS_PUBLIC);
+        break;
+      case PROTECTED:
+        print(CHARS_PROTECTED);
+        break;
+      case PRIVATE:
+        print(CHARS_PRIVATE);
+        break;
+      case DEFAULT:
+        break;
     }
     printStaticFlag(x);
     printAbstractFlag(x);
=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java Wed Jun 29 15:11:51 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java Wed Jul 6 13:03:16 2011
@@ -20,6 +20,7 @@
 import com.google.gwt.dev.javac.CompilationProblemReporter;
 import com.google.gwt.dev.javac.CompilationUnit;
 import com.google.gwt.dev.javac.CompiledClass;
+import com.google.gwt.dev.javac.Shared;
 import com.google.gwt.dev.jdt.RebindPermutationOracle;
 import com.google.gwt.dev.jjs.InternalCompilerException;
 import com.google.gwt.dev.jjs.JJSOptions;
@@ -674,6 +675,19 @@
       }
     }
   }
+
+ private boolean canAccessSuperMethod(JDeclaredType type, JMethod method) {
+    if (method.isPrivate()) {
+      return false;
+    }
+    if (method.isDefault()) {
+      // Check package access.
+      String typePackage = Shared.getPackageName(type.getName());
+ String methodPackage = Shared.getPackageName(method.getEnclosingType().getName());
+      return typePackage.equals(methodPackage);
+    }
+    return true;
+  }

private void collectUpRefs(JDeclaredType type, Map<String, Set<JMethod>> collected) {
     if (type == null) {
@@ -711,8 +725,11 @@
       collectUpRefsInSupers(type, collected);
       for (JMethod method : type.getMethods()) {
         if (method.canBePolymorphic()) {
-          Set<JMethod> uprefs = collected.get(method.getSignature());
-          method.addOverrides(Lists.create(uprefs));
+          for (JMethod upref : collected.get(method.getSignature())) {
+            if (canAccessSuperMethod(type, upref)) {
+              method.addOverride(upref);
+            }
+          }
         }
       }
     }
=======================================
--- /trunk/dev/core/test/com/google/gwt/dev/jjs/impl/PrunerTest.java Mon May 23 09:42:46 2011 +++ /trunk/dev/core/test/com/google/gwt/dev/jjs/impl/PrunerTest.java Wed Jul 6 13:03:16 2011
@@ -112,14 +112,14 @@
     assertNull(result.findClass("UninstantiatedClass"));

     assertEquals(
-        "public static null returnUninstantiatedClass(){\n" +
+        "static null returnUninstantiatedClass(){\n" +
         "  return null;\n" +
-        "}",
+        "}",
         result.findMethod("returnUninstantiatedClass").toSource());

     assertEquals(
-        "public static void methodWithUninstantiatedParam(){\n" +
-        "}",
+        "static void methodWithUninstantiatedParam(){\n" +
+        "}",
         result.findMethod("methodWithUninstantiatedParam").toSource());

     assertEquals(

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

Reply via email to