You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a bug in the sdk-generate-entity-models-maven-plugin.
Given a defect retrieved from the server with no owner set, DefectEntityModel#getOwner throws the following exception:
java.lang.ClassCastException: com.hpe.adm.nga.sdk.model.EmptyFieldModel cannot be cast to com.hpe.adm.nga.sdk.model.ReferenceFieldModel
at com.hpe.adm.nga.sdk.model.DefectEntityModel.getOwner(DefectEntityModel.java:1187)
Here is the implementation of the getOwner method, part of the class DefectEntityModel, which was generated by the maven plugin:
There's a bug in the sdk-generate-entity-models-maven-plugin.
Given a defect retrieved from the server with no owner set,
DefectEntityModel#getOwner
throws the following exception:Here is the implementation of the getOwner method, part of the class
DefectEntityModel
, which was generated by the maven plugin:The bug lies in the first line, which throws the
ClassCastException
above.Instead of checking for null after the cast, it should check the type before attempting the cast:
This applies to all the getters, I believe.
The text was updated successfully, but these errors were encountered: