From 6ef5a1f1b5fe4af9b37f179cc47021286741bf78 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 31 Dec 2013 11:50:34 +0000 Subject: [PATCH] synchronize access to helpers cache - PR 37501 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1554405 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/IntrospectionHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); }