maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MSHARED-674) Maven Dependency Analyzer ignores Java 8 type annotations
Date Thu, 04 Jan 2018 11:44:00 GMT

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

ASF GitHub Bot commented on MSHARED-674:
----------------------------------------

rfscholte commented on a change in pull request #1: [MSHARED-674] Detect Java 8 type annotations
URL: https://github.com/apache/maven-dependency-analyzer/pull/1#discussion_r159634365
 
 

 ##########
 File path: src/test/java/org/apache/maven/shared/dependency/analyzer/DefaultProjectDependencyAnalyzerTest.java
 ##########
 @@ -302,17 +303,44 @@ public void testMultimoduleProject()
         assertEquals( expectedAnalysis, actualAnalysis );
     }
 
+    public void testTypeUseAnnotationDependency()
+            throws TestToolsException, ProjectDependencyAnalyzerException
+    {
+        // java.lang.annotation.ElementType.TYPE_USE introduced with Java 1.8
+        Assume.assumeTrue(SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_8));
 
 Review comment:
   Assumptions doesn't work with methodName based tests like PlexusTestCase still does.
   See https://builds.apache.org/job/maven-box/job/maven-dependency-analyzer/job/MSHARED-674_Detect_Java_8_type_annotations/1/
   
   For know I'd suggest to simple do a return when this value is false, but keep the code
once PlexusTestCase is upgraded.

----------------------------------------------------------------
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:
users@infra.apache.org


> Maven Dependency Analyzer ignores Java 8 type annotations
> ---------------------------------------------------------
>
>                 Key: MSHARED-674
>                 URL: https://issues.apache.org/jira/browse/MSHARED-674
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-dependency-analyzer
>    Affects Versions: maven-dependency-analyzer-1.7
>            Reporter: Andreas Hubold
>            Assignee: Robert Scholte
>
> The Maven Dependency Analyzer's DefaultMethodVisitor does not overwrite org.objectweb.asm.MethodVisitor#visitTypeAnnotation.
Because of this, type annotations are not detected. 
> This causes MDEP-594. Have a look at that issue for more details.
> Note, that type annotations were introduced with Java 8.



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

Mime
View raw message