Commit Graph

12 Commits

Author SHA1 Message Date
Joel Dice
6e7149061c various refinements to network implementation
The main idea is to make DatagramChannel and *SocketChannel behave in
a way that more closely matches the standard, e.g. allow binding
sockets to addresses without necessarily listening on those addresses
and accept null addresses where appropriate.  It also avoids multiple
redundant DNS lookups.

This commit also implements CharBuffer and BindException, and adds the
Readable interface.
2014-03-31 15:22:14 -06:00
Johannes Schindelin
c1ec6020a6 Verify that String#lastIndexOf handles large fromIndex correctly
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-25 15:32:33 -05:00
Johannes Schindelin
359f99c0f7 Add a unit test for regular expressions
We do not really support regular expressions yet, but we do support
trivial patterns including ones with escaped characters. Let's make sure
that that works as advertised.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-21 13:34:33 -05:00
Joel Dice
aa513c2c1d set default file.encoding to UTF-8 in classpath-openjdk.cpp
This default makes more sense than ASCII, which is what it had been.
2013-04-16 19:35:21 -06:00
Joel Dice
e2ff771baa handle basic argument substitution in MessageFormat.format
Thanks to Remi for an initial version of this patch.
2012-08-11 08:58:40 -06:00
Joel Dice
96d5dae06c specify UTF-8 explicitly in Strings.testDecode
This fixes a test failure with the OpenJDK port.
2012-08-04 18:41:44 -06:00
Joel Dice
c63668c1ce fix ArrayIndexOutOfBoundsException when decoding a UTF-8 stream 2012-08-04 16:11:27 -06:00
Joel Dice
b57e734ceb implement Character.forDigit 2011-01-20 09:33:50 -07:00
Joel Dice
250a77dc13 handle empty strings properly in Pattern.split
We were incorrectly returning an empty array when the input was empty,
whereas we ought to return an array containing a single empty string.
When the pattern to match was empty, we went into a loop to create an
infinite list of empty strings, only to crash once we've run out of
memory.  This commit addresses both problems.
2010-09-06 11:16:27 -06:00
Joel Dice
4c14a9ab66 implement enough of java.util.regex to ensure String methods work for trivial regular expressions 2009-08-20 11:14:05 -06:00
Joel Dice
c27aa559e5 comment out use of currently-unsupported regex functionality in Strings test 2009-08-18 14:21:40 -06:00
Joel Dice
7fcbf9d85c fix reading 2-byte UTF-8 constants 2009-08-14 08:52:31 -06:00