diff --git a/src/main/org/apache/tools/ant/IntrospectionHelper.java b/src/main/org/apache/tools/ant/IntrospectionHelper.java index ae334b92c..7cb247f97 100644 --- a/src/main/org/apache/tools/ant/IntrospectionHelper.java +++ b/src/main/org/apache/tools/ant/IntrospectionHelper.java @@ -343,7 +343,7 @@ public final class IntrospectionHelper { * * @return a helper for the specified class */ - public static IntrospectionHelper getHelper(Project p, Class c) { + public synchronized static IntrospectionHelper getHelper(Project p, Class c) { IntrospectionHelper ih = HELPERS.get(c.getName()); // If a helper cannot be found, or if the helper is for another // classloader, create a new IH @@ -1499,7 +1499,7 @@ public final class IntrospectionHelper { /** * Clears the static cache of on build finished. */ - public static void clearCache() { + public synchronized static void clearCache() { HELPERS.clear(); }