7151062: [macosx] SCDynamicStore prints error messages to stderr
authorweijun
Wed, 07 Aug 2013 19:06:29 +0800
changeset 19221 a488a16d1838
parent 19220 d3d40ccb544e
child 19222 19707772a06c
7151062: [macosx] SCDynamicStore prints error messages to stderr Reviewed-by: xuelei
jdk/src/macosx/native/java/util/SCDynamicStoreConfig.m
--- a/jdk/src/macosx/native/java/util/SCDynamicStoreConfig.m	Tue Aug 06 18:18:12 2013 -0700
+++ b/jdk/src/macosx/native/java/util/SCDynamicStoreConfig.m	Wed Aug 07 19:06:29 2013 +0800
@@ -103,7 +103,6 @@
         CFTypeRef realmInfo = SCDynamicStoreCopyValue(store, (CFStringRef) [NSString stringWithFormat:@"Kerberos:%@", realm]);
 
         if (CFGetTypeID(realmInfo) != CFDictionaryGetTypeID()) {
-            NSLog(@"Unexpected CFType for realm Info: %lu", CFGetTypeID(realmInfo));
             return nil;
         }
 
@@ -140,7 +139,6 @@
 
     SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java"), _SCDynamicStoreCallBack, NULL);
     if (store == NULL) {
-        NSLog(@"Unable to load SCDynamicStore to install NotificationCallback");
         return;
     }
 
@@ -171,19 +169,11 @@
 
     SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java-kerberos"), NULL, NULL);
     if (store == NULL) {
-        NSLog(@"Unable to load SCDynamicStore");
-        return NULL;
-    }
-
-    // Create the store if it is NULL and set it.
-    if (store == NULL) {
-        NSLog(@"Invalid value for SCDynamicStore");
         return NULL;
     }
 
     CFTypeRef realms = SCDynamicStoreCopyValue(store, (CFStringRef) KERBEROS_DEFAULT_REALMS);
     if (realms == NULL || CFGetTypeID(realms) != CFArrayGetTypeID()) {
-        NSLog(@"Unable to load realm info from SCDynamicStore");
         if (realms) CFRelease(realms);
         CFRelease(store);
         return NULL;
@@ -192,7 +182,6 @@
     CFTypeRef realmMappings = SCDynamicStoreCopyValue(store, (CFStringRef) KERBEROS_DEFAULT_REALM_MAPPINGS);
 
     if (realmMappings == NULL || CFGetTypeID(realmMappings) != CFArrayGetTypeID()) {
-        NSLog(@"Unable to load realm mapping info from SCDynamicStore");
         if (realmMappings) CFRelease(realmMappings);
         CFRelease(realms);
         CFRelease(store);