Skip to content

Commit

Permalink
Merge pull request #12327 from swagger-api/issue-12305
Browse files Browse the repository at this point in the history
Use Object instead ERROR_UNKNOWN as default value for empty  names
  • Loading branch information
HugoMario authored Jan 24, 2024
2 parents 0051519 + 2eb75a8 commit 16f539d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3749,8 +3749,8 @@ public String sanitizeName(String name) {

// better error handling when map/array type is invalid
if (name == null) {
LOGGER.error("String to be sanitized is null. Default to ERROR_UNKNOWN");
return "ERROR_UNKNOWN";
LOGGER.error("String to be sanitized is null. Default to " + Object.class.getSimpleName());
return Object.class.getSimpleName();
}

// if the name is just '$', map it to 'value' for the time being.
Expand Down

0 comments on commit 16f539d

Please sign in to comment.