Inspectopedia Help

Entity listener problems

Reports the following JPA specification errors:

  • Entity listener classes without public no-argument constructors

  • Entity listener methods with incorrect signatures

Example:

@Entity @EntityListeners(value = JavaEntityListener.class) class JavaEntity { ... } class JavaEntityListener { @PostLoad void postLoad(String parameter) { ... } // Error: method 'postLoad' should take parameter of type 'Object' here }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Jakarta EE: Persistence (JPA), 233.SNAPSHOT

Last modified: 13 July 2023