-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException thrown for BugPattern ScheduledTransactionTrace when using error-prone-support on jbanking #626
Comments
Tnx for the report @marcwrobel! I just checked out the repository and branch, and can indeed reproduce the issue. Will have a look! |
@marcwrobel to get you unblocked, the following patch avoids the issue (it disables the only three checks that rely on the diff --git a/pom.xml b/pom.xml
index bbd0c3e..e9677c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,6 +96,10 @@
<arg>
-Xplugin:ErrorProne
<!-- More Error Prone flags on https://errorprone.info/docs/flags. -->
+ <!-- Workaround for https://github.com/PicnicSupermarket/error-prone-support/issues/626. -->
+ -Xep:CollectorMutability:OFF
+ -Xep:FluxImplicitBlock:OFF
+ -Xep:ScheduledTransactionTrace:OFF
</arg>
<arg>-XDcompilePolicy=simple</arg>
</compilerArgs> As for the proper fix: I see where the NPE happens, and we could avoid it using an extra |
When targeting Java 8, `unnamedModule` is not properly initialized, causing an NPE when trying to load a class from it. In that context `noModule` should be used instead. Resolves #626.
I filed #627, which should properly resolve the issue. Thanks again for reporting @marcwrobel. NB: Good to keep in mind that this library is rather opinionated about use of Guava and AssertJ. I imagine that especially the former may not be a good fit for jbanking, as it is a zero-dependency library. It may help to omit the |
Thanks for your prompt response @Stephan202.
Yep, I just saw that. I am thinking about moving to AssertJ, so at least it may help for that migration. |
Hey @marcwrobel, version 0.11.1 is now available on Maven Central :) |
Hi @Stephan202, just tested the new version and everything works fine now. Thanks ! |
Describe the bug
While experimenting Error Prone Support on jbanking I got a
java.lang.NullPointerException
intech.picnic.errorprone.bugpatterns.ScheduledTransactionTrace
.Considering the
ScheduledTransactionTrace
bug pattern is located in error-prone-contrib I opened an issue here instead of https://github.com/google/error-prone.of the project.
already known.
Minimal Reproducible Example
The code that triggered the issue is located at https://github.com/marcwrobel/jbanking/blob/error-prone/src/main/java/fr/marcwrobel/jbanking/calendar/DayOfWeekInMonthHoliday.java. The bug can be reproduced using https://github.com/marcwrobel/jbanking/tree/error-prone.
Logs
Expected behavior
A successful build, without
NullPointerException
.Setup
Additional context
None
The text was updated successfully, but these errors were encountered: