[
https://issues.apache.org/jira/browse/BEAM-6420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kenneth Knowles updated BEAM-6420:
----------------------------------
Description:
{code}
sdks/java/core/src/main/java/org/apache/beam/sdk/io/Compression.java:145:
warning: [ImmutableEnumChecker] enums should be immutable: 'Compression' has
field 'detectedSuffixes' of type
'org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList<java.lang.String>',
the declaration of type
'org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList<java.lang.String>'
is not annotated with @com.google.errorprone.annotations.Immutable or
@javax.annotation.concurrent.Immutable
private final ImmutableList<String> detectedSuffixes;
^
(see http://errorprone.info/bugpattern/ImmutableEnumChecker)
error: warnings found and -Werror specified
{code}
The annotations should be preserved, so it may be that errorprone has an
allowlist of classes and the relocation fools it. Probably should be fixed in
errorprone if that is the case. If there is something we need to preserve about
the rewritten class files, we should do that.
was:
{code}
sdks/java/core/src/main/java/org/apache/beam/sdk/io/Compression.java:145:
warning: [ImmutableEnumChecker] enums should be immutable: 'Compression' has
field 'detectedSuffixes' of type
'org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList<java.lang.String>',
the declaration of type
'org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList<java.lang.String>'
is not annotated with @com.google.errorprone.annotations.Immutable or
@javax.annotation.concurrent.Immutable
private final ImmutableList<String> detectedSuffixes;
^
(see http://errorprone.info/bugpattern/ImmutableEnumChecker)
error: warnings found and -Werror specified
{code}
The annotations should be preserved, so it may be that errorprone has a
whitelist of classes and the relocation fools it. Probably should be fixed in
errorprone if that is the case. If there is something we need to preserve about
the rewritten class files, we should do that.
> Vendored Guava hits some errorprone issues
> ------------------------------------------
>
> Key: BEAM-6420
> URL: https://issues.apache.org/jira/browse/BEAM-6420
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Reporter: Kenneth Knowles
> Priority: P3
>
> {code}
> sdks/java/core/src/main/java/org/apache/beam/sdk/io/Compression.java:145:
> warning: [ImmutableEnumChecker] enums should be immutable: 'Compression' has
> field 'detectedSuffixes' of type
> 'org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList<java.lang.String>',
> the declaration of type
> 'org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList<java.lang.String>'
> is not annotated with @com.google.errorprone.annotations.Immutable or
> @javax.annotation.concurrent.Immutable
> private final ImmutableList<String> detectedSuffixes;
> ^
> (see http://errorprone.info/bugpattern/ImmutableEnumChecker)
> error: warnings found and -Werror specified
> {code}
> The annotations should be preserved, so it may be that errorprone has an
> allowlist of classes and the relocation fools it. Probably should be fixed in
> errorprone if that is the case. If there is something we need to preserve
> about the rewritten class files, we should do that.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)