I am somewhat desperate as i dont even know how its possible that i get the Exception i am getting.
From the stack trace:
java.lang.NullPointerException
at us.fl.k12.sdhc.services.dto.MagnetApplicant.getGrade(MagnetApplicant.java:86)
...
MagnetApplicant code:
84 public Grade getGrade()
85 {
86 return grade;
87 }
Grade is an Enumeration. How can a NullPointerException be thrown when just returning a value?
Thanks for reading!
The object reference on which you are invoking the getGrade() method might be null. It is not necessarily the enum itself that has this method.
Since enums do not get autoboxed/autounboxed and returning a null from a method is fine, the problem is not within the method as such.