jzhuge commented on a change in pull request #1427:
URL: https://github.com/apache/iceberg/pull/1427#discussion_r483919408
##########
File path: api/src/main/java/org/apache/iceberg/Files.java
##########
@@ -60,9 +60,8 @@ public PositionOutputStream create() {
if (!file.getParentFile().isDirectory() &&
!file.getParentFile().mkdirs()) {
throw new RuntimeIOException(
- String.format(
"Failed to create the file's directory at %s.",
- file.getParentFile().getAbsolutePath()));
+ file.getParentFile().getAbsolutePath());
Review comment:
Since RuntimeIOException is deprecated and you are touching this code,
why not replace it?
##########
File path: api/src/main/java/org/apache/iceberg/Files.java
##########
@@ -76,7 +75,7 @@ public PositionOutputStream create() {
public PositionOutputStream createOrOverwrite() {
if (file.exists()) {
if (!file.delete()) {
- throw new RuntimeIOException("Failed to delete: " + file);
+ throw new RuntimeIOException("Failed to delete: %s", file);
Review comment:
Why is this better?
##########
File path: build.gradle
##########
@@ -174,6 +174,7 @@ project(':iceberg-bundled-guava') {
project(':iceberg-api') {
dependencies {
compile project(path: ':iceberg-bundled-guava', configuration: 'shadow')
+ compileOnly "com.google.errorprone:error_prone_annotations:2.3.3"
Review comment:
Was there any discussion to turn on errorprone or spotbug in gradle?
Your effort here will make it easier to turn it on.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]