aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2022-01-10 08:09:47 -0800
committerGitHub <noreply@github.com>2022-01-10 08:09:47 -0800
commit04b4ff08535291ac111884320661ae23f1d7a3c9 (patch)
tree492cdd06efa5fa3215f1b0bb49397f25408734c3 /util
parent605b700abfb1cffcc3d39ae768d048bf6a8fef2a (diff)
parent4c8c90de69b4e3cdeea0f598fea5a5358ac2c861 (diff)
downloadaspectj-04b4ff08535291ac111884320661ae23f1d7a3c9.tar.gz
aspectj-04b4ff08535291ac111884320661ae23f1d7a3c9.zip
Merge pull request #109 from turbanoff/avoid_empty_arrays_allocation
Reduce empty array allocations
Diffstat (limited to 'util')
-rw-r--r--util/src/main/java/org/aspectj/util/GenericSignature.java2
-rw-r--r--util/src/main/java/org/aspectj/util/GenericSignatureParser.java2
2 files changed, 2 insertions, 2 deletions
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("<")) {