From: Manolo Carrasco Date: Tue, 16 Sep 2014 15:36:33 +0000 (+0200) Subject: Fix Exception when cleaning up. Support for web components tag names X-Git-Tag: gwtquery-project-1.4.3~28^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c757c3d3c68f7ea49d7eeece9f7d41b2facbdfbf;p=gwtquery.git Fix Exception when cleaning up. Support for web components tag names --- diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java index 2570f411..ddf72475 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java @@ -171,7 +171,7 @@ public class GQuery implements Lazy { */ private static DocumentStyleImpl styleImpl; - private static RegExp tagNameRegex = RegExp.compile("<([\\w:]+)"); + private static RegExp tagNameRegex = RegExp.compile("<([\\w:-]+)"); /** * Static reference to the Widgets plugin @@ -3848,9 +3848,10 @@ public class GQuery implements Lazy { if (name != null) { if (dataCache.exists(id)) { dataCache.getCache(id).delete(name); - } - if (dataCache.getCache(id).isEmpty()) { - removeData(item, null); + if (dataCache.getCache(id).isEmpty()) { + // Save memory + removeData(item, null); + } } } else { // when the element cache is empty we remove its entry to save memory (issue 132)