From f4527aad8efcfc306baaa4e915dee7d9ee731e66 Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 18 Apr 2008 16:43:09 +0000 Subject: [PATCH] 227029: multithreaded bug in reflection --- .../reflect/Java15ReflectionBasedReferenceTypeDelegate.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java index eccfd962c..ff2c0bc7c 100644 --- a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java +++ b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java @@ -105,10 +105,11 @@ public class Java15ReflectionBasedReferenceTypeDelegate extends public ResolvedMember[] getDeclaredFields() { if (fields == null) { Field[] reflectFields = this.myType.getDeclaredFields(); - this.fields = new ResolvedMember[reflectFields.length]; + ResolvedMember[] rFields = new ResolvedMember[reflectFields.length]; for (int i = 0; i < reflectFields.length; i++) { - this.fields[i] = createGenericFieldMember(reflectFields[i]); + rFields[i] = createGenericFieldMember(reflectFields[i]); } + this.fields = rFields; } return fields; } -- 2.39.5