rdblue commented on code in PR #6762:
URL: https://github.com/apache/iceberg/pull/6762#discussion_r1320872571
##########
core/src/main/java/org/apache/iceberg/encryption/PlaintextEncryptionManager.java:
##########
@@ -18,18 +18,22 @@
*/
package org.apache.iceberg.encryption;
-import java.nio.ByteBuffer;
import org.apache.iceberg.io.InputFile;
import org.apache.iceberg.io.OutputFile;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class PlaintextEncryptionManager implements EncryptionManager {
+ private static final EncryptionManager INSTANCE = new
PlaintextEncryptionManager();
private static final Logger LOG =
LoggerFactory.getLogger(PlaintextEncryptionManager.class);
+ public static EncryptionManager instance() {
+ return INSTANCE;
+ }
+
@Override
public InputFile decrypt(EncryptedInputFile encrypted) {
- if (encrypted.keyMetadata().buffer() != null) {
+ if (encrypted.keyMetadata() != null && encrypted.keyMetadata().buffer() !=
null) {
LOG.warn(
"File encryption key metadata is present, but currently using
PlaintextEncryptionManager.");
Review Comment:
Rather than using a class name, can we change this to "but no encryption has
been configured"
--
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]