maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylwester Lachiewicz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MPLUGIN-343) syntax error with enums + lambdas / anon inner inner classes
Date Thu, 02 May 2019 16:43:00 GMT

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

Sylwester Lachiewicz commented on MPLUGIN-343:
----------------------------------------------

Can you check with 3.6.0 version, does the problem still exist?

> syntax error with enums + lambdas / anon inner inner classes
> ------------------------------------------------------------
>
>                 Key: MPLUGIN-343
>                 URL: https://issues.apache.org/jira/browse/MPLUGIN-343
>             Project: Maven Plugin Tools
>          Issue Type: Bug
>    Affects Versions: 3.5.2
>            Reporter: Zoltan Farkas
>            Priority: Major
>
> Error:
> maven-plugin-plugin:3.5.2:descriptor failed: syntax error @[42,18] in file:/Users/zoly/NetBeansProjects/spf4j/spf4j-jdiff-maven-plugin/target/generated-sources/spf4j-core/org/spf4j/base/ReferenceType.java

> on code:
> {code}
> // blabla license comments
> package org.spf4j.base;
> import java.lang.ref.Reference;
> import java.lang.ref.SoftReference;
> import java.lang.ref.WeakReference;
> import java.util.function.Function;
> public enum ReferenceType {
>     WEAK((Object object) -> new WeakReference<>(object)),
>     SOFT((Object object) -> new SoftReference<>(object));
>     private final Function<Object, Reference<Object>> factory;
>     ReferenceType(final Function<Object, Reference<Object>> factory) {
>         this.factory = factory;
>     }
>     public <T> Reference<T> create(final T object) {
>         return (Reference<T>) factory.apply(object);
>     }
> }
> {code}



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

Mime
View raw message