jstachio: NPE genreated from the annotation processor with version jstachio 1.3.1

1.3.1 has introduced some regression (not present in 1.2.0) that causes Gradle annotation processing (tested with Gradle 8.3 and 8.2.1 and Java 20) to abort with NullPointerException. Could not provide a reproducible example, but here is some debugging screenshot that might help: There is this class in Gradle - AnnotationProcessingData - and you can see in its constructor that it has a Set<String> aggregateType that after running the Jstachio annotation processor has 2 elements (see screenshot), one of which is NULL (IntelliJ debugger has message: “Not Showing null elements”, shows only the non-null String), the other one has my annotated class. So, when it is is transferred to an com.google.common.collect.ImmutableSet(Google Guava?) , line 49:

this.aggregatedTypes = ImmutableSet.copyOf(aggregatedTypes);

the Google’s immutable set bombs with NPE, as it cannot acept NULLs! The issue seems to be some parasitic NULL that is in the set and causes the problem.

Screenshot 2023-08-20 at 1 54 41 AM

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Yes and I am massively grateful to providing all the info above. Seriously I owe you big time as it already saved me a bunch of time!

I promise Monday you will have a working 1.3.2

I can file a Gradle bug, will ask you to review it once filed, and participate in it’s discussion, if necessary

Ok, I will do that shortly. If this is a Gradle bug, it is an old one, as I can reproduce it with the previous version (8.2.1) as well

For now, I downgraded to 1.2.0, but would really appreciate a quick fix to this showstopper.