History log of /libcore/luni/src/main/java/java/net/URI.java
Revision Date Author Comments
30fac583a89ef577ed74629c41c1bea1ffbee4e8 10-Apr-2014 Calin Juravle <calin@google.com> Don't allow explicit signs in URI port numbers.

Bug: 5239391
Change-Id: I26fb1042d169d545a793e47596f4f8a94dd09530
0b217ad34f025aedbba468e248303bdc8b2e5df0 19-Nov-2013 Narayan Kamath <narayan@google.com> Improve URI.equals performance.

The main improvement is that we're vastly reducing
the amount of garbage this method creates.

Also, get rid of some incorrect checks and add a new
benchmark test case.

Before vs. After:

URI Equals 1540.1 =
URI EqualsWithHeavilyEscapedComponent 11921397.1 ==============================

URI Equals 1337.2 =
URI EqualsWithHeavilyEscapedComponent 588934.3 ==============================

Change-Id: I9ddb87b8267f0ac6a3ac85c2989cc0dd305ef6a1
ecf950e56b55f95a960f151268286576159c6530 27-May-2011 Jesse Wilson <jessewilson@google.com> Relative/absolute and opaque/hierarchical docs for java.net.URI.

Change-Id: I5ec2e1dd10a3c676441caf56838433fffa316a59
http://b/2753295
c68609e723a5daa20888abdb640799d4353fd590 27-May-2011 Jesse Wilson <jessewilson@google.com> Document java.net.URI.

Change-Id: I941ba9cb4a2d48b052c25b7799ac466549df8d53
http://b/2753295
ce257b03a1e5ff6075967e6a84cdb439cb2b01c8 27-May-2011 Jesse Wilson <jessewilson@google.com> Clean Up URI's parsing code.

http://b/2753295

Change-Id: I190ee12c14d1b3b17e2c8cb5ef3868618f1ee124
2d99ef561304174b8ae01a0a68d5b96d5edb9f10 26-May-2011 Jesse Wilson <jessewilson@google.com> Fix URI to behave more like the spec and browsers and less like the RI.

When computing relative paths from URLs like foo.com/a to foo.com/a/b,
this now uses "a/b" as the relative path and not just "b". That was an
RI bug that we were foolishly compatible with.

Change-Id: I6e3f10d84602c08bbf6bd7c7e43c2ba3387e4c3b
http://b/2753295
c5727263001f1eae068f7821063d7bfb2da8e24c 26-May-2011 Jesse Wilson <jessewilson@google.com> Use canonicalizePath in URI.

This needs to add another mode to canonicalizePath to not
discard ".." prefixes from relative paths.

Change-Id: I9e0b86bd1e7ab8e5e71c46f1efcf4aeb218e66b2
http://b/2753295
1c039d71d3879f39e3a75b8788e656f7b4f88f08 05-May-2011 Elliott Hughes <enh@google.com> Add getaddrinfo(2).

This only supports the "node" side of getaddrinfo(2), not the "service" side.
There's also no support for AI_CANONNAME, so we currently return InetAddress[]
rather than anything equivalent to C's linked list of struct addrinfo.

Bug: 3107501
Change-Id: I8cf6baa3027a0fa05ac6e2f8fcc1dd8b576ff8c4
ae394a866dd86df8819b652dfe00b3d2c7ee204c 20-Apr-2011 Elliott Hughes <enh@google.com> Remove "java.net.preferIPv6Addresses", which has been true since Eclair.

Also ensure all javadoc references to RFCs are links.

Change-Id: I58b08a8ead08d6eab018e19ec2cff7d60f2b06e6
56099d23fcb002b164bff8fb7f14d6ec0453509e 09-Feb-2011 Jesse Wilson <jessewilson@google.com> Remove redundant URL encoders and decoders.

http://b/3436051
http://b/2753295

Change-Id: I5836eab395214767efa4a3d8e8002cff72738854
118abc3050371812703e4fabf03f4399d01fb28c 13-Jan-2011 Elliott Hughes <enh@google.com> Kill most users of StringTokenizer.

I've left a handful that actually make some use of it, in classes we
don't care about anyway (XML preferences and the like).

Change-Id: I754262ee600d8a16046b537a6d6258db849db89b
78e3320540c8bdcbefba5ae1222ee18f6679ab33 13-Jan-2011 Elliott Hughes <enh@google.com> Most callers of toLowerCase/toUpperCase should pass Locale.US to avoid problems in Turkey.

Some callers should be replaced with equalsIgnoreCase instead.

The one exception is StreamTokenizer, where the RI uses the default
locale, which is arguably the right thing to do. No-one cares because
that's legacy API, but I've added a test anyway.

I've left HttpCookie and GeneralName for my co-conspirators because the
appropriate resolutions aren't as obvious there...

Bug: 3325637
Change-Id: Ia37a1caaa91b11763ae43e61e445adb45c30f793
5501a3d4b3d7657c183ed5446fe67fa011fbf70b 03-Dec-2010 Elliott Hughes <enh@google.com> Comments/javadoc should be in en_US, not en_CA.

Change-Id: Ie9dde4971e0a6a8dadd14af43d631158fc488cd8
0d93c38cc3c7a5001aece8a18cafc6d1fc7551f3 04-Nov-2010 Elliott Hughes <enh@google.com> Add a public @hide InetAddress.isNumeric.

Some frameworks/base callers want to know whether they can call
getAllByName/getByName without incurring a DNS lookup. Rather than have them
write their own JNI to do the AI_NUMERICHOST getaddrinfo(3) call, let's just
offer them ours.

Why don't I fully expose getaddrinfo(3)? Because it doesn't map to Java API
very well, and no-one needs that yet. So for now, let's take the easy way out.

Also improve some misleading javadoc.

Bug: 3073384
Change-Id: Ia1990313306254598a4e1480cae356f68ceaaf22
3db0d1b07a79c3c871b0aa0929674adae3081b4f 28-Aug-2010 Elliott Hughes <enh@google.com> Remove the accessors hiding our IFileSystem and INetworkSystem.

These accessors aren't buying us anything, are costing us something, and have
encouraged caching of instances in fields all over the place. Lose all that
cruft.

I think we all agree that we want to merge IFileSystem and INetworkSystem at
some point, but I'll do that some other day.

Change-Id: I07696ec9650d0395ec31a71a74300e818a3fed91
c8977f474b30c5f3807398859a6b16687af6fc7b 15-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing various problems with HTTPS proxies thru HTTP.

- reading extra bytes from the server depending on available()
- not sending the port with the proxy request
- returning a read-til-the-end stream instead of a read-0-bytes-stream
on CONNECT requests
- fixing MockWebServer to omit the unnecessary \r\n after
the response body
- tests no longer mask the issue by unambiguously reading characters.
Trailing newlines aren't discarded!
- New tests when content-length and content disagree. The RI fails
the test when the transfer-encoding is not chunked.

Change-Id: I888569844d323bc770cd5bb95ac71c740dd5e720
753dcd862b31e85766225590d90ba0b9f481176f 02-Jun-2010 Elliott Hughes <enh@google.com> Refactor some of the OSNetworkSystem stuff to more appropriate homes.

Also rewrite PlainDatagramSocketImpl.peek in terms of existing primitives
rather than requiring its own. I still don't see how it can get called, but
at least now it doesn't require its own native code.

Bug: 2686833

Change-Id: I0453add66dab4c7095ee2a3f51a49efbd1205598
6e5d43fafa5d4fa75cefa8e552c6c1c60a5d3534 27-May-2010 Jesse Wilson <jessewilson@google.com> Fixing many test failures with the new cookie implementation.

Highlights:
- don't send cookies with nonmatching ports or secure attributes
- default the port when "port" with no value is received
- make CookieStore threadsafe
- make CookieStore retain only host in URIs
- fix concurrent mod bug when removing expired cookies
- support null URIs in the CookieStore (unfortuantely)
- parse more date formats; even ridiculous date formats
- match ".google.com" to "google".
- support single quotes in attribute values
- exploit @hide to add a new API, URI.getEffectivePort()

Alongside this change I've fixed several test problems in dalvik-prebuild's
copy of both the Harmony tests and the jtreg tests. Most of the fixes involve
commenting out bogus assertions.

Change-Id: I71f09110b48d8ca4f3538fd21c8dde7ffdd35a6a
80a7fbab52b96c9fd47c72f8987d1babe2cd001d 22-May-2010 Elliott Hughes <enh@google.com> Remove more localized exception messages.

I also accidentally mixed two unrelated changes in here: replacing "".equals
and equals("") with String.isEmpty, and removing some dead code in
org.apache.harmony.luni.util.Util.

Change-Id: I0aaad43290b083085b3095b624caf096de487223
f33eae7e84eb6d3b0f4e86b59605bb3de73009f3 13-May-2010 Elliott Hughes <enh@google.com> Remove all trailing whitespace from the dalvik team-maintained parts of libcore.

Gentlemen, you may now set your editors to "strip trailing whitespace"...

Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
38607710cdc82cb1a0e81c2fc5c78278b435e4fc 23-Apr-2010 Jesse Wilson <jessewilson@google.com> Remove unnecessary IPv6 and IPv4 parsing from URI.

Cleanup URI and InetAddress exception localization.
733642b27de051f9fabcd689d160282971a30cef 22-Apr-2010 Jesse Wilson <jessewilson@google.com> Fixing java.lang.NullPointerException at java.net.URI$Helper.isValidDomainName

See http://b/issue?id=2604061
4fefecee9d4a5d2a4510f516b4015607b19e8d09 13-Nov-2009 Jean-Baptiste Queru <jbq@google.com> eclair snapshot
a389b4a499f40379b0b204d7ba1c2057663d95c0 11-Aug-2009 Jesse Wilson <jessewilson@google.com> Update Luni to Harmony r802921.

Notable changes:
- replaced StringBuffer with StringBuilder in several places
- fixed a problem with BufferedInputStream's newline characters (EBCDIC)
- cleanup Timer's finalizer helper object
- new cache for the canonical path of a file
- fixed concurrency issue with ArrayList
- floating point parsing now trims length for very small numbers
- encoding specified "UTF-8" when converting some byte[]s to strings (JarURLConnection, Util, OSFileSystem)
- Harmony now implements floor and ceil in Java. We continue to use native code.
f5597e626ecf7949d249dea08c1a2964d890ec11 25-Jul-2009 Jesse Wilson <jessewilson@google.com> Integrate luni module (but not tests) to Harmony r772995.

Notable changes
- Stripped "@since Android 1.0" from many files. Most files
are now 100% the same in Dalvik and Harmony.
- AbstractStringBuilder.reverse() supports surrogates
- AbstractStringBuilder shares less to waste less memory
- Bitset optimized
- BufferedInputStream changed to support unsynchronized close()
- BufferedOutputStream does flushInternal
- BufferedReader supports EBCDIC NEL
- Collections.synchronizedList().indexOf() does a copy for more concurrency
- Classes in nio module changed: DatagramChannelImpl, SocketChannelImpl
and ServerSocketChannelImpl (these depend on internal APIs changed in
this update)
- DataInputStream/DataOutputStream now use a small buffer to limit the
number of times the underlying stream is accessed
- Date now has a minutes offset, more efficient toString()
- ExposedByteArrayInputStream: new internal class
- DeleteOnExit moved to top-level class
- FileDescriptor.isValid() now non-native
- Float, Double lessThan optimized (fix for compare(-0.0F, 0.0F) still pending)
- FileURLConnection now guesses content types from streams
- HashMap iterator changes
- Hashtable iterator changes
- INetworkSystem
- removes bind2(), createMulticastSocket, sendStream(),
- renames createSocket to createStreamSocket
- JarURLConnection rewritten
- LinkedHashMap: new iterator
- Locale, Currency, TimeZone: now use ICU in Harmony, plain Java in Dalvik
- ObjectInputStream: Accessor objects in Harmony, direct native in Dalvik
- ProxyClassFile - many changes
- String - optimized ascii for toLowerCase, toUpperCase, compare
- Timer - rewritten
- TreeMap - rewritten
- URLClassLoader - new
- URLConnection - new guessContentTypeFromStream(), uses org.apache.harmony.awt.www.content
to lookup content type handlers
adc854b798c1cfe3bfd4c27d68d5cee38ca617da 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1c0fed63c71ddb230f3b304aac12caffbedf2f21 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
dd828f42a5c83b4270d4fbf6fce2da1878f1e84a 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
fdb2704414a9ed92394ada0d1395e4db86889465 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution