/libcore/ojluni/src/test/java/util/Map/ |
D | InPlaceOpsCollisions.java | 51 Object[] keys = map.keySet().toArray(); in testPutIfAbsent() local 53 removeOddKeys(map, keys); in testPutIfAbsent() 54 for (int i = 0; i < keys.length; i++) { in testPutIfAbsent() 55 retVal = map.putIfAbsent(keys[i], val); in testPutIfAbsent() 58 assertEquals(retVal, keys[i], in testPutIfAbsent() 60 assertEquals(keys[i], map.get(keys[i]), in testPutIfAbsent() 62 assertTrue(map.containsValue(keys[i]), in testPutIfAbsent() 67 assertEquals(val, map.get(keys[i]), in testPutIfAbsent() 69 assertFalse(map.containsValue(keys[i]), in testPutIfAbsent() 72 assertTrue(map.containsKey(keys[i]), in testPutIfAbsent() [all …]
|
D | MapWithCollisionsProviders.java | 170 private static <T> Map<T, T> fillMap(Map<T, T> m, T[] keys) { in fillMap() argument 171 for (T k : keys) { in fillMap() 176 assertEquals(m.size(), keys.length); in fillMap() 180 private static <T> Supplier<Map<T, T>> createMap(Map<T, T> m, T[] keys) { in createMap() argument 181 return () -> fillMap(m, keys); in createMap() 184 private static <T> Object[] createCase(String desc, Map<T, T> m, T[] keys, T val) { in createCase() argument 185 return new Object[]{desc, createMap(m, keys), val}; in createCase() 189 T[] keys, in makeMapsMoreTypes() argument 193 new Hashtable<>(), keys, val)); in makeMapsMoreTypes() 195 new IdentityHashMap<>(), keys, val)); in makeMapsMoreTypes() [all …]
|
/libcore/ojluni/src/main/java/java/nio/channels/spi/ |
D | AbstractSelectableChannel.java | 68 private SelectionKey[] keys = null; field in AbstractSelectableChannel 105 if ((keys != null) && (keyCount < keys.length)) { in addKey() 107 for (i = 0; i < keys.length; i++) in addKey() 108 if (keys[i] == null) in addKey() 110 } else if (keys == null) { in addKey() 111 keys = new SelectionKey[2]; in addKey() 114 int n = keys.length * 2; in addKey() 116 for (i = 0; i < keys.length; i++) in addKey() 117 ks[i] = keys[i]; in addKey() 118 keys = ks; in addKey() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | MembershipRegistry.java | 59 List<MembershipKeyImpl> keys = groups.get(group); in checkMembership() local 60 if (keys != null) { in checkMembership() 61 for (MembershipKeyImpl key: keys) { in checkMembership() 89 List<MembershipKeyImpl> keys; in add() local 92 keys = null; in add() 94 keys = groups.get(group); in add() 96 if (keys == null) { in add() 97 keys = new LinkedList<>(); in add() 98 groups.put(group, keys); in add() 100 keys.add(key); in add() [all …]
|
D | SelectorImpl.java | 47 protected HashSet<SelectionKey> keys; field in SelectorImpl 55 keys = new HashSet<SelectionKey>(); in SelectorImpl() 58 publicKeys = keys; in SelectorImpl() 61 publicKeys = Collections.unmodifiableSet(keys); in SelectorImpl() 66 public Set<SelectionKey> keys() { in keys() method in SelectorImpl
|
/libcore/ojluni/src/main/java/sun/net/www/ |
D | MessageHeader.java | 45 private String keys[]; field in MessageHeader 63 joiner.add(keys[i]); in getHeaderNamesInList() 72 keys = null; in reset() 87 if (keys[i] == null) in findValue() 91 if (k.equalsIgnoreCase(keys[i])) in findValue() 100 if ((keys[i] == k) || in getKey() 101 (k != null && k.equalsIgnoreCase(keys[i]))) in getKey() 108 return keys[n]; in getKey() 131 if (keys[i] == null) in findNextValue() 138 if (k.equalsIgnoreCase(keys[i])) in findNextValue() [all …]
|
/libcore/luni/src/test/java/tests/security/interfaces/ |
D | DSAPublicKeyTest.java | 39 KeyPair keys = null; in test_getY() local 46 keys = keyGen.generateKeyPair(); in test_getY() 47 priv = (DSAPrivateKey) keys.getPrivate(); in test_getY() 48 publ = (DSAPublicKey) keys.getPublic(); in test_getY() 54 keys = keyGen.generateKeyPair(); in test_getY() 55 priv = (DSAPrivateKey) keys.getPrivate(); in test_getY() 56 publ = (DSAPublicKey) keys.getPublic(); in test_getY()
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | KeyFactory2Test.java | 117 KeyPair keys = keyGen.generateKeyPair(); in test_generatePrivateLjava_security_spec_KeySpec() local 122 KeySpec privateKeySpec = fact.getKeySpec(keys.getPrivate(), in test_generatePrivateLjava_security_spec_KeySpec() 126 Arrays.toString(keys.getPrivate().getEncoded()), in test_generatePrivateLjava_security_spec_KeySpec() 128 … privateKey = fact.generatePrivate(new PKCS8EncodedKeySpec(keys.getPrivate().getEncoded())); in test_generatePrivateLjava_security_spec_KeySpec() 130 Arrays.toString(keys.getPrivate().getEncoded()), in test_generatePrivateLjava_security_spec_KeySpec() 147 KeyPair keys = keyGen.generateKeyPair(); in test_generatePublicLjava_security_spec_KeySpec() local 151 KeySpec publicKeySpec = fact.getKeySpec(keys.getPublic(), in test_generatePublicLjava_security_spec_KeySpec() 158 Arrays.toString(keys.getPublic().getEncoded()), in test_generatePublicLjava_security_spec_KeySpec() 239 KeyPair keys = keyGen.generateKeyPair(); in test_getKeySpecLjava_security_KeyLjava_lang_Class() local 243 KeySpec privateKeySpec = fact.getKeySpec(keys.getPrivate(), in test_getKeySpecLjava_security_KeyLjava_lang_Class() [all …]
|
D | KeyPairGenerator1Test.java | 349 int[] keys = { -10000, -1024, -1, 0, 10000 }; in testKeyPairGenerator11() local 357 for (int j = 0; j < keys.length; j++) { in testKeyPairGenerator11() 359 kpg[i].initialize(keys[j]); in testKeyPairGenerator11() 360 kpg[i].initialize(keys[j], random); in testKeyPairGenerator11() 386 int[] keys = { -1, -250, 1, 64, 512, 1024 }; in testKeyPairGenerator12() local 396 for (int i = 0; i < keys.length; i++) { in testKeyPairGenerator12() 398 mKPG.initialize(keys[i]); in testKeyPairGenerator12() 400 + Integer.toString(keys[i]) + ")"); in testKeyPairGenerator12() 404 mKPG.initialize(keys[i], random); in testKeyPairGenerator12() 406 + Integer.toString(keys[i]) + ")"); in testKeyPairGenerator12() [all …]
|
D | KeyFactoryTest.java | 290 Key[] keys = { in testGetKeySpec() local 304 for (int i = 0; i < keys.length; i++) { in testGetKeySpec() 305 Key key = keys[i]; in testGetKeySpec() 319 Key[] keys = { in testGetKeySpec() local 340 for (int i = 0; i < keys.length; i++) { in testGetKeySpec() 341 Key key = keys[i]; in testGetKeySpec() 372 Key[] keys = { in testTranslateKey() local 382 for (int i = 0; i < keys.length; i++) { in testTranslateKey() 383 Key key = keys[i]; in testTranslateKey() 396 Key[] keys = { in testTranslateKey() local [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | ListResourceBundleTest.java | 35 Enumeration<String> keys = bundle.getKeys(); in test_getKeys() local 37 while (keys.hasMoreElements()) { in test_getKeys() 38 result.addElement(keys.nextElement()); in test_getKeys() 54 Enumeration keys = bundle.getKeys(); in test_handleGetObjectLjava_lang_String() local 57 while (keys.hasMoreElements()) { in test_handleGetObjectLjava_lang_String() 58 result.addElement(bundle.handleGetObject((String)keys.nextElement())); in test_handleGetObjectLjava_lang_String()
|
D | WeakHashMapTest.java | 186 List keys = Arrays.asList(keyArray); in test_entrySet() local 194 assertTrue("Invalid map entry returned--bad key", keys.contains(entry.getKey())); in test_entrySet() 197 keys = null; in test_entrySet() 295 List keys = Arrays.asList(keyArray); in test_keySet() local 303 assertTrue("Invalid map entry returned--bad key", keys.contains(key)); in test_keySet() 305 keys = null; in test_keySet() 381 List keys = Arrays.asList(keyArray); in test_values() local 391 keys = null; in test_values() 537 Set<String> keys = hashMap.keySet(); in test_spliterator_keySet() local 538 ArrayList<String> expectedKeys = new ArrayList<>(keys); in test_spliterator_keySet() [all …]
|
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/ |
D | SystemScope.java | 49 private Hashtable keys = new Hashtable(); field in SystemScope 96 return (Identity) keys.get(key); in getIdentity() 113 if (key != null && keys.containsKey(key)) { in addIdentity() 119 keys.put(key, identity); in addIdentity() 145 contains = contains || keys.containsKey(key); in removeIdentity() 146 keys.remove(key); in removeIdentity()
|
/libcore/ojluni/src/tools/build/tools/spp/ |
D | Spp.java | 72 Set<String> keys = new HashSet<>(); in main() local 83 keys.add(arg.substring(2)); in main() 101 keys, vars, be, el, in main() 124 Set<String> keys, Map<String, String> vars) { in append() argument 131 boolean test = keys.contains(vardef.group(GN_KEY)); in append() 154 Set<String> keys, Map<String, String> vars, in spp() argument 171 boolean test = keys.contains(k); in spp() 175 if (!spp(in, buf, k, keys, vars, be, el, skip || !test)) { in spp() 176 spp(in, buf, k, keys, vars, be, el, skip || test); in spp() 200 append(buf, ln, keys, vars); in spp()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | X509KeyManagerTest.java | 32 private PrivateKey[] keys; field in X509KeyManagerTest 631 keys = new PrivateKey[3]; in init() 632 keys[0] = kf.generatePrivate(new PKCS8EncodedKeySpec(keyBytes)); in init() 633 keys[1] = kf.generatePrivate(new PKCS8EncodedKeySpec(key2Bytes)); in init() 634 keys[2] = kf.generatePrivate(new PKCS8EncodedKeySpec(key3Bytes)); in init() 639 … keyTest.setKeyEntry("clientKey_01", keys[0], PASSWORD, new X509Certificate[] {cert[0]}); in init() 640 … keyTest.setKeyEntry("clientKey_02", keys[1], PASSWORD, new X509Certificate[] {cert[0], cert[1]}); in init() 641 … keyTest.setKeyEntry("clientKey_03", keys[2], PASSWORD, new X509Certificate[] {cert[0], cert[2]}); in init() 646 keys = new PrivateKey[1]; in init() 647 keys[0] = kf.generatePrivate(new PKCS8EncodedKeySpec(keyBytes)); in init() [all …]
|
D | HandshakeCompletedEventTest.java | 391 String keys; field in HandshakeCompletedEventTest.TestServer 397 public TestServer(boolean provideKeys, int clientAuth, String keys) throws Exception { in TestServer() argument 398 this.keys = keys; in TestServer() 404 KeyManager[] keyManagers = provideKeys ? getKeyManagers(keys) : null; in TestServer() 473 private String keys; field in HandshakeCompletedEventTest.TestClient 477 public TestClient(boolean provideKeys, String keys) { in TestClient() argument 478 this.keys = keys; in TestClient() 486 KeyManager[] keyManagers = provideKeys ? getKeyManagers(keys) : null; in run() 536 private KeyManager[] getKeyManagers(String keys) throws Exception { in getKeyManagers() argument 537 byte[] bytes = Base64.getDecoder().decode(keys.getBytes()); in getKeyManagers()
|
/libcore/ojluni/src/main/java/java/security/ |
D | Signer.java | 158 String keys = ""; in printKeys() local 161 keys = "\tpublic and private keys initialized"; in printKeys() 164 keys = "\tno keys"; in printKeys() 166 return keys; in printKeys()
|
/libcore/luni/src/test/java/tests/security/spec/ |
D | EncodedKeySpec2Test.java | 42 KeyPair keys = keyGen.generateKeyPair(); in test_getEncoded() local 49 byte[] encoded = keys.getPublic().getEncoded(); in test_getEncoded() 53 isEqual(key, keys.getPublic())); in test_getEncoded() 56 encoded = keys.getPrivate().getEncoded(); in test_getEncoded() 60 isEqual(key, keys.getPrivate())); in test_getEncoded()
|
/libcore/ojluni/src/test/java/util/Properties/ |
D | StringPropertyNames.java | 124 Set<String> keys = props.stringPropertyNames(); in checkProperties() local 125 if (keys.size() != numStringKeys) { in checkProperties() 128 numStringKeys + " but found = " + keys.size()); in checkProperties() 161 keys.add("xyzzy"); in checkProperties() 166 Iterator<String> it = keys.iterator(); in checkProperties() 169 keys.remove(it.next()); in checkProperties()
|
D | LoadParsing2.java | 58 String[] keys, in test() argument 68 for (int i = 0; i < keys.length; i++) { in test() 69 if (!myProps.getProperty(keys[i]).equals(values[i])) { in test() 137 static String[][] keys = {keys1, keys1, keys2, keys2, keys3}; field in LoadParsing2
|
D | CheckUnsynchronized.java | 56 Enumeration<Object> keys = in main() local 57 CompletableFuture.supplyAsync(() -> props.keys()).join(); in main() 58 System.out.println("first key from keys(): " + keys.nextElement()); in main()
|
/libcore/json/src/test/java/libcore/org/json/ |
D | JSONArrayTest.java | 330 JSONArray keys = new JSONArray(); in testToJSONObject() local 331 keys.put("a"); in testToJSONObject() 332 keys.put("b"); in testToJSONObject() 338 JSONObject object = values.toJSONObject(keys); in testToJSONObject() 342 keys.put(0, "a"); in testToJSONObject() 348 JSONArray keys = new JSONArray(); in testToJSONObjectWithNulls() local 349 keys.put("a"); in testToJSONObjectWithNulls() 350 keys.put("b"); in testToJSONObjectWithNulls() 357 JSONObject object = values.toJSONObject(keys); in testToJSONObjectWithNulls() 364 JSONArray keys = new JSONArray(); in testToJSONObjectMoreNamesThanValues() local [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | ExpiringCache.java | 122 String[] keys = new String[keySet.size()]; in cleanup() local 125 keys[i++] = key; in cleanup() 127 for (int j = 0; j < keys.length; j++) { in cleanup() 128 entryFor(keys[j]); in cleanup()
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | DistinctOps.java | 93 Set<T> keys = map.keySet(); in makeRef() local 96 keys = new HashSet<>(keys); in makeRef() 97 keys.add(null); in makeRef() 99 return Nodes.node(keys); in makeRef()
|
/libcore/ojluni/src/test/java/util/HashMap/ |
D | ReplaceExisting.java | 70 HashSet<Integer> keys = new HashSet<>(hm.size()); in testItr() local 71 keys.addAll(hm.keySet()); in testItr() 98 if (!keys.equals(collected)) { in testItr()
|