Skip to content

Commit

Permalink
Make a copy of the metadata when uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
Sollace committed Sep 30, 2024
1 parent 475ff74 commit f825898
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ static SkinUpload create(@Nullable URI skin, SkinType type, Map<String, String>
return new Delete(session, type);
}
if ("file".equals(skin.getScheme())) {
return new FileUpload(session, type, Paths.get(skin), metadata);
return new FileUpload(session, type, Paths.get(skin), Map.copyOf(metadata));
}
if (Set.of("http", "https").contains(skin.getScheme())) {
return new UriUpload(session, type, skin, metadata);
return new UriUpload(session, type, skin, Map.copyOf(metadata));
}
throw new IllegalArgumentException("URI scheme not supported for skin upload: " + skin.getScheme());
}
Expand Down

0 comments on commit f825898

Please sign in to comment.