From 4c8c90de69b4e3cdeea0f598fea5a5358ac2c861 Mon Sep 17 00:00:00 2001 From: Andrey Turbanov Date: Sat, 18 Dec 2021 15:20:43 +0300 Subject: Reduce empty array allocations --- util/src/main/java/org/aspectj/util/GenericSignature.java | 2 +- util/src/main/java/org/aspectj/util/GenericSignatureParser.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'util/src') diff --git a/util/src/main/java/org/aspectj/util/GenericSignature.java b/util/src/main/java/org/aspectj/util/GenericSignature.java index e68a78b7e..3ac878771 100644 --- a/util/src/main/java/org/aspectj/util/GenericSignature.java +++ b/util/src/main/java/org/aspectj/util/GenericSignature.java @@ -38,7 +38,7 @@ public class GenericSignature { } public static class MethodTypeSignature { - public FormalTypeParameter[] formalTypeParameters = new FormalTypeParameter[0]; + public FormalTypeParameter[] formalTypeParameters = FormalTypeParameter.NONE; public TypeSignature[] parameters = new TypeSignature[0]; public TypeSignature returnType; public FieldTypeSignature[] throwsSignatures = new FieldTypeSignature[0]; diff --git a/util/src/main/java/org/aspectj/util/GenericSignatureParser.java b/util/src/main/java/org/aspectj/util/GenericSignatureParser.java index 3f1f3d52a..b6fbe4b4b 100644 --- a/util/src/main/java/org/aspectj/util/GenericSignatureParser.java +++ b/util/src/main/java/org/aspectj/util/GenericSignatureParser.java @@ -71,7 +71,7 @@ public class GenericSignatureParser { this.inputString = sig; tokenStream = tokenize(sig); tokenIndex = 0; - FormalTypeParameter[] formals = new FormalTypeParameter[0]; + FormalTypeParameter[] formals = FormalTypeParameter.NONE; TypeSignature returnType = null; // FormalTypeParameters-opt if (maybeEat("<")) { -- cgit v1.2.3