jdk/test/javax/security/auth/login/modules/JaasClient.java
changeset 46898 4d2a6afafb76
parent 36511 9d0388c6b336
--- a/jdk/test/javax/security/auth/login/modules/JaasClient.java	Tue Aug 22 16:20:29 2017 +0200
+++ b/jdk/test/javax/security/auth/login/modules/JaasClient.java	Wed Aug 23 09:13:32 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
 import javax.security.auth.callback.UnsupportedCallbackException;
 import javax.security.auth.login.LoginException;
 import javax.security.auth.login.LoginContext;
-import com.sun.security.auth.UnixPrincipal;
+import com.sun.security.auth.UserPrincipal;
 
 /**
  * JAAS client which will try to authenticate a user through a custom JAAS LOGIN
@@ -71,13 +71,13 @@
             return;
         }
         for (Principal p : loginContext.getSubject().getPrincipals()) {
-            if (p instanceof UnixPrincipal
+            if (p instanceof UserPrincipal
                     && USER_NAME.equals(p.getName())) {
                 //Proper principal was found, return.
                 return;
             }
         }
-        throw new RuntimeException("Test failed. UnixPrincipal "
+        throw new RuntimeException("Test failed. UserPrincipal "
                 + USER_NAME + " expected.");
 
     }