You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/11/24 08:52:53 UTC
[GitHub] [iceberg] nastra opened a new pull request, #6264: API: Fix ErrorProne warning around Immutable Enums
nastra opened a new pull request, #6264:
URL: https://github.com/apache/iceberg/pull/6264
This should fix the ErrorProne warning
```
> Task :iceberg-api:compileJava
/home/nastra/Development/workspace/iceberg/api/src/main/java/org/apache/iceberg/transforms/Timestamps.java:69: warning: [ImmutableEnumChecker] enums should be immutable: 'Timestamps' has field 'apply' of type 'org.apache.iceberg.util.SerializableFunction<java.lang.Long,java.lang.Integer>', the declaration of type 'org.apache.iceberg.util.SerializableFunction<java.lang.Long,java.lang.Integer>' is not annotated with @com.google.errorprone.annotations.Immutable
private final SerializableFunction<Long, Integer> apply;
^
(see https://errorprone.info/bugpattern/ImmutableEnumChecker)
/home/nastra/Development/workspace/iceberg/api/src/main/java/org/apache/iceberg/transforms/Dates.java:66: warning: [ImmutableEnumChecker] enums should be immutable: 'Dates' has field 'apply' of type 'org.apache.iceberg.transforms.Dates.Apply', the declaration of type 'org.apache.iceberg.transforms.Dates.Apply' is not annotated with @com.google.errorprone.annotations.Immutable
private final Apply apply;
^
(see https://errorprone.info/bugpattern/ImmutableEnumChecker)
```
--
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
[GitHub] [iceberg] Fokko merged pull request #6264: API: Fix ErrorProne warning around Immutable Enums
Posted by GitBox <gi...@apache.org>.
Fokko merged PR #6264:
URL: https://github.com/apache/iceberg/pull/6264
--
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
[GitHub] [iceberg] nastra commented on a diff in pull request #6264: API: Fix ErrorProne warning around Immutable Enums
Posted by GitBox <gi...@apache.org>.
nastra commented on code in PR #6264:
URL: https://github.com/apache/iceberg/pull/6264#discussion_r1031206753
##########
api/src/main/java/org/apache/iceberg/transforms/Timestamps.java:
##########
@@ -66,7 +68,7 @@ public Integer apply(Long timestampMicros) {
private final ChronoUnit granularity;
private final String name;
- private final SerializableFunction<Long, Integer> apply;
+ private final Apply apply;
Review Comment:
we're using the same definion in `Dates`: `private final Apply apply;`
--
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
[GitHub] [iceberg] nastra commented on a diff in pull request #6264: API: Fix ErrorProne warning around Immutable Enums
Posted by GitBox <gi...@apache.org>.
nastra commented on code in PR #6264:
URL: https://github.com/apache/iceberg/pull/6264#discussion_r1031206753
##########
api/src/main/java/org/apache/iceberg/transforms/Timestamps.java:
##########
@@ -66,7 +68,7 @@ public Integer apply(Long timestampMicros) {
private final ChronoUnit granularity;
private final String name;
- private final SerializableFunction<Long, Integer> apply;
+ private final Apply apply;
Review Comment:
we're using the same definion in https://github.com/apache/iceberg/compare/master...nastra:iceberg:fix-immutable-enum-warn?expand=1#diff-dd0f2b50502667dbbac8ee8f4eba61bffe1b9c5cc23a9445ded9fd8c725db978R68
--
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