[ 
https://issues.apache.org/jira/browse/BEAM-6096?focusedWorklogId=167618&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-167618
 ]

ASF GitHub Bot logged work on BEAM-6096:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Nov/18 04:52
            Start Date: 20/Nov/18 04:52
    Worklog Time Spent: 10m 
      Work Description: cushon commented on a change in pull request #7085: 
[BEAM-6096] illegal signature attribute when compiling with JDK 11
URL: https://github.com/apache/beam/pull/7085#discussion_r234868645
 
 

 ##########
 File path: 
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/WindowMergingFnRunner.java
 ##########
 @@ -130,16 +130,16 @@ private MergingViaWindowFnRunner(WindowFn<?, W> 
windowFn) {
       this.mergedWindows = new ArrayList<>();
       this.currentWindows = new ArrayList<>();
       this.mergeContext =
-          windowFn.new MergeContext() {
+          ((WindowFn) windowFn).new MergeContext() {
 
 Review comment:
   It's a `WindowFn<?, W>`, and anonymous classes whose enclosing instance 
types contain captured wildcards are illegal: 
https://bugs.openjdk.java.net/browse/JDK-8203436.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 167618)
    Time Spent: 0.5h  (was: 20m)

> illegal signature attribute when compiling with JDK 11
> ------------------------------------------------------
>
>                 Key: BEAM-6096
>                 URL: https://issues.apache.org/jira/browse/BEAM-6096
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-core
>            Reporter: Liam Miller-Cushon
>            Assignee: Liam Miller-Cushon
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The following code is invalid, and fails to compile with the JDK 11 javac: 
> https://github.com/apache/beam/blob/1cbbc4d8755130f137e7d9ef4813e8d3b917cb70/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/WindowMergingFnRunner.java#L132-L144
> The error is:
> ```
> error: error while generating class <anonymous 
> org.apache.beam.fn.harness.WindowMergingFnRunner$MergingViaWindowFnRunner$1>
>  (illegal signature attribute for type CAP#1)
>  where CAP#1 is a fresh type-variable:
>  CAP#1 extends Object from capture of ?
> ```
> The code was previously accepted by javac due to a bug, which has been fixed 
> in JDK 11: https://bugs.openjdk.java.net/browse/JDK-8203436



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to