• Home
  • History
  • Annotate
  • only in /libcore/ojluni/src/main/java/sun/net/www/protocol/
History log of /libcore/ojluni/src/main/java/sun/net/www/protocol/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e31b37859051d3902e06e4ba384995df7188917f 02-Dec-2017 Hans Boehm <hboehm@google.com> Add reachabilityFence, ReachabilitySensitive

Add the @ReachabilitySensitive annotation itself, and use it
in libcore itself, where needed.

Import OpenJDK9+181's reachabilityFence, so that it can be used in
preference to the annotation where it makes sense. Java 9's
stopgap reachabilityFence implementation doesn't work for us,
so replace it with a different stopgap.

The libcore changes correct many situations in which finalizers
could previously run prematurely according to the JLS. Or they
would correct them if we had a real implementation for
@ReachabilitySensitive.

The ZipFile constructor could close the file before notifying the
CloseGuard that it was open.

Aside from the ZipFile change, there should be no functional
change, yet.

Note that the ExemptionMechanism.java fix is the same as upstream.

Conspicuously missing:

- Any code, e.g. in ART or D8, that actually looks for the annotation.
- Uses in frameworks code, where it's probably most critical.

Bug: 63934467
Bug: 70906684
Bug: 28342794
Test: Build & boot AOSP
Change-Id: I652f0625b39b2ba9ac901d4f63e6aa6cf3b74af5
ar/URLJarFile.java
545619b8f363fbf58881e08f6a0a1008361eabf3 11-May-2017 Tobias Thierer <tobiast@google.com> Update sun.net to OpenJDK8u121-b13.

Before this CL, that package was based on OpenJDK7u40. This CL
integrates the upstream changes up to 8u121-b13.

The following changes are noteworthy;

Bug fixes:
JarURLConnection: minor fix (no test added)
FtpURLConnection: fix for NPE when attempting to log in
with null password. A regression test is added.

Logic changes or reimplementations:
DefaultProxySelector: Changes around NoProxy hosts logic
- represent nphosts as Pattern rather than RegexpPool
- extract utility methods relating to that Pattern
- NoProxy configuration for SOCKS (defaults to no proxy for localhost addresses)
- No test was added for the SOCKS changes, since SOCKS proxy
logic overall is not currently covered by tests (bug 35867657).

IPAddressUtil: Reimplementation of textToNumericFormatV4()
- An Android change to the old version of that method was
replaced with a new change on top of the new implementation.
- The test that was added passes both before and after this CL.

New upstream code that is not used on Android and commented out:
URLUtil: Android doesn't support SecurityMAnager, so Permissions code
is unused.

Bug: 38027507
Test: CtsLibcoreTestCases

(cherry picked from commit a6d00d975886ca644d3e29c217cf4e8e0cf3b975)

Change-Id: Iba69172b5e1912680c4c1a6be68070863dd35688
tp/FtpURLConnection.java
ar/Handler.java
ar/JarFileFactory.java
ar/JarURLConnection.java
f0d5c9c93df37348702d5a147877e8c60c408ad0 11-May-2017 Tobias Thierer <tobiast@google.com> Add missing / improve existing change markers in sun.net.

Files in this package are currently based on an OpenJDK 7u40 upstream.
This CL ensures proper documentation for Android changes in this
package. The work to update this package to a later upstream is left
to a follow-up CL.

Bug: 38027507
Test: Treehugger build succeeds.

(cherry picked from commit b8ecbc29b0dbd2f0e44bd86b10345f999935aaf7)

Change-Id: I08596e15316581fd65e17b6ea0421b108a8f4388
tp/FtpURLConnection.java
7835c85a226f5298ee661fdfff1ac009e0196394 24-Apr-2017 Przemyslaw Szczepaniak <pszczepaniak@google.com> Revert "Reject ftp URLConnection containing /r/n in user info."

This reverts commit 1f324ab7325533dddde93d6557850f85ea4b63fc.

It's being replaced by working openjdk based changeset.

Test: make
Change-Id: I192a19133baf654b5f8d2280afb00eb567cba16a
tp/FtpURLConnection.java
1f324ab7325533dddde93d6557850f85ea4b63fc 27-Mar-2017 Przemyslaw Szczepaniak <pszczepaniak@google.com> Reject ftp URLConnection containing /r/n in user info.

Test: In change 8a4a28d8710a137720fe9044b1c158bde1bee372
Bug: 35784677
Change-Id: Ie5084a06918b1767b3cd1bec49667b17ddc97aeb
tp/FtpURLConnection.java
05b4a62c18b188328d483b7d3eeffa2199d7edb6 30-Jan-2017 Tobias Thierer <tobiast@google.com> Drop dead code from sun.net.www

This covers:
- HeaderParser.java
- protocol.jar.URLJarFileCallback and URLJarFile.setCallBack()

Bug: 29569605
Test: Nothing at this CL; "make droid cts checkbuild"
and libcore tests at follow-up CL built on top of this one
that will get merged at the same time.

Change-Id: Id8e065d80d010a96a93ec3cb562da6ff586cc02e
ar/URLJarFile.java
ar/URLJarFileCallBack.java
62db9f9d1df5b158f80da1366225e7de5039d803 28-Nov-2016 Tobias Thierer <tobiast@google.com> Drop support for proxying FTP over HTTP

This feature accidentally launched in Android N; it relied on
9k lines of untested code in the packages
sun.net.www.{http,protocol.http} which are dropped by this CL.

Tests for FtpURLConnection that depend on external/mockftpserver
were added; the tests originally derive from draft CL
http://r.android.com/143327 but those have been refactored.
Additional tests were added to cover specifically FTP proxying
over HTTP, which is no longer supported after this CL.

Bug: https://code.google.com/p/android/issues/detail?id=160725
Bug: 29574477
Test: libcore.java.net.FtpURLConnectionTest
Test: cts-tradefed run cts -m CtsLibcoreTestCases -a arm64-v8a
Change-Id: I8a2aab36632e162e4616a4f3c61e833f63a97b88
tp/FtpURLConnection.java
tp/Handler.java
ttp/AuthCache.java
ttp/AuthCacheImpl.java
ttp/AuthCacheValue.java
ttp/AuthScheme.java
ttp/AuthenticationHeader.java
ttp/AuthenticationInfo.java
ttp/BasicAuthentication.java
ttp/DigestAuthentication.java
ttp/Handler.java
ttp/HttpAuthenticator.java
ttp/HttpCallerInfo.java
ttp/HttpURLConnection.java
ttp/NTLMAuthenticationProxy.java
ttp/NegotiateAuthentication.java
ttp/Negotiator.java
49965c1dc9da104344f4893a05e45795a5740d20 30-Jun-2016 Ganesh Mahendran <opensource.ganesh@gmail.com> remove x attribute of java file

java file does not need x attribute. This patch removes it.

Change-Id: I2a7170d99f4bee7a7b819621c84dd197ded37fa2
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
ile/FileURLConnection.java
ile/Handler.java
tp/FtpURLConnection.java
tp/Handler.java
ttp/AuthCache.java
ttp/AuthCacheImpl.java
ttp/AuthCacheValue.java
ttp/AuthScheme.java
ttp/AuthenticationHeader.java
ttp/AuthenticationInfo.java
ttp/BasicAuthentication.java
ttp/DigestAuthentication.java
ttp/Handler.java
ttp/HttpAuthenticator.java
ttp/HttpCallerInfo.java
ttp/HttpURLConnection.java
ttp/NTLMAuthenticationProxy.java
ttp/NegotiateAuthentication.java
ttp/Negotiator.java
ar/Handler.java
ar/JarFileFactory.java
ar/JarURLConnection.java
ar/URLJarFile.java
ar/URLJarFileCallBack.java
52fa2d5d26c488d56aa68bfbb398a2cac4653199 22-Jun-2016 Sergio Giro <sgiro@google.com> ojluni: delete dead code in sun.net.www

These classes are unused.

Bug: 29569605

Change-Id: I9131cf7f1e2e4c24236e964429c0df0a7faea758
opher/GopherClient.java
opher/Handler.java
ailto/Handler.java
ailto/MailToURLConnection.java
etdoc/Handler.java
de6494eb633564ddaa1df30ded0cfc1b5ffc83d4 15-Jun-2016 Sergio Giro <sgiro@google.com> ojluni: delete SunJSSE provider

And unused classes depending on it.

(cherry picked from commit 423bdf682bab7276e17ae2d55aa0877b0f4445ff)

Bug: 29352544

Change-Id: Ib2287f70773348ddc3ed9f20fa50f2505b4f30d7
ttps/AbstractDelegateHttpsURLConnection.java
ttps/DelegateHttpsURLConnection.java
ttps/Handler.java
ttps/HttpsClient.java
ttps/HttpsURLConnectionImpl.java
e6bac4bf9c85c2454ce22c91da6c654552c268e0 20-May-2016 Shubham Ajmera <shubhamajmera@google.com> Add OpenJDK 8 java.nio.file package

Based on openJdk 8u60 except java.nio.FileTime. JDK8 FileTime is
dependent on java.time package which is yet to be added, therefore, it
is taken from openJdk 7u40.

Bug: 27331465
Change-Id: If6969ad38edb1e160f2918bb40c94579a43f0346
ar/URLJarFile.java
e0c43b0b6ee87b14972769634cac75b49bb8c5de 27-Jan-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Remove java.nio.file package

This package has no test coverage, and we don't
know if it was ported properly. This package will
be added in future, with a test suite.

Bug: 26786186
Bug: 26812611
Change-Id: I30a35f57be38fbf2b760e7d821bd2e233d2eaecb
ar/URLJarFile.java
2c87ad3a45cecf9e344487cad1abfdebe79f2c7c 21-Dec-2015 Narayan Kamath <narayan@google.com> Update file headers.

Change-Id: I8149f41585768a1a4b72ab7bb4a1452376c05cc2
tp/FtpURLConnection.java
ttp/HttpURLConnection.java
ttps/HttpsClient.java
cc42201b8d47d4c03a69dcf6df4e58c1a11d32e5 21-Dec-2015 Paul Duffin <paulduffin@google.com> Deleting unused or broken files

The tests removed from luni/src/test are testing files that no
longer exist. It's possible that they provided some coverage of
the code which is not provided for the OpenJDK code.

The classes removed from ojluni/src/main are the ones not
explicitly mentioned in the openjdk_java_files.mk.

Change-Id: Id52d65d9b1f06e1a6e7afbd93336c7d12e0c3083
ileURLConnection.java
ttp/logging/HttpLogFormatter.java
ttp/ntlm/NTLMAuthentication.java
ttp/ntlm/NTLMAuthenticationCallback.java
ttp/spnego/NegotiateCallbackHandler.java
ttp/spnego/NegotiatorImpl.java
ttps/DefaultHostnameVerifier.java
5df3cb8454198b6c2a8256fc54283206b9813d08 09-Dec-2015 Narayan Kamath <narayan@google.com> Apply NetworkSecurityPolicies to FtpURLConnection / SocketHandler.

Based on change 2f4d25190a7d2cc8328a202417ca9077a02e6d9a.

bug: 25923638
Change-Id: I9fbb8b418a0f9bf4c2d7957a554e49b694bdf105
tp/FtpURLConnection.java
f7ab2bc37debba91864bfec6572a3e7bbe994c58 06-May-2015 Piotr Jastrzebski <haaawk@google.com> Use OpenJdk implementation of java.net.*

- Add FileURLConnection.
- NetworkUtilities : Update field names in JNI.
- Suppress a few libcore tests that rely on internal implementation
details.
- Remove code that loads the net library (not needed on android).
- DatagramSocket : Add setNetworkInterface method.
- HttpCookie : make parse & field public
- Inet4Address / Inet6Address : Add getAddressInternal.
- InetAddress : Add methods required by frameworks/base, particularly
those required to deal with net-ids and scope ids.
- URI : Add UriCodec static members for AUTHORITY_ENCODER and friends.
- URL : Add toUriLenient
- URLStreamHandler : Add a toExternalForm variant that optionally
escapes illegal chars.
- Inet4AddressImpl.c : Unconditionally define HAS_GLIBC_GETHOSTBY_R

Change-Id: Ic51f863941f5d954ed6cf86309cc610e711d54bd
ileURLConnection.java
ttp/HttpURLConnection.java
8b40ca90ca76b328416ad578eda2cc3b40798f7e 24-Feb-2015 Piotr Jastrzebski <haaawk@google.com> Use OpenJdk implementation of javax.net, javax.net.ssl.

Includes :
- javax.security.auth
- javax.security.auth.callback
- javax.security.auth.login
- javax.security.auth.x500
- javax.security.cert

Replace the default hostname verifier with one that does something
useful.

Change-Id: Ie2f4de4f9c024b294f55712e866b06ce59de5f6d
ttps/HttpsClient.java
51b1b6997fd3f980076b8081f7f1165ccc2a4008 16-Feb-2015 Piotr Jastrzebski <haaawk@google.com> Initial import of OpenJdk files.

Create new libcore/ojluni directory with src/main/java and
src/main/native subdirectiories.

Build ojluni into core-oj jar.

Use openjdk classes from java.awt.font package.

Copy all files from jdk/src/share/classes and jdk/src/solaris/classes
directories in openjdk into libcore/ojluni/src/main/java.

Copy following native files from openjdk to
libcore/ojluni/src/main/native:
jdk/src/solaris/native/java/io/canonicalize_md.c
build/linux-amd64/include/classfile_constants.h
jdk/src/share/native/java/net/DatagramPacket.c
jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c
jdk/src/share/native/java/lang/Double.c
jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h
jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c
jdk/src/solaris/native/java/io/FileDescriptor_md.c
jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c
jdk/src/share/native/java/io/FileInputStream.c
jdk/src/solaris/native/sun/nio/ch/FileKey.c
jdk/src/solaris/native/java/io/FileOutputStream_md.c
jdk/src/solaris/native/java/io/FileSystem_md.c
jdk/src/share/native/java/lang/Float.c
jdk/src/share/native/java/net/Inet4Address.c
jdk/src/solaris/native/java/net/Inet4AddressImpl.c
jdk/src/share/native/java/net/Inet6Address.c
jdk/src/solaris/native/java/net/Inet6AddressImpl.c
jdk/src/share/native/java/net/InetAddress.c
jdk/src/solaris/native/java/net/InetAddressImplFactory.c
jdk/src/share/native/java/io/io_util.c
jdk/src/solaris/native/sun/nio/ch/IOUtil.c
jdk/src/share/native/java/io/io_util.h
jdk/src/solaris/native/java/io/io_util_md.c
jdk/src/solaris/native/java/io/io_util_md.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/java_io_FileDescriptor.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileInputStream.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileOutputStream.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileSystem.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_ObjectStreamClass.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_UnixFileSystem.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Double.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Float.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Integer.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Long.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Runtime.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Shutdown.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_StrictMath.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_String.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_System.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Thread.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Throwable.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_DatagramPacket.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet4Address.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet4AddressImpl.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet6Address.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet6AddressImpl.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_InetAddress.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_InetAddressImplFactory.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_NetworkInterface.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_PlainDatagramSocketImpl.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_PlainSocketImpl.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketInputStream.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketOptions.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketOutputStream.h
jdk/src/share/native/java/lang/java_props.h
jdk/src/solaris/native/java/lang/java_props_md.c
jdk/src/share/native/java/util/zip/Adler32.c as java_util_zip_Adler32.c
jdk/src/share/native/java/util/zip/CRC32.c as java_util_zip_CRC32.c
build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_CRC32.h
jdk/src/share/native/java/util/zip/Deflater.c as java_util_zip_Deflater.c
build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_Deflater.h
jdk/src/share/native/java/util/zip/Inflater.c as java_util_zip_Inflater.c
build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_Inflater.h
jdk/src/share/native/java/util/zip/ZipFile.c as java_util_zip_ZipFile.c
build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_ZipFile.h
jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h
jdk/src/share/native/common/jlong.h
jdk/src/solaris/native/common/jlong_md.h
jdk/src/share/native/common/jni_util.c
jdk/src/share/native/common/jni_util.h
jdk/src/solaris/native/common/jni_util_md.c
jdk/src/share/javavm/export/jvm.h
jdk/src/solaris/javavm/export/jvm_md.h
jdk/src/solaris/native/java/net/linux_close.c
jdk/src/share/native/sun/misc/NativeSignalHandler.c
jdk/src/solaris/native/sun/nio/ch/NativeThread.c
jdk/src/share/native/java/net/net_util.c
jdk/src/share/native/java/net/net_util.h
jdk/src/solaris/native/java/net/net_util_md.c
jdk/src/solaris/native/java/net/net_util_md.h
jdk/src/solaris/native/java/net/NetworkInterface.c
jdk/src/share/native/sun/nio/ch/nio.h
jdk/src/solaris/native/sun/nio/ch/nio_util.h
jdk/src/share/native/java/io/ObjectStreamClass.c
jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
jdk/src/solaris/native/java/net/PlainSocketImpl.c
jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c
jdk/src/share/native/java/lang/Runtime.c
jdk/src/share/native/java/lang/Shutdown.c
jdk/src/share/native/sun/misc/Signal.c
jdk/src/solaris/native/java/net/SocketInputStream.c
jdk/src/solaris/native/java/net/SocketOutputStream.c
jdk/src/share/native/java/lang/StrictMath.c
jdk/src/share/native/java/lang/String.c
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/sun_misc_NativeSignalHandler.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/sun_misc_Signal.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/sun_net_spi_DefaultProxySelector.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileChannelImpl.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileDispatcherImpl.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileKey.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_IOStatus.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_IOUtil.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_NativeThread.h
jdk/src/share/native/java/lang/System.c
jdk/src/share/native/java/lang/Thread.c
jdk/src/share/native/java/lang/Throwable.c
jdk/src/solaris/native/java/io/UnixFileSystem_md.c
jdk/src/solaris/native/java/lang/UNIXProcess_md.c
jdk/src/share/native/java/util/zip/zip_util.c
jdk/src/share/native/java/util/zip/zip_util.h

Change-Id: Ib237df4e1b7b5b4d9f12e74d189e6ec9eed3c31d
ile/FileURLConnection.java
ile/Handler.java
tp/FtpURLConnection.java
tp/Handler.java
opher/GopherClient.java
opher/Handler.java
ttp/AuthCache.java
ttp/AuthCacheImpl.java
ttp/AuthCacheValue.java
ttp/AuthScheme.java
ttp/AuthenticationHeader.java
ttp/AuthenticationInfo.java
ttp/BasicAuthentication.java
ttp/DigestAuthentication.java
ttp/Handler.java
ttp/HttpAuthenticator.java
ttp/HttpCallerInfo.java
ttp/HttpURLConnection.java
ttp/NTLMAuthenticationProxy.java
ttp/NegotiateAuthentication.java
ttp/Negotiator.java
ttp/logging/HttpLogFormatter.java
ttp/ntlm/NTLMAuthentication.java
ttp/ntlm/NTLMAuthenticationCallback.java
ttp/spnego/NegotiateCallbackHandler.java
ttp/spnego/NegotiatorImpl.java
ttps/AbstractDelegateHttpsURLConnection.java
ttps/DefaultHostnameVerifier.java
ttps/DelegateHttpsURLConnection.java
ttps/Handler.java
ttps/HttpsClient.java
ttps/HttpsURLConnectionImpl.java
ar/Handler.java
ar/JarFileFactory.java
ar/JarURLConnection.java
ar/URLJarFile.java
ar/URLJarFileCallBack.java
ailto/Handler.java
ailto/MailToURLConnection.java
etdoc/Handler.java