Github user xnslong commented on the issue:
https://github.com/apache/logging-log4j2/pull/92
After this failure, could you please check your local maven repository for
the log4j-api-2.9-SNAPSHOT version, decompile the jar and check the
StringBuilders class. After I got the failure, I found it is not compiled from
my code.
I didn't check the command I provided above, I just wrote it on my
experience. My point is that the two modules may have to be compiled in only 1
command. For me, my settings for maven will download the dependent SNAPSHOT
artifacts every time I build a module, so even when I installed the SNAPSHOT
version, it will be rewritten when I try to build the other module. I'm not
sure what's your settings, so I suggest to check the jar file in the repository.
```java
public static void trimToMaxSize(final StringBuilder stringBuilder, final
int maxSize) {
if (stringBuilder != null && stringBuilder.capacity() > maxSize) { // I
modified this line, but I found it remains unchanged and still check the
stringBuilder.length() in the decompiled code.
stringBuilder.setLength(maxSize);
stringBuilder.trimToSize();
}
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---