You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ad...@apache.org on 2021/03/26 08:27:43 UTC

[maven-pmd-plugin] branch master updated (dfef938 -> 5c5f40d)

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

adangel pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git.


    from dfef938  [MPMD-312] Upgrade to PMD 6.32.0
     new 4fd563b  [MPMD-312] - Add it for java16
     new 0bc759b  [MPMD-312] Remove deprecated usage of RuleSetReferenceId
     new 1f1544c  (doc) Document support of targetJdk=16
     new 5c5f40d  (doc) Fix sample in Upgrading PMD at runtime

The 4 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:
 .../invoker.properties                             |  2 +-
 src/it/{MPMD-302-JDK15 => MPMD-312-JDK16}/pom.xml  |  4 +-
 .../src/main/java/com/mycompany/app/App.java       |  0
 .../src/main/java/com/mycompany/app/Foo.java       |  0
 .../verify.groovy                                  |  0
 .../org/apache/maven/plugins/pmd/PmdReport.java    | 39 ++++++++++++++--
 .../apt/examples/upgrading-PMD-at-runtime.apt.vm   |  2 +-
 .../apache/maven/plugins/pmd/PmdReportTest.java    | 54 ++++++++++++++++++++++
 ...m-rules.xml => pmd-report-resolve-rulesets.xml} |  5 ++
 9 files changed, 97 insertions(+), 9 deletions(-)
 copy src/it/{MPMD-302-JDK14 => MPMD-312-JDK16}/invoker.properties (96%)
 copy src/it/{MPMD-302-JDK15 => MPMD-312-JDK16}/pom.xml (97%)
 copy src/it/{empty-rulesets => MPMD-312-JDK16}/src/main/java/com/mycompany/app/App.java (100%)
 copy src/it/{empty-rulesets => MPMD-312-JDK16}/src/main/java/com/mycompany/app/Foo.java (100%)
 copy src/it/{empty-rulesets => MPMD-312-JDK16}/verify.groovy (100%)
 copy src/test/resources/unit/default-configuration/{pmd-report-custom-rules.xml => pmd-report-resolve-rulesets.xml} (86%)

[maven-pmd-plugin] 04/04: (doc) Fix sample in Upgrading PMD at runtime

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

adangel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git

commit 5c5f40d8597ff728546a51fdfcbd2b7170aacfe4
Author: Andreas Dangel <ad...@apache.org>
AuthorDate: Fri Mar 26 09:21:18 2021 +0100

    (doc) Fix sample in Upgrading PMD at runtime
    
    Thanks to https://github.com/boris-github for reporting
    Refs pmd/pmd#402
---
 src/site/apt/examples/upgrading-PMD-at-runtime.apt.vm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/site/apt/examples/upgrading-PMD-at-runtime.apt.vm b/src/site/apt/examples/upgrading-PMD-at-runtime.apt.vm
index 367d9c1..5223c0f 100644
--- a/src/site/apt/examples/upgrading-PMD-at-runtime.apt.vm
+++ b/src/site/apt/examples/upgrading-PMD-at-runtime.apt.vm
@@ -38,7 +38,7 @@ Upgrading PMD at Runtime
 +-----+
 <project>
   <properties>
-    <pmdVersion>...choose your version...</version>
+    <pmdVersion>...choose your version...</pmdVersion>
   </properties>
 ...
   <build>

[maven-pmd-plugin] 03/04: (doc) Document support of targetJdk=16

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

adangel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git

commit 1f1544ca324882d8278aefdcc9c2f00e5b10d965
Author: Andreas Dangel <ad...@apache.org>
AuthorDate: Fri Mar 26 09:13:53 2021 +0100

    (doc) Document support of targetJdk=16
---
 src/main/java/org/apache/maven/plugins/pmd/PmdReport.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
index 52585a2..f30e31b 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
@@ -72,7 +72,7 @@ public class PmdReport
      * with the default PMD version are
      * currently <code>1.3</code>, <code>1.4</code>, <code>1.5</code>, <code>1.6</code>, <code>1.7</code>,
      * <code>1.8</code>, <code>9</code>, <code>10</code>, <code>11</code>, <code>12</code>, <code>13</code>,
-     * <code>14</code>, and <code>15</code>.
+     * <code>14</code>, <code>15</code>, and <code>16</code>.
      *
      * <p> You can override the default PMD version by specifying PMD as a dependency,
      * see <a href="examples/upgrading-PMD-at-runtime.html">Upgrading PMD at Runtime</a>.</p>

[maven-pmd-plugin] 02/04: [MPMD-312] Remove deprecated usage of RuleSetReferenceId

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

adangel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git

commit 0bc759bd1e2cc210ed8c0da2fc1dfd7734c02697
Author: Andreas Dangel <ad...@apache.org>
AuthorDate: Thu Mar 25 12:53:47 2021 +0100

    [MPMD-312] Remove deprecated usage of RuleSetReferenceId
---
 .../org/apache/maven/plugins/pmd/PmdReport.java    | 37 ++++++++++--
 .../apache/maven/plugins/pmd/PmdReportTest.java    | 54 +++++++++++++++++
 .../pmd-report-resolve-rulesets.xml                | 67 ++++++++++++++++++++++
 3 files changed, 154 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
index ba06cf8..52585a2 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
@@ -54,7 +54,6 @@ import org.codehaus.plexus.resource.loader.ResourceNotFoundException;
 import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.StringUtils;
 
-import net.sourceforge.pmd.RuleSetReferenceId;
 import net.sourceforge.pmd.renderers.Renderer;
 
 /**
@@ -118,7 +117,7 @@ public class PmdReport
      * (<code>/rulesets/java/maven-pmd-plugin-default.xml</code>).
      */
     @Parameter
-    private String[] rulesets = new String[] { "/rulesets/java/maven-pmd-plugin-default.xml" };
+    String[] rulesets = new String[] { "/rulesets/java/maven-pmd-plugin-default.xml" };
 
     /**
      * Controls whether the project's compile/test classpath should be passed to PMD to enable its type resolution
@@ -438,8 +437,8 @@ public class PmdReport
             {
                 String set = rulesets[idx];
                 getLog().debug( "Preparing ruleset: " + set );
-                RuleSetReferenceId id = new RuleSetReferenceId( set );
-                File ruleset = locator.getResourceAsFile( id.getRuleSetFileName(), getLocationTemp( set ) );
+                String rulesetFilename = determineRulesetFilename( set );
+                File ruleset = locator.getResourceAsFile( rulesetFilename, getLocationTemp( set ) );
                 if ( null == ruleset )
                 {
                     throw new MavenReportException( "Could not resolve " + set );
@@ -454,6 +453,36 @@ public class PmdReport
         return StringUtils.join( sets, "," );
     }
 
+    private String determineRulesetFilename( String ruleset )
+    {
+        String result = ruleset.trim();
+        String lowercase = result.toLowerCase( Locale.ROOT );
+        if ( lowercase.endsWith( ".xml" ) )
+        {
+            return result;
+        }
+
+        // assume last part is a single rule, e.g. myruleset.xml/SingleRule
+        if ( result.indexOf( '/' ) > -1 )
+        {
+            String rulesetFilename = result.substring( 0, result.lastIndexOf( '/' ) );
+            if ( rulesetFilename.toLowerCase( Locale.ROOT ).endsWith( ".xml" ) )
+            {
+                return rulesetFilename;
+            }
+        }
+        // maybe a built-in ruleset name, e.g. java-design -> rulesets/java/design.xml
+        int dashIndex = lowercase.indexOf( '-' );
+        if ( dashIndex > -1 && lowercase.indexOf( '-', dashIndex + 1 ) == -1 )
+        {
+            String language = result.substring( 0, dashIndex );
+            String rulesetName = result.substring( dashIndex + 1 );
+            return "rulesets/" + language + "/" + rulesetName + ".xml";
+        }
+        // fallback - no change of the given ruleset specifier
+        return result;
+    }
+
     private void generateMavenSiteReport( Locale locale )
         throws MavenReportException
     {
diff --git a/src/test/java/org/apache/maven/plugins/pmd/PmdReportTest.java b/src/test/java/org/apache/maven/plugins/pmd/PmdReportTest.java
index 8a4fc0b..7e175a9 100644
--- a/src/test/java/org/apache/maven/plugins/pmd/PmdReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/pmd/PmdReportTest.java
@@ -690,4 +690,58 @@ public class PmdReportTest
         assertEquals( 4, StringUtils.countMatches( str, "\">UnusedPrivateField</a></td>" ) );
     }
 
+    public void testPmdReportResolveRulesets()
+            throws Exception
+    {
+        int port = determineFreePort();
+        WireMockServer mockServer = new WireMockServer( port );
+        mockServer.start();
+
+        String sonarRuleset =
+            IOUtils.toString( getClass().getClassLoader().getResourceAsStream( "unit/default-configuration/rulesets/sonar-way-ruleset.xml" ),
+                    StandardCharsets.UTF_8 );
+
+        final String sonarProfileUrl = "/profiles/export?format=pmd&language=java&name=Sonar%2520way";
+        final String sonarExportRulesetUrl = "http://localhost:" + mockServer.port() + sonarProfileUrl;
+        final String myRulesetBaseUrl = "/config/my-ruleset.xml";
+        final String myRulesetUrl = "http://localhost:" + mockServer.port() + myRulesetBaseUrl;
+
+        mockServer.stubFor( WireMock.get( WireMock.urlEqualTo( sonarProfileUrl ) )
+                .willReturn( WireMock.aResponse().withStatus( 200 ).withHeader( "Content-Type",
+                                                                                "text/xml" ).withBody( sonarRuleset ) ) );
+        mockServer.stubFor( WireMock.get( WireMock.urlEqualTo( myRulesetBaseUrl ) )
+                .willReturn( WireMock.aResponse().withStatus( 200 ).withHeader( "Content-Type",
+                                                                                "text/xml" ).withBody( sonarRuleset ) ) );
+
+        FileUtils.copyDirectoryStructure( new File( getBasedir(),
+                                                    "src/test/resources/unit/default-configuration/jxr-files" ),
+                                          new File( getBasedir(), "target/test/unit/default-configuration/target/site" ) );
+
+        File testPom =
+            new File( getBasedir(),
+                      "src/test/resources/unit/default-configuration/pmd-report-resolve-rulesets.xml" );
+        PmdReport mojo = (PmdReport) lookupMojo( "pmd", testPom );
+        mojo.rulesets[3] = sonarExportRulesetUrl;
+        mojo.rulesets[4] = myRulesetUrl;
+        mojo.execute();
+
+        // these are the rulesets, that have been copied to target/pmd/rulesets
+        File generatedFile = new File( getBasedir(), "target/test/unit/default-configuration/target/pmd/rulesets/custom-rules.xml" );
+        assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+        generatedFile = new File( getBasedir(), "target/test/unit/default-configuration/target/pmd/rulesets/bestpractices.xml" );
+        assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+        generatedFile = new File( getBasedir(), "target/test/unit/default-configuration/target/pmd/rulesets/java-design.xml" );
+        assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+        generatedFile = new File( getBasedir(), "target/test/unit/default-configuration/target/pmd/rulesets/export_format_pmd_language_java_name_Sonar_2520way.xml" );
+        assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+        generatedFile = new File( getBasedir(), "target/test/unit/default-configuration/target/pmd/rulesets/my-ruleset.xml" );
+        assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+        mockServer.stop();
+    }
+
 }
diff --git a/src/test/resources/unit/default-configuration/pmd-report-resolve-rulesets.xml b/src/test/resources/unit/default-configuration/pmd-report-resolve-rulesets.xml
new file mode 100644
index 0000000..5d4ea4b
--- /dev/null
+++ b/src/test/resources/unit/default-configuration/pmd-report-resolve-rulesets.xml
@@ -0,0 +1,67 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>def.configuration</groupId>
+  <artifactId>default-configuration</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <inceptionYear>2006</inceptionYear>
+  <name>Maven PMD Plugin Default Configuration Test</name>
+  <url>http://maven.apache.org</url>
+  <build>
+    <finalName>default-configuration</finalName>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <configuration>
+          <project implementation="org.apache.maven.plugins.pmd.stubs.DefaultConfigurationMavenProjectStub"/>
+          <outputDirectory>${basedir}/target/test/unit/default-configuration/target/site</outputDirectory>
+          <targetDirectory>${basedir}/target/test/unit/default-configuration/target</targetDirectory>
+          <rulesetsTargetDirectory>${basedir}/target/test/unit/default-configuration/target/pmd/rulesets</rulesetsTargetDirectory>
+          <rulesets>
+            <ruleset>${basedir}/src/test/resources/unit/default-configuration/rulesets/custom-rules.xml</ruleset>
+            <ruleset>category/java/bestpractices.xml</ruleset>
+            <ruleset>java-design</ruleset>
+            <!-- note, the port of the http urls will be replaced by the unit test -->
+            <ruleset>http://localhost:12345/profiles/export?format=pmd&amp;language=java&amp;name=Sonar%2520way</ruleset>
+            <ruleset>http://localhost:12345/config/my-ruleset.xml</ruleset>
+          </rulesets>
+          <format>xml</format>
+          <linkXRef>true</linkXRef>
+          <xrefLocation>${basedir}/target/test/unit/default-configuration/target/site/xref</xrefLocation>
+          <sourceEncoding>UTF-8</sourceEncoding>
+          <compileSourceRoots>
+            <compileSourceRoot>${basedir}/src/test/resources/unit/default-configuration/</compileSourceRoot>
+          </compileSourceRoots>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jxr-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

[maven-pmd-plugin] 01/04: [MPMD-312] - Add it for java16

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

adangel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git

commit 4fd563b718a83d27a02fda01dbbb0a4a5610a183
Author: Andreas Dangel <ad...@apache.org>
AuthorDate: Thu Mar 25 12:06:28 2021 +0100

    [MPMD-312] - Add it for java16
---
 src/it/MPMD-312-JDK16/invoker.properties           | 19 +++++
 src/it/MPMD-312-JDK16/pom.xml                      | 82 ++++++++++++++++++++++
 .../src/main/java/com/mycompany/app/App.java       | 25 +++++++
 .../src/main/java/com/mycompany/app/Foo.java       | 28 ++++++++
 src/it/MPMD-312-JDK16/verify.groovy                | 22 ++++++
 5 files changed, 176 insertions(+)

diff --git a/src/it/MPMD-312-JDK16/invoker.properties b/src/it/MPMD-312-JDK16/invoker.properties
new file mode 100644
index 0000000..a18fd49
--- /dev/null
+++ b/src/it/MPMD-312-JDK16/invoker.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.java.version = 16+
+invoker.goals = clean verify
diff --git a/src/it/MPMD-312-JDK16/pom.xml b/src/it/MPMD-312-JDK16/pom.xml
new file mode 100644
index 0000000..07daa62
--- /dev/null
+++ b/src/it/MPMD-312-JDK16/pom.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.pmd.it</groupId>
+  <artifactId>MPMD-312-JDK16</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <java.version>16</java.version>
+  </properties>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.0</version>
+          <configuration>
+            <target>${java.version}</target>
+            <source>${java.version}</source>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <skipPmdError>false</skipPmdError>
+          <skip>false</skip>
+          <failOnViolation>true</failOnViolation>
+          <failurePriority>4</failurePriority>
+          <targetJdk>${java.version}</targetJdk>
+          <sourceEncoding>UTF-8</sourceEncoding>
+          <minimumTokens>100</minimumTokens>
+          <excludes>
+            <exclude>**/*Bean.java</exclude>
+            <exclude>**/generated/*.java</exclude>
+          </excludes>
+          <excludeRoots>
+            <excludeRoot>target/generated-sources/stubs</excludeRoot>
+          </excludeRoots>
+          <rulesets/>
+        </configuration>
+        <executions>
+          <execution>
+            <id>default</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/src/it/MPMD-312-JDK16/src/main/java/com/mycompany/app/App.java b/src/it/MPMD-312-JDK16/src/main/java/com/mycompany/app/App.java
new file mode 100644
index 0000000..8e4972d
--- /dev/null
+++ b/src/it/MPMD-312-JDK16/src/main/java/com/mycompany/app/App.java
@@ -0,0 +1,25 @@
+package com.mycompany.app;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public class App
+{
+
+}
diff --git a/src/it/MPMD-312-JDK16/src/main/java/com/mycompany/app/Foo.java b/src/it/MPMD-312-JDK16/src/main/java/com/mycompany/app/Foo.java
new file mode 100644
index 0000000..2a5a2bc
--- /dev/null
+++ b/src/it/MPMD-312-JDK16/src/main/java/com/mycompany/app/Foo.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.ArrayList;
+
+public class Foo
+{
+    public Foo( final ArrayList<String> foo )
+    {
+    }
+
+}
diff --git a/src/it/MPMD-312-JDK16/verify.groovy b/src/it/MPMD-312-JDK16/verify.groovy
new file mode 100644
index 0000000..1cd85d4
--- /dev/null
+++ b/src/it/MPMD-312-JDK16/verify.groovy
@@ -0,0 +1,22 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+File buildLog = new File( basedir, 'build.log' )
+assert buildLog.exists()
\ No newline at end of file