I am trying to implement Search filter functionality and load grid in spring boot data JPA application. For creating dynamic query I am using Querydsl.
I think the issue is if (nBuildId != 0). nBuildId is a big Integer so when the check is being performed it is being unboxed to a primitive int. If it's null, this will cause a NullPointerException. A null check on nBuildId should fix things, E.G. if (nBuildId != null && nBuildId != 0).