You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2018/03/25 12:48:19 UTC

[maven-dependency-analyzer] branch MSHARED-710 updated (4d06336 -> 243006b)

This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a change to branch MSHARED-710
in repository https://gitbox.apache.org/repos/asf/maven-dependency-analyzer.git.


 discard 4d06336  [MSHARED-710] - JDK 9 / 10 Issue - Unknown constant pool type  o Added missing constants to the ConstantPoolParser.
     new 243006b  [MSHARED-710] - JDK 9 / 10 Issue - Unknown constant pool type  o Added missing constants to the ConstantPoolParser.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (4d06336)
            \
             N -- N -- N   refs/heads/MSHARED-710 (243006b)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../shared/dependency/analyzer/asm/ConstantPoolParser.java | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
khmarbaise@apache.org.

[maven-dependency-analyzer] 01/01: [MSHARED-710] - JDK 9 / 10 Issue - Unknown constant pool type o Added missing constants to the ConstantPoolParser.

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MSHARED-710
in repository https://gitbox.apache.org/repos/asf/maven-dependency-analyzer.git

commit 243006bd4ddf19ef71b6ff41c17d551f611c00ec
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Sun Mar 25 14:41:43 2018 +0200

    [MSHARED-710] - JDK 9 / 10 Issue - Unknown constant pool type
     o Added missing constants to the ConstantPoolParser.
---
 .../dependency/analyzer/asm/ConstantPoolParser.java    | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java b/src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java
index 8e2b2d5..865df0b 100644
--- a/src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java
+++ b/src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java
@@ -32,6 +32,12 @@ import java.util.Set;
  * ASM does not support.
  *
  * Adapted from http://stackoverflow.com/a/32278587/23691
+ * 
+ * Constant pool types:
+ * 
+ * @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.4
+ * @see https://docs.oracle.com/javase/specs/jvms/se10/html/jvms-4.html#jvms-4.4
+ * 
  */
 public class ConstantPoolParser
 {
@@ -65,6 +71,10 @@ public class ConstantPoolParser
     public static final byte CONSTANT_METHOD_TYPE = 16;
 
     public static final byte CONSTANT_INVOKE_DYNAMIC = 18;
+    
+    public static final byte CONSTANT_MODULE = 19;
+
+    public static final byte CONSTANT_PACKAGE = 20;
 
     private static final int OXF0 = 0xf0;
 
@@ -93,7 +103,7 @@ public class ConstantPoolParser
             switch ( tag )
             {
                 default:
-                    throw new RuntimeException( "Unknown constant pool type" );
+                    throw new RuntimeException( "Unknown constant pool type '" + tag + "'" );
                 case CONSTANT_UTF8:
                     stringConstants.put( ix, decodeString( buf ) );
                     continue;
@@ -131,6 +141,12 @@ public class ConstantPoolParser
                     buf.getChar();
                     buf.getChar();
                     break;
+                case CONSTANT_MODULE:
+                    buf.getChar();
+                    break;
+                case CONSTANT_PACKAGE:
+                    buf.getChar();
+                    break;  
             }
         }
         Set<String> result = new HashSet<String>();

-- 
To stop receiving notification emails like this one, please contact
khmarbaise@apache.org.