/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | SourceChannelTest.java | 40 private Pipe.SourceChannel source; field in SourceChannelTest 50 source = pipe.source(); in setUp() 60 assertEquals(SelectionKey.OP_READ, source.validOps()); in test_validOps() 69 int count = source.read(ByteBuffer.allocate(10)); in test_read_LByteBuffer_DataAvailable() 79 source.read(nullBuf); in test_read_LByteBuffer_Exception() 93 long count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed() 96 count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed() 100 count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed() 109 source.close(); in test_read_LByteBuffer_SourceClosed() 111 source.read(readBuf); in test_read_LByteBuffer_SourceClosed() [all …]
|
/libcore/ojluni/src/main/java/java/text/ |
D | RuleBasedCollator.java | 330 public CollationElementIterator getCollationElementIterator(String source) { in getCollationElementIterator() argument 332 if (source == null) { in getCollationElementIterator() 335 return new CollationElementIterator(collAsICU().getCollationElementIterator(source)); in getCollationElementIterator() 347 CharacterIterator source) { in getCollationElementIterator() argument 349 if (source == null) { in getCollationElementIterator() 352 return new CollationElementIterator(collAsICU().getCollationElementIterator(source)); in getCollationElementIterator() 363 public synchronized int compare(String source, String target) in compare() argument 365 if (source == null || target == null) { in compare() 369 return icuColl.compare(source, target); in compare() 377 public synchronized CollationKey getCollationKey(String source) in getCollationKey() argument [all …]
|
D | CollationKey.java | 120 return source; in getSourceString() 142 protected CollationKey(String source) { in CollationKey() argument 143 if (source==null){ in CollationKey() 146 this.source = source; in CollationKey() 149 private final String source; field in CollationKey
|
/libcore/ojluni/src/test/java/lang/String/ |
D | LiteralReplace.java | 49 public void testExpected(String source, String target, in testExpected() argument 52 String canonical = canonicalReplace(source, target, replacement); in testExpected() 56 test0(source, target, replacement, expected); in testExpected() 60 public void testCanonical(String source, String target, in testCanonical() argument 63 String canonical = canonicalReplace(source, target, replacement); in testCanonical() 64 test0(source, target, replacement, canonical); in testCanonical() 67 private void test0(String source, String target, String replacement, in test0() argument 70 String result = source.replace(target, replacement); in test0() 78 public void testNPE(String source, String target, String replacement) { in testNPE() argument 79 source.replace(target, replacement); in testNPE() [all …]
|
D | Split.java | 103 String source = ""; 104 String[] result = source.split("e", 0); 107 if (!result[0].equals(source)) 184 …private void testSplit_fastPath_(String source, Random r, boolean doEscape, int cpFrom, int cpTo) { 201 int off = r.nextInt(source.length()); 204 source, 205 regex + source, 206 source + regex, 207 source.substring(0, 3) 208 + regex + source.substring(3, 9) [all …]
|
/libcore/luni/src/test/java/libcore/javax/xml/transform/dom/ |
D | DOMSourceTest.java | 35 DOMSource source = new DOMSource(); in constructor() local 36 assertNotNull(source); in constructor() 37 assertNull(source.getNode()); in constructor() 38 assertNull(source.getSystemId()); in constructor() 44 DOMSource source = new DOMSource(node, "systemId"); in constructorWithNodeAndString() local 45 assertEquals(node, source.getNode()); in constructorWithNodeAndString() 46 assertEquals("systemId", source.getSystemId()); in constructorWithNodeAndString() 51 DOMSource source = new DOMSource(); in setSystemId() local 52 assertNull(source.getSystemId()); in setSystemId() 54 source.setSystemId("systemId"); in setSystemId() [all …]
|
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/ |
D | SliceSpliteratorTest.java | 44 Collection<T> source; field in SliceSpliteratorTest.UnorderedContentAsserter 46 UnorderedContentAsserter(Collection<T> source) { in UnorderedContentAsserter() argument 47 this.source = source; in UnorderedContentAsserter() 57 assertTrue(source.containsAll(actual)); in assertContents() 74 … final Collection<Integer> source = IntStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider() 77 … Spliterator<Integer> s = Arrays.spliterator(source.stream().toArray(Integer[]::new)); in sliceSpliteratorDataProvider() 87 … final Collection<Integer> source = IntStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider() 90 … Spliterator.OfInt s = Arrays.spliterator(source.stream().mapToInt(i->i).toArray()); in sliceSpliteratorDataProvider() 100 … final Collection<Long> source = LongStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider() 103 … Spliterator.OfLong s = Arrays.spliterator(source.stream().mapToLong(i->i).toArray()); in sliceSpliteratorDataProvider() [all …]
|
/libcore/luni/src/test/java/libcore/javax/xml/transform/sax/ |
D | SAXSourceTest.java | 46 private SAXSource source; field in SAXSourceTest 50 source = new SAXSource(); in setUp() 55 source = new SAXSource(); in constructor() 56 assertNull(source.getInputSource()); in constructor() 57 assertNull(source.getXMLReader()); in constructor() 64 source = new SAXSource(reader, is); in constructor_withXMLReaderAndInputSource() 65 assertEquals(reader, source.getXMLReader()); in constructor_withXMLReaderAndInputSource() 66 assertEquals(is, source.getInputSource()); in constructor_withXMLReaderAndInputSource() 72 source.setInputSource(is); in setInputSource() 73 assertEquals(is, source.getInputSource()); in setInputSource() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/fs/ |
D | UnixCopyFile.java | 127 private static void copyDirectory(UnixPath source, in copyDirectory() argument 179 sfd = open(source, O_RDONLY, 0); in copyDirectory() 182 x.rethrowAsIOException(source); in copyDirectory() 185 source.getFileSystem().copyNonPosixAttributes(sfd, dfd); in copyDirectory() 219 private static void copyFile(UnixPath source, in copyFile() argument 228 fi = open(source, O_RDONLY, 0); in copyFile() 230 x.rethrowAsIOException(source); in copyFile() 253 x.rethrowAsIOException(source, target); in copyFile() 267 source.getFileSystem().copyNonPosixAttributes(fi, fo); in copyFile() 303 private static void copyLink(UnixPath source, in copyLink() argument [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | EventObject.java | 46 protected transient Object source; field in EventObject 54 public EventObject(Object source) { in EventObject() argument 55 if (source == null) in EventObject() 58 this.source = source; in EventObject() 67 return source; in getSource() 76 return getClass().getName() + "[source=" + source + "]"; in toString()
|
D | Scanner.java | 332 private Readable source; field in Scanner 539 private Scanner(Readable source, Pattern pattern) { in Scanner() argument 540 assert source != null : "source should not be null"; in Scanner() 542 this.source = source; in Scanner() 559 public Scanner(Readable source) { in Scanner() argument 560 this(Objects.requireNonNull(source, "source"), WHITESPACE_PATTERN); in Scanner() 571 public Scanner(InputStream source) { in Scanner() argument 572 this(new InputStreamReader(source), WHITESPACE_PATTERN); in Scanner() 586 public Scanner(InputStream source, String charsetName) { in Scanner() argument 587 this(makeReadable(Objects.requireNonNull(source, "source"), toCharset(charsetName)), in Scanner() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | MembershipKeyImpl.java | 45 private final InetAddress source; field in MembershipKeyImpl 58 InetAddress source) in MembershipKeyImpl() argument 63 this.source = source; in MembershipKeyImpl() 77 InetAddress source, in Type4() argument 82 super(ch, group, interf, source); in Type4() 96 int source() { in source() method in MembershipKeyImpl.Type4 112 InetAddress source, in Type6() argument 117 super(ch, group, interf, source); in Type6() 131 byte[] source() { in source() method in MembershipKeyImpl.Type6 167 return source; in sourceAddress() [all …]
|
D | Net.java | 523 static int join4(FileDescriptor fd, int group, int interf, int source) 526 return joinOrDrop4(true, fd, group, interf, source); 532 static void drop4(FileDescriptor fd, int group, int interf, int source) 535 joinOrDrop4(false, fd, group, interf, source); 538 …e static native int joinOrDrop4(boolean join, FileDescriptor fd, int group, int interf, int source) 544 static int block4(FileDescriptor fd, int group, int interf, int source) 547 return blockOrUnblock4(true, fd, group, interf, source); 553 static void unblock4(FileDescriptor fd, int group, int interf, int source) 556 blockOrUnblock4(false, fd, group, interf, source); 560 int interf, int source) [all …]
|
D | PipeImpl.java | 38 private final SourceChannel source; field in PipeImpl 47 source = new SourceChannelImpl(sp, sourcefd); in PipeImpl() 53 public SourceChannel source() { in source() method in PipeImpl 54 return source; in source()
|
/libcore/ojluni/src/test/java/nio/channels/Selector/ |
D | SelectWithConsumer.java | 125 Pipe.SourceChannel source = p.source(); in testReadable() local 126 source.configureBlocking(false); in testReadable() 127 SelectionKey key = source.register(sel, SelectionKey.OP_READ); in testReadable() 145 Pipe.SourceChannel source = p.source(); in testWritable() local 191 Pipe.SourceChannel source = p.source(); in testTwoChannels() local 193 source.configureBlocking(false); in testTwoChannels() 195 SelectionKey key1 = source.register(sel, SelectionKey.OP_READ); in testTwoChannels() 248 Pipe.SourceChannel source = p.source(); in testRepeatedSelect1() local 250 source.configureBlocking(false); in testRepeatedSelect1() 251 SelectionKey key = source.register(sel, SelectionKey.OP_READ); in testRepeatedSelect1() [all …]
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | MatchOpTest.java | 98 …private <T> void assertPredicates(List<T> source, Kind kind, Predicate<T>[] predicates, boolean...… in assertPredicates() argument 101 boolean match = this.<T>kinds().get(kind).apply(predicates[i]).apply(source.stream()); in assertPredicates() 135 final Supplier<Iterator<Integer>> source; in testInfinite() field in MatchOpTest.CycleIterator 138 CycleIterator(Supplier<Iterator<Integer>> source) { in testInfinite() argument 139 this.source = source; in testInfinite() 145 i = source.get(); in testInfinite() 153 i = source.get(); in testInfinite() 159 Supplier<Iterator<Integer>> source = () -> Arrays.asList(1, 2, 3, 4).iterator(); in testInfinite() local 160 … -> StreamSupport.stream(Spliterators.spliteratorUnknownSize(new CycleIterator(source), 0), false); in testInfinite() 183 …private void assertIntPredicates(Supplier<IntStream> source, Kind kind, IntPredicate[] predicates,… in assertIntPredicates() argument [all …]
|
/libcore/ojluni/src/test/java/util/Collection/testlibrary/ |
D | ExtendsAbstractCollection.java | 48 public ExtendsAbstractCollection(Collection<E> source) { in ExtendsAbstractCollection() argument 50 coll.addAll(source); in ExtendsAbstractCollection() 67 Iterator<E> source = coll.iterator(); in iterator() 70 return source.hasNext(); in iterator() 74 return source.next(); in iterator() 78 source.remove(); in iterator()
|
D | ExtendsAbstractSet.java | 49 public ExtendsAbstractSet(Collection<E> source) { in ExtendsAbstractSet() argument 51 addAll(source); in ExtendsAbstractSet() 68 Iterator<E> source = set.iterator(); in iterator() 71 return source.hasNext(); in iterator() 75 return source.next(); in iterator() 79 source.remove(); in iterator()
|
D | ExtendsAbstractList.java | 53 public ExtendsAbstractList(Collection<E> source) { in ExtendsAbstractList() argument 55 addAll(source); in ExtendsAbstractList() 84 Iterator<E> source = list.iterator(); in iterator() 87 return source.hasNext(); in iterator() 91 return source.next(); in iterator() 95 source.remove(); in iterator()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | RuleBasedCollatorTest.java | 35 String source = null; in test_getCollationKeyLjava_lang_String() local 38 CollationKey ck = rbc.getCollationKey(source); in test_getCollationKeyLjava_lang_String() 84 String source = "abc"; in testGetCollationKey() local 85 CollationKey key1 = coll.getCollationKey(source); in testGetCollationKey() 86 assertEquals(source, key1.getSourceString()); in testGetCollationKey() 91 assertTrue(coll.compare(source, source2) > 0); in testGetCollationKey() 104 String source = "cha"; in testGetCollationElementIteratorString() local 105 CollationElementIterator iterator = coll.getCollationElementIterator(source); in testGetCollationElementIteratorString() 110 while (offset != source.length()) { in testGetCollationElementIteratorString() 121 String source = "\u00fcb"; in testGetCollationElementIteratorString() local [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | EventObjectTest.java | 35 Object source = new Object(); in testGetSource() local 36 assertSame(source, new EventObject(source).getSource()); in testGetSource() 46 Object source = new Object(); in testSerializationNullsOutSource() local 47 EventObject eventObject = new EventObject(source); in testSerializationNullsOutSource()
|
/libcore/ojluni/src/main/java/java/util/logging/ |
D | SimpleFormatter.java | 142 String source; in format() local 144 source = record.getSourceClassName(); in format() 146 source += " " + record.getSourceMethodName(); in format() 149 source = record.getLoggerName(); in format() 163 source, in format()
|
/libcore/luni/src/main/java/javax/xml/transform/sax/ |
D | SAXSource.java | 186 public static InputSource sourceToInputSource(Source source) { in sourceToInputSource() argument 188 if (source instanceof SAXSource) { in sourceToInputSource() 189 return ((SAXSource) source).getInputSource(); in sourceToInputSource() 190 } else if (source instanceof StreamSource) { in sourceToInputSource() 191 StreamSource ss = (StreamSource) source; in sourceToInputSource()
|
/libcore/tools/testmapping/ |
D | save_logs.py | 72 def relative_source_name(source): argument 74 return os.path.relpath(source, LOGS_ROOT) 121 def do_copy(source): argument 123 destination = destination_path(flatten_name(relative_source_name(source))) 128 (util.printable_path(source), util.printable_path(destination))) 129 shutil.copyfile(source, destination)
|
/libcore/ojluni/src/main/java/java/nio/file/ |
D | CopyMoveHelper.java | 100 static void copyToForeignTarget(Path source, Path target, in copyToForeignTarget() argument 109 BasicFileAttributes attrs = Files.readAttributes(source, in copyToForeignTarget() 125 try (InputStream in = Files.newInputStream(source)) { in copyToForeignTarget() 154 static void moveToForeignTarget(Path source, Path target, in moveToForeignTarget() argument 157 copyToForeignTarget(source, target, convertMoveToCopyOptions(options)); in moveToForeignTarget() 158 Files.delete(source); in moveToForeignTarget()
|