Skip to content

Commit

Permalink
specify UTF_8 encodings more
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Oct 24, 2023
1 parent 53f694f commit 7de6885
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
12 changes: 9 additions & 3 deletions src/main/java/io/cryostat/recordings/RecordingHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -608,10 +608,16 @@ private Tagging createMetadataTagging(Metadata metadata) {
Tag.builder()
.key(
base64Url.encodeAsString(
e.getKey().getBytes()))
e.getKey()
.getBytes(
StandardCharsets
.UTF_8)))
.value(
base64Url.encodeAsString(
e.getValue().getBytes()))
e.getValue()
.getBytes(
StandardCharsets
.UTF_8)))
.build())
.toList());
if (metadata.expiry() != null) {
Expand All @@ -623,7 +629,7 @@ private Tagging createMetadataTagging(Metadata metadata) {
metadata.expiry()
.atOffset(ZoneOffset.UTC)
.toString()
.getBytes()))
.getBytes(StandardCharsets.UTF_8)))
.build());
}
return Tagging.builder().tagSet(tags).build();
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/io/cryostat/recordings/Recordings.java
Original file line number Diff line number Diff line change
Expand Up @@ -850,10 +850,16 @@ private Tagging createMetadataTagging(Metadata metadata) {
Tag.builder()
.key(
base64Url.encodeAsString(
e.getKey().getBytes()))
e.getKey()
.getBytes(
StandardCharsets
.UTF_8)))
.value(
base64Url.encodeAsString(
e.getValue().getBytes()))
e.getValue()
.getBytes(
StandardCharsets
.UTF_8)))
.build())
.toList())
.build();
Expand Down

0 comments on commit 7de6885

Please sign in to comment.