Community
Participate
Working Groups
Build Identifier: 1.6.8 Analysing a heap dump of our webapps running under tcServer/Insight combo, I discovered that the AspectJ weaver is the biggest sinner for creating empty array references. This could be eliminated by replacing instances of: blah = new ReferenceType[0]; with blah = EMPTY_REFERENCE_TYPE_ARRAY; which is defined as private static final ReferenceType[] EMPTY_REFERENCE_TYPE_ARRAY = new ReferenceType[0]; Guilty classes include: - BoundedReferenceType (new ReerenceType[0]) - Pointcut (new String[0] - x2) - BcelMethod (genericParameterTypes = new UnresolvedType[paramTypeSigs.length] - often zero) - GenericSignature$ClassTypeSignature (new FormalTypeParameter[0] and new ClassTypeSignature[0]) - ExposedState (when ctor calls this(0) -> new Var[0] & new boolean[0]) There's a number more, but the above are those with the most instances Reproducible: Always
all fixed. Are you really on 1.6.7? If so I advise moving to 1.6.8 - 1.6.7 has some nasty issues that forced me to quickly release 1.6.8.
Actually on 1.6.8, but for some reason, I was looking at the 1.6.7. source code, so stuck that in in a moment of paranoia. Have changed it back just for accuracy.