[Git][java-team/access-modifier-checker][upstream] 3 commits: New upstream version 1.28

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Thu Dec 15 08:09:46 GMT 2022



Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / access-modifier-checker


Commits:
fc8b1a39 by Emmanuel Bourg at 2022-12-05T13:50:35+01:00
New upstream version 1.28
- - - - -
7f2814dc by Emmanuel Bourg at 2022-12-15T09:04:27+01:00
New upstream version 1.29
- - - - -
154a3dbf by Emmanuel Bourg at 2022-12-15T09:04:53+01:00
New upstream version 1.30
- - - - -


22 changed files:

- .mvn/extensions.xml
- Jenkinsfile
- access-modifier-annotation/pom.xml
- access-modifier-annotation/src/main/java/org/kohsuke/accmod/restrictions/ProtectedExternally.java
- access-modifier-checker/pom.xml
- access-modifier-checker/src/it/beta-fail/pom.xml
- access-modifier-checker/src/it/beta-pass/pom.xml
- access-modifier-checker/src/it/disable-restrictions-wrong-annotation/pom.xml
- access-modifier-checker/src/it/disable-restrictions/pom.xml
- access-modifier-checker/src/it/failOnError/pom.xml
- access-modifier-checker/src/it/method-inside-type/pom.xml
- access-modifier-checker/src/it/no-external-use/pom.xml
- access-modifier-checker/src/it/own-members/pom.xml
- access-modifier-checker/src/it/protected-externally/pom.xml
- access-modifier-checker/src/it/skip/pom.xml
- access-modifier-checker/src/it/synthetics/pom.xml
- access-modifier-checker/src/main/java/org/kohsuke/accmod/impl/AccessRestrictionFactory.java
- access-modifier-checker/src/main/java/org/kohsuke/accmod/impl/Checker.java
- access-modifier-checker/src/main/java/org/kohsuke/accmod/impl/EnforcerMojo.java
- src/spotbugs/excludesFilter.xml → access-modifier-checker/src/spotbugs/excludesFilter.xml
- access-modifier-suppressions/pom.xml
- pom.xml


Changes:

=====================================
.mvn/extensions.xml
=====================================
@@ -2,6 +2,6 @@
   <extension>
     <groupId>io.jenkins.tools.incrementals</groupId>
     <artifactId>git-changelist-maven-extension</artifactId>
-    <version>1.2</version>
+    <version>1.4</version>
   </extension>
 </extensions>


=====================================
Jenkinsfile
=====================================
@@ -4,7 +4,7 @@
  * allowing one to test against multiple Jenkins versions.
  */
 buildPlugin(useContainerAgent: true, configurations: [
-  [ platform: 'linux', jdk: '8', jenkins: null ],
-  [ platform: 'linux', jdk: '11', jenkins: null ],
-  [ platform: 'windows', jdk: '11', jenkins: null ]
+  [ platform: 'linux', jdk: '11' ],
+  [ platform: 'windows', jdk: '11' ],
+  [ platform: 'linux', jdk: '17' ],
 ])


=====================================
access-modifier-annotation/pom.xml
=====================================
@@ -1,10 +1,10 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <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>
   <parent>
-    <artifactId>access-modifier</artifactId>
     <groupId>org.kohsuke</groupId>
-    <version>1.27</version>
+    <artifactId>access-modifier</artifactId>
+    <version>1.30</version>
   </parent>
   <artifactId>access-modifier-annotation</artifactId>
 
@@ -14,7 +14,7 @@
     <dependency>
       <groupId>org.jenkins-ci</groupId>
       <artifactId>annotation-indexer</artifactId>
-      <version>1.15</version>
+      <version>1.17</version>
     </dependency>
     <dependency>
       <groupId>org.ow2.asm</groupId>


=====================================
access-modifier-annotation/src/main/java/org/kohsuke/accmod/restrictions/ProtectedExternally.java
=====================================
@@ -50,7 +50,7 @@ public class ProtectedExternally extends None {
 
     @Override
     @SuppressFBWarnings(
-            value={"RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE","RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", "NP_LOAD_OF_KNOWN_NULL_VALUE"},
+            value={"RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE", "NP_LOAD_OF_KNOWN_NULL_VALUE"},
             justification="something in this class confuses spotbugs, I can't see anything redundant and the error line is the catch block")
     public void invoked(Location loc, RestrictedElement target, ErrorListener errorListener) {
         if (target.isInTheInspectedModule()) {


=====================================
access-modifier-checker/pom.xml
=====================================
@@ -1,25 +1,20 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <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>
   <parent>
-    <artifactId>access-modifier</artifactId>
     <groupId>org.kohsuke</groupId>
-    <version>1.27</version>
+    <artifactId>access-modifier</artifactId>
+    <version>1.30</version>
   </parent>
   <artifactId>access-modifier-checker</artifactId>
   <packaging>maven-plugin</packaging>
   <name>Custom Access Modifier Checker</name>
 
   <properties>
-    <maven.version>3.8.4</maven.version>
+    <maven.version>3.8.6</maven.version>
   </properties>
 
   <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>access-modifier-annotation</artifactId>
@@ -31,81 +26,57 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.ow2.asm</groupId>
-      <artifactId>asm</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.kohsuke.metainf-services</groupId>
-      <artifactId>metainf-services</artifactId>
-      <version>1.8</version>
-      <optional>true</optional>
-    </dependency>
-    <!-- https://mvnrepository.com/artifact/org.apache.maven/maven-plugin-api -->
-    <dependency>
+      <!-- needed when injecting the Maven Project into a plugin  -->
       <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
+      <artifactId>maven-core</artifactId>
       <version>${maven.version}</version>
       <scope>provided</scope>
     </dependency>
+    <!-- https://mvnrepository.com/artifact/org.apache.maven/maven-plugin-api -->
     <dependency>
-      <!-- needed when injecting the Maven Project into a plugin  -->
       <groupId>org.apache.maven</groupId>
-      <artifactId>maven-core</artifactId>
+      <artifactId>maven-plugin-api</artifactId>
       <version>${maven.version}</version>
       <scope>provided</scope>
     </dependency>
-
     <dependency>
+      <!-- annotations are not used at runtime because @Retention(value=CLASS), they are needed only to build the plugin -->
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
-      <version>3.6.2</version>
-      <optional>true</optional> <!-- annotations are not used at runtime because @Retention(value=CLASS), they are needed only to build the plugin -->
+      <version>3.7.0</version>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>org.kohsuke.metainf-services</groupId>
+      <artifactId>metainf-services</artifactId>
+      <version>1.9</version>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>org.ow2.asm</groupId>
+      <artifactId>asm</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
     </dependency>
   </dependencies>
 
-  <dependencyManagement>
-    <dependencies>
-      <dependency> <!-- Irritatingly, maven-resolver-provider & maven-resolver-impl request different versions -->
-        <groupId>org.slf4j</groupId>
-        <artifactId>slf4j-api</artifactId>
-        <version>1.7.32</version>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-
   <profiles>
     <profile>
       <id>run-its</id>
       <activation>
-          <property>
-              <name>skipTests</name>
-              <value>!true</value>
-          </property>
+        <property>
+          <name>skipTests</name>
+          <value>!true</value>
+        </property>
       </activation>
       <build>
         <plugins>
-          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>mrm-maven-plugin</artifactId>
-            <version>1.3.0</version>
-            <executions>
-              <execution>
-                <goals>
-                  <goal>start</goal>
-                  <goal>stop</goal>
-                </goals>
-                <configuration>
-                  <propertyName>repository.proxy.url</propertyName>
-                  <repositories>
-                    <proxyRepo />
-                  </repositories>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
           <plugin>
             <artifactId>maven-invoker-plugin</artifactId>
-            <version>3.2.2</version>
+            <version>3.3.0</version>
             <executions>
               <execution>
                 <id>integration-test</id>
@@ -127,9 +98,27 @@
               </execution>
             </executions>
           </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>mrm-maven-plugin</artifactId>
+            <version>1.4.1</version>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>start</goal>
+                  <goal>stop</goal>
+                </goals>
+                <configuration>
+                  <propertyName>repository.proxy.url</propertyName>
+                  <repositories>
+                    <proxyRepo />
+                  </repositories>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
         </plugins>
       </build>
     </profile>
   </profiles>
-
 </project>


=====================================
access-modifier-checker/src/it/beta-fail/pom.xml
=====================================
@@ -7,11 +7,22 @@
     <packaging>pom</packaging>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
     </properties>
     <modules>
         <module>api</module>
         <module>caller</module>
     </modules>
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.10.1</version>
+                    <configuration>
+                        <release>11</release>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
 </project>
\ No newline at end of file


=====================================
access-modifier-checker/src/it/beta-pass/pom.xml
=====================================
@@ -7,11 +7,22 @@
     <packaging>pom</packaging>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
     </properties>
     <modules>
         <module>api</module>
         <module>caller</module>
     </modules>
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.10.1</version>
+                    <configuration>
+                        <release>11</release>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
 </project>
\ No newline at end of file


=====================================
access-modifier-checker/src/it/disable-restrictions-wrong-annotation/pom.xml
=====================================
@@ -7,11 +7,22 @@
   <packaging>pom</packaging>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <maven.compiler.source>1.7</maven.compiler.source>
-    <maven.compiler.target>1.7</maven.compiler.target>
   </properties>
   <modules>
     <module>api</module>
     <module>caller</module>
   </modules>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.10.1</version>
+          <configuration>
+            <release>11</release>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
 </project>
\ No newline at end of file


=====================================
access-modifier-checker/src/it/disable-restrictions/pom.xml
=====================================
@@ -7,11 +7,22 @@
   <packaging>pom</packaging>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <maven.compiler.source>1.7</maven.compiler.source>
-    <maven.compiler.target>1.7</maven.compiler.target>
   </properties>
   <modules>
     <module>api</module>
     <module>caller</module>
   </modules>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.10.1</version>
+          <configuration>
+            <release>11</release>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
 </project>
\ No newline at end of file


=====================================
access-modifier-checker/src/it/failOnError/pom.xml
=====================================
@@ -7,11 +7,22 @@
     <packaging>pom</packaging>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.7</maven.compiler.source>
-        <maven.compiler.target>1.7</maven.compiler.target>
     </properties>
     <modules>
         <module>api</module>
         <module>caller</module>
     </modules>
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.10.1</version>
+                    <configuration>
+                        <release>11</release>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
 </project>
\ No newline at end of file


=====================================
access-modifier-checker/src/it/method-inside-type/pom.xml
=====================================
@@ -7,11 +7,22 @@
     <packaging>pom</packaging>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.7</maven.compiler.source>
-        <maven.compiler.target>1.7</maven.compiler.target>
     </properties>
     <modules>
         <module>api</module>
         <module>caller</module>
     </modules>
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.10.1</version>
+                    <configuration>
+                        <release>11</release>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
 </project>
\ No newline at end of file


=====================================
access-modifier-checker/src/it/no-external-use/pom.xml
=====================================
@@ -7,11 +7,22 @@
     <packaging>pom</packaging>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.7</maven.compiler.source>
-        <maven.compiler.target>1.7</maven.compiler.target>
     </properties>
     <modules>
         <module>api</module>
         <module>caller</module>
     </modules>
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.10.1</version>
+                    <configuration>
+                        <release>11</release>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
 </project>
\ No newline at end of file


=====================================
access-modifier-checker/src/it/own-members/pom.xml
=====================================
@@ -7,8 +7,6 @@
     <packaging>jar</packaging>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
     </properties>
     <dependencies>
         <dependency>
@@ -18,6 +16,17 @@
         </dependency>
     </dependencies>
     <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.10.1</version>
+                    <configuration>
+                        <release>11</release>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
         <plugins>
             <plugin>
                 <groupId>org.kohsuke</groupId>


=====================================
access-modifier-checker/src/it/protected-externally/pom.xml
=====================================
@@ -7,8 +7,6 @@
     <packaging>pom</packaging>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
     </properties>
     <modules>
         <module>api</module>
@@ -16,6 +14,17 @@
         <module>caller2</module>
     </modules>
     <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.10.1</version>
+                    <configuration>
+                        <release>11</release>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
         <plugins>
             <plugin>
                 <groupId>org.kohsuke</groupId>


=====================================
access-modifier-checker/src/it/skip/pom.xml
=====================================
@@ -7,11 +7,22 @@
     <packaging>pom</packaging>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.7</maven.compiler.source>
-        <maven.compiler.target>1.7</maven.compiler.target>
     </properties>
     <modules>
         <module>api</module>
         <module>caller</module>
     </modules>
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.10.1</version>
+                    <configuration>
+                        <release>11</release>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
 </project>
\ No newline at end of file


=====================================
access-modifier-checker/src/it/synthetics/pom.xml
=====================================
@@ -7,8 +7,6 @@
     <packaging>jar</packaging>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
     </properties>
     <dependencies>
         <dependency>
@@ -18,6 +16,17 @@
         </dependency>
     </dependencies>
     <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.10.1</version>
+                    <configuration>
+                        <release>11</release>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
         <plugins>
             <plugin>
                 <groupId>org.kohsuke</groupId>


=====================================
access-modifier-checker/src/main/java/org/kohsuke/accmod/impl/AccessRestrictionFactory.java
=====================================
@@ -23,8 +23,6 @@
  */
 package org.kohsuke.accmod.impl;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 import org.kohsuke.accmod.AccessRestriction;
 import org.objectweb.asm.Type;
 
@@ -40,7 +38,6 @@ public class AccessRestrictionFactory {
     private final Map<String,AccessRestriction> instances = new HashMap<>();
     private final ClassLoader cl;
 
-    @SuppressFBWarnings("EI_EXPOSE_REP2")
     public AccessRestrictionFactory(ClassLoader cl) {
         this.cl = cl;
     }


=====================================
access-modifier-checker/src/main/java/org/kohsuke/accmod/impl/Checker.java
=====================================
@@ -23,9 +23,6 @@
  */
 package org.kohsuke.accmod.impl;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
-import java.nio.charset.StandardCharsets;
 import java.util.HashSet;
 import java.util.Set;
 import org.apache.maven.plugin.logging.Log;
@@ -42,20 +39,17 @@ import org.objectweb.asm.MethodVisitor;
 import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.Type;
 
-import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+import org.jvnet.hudson.annotation_indexer.Index;
 
 import static org.objectweb.asm.ClassReader.SKIP_FRAMES;
 
@@ -96,7 +90,6 @@ public class Checker {
 
     private int line;
 
-    @SuppressFBWarnings("EI_EXPOSE_REP2")
     public Checker(ClassLoader dependencies, ErrorListener errorListener, Properties properties,
             Log log) throws IOException {
         this.dependencies = dependencies;
@@ -136,13 +129,7 @@ public class Checker {
      * Loads all the access restrictions defined in our dependencies.
      */
     private void loadAccessRestrictions() throws IOException {
-        for (String prefix : new String[] {"META-INF/services/annotations/", "META-INF/annotations/"}) {
-            final Enumeration<URL> res = dependencies.getResources(prefix + Restricted.class.getName());
-            while (res.hasMoreElements()) {
-                URL url = res.nextElement();
-                loadRestrictions(url.openStream(), false);
-            }
-        }
+        loadRestrictions(dependencies, false);
     }
 
     /**
@@ -151,12 +138,8 @@ public class Checker {
      * @param isInTheInspectedModule
      *      This value shows up in {@link RestrictedElement#isInTheInspectedModule()}.
      */
-    public void loadRestrictions(InputStream stream, final boolean isInTheInspectedModule) throws IOException {
-        if (stream==null)      return;
-
-        BufferedReader r = new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8));
-        String className;
-        while ((className=r.readLine())!=null) {
+    public void loadRestrictions(ClassLoader cl, final boolean isInTheInspectedModule) throws IOException {
+        for (String className : Index.listClassNames(Restricted.class, cl)) {
             InputStream is = dependencies.getResourceAsStream(className.replace('.','/') + ".class");
             if (is==null) {
                 errorListener.onWarning(null,null,"Failed to find class file for "+ className);


=====================================
access-modifier-checker/src/main/java/org/kohsuke/accmod/impl/EnforcerMojo.java
=====================================
@@ -14,7 +14,6 @@ import org.kohsuke.accmod.Restricted;
 
 import java.io.File;
 import java.io.IOException;
-import java.io.InputStream;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
@@ -55,12 +54,9 @@ public class EnforcerMojo extends AbstractMojo {
 
     @Override
     @SuppressFBWarnings(value = {
-            "UWF_UNWRITTEN_FIELD",
             "URLCONNECTION_SSRF_FD",
-            "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD",
             "PATH_TRAVERSAL_IN",
-            "DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED",
-            "NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD"
+            "DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED"
     })
     public void execute() throws MojoExecutionException, MojoFailureException {
         if (skip) {
@@ -98,17 +94,11 @@ public class EnforcerMojo extends AbstractMojo {
                 }, properties != null ? properties : new Properties(), getLog());
 
             // If there is a restriction list in the inspected module itself, load it as well:
-            for (String prefix : new String[] {"META-INF/services/annotations/", "META-INF/annotations/"}) {
-                URL local = new URL(outputURL, prefix + Restricted.class.getName());
-                InputStream self = null;
-                try {
-                    self = local.openStream();
-                    getLog().debug("loaded local index " + local);
-                } catch (IOException e) {
-                    getLog().debug("could not load local index " + local, e);
-                }
-                if (self!=null)
-                    checker.loadRestrictions(self, true);
+            try {
+                checker.loadRestrictions(new URLClassLoader(new URL[] {outputURL}, ClassLoader.getSystemClassLoader().getParent()), true);
+                getLog().debug("loaded local index " + outputURL);
+            } catch (IOException e) {
+                getLog().debug("could not load local index " + outputURL, e);
             }
 
             // perform checks


=====================================
src/spotbugs/excludesFilter.xml → access-modifier-checker/src/spotbugs/excludesFilter.xml
=====================================
@@ -1,7 +1,6 @@
 <FindBugsFilter>
     <Match>
         <!-- generated class -->
-        <Class name="org.kohsuke.accmod.impl.HelpMojo"/>
-        <Bug pattern="XXE_DOCUMENT"/>
+        <Class name="org.kohsuke.access_modifier_checker.HelpMojo"/>
     </Match>
-</FindBugsFilter>
\ No newline at end of file
+</FindBugsFilter>


=====================================
access-modifier-suppressions/pom.xml
=====================================
@@ -1,10 +1,10 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <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>
   <parent>
-    <artifactId>access-modifier</artifactId>
     <groupId>org.kohsuke</groupId>
-    <version>1.27</version>
+    <artifactId>access-modifier</artifactId>
+    <version>1.30</version>
   </parent>
   <artifactId>access-modifier-suppressions</artifactId>
 
@@ -16,8 +16,7 @@
     changed/modified/removed at any stage without warning. A simple upgrade of the dependency may break your module. Use
     at your own risk.
     You should try to not use @Restricted classes in the first place, but if you _must_ use them, this is a less-brutal
-    approach than just disabling the access-modifier-checker entirely
-  </description>
+    approach than just disabling the access-modifier-checker entirely</description>
 
   <dependencies>
     <dependency>


=====================================
pom.xml
=====================================
@@ -4,40 +4,26 @@
   <parent>
     <groupId>org.jenkins-ci</groupId>
     <artifactId>jenkins</artifactId>
-    <version>1.69</version>
+    <version>1.92</version>
     <relativePath />
   </parent>
 
   <groupId>org.kohsuke</groupId>
   <artifactId>access-modifier</artifactId>
-  <version>1.27</version>
+  <version>1.30</version>
+  <packaging>pom</packaging>
 
   <name>Custom access modifier for Java</name>
-  <packaging>pom</packaging>
   <description>Extensible application-specific access modifiers for Java</description>
   <url>https://github.com/jenkinsci/lib-access-modifier</url>
 
-  <properties>
-    <revision>1.27</revision>
-    <changelist>-SNAPSHOT</changelist>
-    <gitHubRepo>jenkinsci/lib-access-modifier</gitHubRepo>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <java.level>8</java.level>
-    <spotbugs.excludeFilterFile>${project.basedir}/../src/spotbugs/excludesFilter.xml</spotbugs.excludeFilterFile>
-  </properties>
-
-  <modules>
-    <module>access-modifier-annotation</module>
-    <module>access-modifier-checker</module>
-    <module>access-modifier-suppressions</module>
-  </modules>
-
-  <scm>
-    <connection>scm:git:git at github.com/${gitHubRepo}.git</connection>
-    <developerConnection>scm:git:ssh://git@github.com/${gitHubRepo}.git</developerConnection>
-    <url>https://github.com/${gitHubRepo}</url>
-    <tag>access-modifier-1.27</tag>
-  </scm>
+  <licenses>
+    <license>
+      <name>MIT License</name>
+      <url>https://opensource.org/licenses/MIT</url>
+      <distribution>repository</distribution>
+    </license>
+  </licenses>
 
   <developers>
     <developer>
@@ -46,66 +32,36 @@
     </developer>
   </developers>
 
-  <reporting>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-javadoc-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </reporting>
+  <modules>
+    <module>access-modifier-annotation</module>
+    <module>access-modifier-checker</module>
+    <module>access-modifier-suppressions</module>
+  </modules>
 
-  <licenses>
-    <license>
-      <name>MIT License</name>
-      <distribution>repository</distribution>
-      <url>https://opensource.org/licenses/MIT</url>
-    </license>
-  </licenses>
+  <scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false">
+    <connection>scm:git:https://github.com/${gitHubRepo}.git</connection>
+    <developerConnection>scm:git:git at github.com:${gitHubRepo}.git</developerConnection>
+    <tag>access-modifier-1.30</tag>
+    <url>https://github.com/${gitHubRepo}</url>
+  </scm>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-javadoc-plugin</artifactId>
-        <configuration>
-          <doclint>none</doclint>
-          <source>${java.level}</source>
-          <locale>en_US</locale>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-plugin-plugin</artifactId>
-        <version>3.6.2</version>
-        <executions>
-          <execution>
-            <id>default-descriptor</id>
-            <phase>process-classes</phase>
-          </execution>
-          <!-- if you want to generate help goal -->
-          <execution>
-            <id>help-goal</id>
-            <goals>
-              <goal>helpmojo</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
+  <properties>
+    <revision>1.30</revision>
+    <changelist>-SNAPSHOT</changelist>
+    <gitHubRepo>jenkinsci/lib-access-modifier</gitHubRepo>
+  </properties>
 
   <dependencyManagement>
     <dependencies>
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-utils</artifactId>
-        <version>3.4.1</version>
+        <version>3.5.0</version>
       </dependency>
       <dependency>
         <groupId>org.ow2.asm</groupId>
         <artifactId>asm</artifactId>
-        <version>9.2</version>
+        <version>9.4</version>
       </dependency>
     </dependencies>
   </dependencyManagement>
@@ -138,4 +94,35 @@
     </pluginRepository>
   </pluginRepositories>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <version>3.7.0</version>
+        <executions>
+          <!-- if you want to generate help goal -->
+          <execution>
+            <id>help-goal</id>
+            <goals>
+              <goal>helpmojo</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>default-descriptor</id>
+            <phase>process-classes</phase>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
 </project>



View it on GitLab: https://salsa.debian.org/java-team/access-modifier-checker/-/compare/5956cd66803655f9adcefc05bfe7b24407325e5e...154a3dbf5b47402644b47223b25f56b9f132a503

-- 
View it on GitLab: https://salsa.debian.org/java-team/access-modifier-checker/-/compare/5956cd66803655f9adcefc05bfe7b24407325e5e...154a3dbf5b47402644b47223b25f56b9f132a503
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20221215/4e7a464a/attachment.htm>


More information about the pkg-java-commits mailing list