Re: java8 lambdas and exceptions lead to compile error

2019-09-23 Thread Till Rohrmann
If there is such a check, then I'd say let's enable it for the moment.

Cheers,
Till

On Fri, Sep 20, 2019 at 1:50 PM zz  wrote:

> thanks for reply. "add some context/comment" is very necessary, but I am
> not sure where to add to remind others for avoiding similar mistakes, so Is
> that a better way to add corresponding grammar checkstyle
> in checkstyle.xml? we can remove corresponding grammar checkstyle when we
> upgrade new Java version.In this way others committers can
> avoid similar problem.
>
> Till Rohrmann  于2019年9月19日周四 下午3:37写道:
>
> > Hi,
> >
> > if there is an easy way to make it also work with Java 1.8.0_77 I guess
> we
> > could change it. That way we would make the life of our users easier.
> >
> > The solution proposed by JDK-8054569 seems quite simple. The only
> downside
> > I see is that it could easily fell victim of a future refactoring/clean
> up
> > if we don't add some context/comment why the explicit type has been
> > introduced. Alternatively, we could state on the website which Java
> version
> > you need to build Flink.
> >
> > Cheers,
> > Till
> >
> > On Thu, Sep 19, 2019 at 8:53 AM zz  wrote:
> >
> > > Hey all,
> > > Recently, I used flink to do secondary development, when compile flink
> > > master(up-to-date) by using Java 1.8.0_77, got errors as follow:
> > >
> > > compile (default-compile) on project flink-table-api-java: Compilation
> > > failure
> > >
> > >
> >
> /home/*/zzsmdfj/sflink/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/Cal
> > > culatedTableFactory.java:[90,53] unreported exception X; must be caught
> > or
> > > declared to be thrownat
> > > org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > > (MojoExecutor.java:213)
> > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > > (MojoExecutor.java:154)
> > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > > (MojoExecutor.java:146)
> > > at
> > > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> > > (LifecycleModuleBuilder.java:117)
> > > at
> > > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> > > (LifecycleModuleBuilder.java:81)
> > > at
> > >
> > >
> >
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
> > > (SingleThreadedBuilder.java:51)
> > > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> > > (LifecycleStarter.java:128)
> > > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
> > > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
> > > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
> > > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
> > > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
> > > at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke
> > > (NativeMethodAccessorImpl.java:62)
> > > at sun.reflect.DelegatingMethodAccessorImpl.invoke
> > > (DelegatingMethodAccessorImpl.java:43)
> > > at java.lang.reflect.Method.invoke (Method.java:498)
> > > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> > > (Launcher.java:289)
> > > at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> > > (Launcher.java:229)
> > > at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> > > (Launcher.java:415)
> > > at org.codehaus.plexus.classworlds.launcher.Launcher.main
> > > (Launcher.java:356)
> > > Caused by:
> org.apache.maven.plugin.compiler.CompilationFailureException:
> > > Compilation failure
> > >
> > > if using Java 1.8.0_102 to compile, it build success. it maybe a case
> of
> > > bug JDK-8054569 .
> > >
> > > Is that a problem?and What should I do with this?any comments would be
> > > appreciated.
> > >
> > > issue:https://issues.apache.org/jira/browse/FLINK-14093
> > >
> >
>


Re: java8 lambdas and exceptions lead to compile error

2019-09-20 Thread zz
thanks for reply. "add some context/comment" is very necessary, but I am
not sure where to add to remind others for avoiding similar mistakes, so Is
that a better way to add corresponding grammar checkstyle
in checkstyle.xml? we can remove corresponding grammar checkstyle when we
upgrade new Java version.In this way others committers can
avoid similar problem.

Till Rohrmann  于2019年9月19日周四 下午3:37写道:

> Hi,
>
> if there is an easy way to make it also work with Java 1.8.0_77 I guess we
> could change it. That way we would make the life of our users easier.
>
> The solution proposed by JDK-8054569 seems quite simple. The only downside
> I see is that it could easily fell victim of a future refactoring/clean up
> if we don't add some context/comment why the explicit type has been
> introduced. Alternatively, we could state on the website which Java version
> you need to build Flink.
>
> Cheers,
> Till
>
> On Thu, Sep 19, 2019 at 8:53 AM zz  wrote:
>
> > Hey all,
> > Recently, I used flink to do secondary development, when compile flink
> > master(up-to-date) by using Java 1.8.0_77, got errors as follow:
> >
> > compile (default-compile) on project flink-table-api-java: Compilation
> > failure
> >
> >
> /home/*/zzsmdfj/sflink/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/Cal
> > culatedTableFactory.java:[90,53] unreported exception X; must be caught
> or
> > declared to be thrownat
> > org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > (MojoExecutor.java:213)
> > at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > (MojoExecutor.java:154)
> > at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > (MojoExecutor.java:146)
> > at
> > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> > (LifecycleModuleBuilder.java:117)
> > at
> > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> > (LifecycleModuleBuilder.java:81)
> > at
> >
> >
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
> > (SingleThreadedBuilder.java:51)
> > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> > (LifecycleStarter.java:128)
> > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
> > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
> > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
> > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
> > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
> > at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:62)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke (Method.java:498)
> > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> > (Launcher.java:289)
> > at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> > (Launcher.java:229)
> > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> > (Launcher.java:415)
> > at org.codehaus.plexus.classworlds.launcher.Launcher.main
> > (Launcher.java:356)
> > Caused by: org.apache.maven.plugin.compiler.CompilationFailureException:
> > Compilation failure
> >
> > if using Java 1.8.0_102 to compile, it build success. it maybe a case of
> > bug JDK-8054569 .
> >
> > Is that a problem?and What should I do with this?any comments would be
> > appreciated.
> >
> > issue:https://issues.apache.org/jira/browse/FLINK-14093
> >
>


Re: java8 lambdas and exceptions lead to compile error

2019-09-19 Thread Till Rohrmann
Hi,

if there is an easy way to make it also work with Java 1.8.0_77 I guess we
could change it. That way we would make the life of our users easier.

The solution proposed by JDK-8054569 seems quite simple. The only downside
I see is that it could easily fell victim of a future refactoring/clean up
if we don't add some context/comment why the explicit type has been
introduced. Alternatively, we could state on the website which Java version
you need to build Flink.

Cheers,
Till

On Thu, Sep 19, 2019 at 8:53 AM zz  wrote:

> Hey all,
> Recently, I used flink to do secondary development, when compile flink
> master(up-to-date) by using Java 1.8.0_77, got errors as follow:
>
> compile (default-compile) on project flink-table-api-java: Compilation
> failure
>
> /home/*/zzsmdfj/sflink/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/Cal
> culatedTableFactory.java:[90,53] unreported exception X; must be caught or
> declared to be thrownat
> org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:213)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:154)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:146)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:117)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:81)
> at
>
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
> (SingleThreadedBuilder.java:51)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
> at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:498)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> (Launcher.java:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main
> (Launcher.java:356)
> Caused by: org.apache.maven.plugin.compiler.CompilationFailureException:
> Compilation failure
>
> if using Java 1.8.0_102 to compile, it build success. it maybe a case of
> bug JDK-8054569 .
>
> Is that a problem?and What should I do with this?any comments would be
> appreciated.
>
> issue:https://issues.apache.org/jira/browse/FLINK-14093
>


java8 lambdas and exceptions lead to compile error

2019-09-19 Thread zz
Hey all,
Recently, I used flink to do secondary development, when compile flink
master(up-to-date) by using Java 1.8.0_77, got errors as follow:

compile (default-compile) on project flink-table-api-java: Compilation
failure
/home/*/zzsmdfj/sflink/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/Cal
culatedTableFactory.java:[90,53] unreported exception X; must be caught or
declared to be thrownat
org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:146)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
(LifecycleModuleBuilder.java:117)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
(LifecycleModuleBuilder.java:81)
at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch
(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main
(Launcher.java:356)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException:
Compilation failure

if using Java 1.8.0_102 to compile, it build success. it maybe a case of
bug JDK-8054569 .

Is that a problem?and What should I do with this?any comments would be
appreciated.

issue:https://issues.apache.org/jira/browse/FLINK-14093


[jira] [Created] (FLINK-14093) Java8 lambdas and exceptions lead to compile error

2019-09-17 Thread zzsmdfj (Jira)
zzsmdfj created FLINK-14093:
---

 Summary: Java8 lambdas and exceptions lead to compile error
 Key: FLINK-14093
 URL: https://issues.apache.org/jira/browse/FLINK-14093
 Project: Flink
  Issue Type: Bug
  Components: Table SQL / API
Affects Versions: 1.9.0
Reporter: zzsmdfj


when compile flink master by using Java 1.8.0_77, got errors as follow:

```
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.8.0:
compile (default-compile) on project flink-table-api-java: Compilation failure
/home/*/zzsmdfj/sflink/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/Cal
culatedTableFactory.java:[90,53] unreported exception X; must be caught or 
declared to be thrown

at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:213)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:154)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:146)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:117)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:81)
 at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
 (SingleThreadedBuilder.java:51)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:128)
 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
 at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
 at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
 at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
 at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
 at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke (Method.java:498)
 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:289)
 at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:415)
 at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: 
Compilation failure
```
if using Java 1.8.0_102 to compile, it build success. it maybe a case of bug 
[JDK-8054569](https://bugs.openjdk.java.net/browse/JDK-8054569), although we 
can fix this by upgrading the JDK,but i think it is better of compatible with 
different versions of the JDK8.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)