You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/11/12 18:42:05 UTC

[commons-email] branch master updated: Avoid what look like false positives on Java 11

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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-email.git


The following commit(s) were added to refs/heads/master by this push:
     new eece28d  Avoid what look like false positives on Java 11
eece28d is described below

commit eece28d873a9cfd60cde8ec777cc33ec8a07e73d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 12 13:42:01 2022 -0500

    Avoid what look like false positives on Java 11
---
 pom.xml | 37 ++++++++++++++++++++++++-------------
 1 file changed, 24 insertions(+), 13 deletions(-)

diff --git a/pom.xml b/pom.xml
index e46fcb2..427f682 100644
--- a/pom.xml
+++ b/pom.xml
@@ -500,6 +500,30 @@
     </reporting>
 
     <profiles>
+      <profile>
+        <id>java17</id>
+        <!-- For testing with Powermock. -->
+        <activation>
+          <jdk>[11,)</jdk>
+        </activation>
+        <build>
+          <plugins>
+            <plugin>
+              <!-- SpotBugs has false positives on Java 17:
+[ERROR] Medium: Load of known null value in org.apache.commons.mail.MultiPartEmail.attach(DataSource, String, String) [org.apache.commons.mail.MultiPartEmail] At MultiPartEmail.java:[line 421] NP_LOAD_OF_KNOWN_NULL_VALUE
+[ERROR] Medium: Redundant nullcheck of is which is known to be null in org.apache.commons.mail.MultiPartEmail.attach(DataSource, String, String) [org.apache.commons.mail.MultiPartEmail] Redundant null check at MultiPartEmail.java:[line 421] RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE
+[ERROR] Medium: Load of known null value in org.apache.commons.mail.resolver.DataSourceClassPathResolver.resolve(String, boolean) [org.apache.commons.mail.resolver.DataSourceClassPathResolver] At DataSourceClassPathResolver.java:[line 104] NP_LOAD_OF_KNOWN_NULL_VALUE
+[ERROR] Medium: Redundant nullcheck of is which is known to be null in org.apache.commons.mail.resolver.DataSourceClassPathResolver.resolve(String, boolean) [org.apache.commons.mail.resolver.DataSourceClassPathResolver] Redundant null check at DataSourceClassPathResolver.java:[line 104] RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE
+              -->
+              <groupId>com.github.spotbugs</groupId>
+              <artifactId>spotbugs-maven-plugin</artifactId>
+              <configuration>
+                <maxAllowedViolations>4</maxAllowedViolations>
+              </configuration>
+            </plugin>
+          </plugins>
+        </build>
+      </profile>
       <profile>
         <id>java17</id>
         <!-- For testing with Powermock. -->
@@ -525,19 +549,6 @@
                 </argLine>
               </configuration>
             </plugin>
-            <plugin>
-              <!-- SpotBugs has false positives on Java 17:
-[ERROR] Medium: Load of known null value in org.apache.commons.mail.MultiPartEmail.attach(DataSource, String, String) [org.apache.commons.mail.MultiPartEmail] At MultiPartEmail.java:[line 421] NP_LOAD_OF_KNOWN_NULL_VALUE
-[ERROR] Medium: Redundant nullcheck of is which is known to be null in org.apache.commons.mail.MultiPartEmail.attach(DataSource, String, String) [org.apache.commons.mail.MultiPartEmail] Redundant null check at MultiPartEmail.java:[line 421] RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE
-[ERROR] Medium: Load of known null value in org.apache.commons.mail.resolver.DataSourceClassPathResolver.resolve(String, boolean) [org.apache.commons.mail.resolver.DataSourceClassPathResolver] At DataSourceClassPathResolver.java:[line 104] NP_LOAD_OF_KNOWN_NULL_VALUE
-[ERROR] Medium: Redundant nullcheck of is which is known to be null in org.apache.commons.mail.resolver.DataSourceClassPathResolver.resolve(String, boolean) [org.apache.commons.mail.resolver.DataSourceClassPathResolver] Redundant null check at DataSourceClassPathResolver.java:[line 104] RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE
-              -->
-              <groupId>com.github.spotbugs</groupId>
-              <artifactId>spotbugs-maven-plugin</artifactId>
-              <configuration>
-                <maxAllowedViolations>4</maxAllowedViolations>
-              </configuration>
-            </plugin>
           </plugins>
         </build>
       </profile>