Skip to content

Commit

Permalink
set new list to be zero-capacity before filling
Browse files Browse the repository at this point in the history
, to save a little space
  • Loading branch information
ZZZank committed Mar 25, 2024
1 parent 13f3d75 commit 30a71a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/probejs/info/ClassInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ private ClassInfo(Class<?> clazz) {
interfaces =
Arrays.stream(clazzRaw.getInterfaces()).map(ClassInfo::ofCache).collect(Collectors.toList());

constructorInfo = new ArrayList<>();
parameters = new ArrayList<>();
methodInfo = new ArrayList<>();
fieldInfo = new ArrayList<>();
constructorInfo = new ArrayList<>(0);
parameters = new ArrayList<>(0);
methodInfo = new ArrayList<>(0);
fieldInfo = new ArrayList<>(0);
try {
constructorInfo.addAll(
Arrays
Expand Down

0 comments on commit 30a71a5

Please sign in to comment.