Skip to content

Commit

Permalink
Add log if encoding fails
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokota committed Nov 8, 2023
1 parent d855a4d commit c8ab3fd
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -207,11 +207,12 @@ private String getExtension(ParsedSchema parsedSchema) {
}
}

protected static String encode(String subject) {
protected String encode(String subject) {
try {
String newSubject = URLEncoder.encode(subject, "UTF-8");
return newSubject.replaceAll("%", PERCENT_REPLACEMENT);
} catch (Exception e) {
getLog().warn(String.format("Could not encode subject '%s'", subject));
return subject;
}
}
Expand Down

0 comments on commit c8ab3fd

Please sign in to comment.