Skip to content

Commit 62cf705

Browse files
committed
fix jwks endpoint issue during server startup.
add auto generated swagger changes.
1 parent e2c30a0 commit 62cf705

File tree

1 file changed

+7
-5
lines changed
  • components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils

1 file changed

+7
-5
lines changed

components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -6841,11 +6841,13 @@ public static void logAuditMessage(String entityType, String entityInfo, String
68416841
jsonObject.put("typ", entityType);
68426842
jsonObject.put("action", action);
68436843
jsonObject.put("performedBy", performedBy);
6844-
try {
6845-
JSONObject entityInfoJson = (JSONObject) new JSONParser().parse(entityInfo);
6846-
jsonObject.put("info", entityInfoJson);
6847-
} catch (ParseException ignored) { // if entityInfo cannot be parsed as json, log as a simple string
6848-
jsonObject.put("info", entityInfo);
6844+
if (entityInfo != null && !StringUtils.isBlank(entityInfo)) {
6845+
try {
6846+
JSONObject entityInfoJson = (JSONObject) new JSONParser().parse(entityInfo);
6847+
jsonObject.put("info", entityInfoJson);
6848+
} catch (ParseException ignored) { // if entityInfo cannot be parsed as json, log as a simple string
6849+
jsonObject.put("info", entityInfo);
6850+
}
68496851
}
68506852
audit.info(StringEscapeUtils.unescapeJava(jsonObject.toString()));
68516853
}

0 commit comments

Comments
 (0)