Skip to content

Commit

Permalink
MOSIP-25514 Fixed null pointer exception in event enum. (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
kameshsr authored Jan 2, 2023
1 parent 3956284 commit f83ffe4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,8 @@ public static EventEnum getEventEnumWithValue(EventEnum e, String s) {
*/
public static EventEnum getEventEnumWithValue(EventEnum e, String edescription, String ename) {
e.setDescription(String.format(e.getDescription(), edescription));
if (e.getId().equalsIgnoreCase("%s"))
String id = e.getId();
if (id!=null && id.equalsIgnoreCase("%s"))
e.setId(edescription);
e.setName(String.format(e.getName(), ename));
return e;
Expand All @@ -812,4 +813,4 @@ public static EventEnum getEventEnumWithDynamicName(EventEnum e, String s) {
return e;
}

}
}

0 comments on commit f83ffe4

Please sign in to comment.