[ 
https://issues.apache.org/jira/browse/BEAM-2872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161102#comment-16161102
 ] 

Stas Levin edited comment on BEAM-2872 at 9/11/17 11:25 AM:
------------------------------------------------------------

[~reuvenlax] I was able to make this error go away by setting the project's SDK 
to JDK 1.8 in the IDE. 
If I set it back to 1.7 the error returns. 
This behavior is consistent with the earlier findings where it compiled fine 
using maven with the env's JDK set to 1.8 and failed to compile with the env's 
JDK set to 1.7.

This leads me to believe people who have JDK 1.7 set as their default JDK will 
not be able to successfully compile Beam at the moment.


was (Author: staslev):
[~reuvenlax] I was able to make this error go away by setting the project's SDK 
to JDK 1.8 in the IDE. 
If I set it back to 1.7 the error returns. 
This behavior is consistent with the earlier findings where it compiled fine 
using maven with the env's JDK set to 1.8 and failed to compile with the env's 
JDK set to 1.7.

This leads me to believe people with JDK 1.7 will not be able to successfully 
compile Beam at the moment.

> AvroIO.TypedWrite#to() method produces a compilation error
> ----------------------------------------------------------
>
>                 Key: BEAM-2872
>                 URL: https://issues.apache.org/jira/browse/BEAM-2872
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>    Affects Versions: 2.2.0
>            Reporter: Stas Levin
>            Assignee: Reuven Lax
>
> The following code produces a compilation error when compiled using 
> IntelliJ's {{Rebuild Project}} command, or when compiling with maven under 
> {{Java 1.7}}:
> {code:java}
> @Experimental(Kind.FILESYSTEM)
>     public <NewDestinationT> TypedWrite<UserT, NewDestinationT, OutputT> to(
>         DynamicAvroDestinations<UserT, NewDestinationT, OutputT> 
> dynamicDestinations) {
>       return toBuilder()
>           .setDynamicDestinations((DynamicAvroDestinations) 
> dynamicDestinations)
>           .build();
>     }
> {code}
> {code}
> Error:(999, 17) java: incompatible types
>   required: 
> org.apache.beam.sdk.io.AvroIO.TypedWrite<UserT,NewDestinationT,OutputT>
>   found:    
> org.apache.beam.sdk.io.AvroIO.TypedWrite<UserT,DestinationT,OutputT>
> {code}
> Note: setting the environment to {{Java 1.8}} and compiling with maven does 
> not produce this error.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to