You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "ebyhr (via GitHub)" <gi...@apache.org> on 2026/05/19 00:24:14 UTC
[PR] Build: Ban Preconditions.checkState with %d placeholder [iceberg]
ebyhr opened a new pull request, #16407:
URL: https://github.com/apache/iceberg/pull/16407
The guava `Preconditions.checkState` method only supports the `%s` placeholder.
This PR replaces invalid patterns and adds a new checkstyle rule similar to the existing `checkArgument` rule.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Build: Ban Preconditions.checkState with %d placeholder [iceberg]
Posted by "ebyhr (via GitHub)" <gi...@apache.org>.
ebyhr commented on code in PR #16407:
URL: https://github.com/apache/iceberg/pull/16407#discussion_r3270032857
##########
api/src/main/java/org/apache/iceberg/PartitionStatistics.java:
##########
@@ -58,7 +58,7 @@ public interface PartitionStatistics extends StructLike {
static Schema schema(Types.StructType unifiedPartitionType, int formatVersion) {
Preconditions.checkState(!unifiedPartitionType.fields().isEmpty(), "Table must be partitioned");
- Preconditions.checkState(formatVersion > 0, "Invalid format version: %d", formatVersion);
+ Preconditions.checkState(formatVersion > 0, "Invalid format version: %s", formatVersion);
Review Comment:
This is the previous error message, without the fix applied:
```
Invalid format version: %d [0]
```
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Build: Ban Preconditions.checkState with %d placeholder [iceberg]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #16407:
URL: https://github.com/apache/iceberg/pull/16407#discussion_r3267240671
##########
api/src/main/java/org/apache/iceberg/PartitionStatistics.java:
##########
@@ -58,7 +58,7 @@ public interface PartitionStatistics extends StructLike {
static Schema schema(Types.StructType unifiedPartitionType, int formatVersion) {
Preconditions.checkState(!unifiedPartitionType.fields().isEmpty(), "Table must be partitioned");
- Preconditions.checkState(formatVersion > 0, "Invalid format version: %d", formatVersion);
+ Preconditions.checkState(formatVersion > 0, "Invalid format version: %s", formatVersion);
Review Comment:
how did the error msg look like before this fix?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Build: Ban Preconditions.checkState with %d placeholder [iceberg]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra merged PR #16407:
URL: https://github.com/apache/iceberg/pull/16407
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org