ggershinsky commented on code in PR #14579:
URL: https://github.com/apache/iceberg/pull/14579#discussion_r2533092999
##########
core/src/main/java/org/apache/iceberg/encryption/AesGcmInputFile.java:
##########
@@ -29,8 +29,13 @@ public class AesGcmInputFile implements InputFile {
private Long encryptedLength;
private Long plaintextLength;
+ /**
+ * @deprecated will be removed in 2.0.0 This API does not receive file
length, and is therefore
+ * not safe
+ */
+ @Deprecated
public AesGcmInputFile(InputFile sourceFile, byte[] dataKey, byte[]
fileAADPrefix) {
- this(sourceFile, dataKey, fileAADPrefix, null);
+ throw new IllegalArgumentException("Can't create AesGcmInputFile without
file length");
Review Comment:
`sourceFile.getLength()` is unsafe, but we don't have to modify the
constructor, an exception will be thrown later in the cycle. I'll revert the
line 38.
--
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]