Neuw84 commented on code in PR #7988:
URL: https://github.com/apache/iceberg/pull/7988#discussion_r1259908365
##########
delta-lake/src/integration/java/org/apache/iceberg/delta/TestSnapshotDeltaLakeTable.java:
##########
@@ -532,13 +533,14 @@ private void addExternalDatafiles(
private static String getFullFilePath(String path, String tableRoot) {
URI dataFileUri = URI.create(path);
try {
- String decodedPath = new URLCodec().decode(path);
+ String decodedPath = URLDecoder.decode(path,
StandardCharsets.UTF_8.name());
if (dataFileUri.isAbsolute()) {
return decodedPath;
} else {
return tableRoot + File.separator + decodedPath;
}
- } catch (DecoderException e) {
+ } catch (UnsupportedEncodingException e) {
+ // In Java 10+ this will not need try-catch
Review Comment:
Yes, I suppose that the tooling will catch this when the project gets
upgraded to a newer Java version.
Removed
##########
dell/src/test/java/org/apache/iceberg/dell/mock/ecs/ObjectData.java:
##########
@@ -70,9 +71,29 @@ public InputStream createInputStream(Range range) {
public S3ObjectMetadata createFullMetadata() {
S3ObjectMetadata metadata = new S3ObjectMetadata();
- metadata.setETag(DigestUtils.md5Hex(content));
+ MessageDigest md = null;
+ try {
+ md = MessageDigest.getInstance("MD5");
+ } catch (NoSuchAlgorithmException e) {
+ throw new RuntimeException(e);
+ }
+ md.update(content);
+ byte[] digest = md.digest();
+ metadata.setETag(bytesToHex(digest));
metadata.setContentLength((long) content.length);
metadata.setUserMetadata(userMetadata);
return metadata;
}
+
+ private static final char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray();
Review Comment:
Moved!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]