Fix @GwtIncompatible annotation for abstract classes.

Using a @GwtIncompatible annotation on an abstract class resulted in an
empty stub that was marked but final and abstract causing a compilation
error.

Change-Id: Ie5e53cca43834668f4e6ce2943e5076a86b57f59
diff --git a/dev/core/src/com/google/gwt/dev/javac/GwtIncompatiblePreprocessor.java b/dev/core/src/com/google/gwt/dev/javac/GwtIncompatiblePreprocessor.java
index c41cfe2..faefaad 100644
--- a/dev/core/src/com/google/gwt/dev/javac/GwtIncompatiblePreprocessor.java
+++ b/dev/core/src/com/google/gwt/dev/javac/GwtIncompatiblePreprocessor.java
@@ -162,6 +162,7 @@
       constructor.bits &= ~ASTNode.IsDefaultConstructor;
       // Mark the class as final so that it can not be extended.
       tyDecl.modifiers |= ClassFileConstants.AccFinal;
+      tyDecl.modifiers &= ~ClassFileConstants.AccAbstract;
     }
   }
 
diff --git a/user/test/com/google/gwt/dev/jjs/test/GwtIncompatibleTest.java b/user/test/com/google/gwt/dev/jjs/test/GwtIncompatibleTest.java
index 1f028a3..ef36d3a 100644
--- a/user/test/com/google/gwt/dev/jjs/test/GwtIncompatibleTest.java
+++ b/user/test/com/google/gwt/dev/jjs/test/GwtIncompatibleTest.java
@@ -17,6 +17,7 @@
 
 import static com.google.gwt.dev.jjs.test.gwtincompatible.ClassWithGwtIncompatibleMethod.gwtIncompatibleMethod;
 
+import com.google.gwt.dev.jjs.test.gwtincompatible.AbstractGwtIncompatibleClass;
 import com.google.gwt.dev.jjs.test.gwtincompatible.GwtIncompatible;
 import com.google.gwt.dev.jjs.test.gwtincompatible.GwtIncompatibleClass;
 import com.google.gwt.junit.client.GWTTestCase;
@@ -104,6 +105,13 @@
     assertNull(instance);
   }
 
+  public void testAbstractGwtIncompatibleReference() {
+    // Have a reference to a GwtIncompatibleClass
+    AbstractGwtIncompatibleClass instance = (AbstractGwtIncompatibleClass) null;
+
+    assertNull(instance);
+  }
+
   @Override
   public String getModuleName() {
     return "com.google.gwt.dev.jjs.CompilerSuite";
diff --git a/user/test/com/google/gwt/dev/jjs/test/gwtincompatible/AbstractGwtIncompatibleClass.java b/user/test/com/google/gwt/dev/jjs/test/gwtincompatible/AbstractGwtIncompatibleClass.java
new file mode 100644
index 0000000..d2a20ad
--- /dev/null
+++ b/user/test/com/google/gwt/dev/jjs/test/gwtincompatible/AbstractGwtIncompatibleClass.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2014 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.test.gwtincompatible;
+
+import java.util.AbstractCollection;
+import java.util.Iterator;
+import java.util.Set;
+
+/**
+ * A simple class that is @GwtIncompatible.
+ *
+ * This class will be seen as a final class that does not extend nor implement anything other
+ * than Object an has only one member: its private default constructor.
+ */
+@GwtIncompatible("incompatible abstract class")
+public abstract class AbstractGwtIncompatibleClass extends AbstractCollection<String>
+    implements Set<String> {
+
+  public int someIntersetingMethod() {
+    return 0;
+  }
+
+  @Override
+  public Iterator<String> iterator() {
+    return null;
+  }
+
+  @Override
+  public int size() {
+    return 0;
+  }
+}