Browse Source

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
master
Stefan Bodewig 11 years ago
parent
commit
6ef5a1f1b5
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/main/org/apache/tools/ant/IntrospectionHelper.java

+ 2
- 2
src/main/org/apache/tools/ant/IntrospectionHelper.java View File

@@ -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();
}



Loading…
Cancel
Save