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

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
     new aac9acd395 PHOENIX-6789 Remove com.sun.istack.NotNull usage
aac9acd395 is described below

commit aac9acd3956a627cc2814d95c7dcc2c5b97e8268
Author: Istvan Toth <st...@apache.org>
AuthorDate: Wed Sep 14 15:29:43 2022 +0200

    PHOENIX-6789 Remove com.sun.istack.NotNull usage
---
 .../java/org/apache/phoenix/jdbc/HighAvailabilityGroup.java   |  5 +++--
 pom.xml                                                       | 11 +++++++----
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/HighAvailabilityGroup.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/HighAvailabilityGroup.java
index 1281b7b54d..9a0eefd547 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/HighAvailabilityGroup.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/HighAvailabilityGroup.java
@@ -17,7 +17,6 @@
  */
 package org.apache.phoenix.jdbc;
 
-import com.sun.istack.NotNull;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
@@ -43,6 +42,8 @@ import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import edu.umd.cs.findbugs.annotations.NonNull;
+
 import java.io.IOException;
 import java.sql.Connection;
 import java.sql.Driver;
@@ -651,7 +652,7 @@ public class HighAvailabilityGroup {
      * @param newRoleRecord the new cluster role record to set
      * @return true if the new record is set as current one; false otherwise
      */
-    private synchronized boolean applyClusterRoleRecord(@NotNull 
ClusterRoleRecord newRoleRecord) {
+    private synchronized boolean applyClusterRoleRecord(@NonNull 
ClusterRoleRecord newRoleRecord) {
         if (roleRecord == null) {
             roleRecord = newRoleRecord;
             state = State.READY;
diff --git a/pom.xml b/pom.xml
index 7fea95b3a8..4dcf5666b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -404,10 +404,6 @@
                 <ignoredUsedUndeclaredDependency>
                   dnsjava:dnsjava
                 </ignoredUsedUndeclaredDependency>
-                <ignoredUsedUndeclaredDependency>
-                  <!-- Until PHOENIX-6789 is fixed -->
-                  com.sun.istack:istack-commons-runtime
-                </ignoredUsedUndeclaredDependency>
               </ignoredUsedUndeclaredDependencies>
             </configuration>
           <executions>
@@ -506,6 +502,13 @@
                       <bannedImport>org.apache.commons.lang.**</bannedImport>
                     </bannedImports>
                   </restrictImports>
+                  <restrictImports 
implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
+                    <includeTestCode>true</includeTestCode>
+                    <reason>Use edu.umd.cs.findbugs.annotations</reason>
+                    <bannedImports>
+                      <bannedImport>com.sun.istack.**</bannedImport>
+                    </bannedImports>
+                  </restrictImports>
                 </rules>
               </configuration>
             </execution>

Reply via email to