You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/02/22 01:50:12 UTC
[groovy] branch danielsun/tweak-resolving-further updated: Try to
address the bug - 2
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch danielsun/tweak-resolving-further
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/danielsun/tweak-resolving-further by this push:
new d44cd85 Try to address the bug - 2
d44cd85 is described below
commit d44cd85be1ccecc0dcda170d9edc56d9fc95fb48
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Feb 22 09:50:04 2020 +0800
Try to address the bug - 2
---
src/main/java/org/codehaus/groovy/control/ResolveVisitor.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java b/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
index d186284..4f29c79 100644
--- a/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
+++ b/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
@@ -637,6 +637,12 @@ public class ResolveVisitor extends ClassCodeExpressionTransformer {
static {
Map<String, Set<String>> defaultImportClasses = VMPluginFactory.getPlugin().getDefaultImportClasses(DEFAULT_IMPORTS);
DEFAULT_IMPORT_CLASS_AND_PACKAGES_CACHE.putAll(defaultImportClasses);
+
+ assert null != DEFAULT_IMPORT_CLASS_AND_PACKAGES_CACHE.get("Object");
+ assert null != DEFAULT_IMPORT_CLASS_AND_PACKAGES_CACHE.get("String");
+ assert null != DEFAULT_IMPORT_CLASS_AND_PACKAGES_CACHE.get("File");
+ assert null != DEFAULT_IMPORT_CLASS_AND_PACKAGES_CACHE.get("RuntimeException");
+ assert null != DEFAULT_IMPORT_CLASS_AND_PACKAGES_CACHE.get("Closure");
}
protected boolean resolveFromDefaultImports(final ClassNode type, final String[] packagePrefixes) {