[tomcat] branch 8.5.x updated: Silence the IDE deprecation warnings

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[tomcat] branch 8.5.x updated: Silence the IDE deprecation warnings

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

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new ee48b17  Silence the IDE deprecation warnings
ee48b17 is described below

commit ee48b1799df777e71cfa823f6d30a50063b9a9ce
Author: Mark Thomas <[hidden email]>
AuthorDate: Mon Dec 2 22:03:28 2019 +0000

    Silence the IDE deprecation warnings
---
 java/org/apache/catalina/realm/CombinedRealm.java | 6 +++---
 java/org/apache/catalina/realm/RealmBase.java     | 5 ++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/realm/CombinedRealm.java b/java/org/apache/catalina/realm/CombinedRealm.java
index dbc66b3..27f68cc 100644
--- a/java/org/apache/catalina/realm/CombinedRealm.java
+++ b/java/org/apache/catalina/realm/CombinedRealm.java
@@ -26,7 +26,6 @@ import java.util.List;
 import javax.management.ObjectName;
 
 import org.apache.catalina.Container;
-import org.apache.catalina.GSSRealm;
 import org.apache.catalina.Lifecycle;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.Realm;
@@ -394,6 +393,7 @@ public class CombinedRealm extends RealmBase {
     /**
      * {@inheritDoc}
      */
+    @SuppressWarnings("deprecation")
     @Override
     public Principal authenticate(GSSName gssName, GSSCredential gssCredential) {
         Principal authenticatedUser = null;
@@ -404,7 +404,7 @@ public class CombinedRealm extends RealmBase {
                         gssName, realm.getClass().getName()));
             }
 
-            if (!(realm instanceof GSSRealm)) {
+            if (!(realm instanceof org.apache.catalina.GSSRealm)) {
                 if (log.isDebugEnabled()) {
                     log.debug(sm.getString("combinedRealm.authFail",
                             gssName, realm.getClass().getName()));
@@ -413,7 +413,7 @@ public class CombinedRealm extends RealmBase {
                 continue;
             }
 
-            authenticatedUser = ((GSSRealm) realm).authenticate(gssName, gssCredential);
+            authenticatedUser = ((org.apache.catalina.GSSRealm) realm).authenticate(gssName, gssCredential);
 
             if (authenticatedUser == null) {
                 if (log.isDebugEnabled()) {
diff --git a/java/org/apache/catalina/realm/RealmBase.java b/java/org/apache/catalina/realm/RealmBase.java
index 807c28b..5fd7f18 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.realm;
 
-
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeSupport;
 import java.io.IOException;
@@ -38,7 +37,6 @@ import org.apache.catalina.Container;
 import org.apache.catalina.Context;
 import org.apache.catalina.CredentialHandler;
 import org.apache.catalina.Engine;
-import org.apache.catalina.GSSRealm;
 import org.apache.catalina.Host;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleState;
@@ -71,7 +69,8 @@ import org.ietf.jgss.GSSName;
  *
  * @author Craig R. McClanahan
  */
-public abstract class RealmBase extends LifecycleMBeanBase implements GSSRealm {
+@SuppressWarnings("deprecation")
+public abstract class RealmBase extends LifecycleMBeanBase implements org.apache.catalina.GSSRealm {
 
     private static final Log log = LogFactory.getLog(RealmBase.class);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]