Re: hg: jdk7/tl/jdk: 6907177: Update jdk tests to remove unncessary -source and -target options

2009-12-04 Thread Andrew John Hughes
2009/12/4  :
> Changeset: 1755493c5774
> Author:    darcy
> Date:      2009-12-03 18:19 -0800
> URL:       http://hg.openjdk.java.net/jdk7/tl/jdk/rev/1755493c5774
>
> 6907177: Update jdk tests to remove unncessary -source and -target options
> Reviewed-by: ohair
>
> ! test/demo/jvmti/hprof/CpuOldTest.java
> ! test/demo/jvmti/hprof/CpuSamplesTest.java
> ! test/demo/jvmti/hprof/CpuTimesDefineClassTest.java
> ! test/demo/jvmti/hprof/CpuTimesTest.java
> ! test/demo/jvmti/hprof/HeapAllTest.java
> ! test/demo/jvmti/hprof/HeapBinaryFormatTest.java
> ! test/demo/jvmti/hprof/HeapDumpTest.java
> ! test/demo/jvmti/hprof/HeapSitesTest.java
> ! test/demo/jvmti/hprof/OptionsTest.java
> ! test/java/io/Serializable/enum/array/Test.java
> ! test/java/io/Serializable/enum/badResolve/Write.java
> ! test/java/io/Serializable/enum/basic/Test.java
> ! test/java/io/Serializable/enum/classObject/Test.java
> ! test/java/io/Serializable/enum/constantSubclasses/Write.java
> ! test/java/io/Serializable/enum/ignoreSerializationFields/Test.java
> ! test/java/io/Serializable/enum/ignoreSerializationMethods/Test.java
> ! test/java/io/Serializable/enum/mismatchedTypecode/Test.java
> ! test/java/io/Serializable/enum/missingConstant/Write.java
> ! test/java/io/Serializable/enum/unshared/Test.java
> ! test/java/lang/Boolean/MakeBooleanComparable.java
> ! test/java/lang/Class/Cast.java
> ! test/java/lang/Class/IsEnum.java
> ! test/java/lang/Class/asSubclass/BasicUnit.java
> ! test/java/lang/ClassLoader/Assert.sh
> ! test/java/lang/Integer/BitTwiddle.java
> ! test/java/lang/Long/BitTwiddle.java
> ! test/java/lang/Math/Atan2Tests.java
> ! test/java/lang/Math/IeeeRecommendedTests.java
> ! test/java/lang/Math/PowTests.java
> ! test/java/lang/Math/TanTests.java
> ! test/java/lang/Runtime/exec/WinCommand.java
> ! test/java/lang/Thread/GenerifyStackTraces.java
> ! test/java/lang/Thread/UncaughtExceptions.sh
> ! test/java/lang/annotation/UnitTest.java
> ! test/java/lang/annotation/package-info.java
> ! test/java/lang/management/CompositeData/MemoryNotifInfoCompositeData.java
> ! test/java/lang/management/CompositeData/ThreadInfoCompositeData.java
> ! test/java/lang/management/ManagementFactory/MXBeanProxyTest.java
> ! test/java/lang/management/ManagementFactory/PlatformMBeanServerTest.java
> ! test/java/lang/management/ManagementFactory/ProxyExceptions.java
> ! test/java/lang/management/ManagementFactory/ProxyTypeMapping.java
> ! test/java/lang/management/ManagementFactory/ValidateOpenTypes.java
> ! test/java/lang/management/RuntimeMXBean/GetSystemProperties.java
> ! test/java/lang/management/RuntimeMXBean/TestInputArgument.sh
> ! test/java/lang/reflect/Constructor/GenericStringTest.java
> ! test/java/lang/reflect/Field/GenericStringTest.java
> ! test/java/lang/reflect/Generics/StringsAndBounds.java
> ! test/java/lang/reflect/Generics/TestC1.java
> ! test/java/lang/reflect/Generics/TestC2.java
> ! test/java/lang/reflect/Generics/TestN1.java
> ! test/java/lang/reflect/Generics/exceptionCauseTest.java
> ! test/java/lang/reflect/Generics/getAnnotationTest.java
> ! test/java/lang/reflect/Method/Equals.java
> ! test/java/lang/reflect/Method/GenericStringTest.java
> ! test/java/math/BigDecimal/DivideTests.java
> ! test/java/math/BigDecimal/IntegralDivisionTests.java
> ! test/java/math/BigDecimal/PowTests.java
> ! test/java/math/BigDecimal/ToPlainStringTests.java
> ! test/java/math/BigDecimal/ZeroScalingTests.java
> ! test/java/math/RoundingMode/RoundingModeTests.java
> ! test/java/net/ProxySelector/ProxyTest.java
> ! test/java/net/URL/PerConnectionProxy.java
> ! test/java/security/cert/PKIXBuilderParameters/InvalidParameters.java
> ! test/java/security/cert/PKIXParameters/InvalidParameters.java
> ! test/java/util/AbstractList/CheckForComodification.java
> ! test/java/util/Collections/AddAll.java
> ! test/java/util/Collections/Disjoint.java
> ! test/java/util/Collections/Frequency.java
> ! test/java/util/EnumMap/EnumMapBash.java
> ! test/java/util/EnumSet/AllOf.java
> ! test/java/util/EnumSet/ComplementOf.java
> ! test/java/util/EnumSet/EnumSetBash.java
> ! test/java/util/EnumSet/JumboRange.java
> ! test/java/util/EnumSet/Range.java
> ! test/java/util/Formattable/StockName.java
> ! test/java/util/IdentityHashMap/ToString.java
> ! test/java/util/Locale/Bug4175998Test.java
> ! test/java/util/UUID/UUIDTest.java
> ! test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java
> ! 
> test/java/util/concurrent/BlockingQueue/MultipleProducersSingleConsumerLoops.java
> ! test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java
> ! 
> test/java/util/concurrent/BlockingQueue/SingleProducerMultipleConsumerLoops.java
> ! test/java/util/concurrent/ConcurrentHashMap/MapCheck.java
> ! test/java/util/concurrent/ConcurrentHashMap/MapLoops.java
> ! test/java/util/concurrent/Exchanger/ExchangeLoops.java
> ! 
> test/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java
> ! test/java/util/concurrent/FutureTask/CancelledFutur

Re: hg: jdk7/tl/jdk: 6907177: Update jdk tests to remove unncessary -source and -target options

2009-12-04 Thread Jonathan Gibbons

Andrew John Hughes wrote:

2009/12/4  :
  

Changeset: 1755493c5774
Author:darcy
Date:  2009-12-03 18:19 -0800
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/1755493c5774

6907177: Update jdk tests to remove unncessary -source and -target options
Reviewed-by: ohair

! test/demo/jvmti/hprof/CpuOldTest.java
! test/demo/jvmti/hprof/CpuSamplesTest.java
! test/demo/jvmti/hprof/CpuTimesDefineClassTest.java
! test/demo/jvmti/hprof/CpuTimesTest.java
! test/demo/jvmti/hprof/HeapAllTest.java
! test/demo/jvmti/hprof/HeapBinaryFormatTest.java
! test/demo/jvmti/hprof/HeapDumpTest.java
! test/demo/jvmti/hprof/HeapSitesTest.java
! test/demo/jvmti/hprof/OptionsTest.java
! test/java/io/Serializable/enum/array/Test.java
! test/java/io/Serializable/enum/badResolve/Write.java
! test/java/io/Serializable/enum/basic/Test.java
! test/java/io/Serializable/enum/classObject/Test.java
! test/java/io/Serializable/enum/constantSubclasses/Write.java
! test/java/io/Serializable/enum/ignoreSerializationFields/Test.java
! test/java/io/Serializable/enum/ignoreSerializationMethods/Test.java
! test/java/io/Serializable/enum/mismatchedTypecode/Test.java
! test/java/io/Serializable/enum/missingConstant/Write.java
! test/java/io/Serializable/enum/unshared/Test.java
! test/java/lang/Boolean/MakeBooleanComparable.java
! test/java/lang/Class/Cast.java
! test/java/lang/Class/IsEnum.java
! test/java/lang/Class/asSubclass/BasicUnit.java
! test/java/lang/ClassLoader/Assert.sh
! test/java/lang/Integer/BitTwiddle.java
! test/java/lang/Long/BitTwiddle.java
! test/java/lang/Math/Atan2Tests.java
! test/java/lang/Math/IeeeRecommendedTests.java
! test/java/lang/Math/PowTests.java
! test/java/lang/Math/TanTests.java
! test/java/lang/Runtime/exec/WinCommand.java
! test/java/lang/Thread/GenerifyStackTraces.java
! test/java/lang/Thread/UncaughtExceptions.sh
! test/java/lang/annotation/UnitTest.java
! test/java/lang/annotation/package-info.java
! test/java/lang/management/CompositeData/MemoryNotifInfoCompositeData.java
! test/java/lang/management/CompositeData/ThreadInfoCompositeData.java
! test/java/lang/management/ManagementFactory/MXBeanProxyTest.java
! test/java/lang/management/ManagementFactory/PlatformMBeanServerTest.java
! test/java/lang/management/ManagementFactory/ProxyExceptions.java
! test/java/lang/management/ManagementFactory/ProxyTypeMapping.java
! test/java/lang/management/ManagementFactory/ValidateOpenTypes.java
! test/java/lang/management/RuntimeMXBean/GetSystemProperties.java
! test/java/lang/management/RuntimeMXBean/TestInputArgument.sh
! test/java/lang/reflect/Constructor/GenericStringTest.java
! test/java/lang/reflect/Field/GenericStringTest.java
! test/java/lang/reflect/Generics/StringsAndBounds.java
! test/java/lang/reflect/Generics/TestC1.java
! test/java/lang/reflect/Generics/TestC2.java
! test/java/lang/reflect/Generics/TestN1.java
! test/java/lang/reflect/Generics/exceptionCauseTest.java
! test/java/lang/reflect/Generics/getAnnotationTest.java
! test/java/lang/reflect/Method/Equals.java
! test/java/lang/reflect/Method/GenericStringTest.java
! test/java/math/BigDecimal/DivideTests.java
! test/java/math/BigDecimal/IntegralDivisionTests.java
! test/java/math/BigDecimal/PowTests.java
! test/java/math/BigDecimal/ToPlainStringTests.java
! test/java/math/BigDecimal/ZeroScalingTests.java
! test/java/math/RoundingMode/RoundingModeTests.java
! test/java/net/ProxySelector/ProxyTest.java
! test/java/net/URL/PerConnectionProxy.java
! test/java/security/cert/PKIXBuilderParameters/InvalidParameters.java
! test/java/security/cert/PKIXParameters/InvalidParameters.java
! test/java/util/AbstractList/CheckForComodification.java
! test/java/util/Collections/AddAll.java
! test/java/util/Collections/Disjoint.java
! test/java/util/Collections/Frequency.java
! test/java/util/EnumMap/EnumMapBash.java
! test/java/util/EnumSet/AllOf.java
! test/java/util/EnumSet/ComplementOf.java
! test/java/util/EnumSet/EnumSetBash.java
! test/java/util/EnumSet/JumboRange.java
! test/java/util/EnumSet/Range.java
! test/java/util/Formattable/StockName.java
! test/java/util/IdentityHashMap/ToString.java
! test/java/util/Locale/Bug4175998Test.java
! test/java/util/UUID/UUIDTest.java
! test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java
! 
test/java/util/concurrent/BlockingQueue/MultipleProducersSingleConsumerLoops.java
! test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java
! 
test/java/util/concurrent/BlockingQueue/SingleProducerMultipleConsumerLoops.java
! test/java/util/concurrent/ConcurrentHashMap/MapCheck.java
! test/java/util/concurrent/ConcurrentHashMap/MapLoops.java
! test/java/util/concurrent/Exchanger/ExchangeLoops.java
! 
test/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java
! test/java/util/concurrent/FutureTask/CancelledFutureLoops.java
! test/java/util/concurrent/atomic/VMSupportsCS8.java
! test/java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java
! test/java/util/concurr

Re: hg: jdk7/tl/jdk: 6907177: Update jdk tests to remove unncessary -source and -target options

2009-12-04 Thread Kelly O'Hair


Andrew John Hughes wrote:

2009/12/4  :

Changeset: 1755493c5774
Author:darcy
Date:  2009-12-03 18:19 -0800
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/1755493c5774

6907177: Update jdk tests to remove unncessary -source and -target options
Reviewed-by: ohair

! test/demo/jvmti/hprof/CpuOldTest.java
! test/demo/jvmti/hprof/CpuSamplesTest.java
! test/demo/jvmti/hprof/CpuTimesDefineClassTest.java
! test/demo/jvmti/hprof/CpuTimesTest.java
! test/demo/jvmti/hprof/HeapAllTest.java
! test/demo/jvmti/hprof/HeapBinaryFormatTest.java
! test/demo/jvmti/hprof/HeapDumpTest.java
! test/demo/jvmti/hprof/HeapSitesTest.java
! test/demo/jvmti/hprof/OptionsTest.java
! test/java/io/Serializable/enum/array/Test.java
! test/java/io/Serializable/enum/badResolve/Write.java
! test/java/io/Serializable/enum/basic/Test.java
! test/java/io/Serializable/enum/classObject/Test.java
! test/java/io/Serializable/enum/constantSubclasses/Write.java
! test/java/io/Serializable/enum/ignoreSerializationFields/Test.java
! test/java/io/Serializable/enum/ignoreSerializationMethods/Test.java
! test/java/io/Serializable/enum/mismatchedTypecode/Test.java
! test/java/io/Serializable/enum/missingConstant/Write.java
! test/java/io/Serializable/enum/unshared/Test.java
! test/java/lang/Boolean/MakeBooleanComparable.java
! test/java/lang/Class/Cast.java
! test/java/lang/Class/IsEnum.java
! test/java/lang/Class/asSubclass/BasicUnit.java
! test/java/lang/ClassLoader/Assert.sh
! test/java/lang/Integer/BitTwiddle.java
! test/java/lang/Long/BitTwiddle.java
! test/java/lang/Math/Atan2Tests.java
! test/java/lang/Math/IeeeRecommendedTests.java
! test/java/lang/Math/PowTests.java
! test/java/lang/Math/TanTests.java
! test/java/lang/Runtime/exec/WinCommand.java
! test/java/lang/Thread/GenerifyStackTraces.java
! test/java/lang/Thread/UncaughtExceptions.sh
! test/java/lang/annotation/UnitTest.java
! test/java/lang/annotation/package-info.java
! test/java/lang/management/CompositeData/MemoryNotifInfoCompositeData.java
! test/java/lang/management/CompositeData/ThreadInfoCompositeData.java
! test/java/lang/management/ManagementFactory/MXBeanProxyTest.java
! test/java/lang/management/ManagementFactory/PlatformMBeanServerTest.java
! test/java/lang/management/ManagementFactory/ProxyExceptions.java
! test/java/lang/management/ManagementFactory/ProxyTypeMapping.java
! test/java/lang/management/ManagementFactory/ValidateOpenTypes.java
! test/java/lang/management/RuntimeMXBean/GetSystemProperties.java
! test/java/lang/management/RuntimeMXBean/TestInputArgument.sh
! test/java/lang/reflect/Constructor/GenericStringTest.java
! test/java/lang/reflect/Field/GenericStringTest.java
! test/java/lang/reflect/Generics/StringsAndBounds.java
! test/java/lang/reflect/Generics/TestC1.java
! test/java/lang/reflect/Generics/TestC2.java
! test/java/lang/reflect/Generics/TestN1.java
! test/java/lang/reflect/Generics/exceptionCauseTest.java
! test/java/lang/reflect/Generics/getAnnotationTest.java
! test/java/lang/reflect/Method/Equals.java
! test/java/lang/reflect/Method/GenericStringTest.java
! test/java/math/BigDecimal/DivideTests.java
! test/java/math/BigDecimal/IntegralDivisionTests.java
! test/java/math/BigDecimal/PowTests.java
! test/java/math/BigDecimal/ToPlainStringTests.java
! test/java/math/BigDecimal/ZeroScalingTests.java
! test/java/math/RoundingMode/RoundingModeTests.java
! test/java/net/ProxySelector/ProxyTest.java
! test/java/net/URL/PerConnectionProxy.java
! test/java/security/cert/PKIXBuilderParameters/InvalidParameters.java
! test/java/security/cert/PKIXParameters/InvalidParameters.java
! test/java/util/AbstractList/CheckForComodification.java
! test/java/util/Collections/AddAll.java
! test/java/util/Collections/Disjoint.java
! test/java/util/Collections/Frequency.java
! test/java/util/EnumMap/EnumMapBash.java
! test/java/util/EnumSet/AllOf.java
! test/java/util/EnumSet/ComplementOf.java
! test/java/util/EnumSet/EnumSetBash.java
! test/java/util/EnumSet/JumboRange.java
! test/java/util/EnumSet/Range.java
! test/java/util/Formattable/StockName.java
! test/java/util/IdentityHashMap/ToString.java
! test/java/util/Locale/Bug4175998Test.java
! test/java/util/UUID/UUIDTest.java
! test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java
! 
test/java/util/concurrent/BlockingQueue/MultipleProducersSingleConsumerLoops.java
! test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java
! 
test/java/util/concurrent/BlockingQueue/SingleProducerMultipleConsumerLoops.java
! test/java/util/concurrent/ConcurrentHashMap/MapCheck.java
! test/java/util/concurrent/ConcurrentHashMap/MapLoops.java
! test/java/util/concurrent/Exchanger/ExchangeLoops.java
! 
test/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java
! test/java/util/concurrent/FutureTask/CancelledFutureLoops.java
! test/java/util/concurrent/atomic/VMSupportsCS8.java
! test/java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java
! test/java/util/concurren

Re: hg: jdk7/tl/jdk: 6907177: Update jdk tests to remove unncessary -source and -target options

2009-12-04 Thread Joseph D. Darcy

Jonathan Gibbons wrote:

Andrew John Hughes wrote:

2009/12/4  :
  

Changeset: 1755493c5774
Author:darcy
Date:  2009-12-03 18:19 -0800
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/1755493c5774

6907177: Update jdk tests to remove unncessary -source and -target options
Reviewed-by: ohair

! test/demo/jvmti/hprof/CpuOldTest.java

  


[snip]


! test/sun/tools/jconsole/ResourceCheckTest.sh





Was this really necessary? The options, as far as I can see, were
doing no harm but this change means that a compiler that defaults to a
version < 1.5 (e.g. ecj) will now fail to compile the tests.
  
This is a JDK test suite and there is no guarantee that any other 
compiler can be used. All sorts of JDK-specific options may be passed 
to the compiler, runtime and other tools in these tests.




Yes, these tests are part of the JDK 7 regression test suite.  
Interoperability with other compilers, even other compilers from related 
code bases like OpenJDK 6, is a non-goal.


Having the old -source options in the tests was at least in a small way 
reducing the effectiveness of the test suite since the default -source 
setting is now 7.  Using of new language features in tests, even tests 
not targeting those language features is certainly encouraged.


As explained in my code review request on corelib-dev, many of the 
-source directives dated to back in JDK 5 before the default sourced was 
upped from 1.4 to 5.  Tests written later in JDK 5 that use JDK 5 
language features didn't have explicit -source settings.


While the build environment for most programs should explicitly set 
source, target, and encoding,

   "Build Advice: Set Source, Target, and Encoding"
   http://blogs.sun.com/darcy/entry/build_advice_set_source_target
the regressions tests of the JDK itself are (usually) an exception.

-Joe



Virtual Host support on the embedded HTTP server

2009-12-04 Thread David M. Lloyd
I've crafted a simple patch which extends the API of the embedded HTTP 
server to support virtual hosts.  The patch is designed to add the new 
functionality without breaking existing implementations which do not 
support virtual hosts, or code which uses the HttpServer API today.  It 
does not include an implementation; however, the default implementation 
should be easy to extend, from a brief look over the code.


The patch is attached.  Please let me know what you think.

- DML
diff -r dde3fe2e8164 src/share/classes/com/sun/net/httpserver/HostMatcher.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +
+++ b/src/share/classes/com/sun/net/httpserver/HostMatcher.java	Fri Dec 04 14:10:23 2009 -0600
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.net.httpserver;
+
+/**
+ * A matcher which determines whether some incoming request matches a virtual
+ * host registration.  See {...@link HttpServer#createVirtualHost(HostMatcher)} for
+ * more information about virtual host registration.
+ *
+ * @since 1.7
+ */
+public interface HostMatcher {
+/**
+ * Determine whether a HTTP request matches a virtual host registration.
+ *
+ * @param exchange the request exchange
+ * @return {...@code true} if the request matches, {...@code false} otherwise
+ */
+boolean matches(HttpExchange exchange);
+}
diff -r dde3fe2e8164 src/share/classes/com/sun/net/httpserver/HttpHost.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +
+++ b/src/share/classes/com/sun/net/httpserver/HttpHost.java	Fri Dec 04 14:10:23 2009 -0600
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.net.httpserver;
+
+/**
+ * This class implements a simple HTTP host. A HttpHost may be "real" or "virtual".
+ * A "real" host is one which is bound to an IP address and extends the {...@link HttpServer}
+ * subclass.  A "virtual" host allows for more than one set of registered contexts
+ * per physical server, differentiated by host name, IP address, or other criteria.
+ * 
+ * One or more {...@link HttpHandler} objects must be associated with a host
+ * in order to process requests. Each such HttpHandler is registered
+ * with a root URI path which represents the
+ * location of the application or service on this server. The mapping of a handler
+ * to a {...@code HttpHost} is essentially equivalent to the mapping of a handler to a
+ * {...@link HttpServer}.
+ *
+ * @since 1.7
+ */
+public abstract class HttpHost {
+/**
+ * Creates a {...@code HttpContext}. A {...@code HttpContext} represents a mapping from a
+ * URI path to a exchange handler on this {

Fwd: Bug in URLConnection?

2009-12-04 Thread Paulo Levi
-- Forwarded message --
From: Paulo Levi 
Date: Fri, Dec 4, 2009 at 9:57 PM
Subject: Re: Bug in URLConnection?
To: Christopher Hegarty -Sun Microsystems Ireland <
christopher.hega...@sun.com>


The problem is that the user (or any really) proxyselector is being called
at all.
Sigh, never mind. It seem that you consider this not a bug then, but then
the overriden call

u.openConnection(Proxy proxy)
seems supremely useless.

My expectation as a client of the api is that that call should bypass
any proxy selector, first

because we are identifying the proxy we want to use and the
proxyselector function is to do

the same thing, second because otherwise, the function appears to
either do useless work,
or the same thing as the u.openConnection()
If you don't want to change the behaviour just say so, but don't
expect the current one to


feel natural to users.


On Thu, Dec 3, 2009 at 11:08 AM, Christopher Hegarty -Sun Microsystems
Ireland  wrote:

> Paulo Levi wrote:
>
>> Besides sending a Proxy to the connection should mean that the connection
>> is going to use that proxy if any? Why ask the proxy selector anything?
>>
>
> Sorry Paulo I'm not seeing the behavior you are describing.
>
> When making a http request and with a custom proxy selector set I see only
> the custom proxy selector's select method being invoked, not the default
> selectors one. Also, when using openConnection(Proxy) I see no calls to the
> proxy selector ( either custom or default ).
>
> What JDK are you using? Do you have a simple test to demonstrate the
> problem? As I said in the previous mail, I do not see the problem you're
> describing with the code you posted previously.
>
> -Chris.
>