]> source.dussan.org Git - gwtquery.git/commitdiff
Fix lazy() ClassCast
authorMaxime Mériouma-Caron <maxime.meriouma@arcbees.com>
Tue, 1 Dec 2015 23:39:32 +0000 (18:39 -0500)
committerMaxime Mériouma-Caron <maxime.meriouma@arcbees.com>
Tue, 1 Dec 2015 23:39:32 +0000 (18:39 -0500)
gwtquery-core/src/main/java/com/google/gwt/query/rebind/LazyGenerator.java

index 0a2cce568491cdb5662995cbfc31b7d86c8a6de8..413a5ebc7efc8606751284d69dec4b2f218682ed 100644 (file)
@@ -207,7 +207,7 @@ public class LazyGenerator extends Generator {
     }
 
     sw.println(
-        "ctx = GQuery.$(getElement()).as(" + nonLazyType.getQualifiedSourceName() + "."
+        "ctx = GQuery.$((Element) getElement()).as(" + nonLazyType.getQualifiedSourceName() + "."
             + classID + ");");
     sw.println("for (int i = 0; i < closures.length(); i++) {");
     sw.indent();
@@ -220,5 +220,6 @@ public class LazyGenerator extends Generator {
     sw.println("};");
     sw.outdent();
     sw.println("}");
+    treeLogger.log(TreeLogger.Type.ERROR, sw.toString());
   }
 }