directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject directory-kerby git commit: Simplifying the diamond operator
Date Thu, 25 Oct 2018 09:12:47 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/trunk 29934ad73 -> 741299429


Simplifying the diamond operator


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/74129942
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/74129942
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/74129942

Branch: refs/heads/trunk
Commit: 7412994295ebb188b7174a83462ed73858d01d1b
Parents: 29934ad
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Thu Oct 25 10:12:32 2018 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Thu Oct 25 10:12:32 2018 +0100

----------------------------------------------------------------------
 .../java/org/apache/kerby/has/common/spnego/AuthToken.java     | 2 +-
 .../apache/kerby/has/common/spnego/KerberosAuthenticator.java  | 2 +-
 .../main/java/org/apache/kerby/has/server/web/WebServer.java   | 2 +-
 .../org/apache/kerby/has/server/web/rest/AsRequestApi.java     | 2 +-
 .../src/test/java/org/apache/kerby/has/server/TestUtil.java    | 2 +-
 .../src/main/java/org/apache/kerby/config/ConfigImpl.java      | 2 +-
 .../src/test/java/org/apache/kerby/config/ConfTest.java        | 6 +++---
 .../kerberos/kerb/integration/test/sasl/SaslAppClient.java     | 2 +-
 .../kerberos/kerb/integration/test/sasl/SaslAppServer.java     | 2 +-
 .../admin/server/kadmin/impl/DefaultAdminServerHandler.java    | 2 +-
 .../java/org/apache/kerby/kerberos/kerb/admin/AuthUtil.java    | 4 ++--
 .../kerby/kerberos/kerb/admin/RemoteAdminClientTool.java       | 2 +-
 .../kerby/kerberos/kerb/client/jaas/TokenJaasKrbUtil.java      | 2 +-
 .../apache/kerby/kerberos/kerb/client/request/KdcRequest.java  | 2 +-
 .../src/main/java/org/apache/kerby/kerberos/kerb/Message.java  | 2 +-
 .../org/apache/kerby/kerberos/kerb/common/EncryptionUtil.java  | 2 +-
 .../kerberos/kerb/server/preauth/pkinit/PkinitPreauth.java     | 2 +-
 .../org/apache/kerby/kerberos/kerb/client/JaasKrbUtil.java     | 4 ++--
 .../java/org/apache/kerby/kerberos/kerb/keytab/Keytab.java     | 2 +-
 .../java/org/apache/kerby/kerberos/tool/kadmin/AuthUtil.java   | 4 ++--
 20 files changed, 25 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/has-project/has-common/src/main/java/org/apache/kerby/has/common/spnego/AuthToken.java
----------------------------------------------------------------------
diff --git a/has-project/has-common/src/main/java/org/apache/kerby/has/common/spnego/AuthToken.java
b/has-project/has-common/src/main/java/org/apache/kerby/has/common/spnego/AuthToken.java
index aaf0080..1bb7263 100644
--- a/has-project/has-common/src/main/java/org/apache/kerby/has/common/spnego/AuthToken.java
+++ b/has-project/has-common/src/main/java/org/apache/kerby/has/common/spnego/AuthToken.java
@@ -199,7 +199,7 @@ public class AuthToken implements Principal {
    * attribute pairs.
    */
   private static Map<String, String> split(String tokenStr) throws AuthenticationException
{
-    Map<String, String> map = new HashMap<String, String>();
+    Map<String, String> map = new HashMap<>();
     StringTokenizer st = new StringTokenizer(tokenStr, ATTR_SEPARATOR);
     while (st.hasMoreTokens()) {
       String part = st.nextToken();

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/has-project/has-common/src/main/java/org/apache/kerby/has/common/spnego/KerberosAuthenticator.java
----------------------------------------------------------------------
diff --git a/has-project/has-common/src/main/java/org/apache/kerby/has/common/spnego/KerberosAuthenticator.java
b/has-project/has-common/src/main/java/org/apache/kerby/has/common/spnego/KerberosAuthenticator.java
index a62383b..0aa379d 100644
--- a/has-project/has-common/src/main/java/org/apache/kerby/has/common/spnego/KerberosAuthenticator.java
+++ b/has-project/has-common/src/main/java/org/apache/kerby/has/common/spnego/KerberosAuthenticator.java
@@ -115,7 +115,7 @@ public class KerberosAuthenticator implements Authenticator {
                                 new HashMap<String, String>());
 
     private static final Map<String, String> KEYTAB_KERBEROS_OPTIONS
-        = new HashMap<String, String>();
+        = new HashMap<>();
     static {
       if (IBM_JAVA) {
         KEYTAB_KERBEROS_OPTIONS.put("credsType", "both");

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/has-project/has-server/src/main/java/org/apache/kerby/has/server/web/WebServer.java
----------------------------------------------------------------------
diff --git a/has-project/has-server/src/main/java/org/apache/kerby/has/server/web/WebServer.java
b/has-project/has-server/src/main/java/org/apache/kerby/has/server/web/WebServer.java
index 2260b9c..fedc5da 100644
--- a/has-project/has-server/src/main/java/org/apache/kerby/has/server/web/WebServer.java
+++ b/has-project/has-server/src/main/java/org/apache/kerby/has/server/web/WebServer.java
@@ -100,7 +100,7 @@ public class WebServer {
     }
 
     private Map<String, String> getAuthFilterParams(HasConfig conf) {
-        Map<String, String> params = new HashMap<String, String>();
+        Map<String, String> params = new HashMap<>();
 
         String authType = conf.getString(WebConfigKey.HAS_AUTHENTICATION_FILTER_AUTH_TYPE);
         if (authType != null && !authType.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/has-project/has-server/src/main/java/org/apache/kerby/has/server/web/rest/AsRequestApi.java
----------------------------------------------------------------------
diff --git a/has-project/has-server/src/main/java/org/apache/kerby/has/server/web/rest/AsRequestApi.java
b/has-project/has-server/src/main/java/org/apache/kerby/has/server/web/rest/AsRequestApi.java
index 8fa567d..b953a1c 100644
--- a/has-project/has-server/src/main/java/org/apache/kerby/has/server/web/rest/AsRequestApi.java
+++ b/has-project/has-server/src/main/java/org/apache/kerby/has/server/web/rest/AsRequestApi.java
@@ -83,7 +83,7 @@ public class AsRequestApi {
             String errMessage = null;
             String js = null;
             ObjectMapper mapper = new ObjectMapper();
-            final Map<String, Object> m = new TreeMap<String, Object>();
+            final Map<String, Object> m = new TreeMap<>();
             if (hasServer.getKdcServer() == null) {
                 errMessage = "Please start the has KDC server.";
             } else if (tokenStr != null && !tokenStr.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/has-project/has-server/src/test/java/org/apache/kerby/has/server/TestUtil.java
----------------------------------------------------------------------
diff --git a/has-project/has-server/src/test/java/org/apache/kerby/has/server/TestUtil.java
b/has-project/has-server/src/test/java/org/apache/kerby/has/server/TestUtil.java
index 9cbb223..c40a8f2 100644
--- a/has-project/has-server/src/test/java/org/apache/kerby/has/server/TestUtil.java
+++ b/has-project/has-server/src/test/java/org/apache/kerby/has/server/TestUtil.java
@@ -203,7 +203,7 @@ class TestUtil {
     File sslClientConfFile = new File(sslConfDir, getClientSSLConfigFileName());
     File sslServerConfFile = new File(sslConfDir, getServerSSLConfigFileName());
 
-    Map<String, X509Certificate> certs = new HashMap<String, X509Certificate>();
+    Map<String, X509Certificate> certs = new HashMap<>();
 
     if (useClientCert) {
       KeyPair cKP = TestUtil.generateKeyPair("RSA");

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-common/kerby-config/src/main/java/org/apache/kerby/config/ConfigImpl.java
----------------------------------------------------------------------
diff --git a/kerby-common/kerby-config/src/main/java/org/apache/kerby/config/ConfigImpl.java
b/kerby-common/kerby-config/src/main/java/org/apache/kerby/config/ConfigImpl.java
index 22cb957..6b2b333 100644
--- a/kerby-common/kerby-config/src/main/java/org/apache/kerby/config/ConfigImpl.java
+++ b/kerby-common/kerby-config/src/main/java/org/apache/kerby/config/ConfigImpl.java
@@ -40,7 +40,7 @@ public class ConfigImpl implements Config {
 
     protected ConfigImpl(String resource) {
         this.resource = resource;
-        this.properties = new HashMap<String, ConfigObject>();
+        this.properties = new HashMap<>();
         this.configs = new ArrayList<>(0);
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-common/kerby-config/src/test/java/org/apache/kerby/config/ConfTest.java
----------------------------------------------------------------------
diff --git a/kerby-common/kerby-config/src/test/java/org/apache/kerby/config/ConfTest.java
b/kerby-common/kerby-config/src/test/java/org/apache/kerby/config/ConfTest.java
index c2f5aca..c0830e3 100644
--- a/kerby-common/kerby-config/src/test/java/org/apache/kerby/config/ConfTest.java
+++ b/kerby-common/kerby-config/src/test/java/org/apache/kerby/config/ConfTest.java
@@ -38,7 +38,7 @@ public class ConfTest {
         String strProp = "hello";
         Integer intProp = 123456;
         Boolean boolProp = true;
-        Map<String, Object> mapConfig = new HashMap<String, Object>();
+        Map<String, Object> mapConfig = new HashMap<>();
         mapConfig.put("strProp", strProp);
         mapConfig.put("intProp", String.valueOf(intProp));
         mapConfig.put("boolProp", String.valueOf(boolProp));
@@ -74,7 +74,7 @@ public class ConfTest {
     public void testMixedConfig() {
         String mapStrProp = "hello map";
         Integer intProp = 123456;
-        Map<String, Object> mapConfig = new HashMap<String, Object>();
+        Map<String, Object> mapConfig = new HashMap<>();
         mapConfig.put("mapStrProp", mapStrProp);
         mapConfig.put("intProp", String.valueOf(intProp));
 
@@ -121,7 +121,7 @@ public class ConfTest {
         Conf conf = new Conf();
         assertThat(conf.getString(TestConfKey.ADDRESS, true)).isEqualTo(
                 TestConfKey.ADDRESS.getDefaultValue());
-        Map<String, Object> mapConfig = new HashMap<String, Object>();
+        Map<String, Object> mapConfig = new HashMap<>();
         String myAddress = "www.google.com";
         mapConfig.put(TestConfKey.ADDRESS.getPropertyKey(), myAddress);
         conf.addMapConfig(mapConfig);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/sasl/SaslAppClient.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/sasl/SaslAppClient.java
b/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/sasl/SaslAppClient.java
index b928e01..57fa611 100644
--- a/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/sasl/SaslAppClient.java
+++ b/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/sasl/SaslAppClient.java
@@ -37,7 +37,7 @@ public class SaslAppClient extends AppClient {
 
         String protocol = args[2];
         String serverFqdn = args[3];
-        Map<String, String> props = new HashMap<String, String>();
+        Map<String, String> props = new HashMap<>();
         props.put(Sasl.QOP, "auth");
 
         this.saslClient = Sasl.createSaslClient(new String[]{"GSSAPI"}, null,

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/sasl/SaslAppServer.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/sasl/SaslAppServer.java
b/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/sasl/SaslAppServer.java
index a681dae..e9eef6c 100644
--- a/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/sasl/SaslAppServer.java
+++ b/kerby-kerb/integration-test/src/main/java/org/apache/kerby/kerberos/kerb/integration/test/sasl/SaslAppServer.java
@@ -66,7 +66,7 @@ public class SaslAppServer extends AppServer {
 
         //mechanism, protocol, serverId, saslProperties, callback
         CallbackHandler callbackHandler = new SaslGssCallbackHandler();
-        Map<String, Object> props = new HashMap<String, Object>();
+        Map<String, Object> props = new HashMap<>();
         props.put(Sasl.QOP, "auth");
 
         SaslServer ss = Sasl.createSaslServer(mechanism,

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/kadmin/impl/DefaultAdminServerHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/kadmin/impl/DefaultAdminServerHandler.java
b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/kadmin/impl/DefaultAdminServerHandler.java
index 62a7e47..b8eb0a7 100644
--- a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/kadmin/impl/DefaultAdminServerHandler.java
+++ b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/kadmin/impl/DefaultAdminServerHandler.java
@@ -114,7 +114,7 @@ public class DefaultAdminServerHandler extends AdminServerHandler implements
Run
                         return null;
                     }
 
-                    Map<String, Object> props = new HashMap<String, Object>();
+                    Map<String, Object> props = new HashMap<>();
                     props.put(Sasl.QOP, "auth-conf");
                     props.put(Sasl.SERVER_AUTH, "true");
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/AuthUtil.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/AuthUtil.java
b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/AuthUtil.java
index 0a8b3df..69a82e5 100644
--- a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/AuthUtil.java
+++ b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/AuthUtil.java
@@ -92,7 +92,7 @@ public class AuthUtil {
 
         @Override
         public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
-            Map<String, String> options = new HashMap<String, String>();
+            Map<String, String> options = new HashMap<>();
             options.put("principal", principal);
             options.put("storeKey", "false");
             options.put("doNotPrompt", "false");
@@ -121,7 +121,7 @@ public class AuthUtil {
 
         @Override
         public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
-            Map<String, String> options = new HashMap<String, String>();
+            Map<String, String> options = new HashMap<>();
             options.put("keyTab", keytabFile.getAbsolutePath());
             options.put("principal", principal);
             options.put("useKeyTab", "true");

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/RemoteAdminClientTool.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/RemoteAdminClientTool.java
b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/RemoteAdminClientTool.java
index 969c88a..852f32a 100644
--- a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/RemoteAdminClientTool.java
+++ b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/RemoteAdminClientTool.java
@@ -154,7 +154,7 @@ public class RemoteAdminClientTool {
             public Object run() {
                 try {
 
-                    Map<String, String> props = new HashMap<String, String>();
+                    Map<String, String> props = new HashMap<>();
                     props.put(Sasl.QOP, "auth-conf");
                     props.put(Sasl.SERVER_AUTH, "true");
                     SaslClient saslClient = null;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/jaas/TokenJaasKrbUtil.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/jaas/TokenJaasKrbUtil.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/jaas/TokenJaasKrbUtil.java
index d623de6..376dbe1 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/jaas/TokenJaasKrbUtil.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/jaas/TokenJaasKrbUtil.java
@@ -125,7 +125,7 @@ public class TokenJaasKrbUtil {
 
         @Override
         public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
-            Map<String, String> options = new HashMap<String, String>();
+            Map<String, String> options = new HashMap<>();
             options.put(TokenAuthLoginModule.PRINCIPAL, principal);
             if (tokenCache != null) {
                 options.put(TokenAuthLoginModule.TOKEN_CACHE, tokenCache.getAbsolutePath());

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
index 9583bff..97aadde 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
@@ -80,7 +80,7 @@ public abstract class KdcRequest {
     public KdcRequest(KrbContext context) {
         this.context = context;
         this.isRetrying = false;
-        this.credCache = new HashMap<String, Object>();
+        this.credCache = new HashMap<>();
         this.preauthContext = context.getPreauthHandler()
                 .preparePreauthContext(this);
         this.fastRequestState = new KrbFastRequestState();

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/Message.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/Message.java
b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/Message.java
index 5712f51..b5cb833 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/Message.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/Message.java
@@ -23,7 +23,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 public class Message {
-    private static Map<MessageCode, String> entries = new HashMap<MessageCode, String>();
+    private static Map<MessageCode, String> entries = new HashMap<>();
 
     public static void init() {
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/EncryptionUtil.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/EncryptionUtil.java
b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/EncryptionUtil.java
index c41dc28..d155c6d 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/EncryptionUtil.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/EncryptionUtil.java
@@ -41,7 +41,7 @@ public class EncryptionUtil {
      * an order preserved map containing cipher names to the corresponding algorithm
      * names in the descending order of strength
      */
-    private static final Map<String, String> CIPHER_ALGO_MAP = new LinkedHashMap<String,
String>();
+    private static final Map<String, String> CIPHER_ALGO_MAP = new LinkedHashMap<>();
 
     static {
         CIPHER_ALGO_MAP.put("rc4", "ArcFourHmac");

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/preauth/pkinit/PkinitPreauth.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/preauth/pkinit/PkinitPreauth.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/preauth/pkinit/PkinitPreauth.java
index a2d5e68..909a04e 100644
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/preauth/pkinit/PkinitPreauth.java
+++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/preauth/pkinit/PkinitPreauth.java
@@ -82,7 +82,7 @@ public class PkinitPreauth extends AbstractPreauthPlugin {
     public PkinitPreauth() {
         super(new PkinitPreauthMeta());
 
-        pkinitContexts = new HashMap<String, PkinitKdcContext>(1);
+        pkinitContexts = new HashMap<>(1);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-kerb/kerb-simplekdc/src/main/java/org/apache/kerby/kerberos/kerb/client/JaasKrbUtil.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-simplekdc/src/main/java/org/apache/kerby/kerberos/kerb/client/JaasKrbUtil.java
b/kerby-kerb/kerb-simplekdc/src/main/java/org/apache/kerby/kerberos/kerb/client/JaasKrbUtil.java
index fd39a82..c655200 100644
--- a/kerby-kerb/kerb-simplekdc/src/main/java/org/apache/kerby/kerberos/kerb/client/JaasKrbUtil.java
+++ b/kerby-kerb/kerb-simplekdc/src/main/java/org/apache/kerby/kerberos/kerb/client/JaasKrbUtil.java
@@ -122,7 +122,7 @@ public final class JaasKrbUtil {
 
         @Override
         public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
-            Map<String, String> options = new HashMap<String, String>();
+            Map<String, String> options = new HashMap<>();
             options.put("keyTab", keytabFile.getAbsolutePath());
             options.put("principal", principal);
             options.put("useKeyTab", "true");
@@ -151,7 +151,7 @@ public final class JaasKrbUtil {
 
         @Override
         public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
-            Map<String, String> options = new HashMap<String, String>();
+            Map<String, String> options = new HashMap<>();
             options.put("principal", principal);
             options.put("storeKey", "false");
             options.put("doNotPrompt", "false");

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/Keytab.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/Keytab.java
b/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/Keytab.java
index d876d91..c34922c 100644
--- a/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/Keytab.java
+++ b/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/Keytab.java
@@ -47,7 +47,7 @@ public final class Keytab implements KrbKeytab {
     private Map<PrincipalName, List<KeytabEntry>> principalEntries;
 
     public Keytab() {
-        this.principalEntries = new HashMap<PrincipalName, List<KeytabEntry>>();
+        this.principalEntries = new HashMap<>();
     }
 
     public static Keytab loadKeytab(File keytabFile) throws IOException {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/74129942/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/AuthUtil.java
----------------------------------------------------------------------
diff --git a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/AuthUtil.java
b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/AuthUtil.java
index 4374d9c..0062a1e 100644
--- a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/AuthUtil.java
+++ b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/AuthUtil.java
@@ -92,7 +92,7 @@ public class AuthUtil {
 
         @Override
         public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
-            Map<String, String> options = new HashMap<String, String>();
+            Map<String, String> options = new HashMap<>();
             options.put("principal", principal);
             options.put("storeKey", "false");
             options.put("doNotPrompt", "false");
@@ -121,7 +121,7 @@ public class AuthUtil {
 
         @Override
         public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
-            Map<String, String> options = new HashMap<String, String>();
+            Map<String, String> options = new HashMap<>();
             options.put("keyTab", keytabFile.getAbsolutePath());
             options.put("principal", principal);
             options.put("useKeyTab", "true");


Mime
View raw message