From Alan.Bateman at Sun.COM Sat Nov 1 03:37:07 2008 From: Alan.Bateman at Sun.COM (Alan Bateman) Date: Sat, 01 Nov 2008 10:37:07 +0000 Subject: FileSystem.getNameMatcher() In-Reply-To: <4907BC09.4000608@univ-mlv.fr> References: <4907BC09.4000608@univ-mlv.fr> Message-ID: <490C3153.9020509@sun.com> R?mi Forax wrote: > Hi alan, hi all, > I have some questions about FileSystem.getNameMatcher() : > First its name, i would prefer something like getNamePathMatcher(), > after all it returns a PathMatcher. R?mi - A late reply as I have been away for a few days. It was named getNameMatcher as it currently only matches on file names and "getNamePathMatcher" seemed a mouthful (I do of course appreciate you taking time to find inconsistencies and naming issues). In any case, a number of people have pinged me about matching across directory boundaries (** matching). This requires a bit of spec work. When that is done then renaming it to getPathMatcher seems natural. > Why getNameMatcher doesn't reuse the same design than setOptions() > to specify the syntax i.e. > > interface Syntax { > String name(); > } > public enum StandardSyntax { > glob, regex > } > > PathMatcher getNameMatcher(Syntax syntax, String regex) { > ... > } > The API is using this "extensible enum" pattern in places where we expect there will be platform/provider specific extensions. For pattern matching we haven't seen a big need beyond regular expressions and globbing so this is why it wasn't used here. From a consistency point of view, you are right (but it does require yet another interface and enum). I'll think about it. As it happens, Tom Hawtin also mentioned this one to me recently. FYI, in an earlier version there was a single parameter that took the form "syntax:pattern". -Alan. From mthornton at optrak.co.uk Sat Nov 1 03:51:00 2008 From: mthornton at optrak.co.uk (Mark Thornton) Date: Sat, 01 Nov 2008 10:51:00 +0000 Subject: FileSystem.getNameMatcher() In-Reply-To: <490C3153.9020509@sun.com> References: <4907BC09.4000608@univ-mlv.fr> <490C3153.9020509@sun.com> Message-ID: <490C3494.6010801@optrak.co.uk> Alan Bateman wrote: >> > The API is using this "extensible enum" pattern in places where we > expect there will be platform/provider specific extensions. For > pattern matching we haven't seen a big need beyond regular expressions > and globbing so this is why it wasn't used here. From a One other possible syntax is "system" i.e. the standard syntax for the platform concerned. Mark Thornton From alan.bateman at sun.com Sat Nov 8 08:33:28 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sat, 08 Nov 2008 16:33:28 +0000 Subject: hg: nio/nio: Added tag jdk7-b38 for changeset cc47a76899ed Message-ID: <20081108163329.2C79ED0BE@hg.openjdk.java.net> Changeset: ab523b49de1f Author: xdono Date: 2008-10-23 10:12 -0700 URL: http://hg.openjdk.java.net/nio/nio/rev/ab523b49de1f Added tag jdk7-b38 for changeset cc47a76899ed ! .hgtags From alan.bateman at sun.com Sat Nov 8 08:35:02 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sat, 08 Nov 2008 16:35:02 +0000 Subject: hg: nio/nio/corba: 3 new changesets Message-ID: <20081108163505.5B1C9D0C3@hg.openjdk.java.net> Changeset: a067bf2329ef Author: tbell Date: 2008-10-15 21:24 -0700 URL: http://hg.openjdk.java.net/nio/nio/corba/rev/a067bf2329ef 6759959: VS2008 errors compiling corba sources Summary: Update Makefiles to deal with newer Visual Studio releases Reviewed-by: ohair ! make/common/Defs-windows.gmk ! make/common/shared/Compiler-msvc.gmk Changeset: 08be802754b0 Author: xdono Date: 2008-10-16 10:29 -0700 URL: http://hg.openjdk.java.net/nio/nio/corba/rev/08be802754b0 Merge Changeset: 55078b6661e2 Author: xdono Date: 2008-10-23 10:12 -0700 URL: http://hg.openjdk.java.net/nio/nio/corba/rev/55078b6661e2 Added tag jdk7-b38 for changeset 08be802754b0 ! .hgtags From alan.bateman at sun.com Sat Nov 8 08:37:11 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sat, 08 Nov 2008 16:37:11 +0000 Subject: hg: nio/nio/hotspot: Added tag jdk7-b38 for changeset d9bc824aa078 Message-ID: <20081108163715.BA9B7D0C8@hg.openjdk.java.net> Changeset: 69e855d955f5 Author: xdono Date: 2008-10-23 10:13 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/69e855d955f5 Added tag jdk7-b38 for changeset d9bc824aa078 ! .hgtags From alan.bateman at sun.com Sat Nov 8 08:40:00 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sat, 08 Nov 2008 16:40:00 +0000 Subject: hg: nio/nio/jaxp: Added tag jdk7-b38 for changeset e9f750f0a3a0 Message-ID: <20081108164002.714FFD0CF@hg.openjdk.java.net> Changeset: 831b80be6cea Author: xdono Date: 2008-10-23 10:13 -0700 URL: http://hg.openjdk.java.net/nio/nio/jaxp/rev/831b80be6cea Added tag jdk7-b38 for changeset e9f750f0a3a0 ! .hgtags From alan.bateman at sun.com Sat Nov 8 08:41:21 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sat, 08 Nov 2008 16:41:21 +0000 Subject: hg: nio/nio/jaxws: Added tag jdk7-b38 for changeset 9ce439969184 Message-ID: <20081108164124.0AF58D0D6@hg.openjdk.java.net> Changeset: 077bc9b1b035 Author: xdono Date: 2008-10-23 10:13 -0700 URL: http://hg.openjdk.java.net/nio/nio/jaxws/rev/077bc9b1b035 Added tag jdk7-b38 for changeset 9ce439969184 ! .hgtags From alan.bateman at sun.com Sat Nov 8 08:42:22 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sat, 08 Nov 2008 16:42:22 +0000 Subject: hg: nio/nio/jdk: 14 new changesets Message-ID: <20081108164532.224BBD0DB@hg.openjdk.java.net> Changeset: dcd40f60ffd3 Author: xdono Date: 2008-10-23 10:13 -0700 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/dcd40f60ffd3 Added tag jdk7-b38 for changeset cc5f810b5af8 ! .hgtags Changeset: 4e51997582ef Author: tbell Date: 2008-10-23 21:55 -0700 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/4e51997582ef Merge Changeset: 1a324821b463 Author: tbell Date: 2008-10-24 20:47 -0700 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/1a324821b463 Merge Changeset: 76ecb928e83a Author: emcmanus Date: 2008-10-27 14:02 +0100 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/76ecb928e83a 6763639: Remove "rawtypes" warnings from JMX code Reviewed-by: dfuchs ! make/netbeans/jmx/build.xml ! src/share/classes/com/sun/jmx/event/LeaseManager.java ! src/share/classes/com/sun/jmx/event/LeaseRenewer.java ! src/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java ! src/share/classes/com/sun/jmx/mbeanserver/ClassLoaderRepositorySupport.java ! src/share/classes/com/sun/jmx/mbeanserver/ConvertingMethod.java ! src/share/classes/com/sun/jmx/mbeanserver/DefaultMXBeanMappingFactory.java ! src/share/classes/com/sun/jmx/mbeanserver/Introspector.java ! src/share/classes/com/sun/jmx/mbeanserver/JmxMBeanServer.java ! src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiator.java ! src/share/classes/com/sun/jmx/mbeanserver/MXBeanIntrospector.java ! src/share/classes/com/sun/jmx/mbeanserver/ObjectInputStreamWithLoader.java ! src/share/classes/com/sun/jmx/mbeanserver/SecureClassLoaderRepository.java ! src/share/classes/com/sun/jmx/mbeanserver/Util.java ! src/share/classes/com/sun/jmx/mbeanserver/WeakIdentityHashMap.java ! src/share/classes/com/sun/jmx/remote/internal/ArrayNotificationBuffer.java ! src/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java ! src/share/classes/com/sun/jmx/remote/internal/ProxyInputStream.java ! src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java ! src/share/classes/com/sun/jmx/remote/internal/Unmarshal.java ! src/share/classes/com/sun/jmx/remote/security/FileLoginModule.java ! src/share/classes/com/sun/jmx/remote/security/JMXPluggableAuthenticator.java ! src/share/classes/com/sun/jmx/remote/security/MBeanServerFileAccessController.java ! src/share/classes/com/sun/jmx/remote/util/ClassLoaderWithRepository.java ! src/share/classes/com/sun/jmx/remote/util/ClassLogger.java ! src/share/classes/com/sun/jmx/remote/util/EnvHelp.java ! src/share/classes/com/sun/jmx/remote/util/EventClientConnection.java ! src/share/classes/com/sun/jmx/remote/util/OrderClassLoaders.java ! src/share/classes/javax/management/AttributeList.java ! src/share/classes/javax/management/DefaultLoaderRepository.java ! src/share/classes/javax/management/JMRuntimeException.java ! src/share/classes/javax/management/JMX.java ! src/share/classes/javax/management/MBeanAttributeInfo.java ! src/share/classes/javax/management/MBeanConstructorInfo.java ! src/share/classes/javax/management/MBeanInfo.java ! src/share/classes/javax/management/MBeanOperationInfo.java ! src/share/classes/javax/management/MBeanServerFactory.java ! src/share/classes/javax/management/MBeanServerInvocationHandler.java ! src/share/classes/javax/management/StandardMBean.java ! src/share/classes/javax/management/event/EventClientDelegate.java ! src/share/classes/javax/management/event/EventSubscriber.java ! src/share/classes/javax/management/loading/DefaultLoaderRepository.java ! src/share/classes/javax/management/loading/MLet.java ! src/share/classes/javax/management/loading/MLetObjectInputStream.java ! src/share/classes/javax/management/modelmbean/DescriptorSupport.java ! src/share/classes/javax/management/modelmbean/ModelMBeanConstructorInfo.java ! src/share/classes/javax/management/modelmbean/RequiredModelMBean.java ! src/share/classes/javax/management/openmbean/ArrayType.java ! src/share/classes/javax/management/openmbean/CompositeDataInvocationHandler.java ! src/share/classes/javax/management/openmbean/CompositeType.java ! src/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java ! src/share/classes/javax/management/openmbean/OpenMBeanParameterInfoSupport.java ! src/share/classes/javax/management/openmbean/OpenType.java ! src/share/classes/javax/management/openmbean/SimpleType.java ! src/share/classes/javax/management/openmbean/TabularDataSupport.java ! src/share/classes/javax/management/openmbean/TabularType.java ! src/share/classes/javax/management/relation/MBeanServerNotificationFilter.java ! src/share/classes/javax/management/relation/RelationService.java ! src/share/classes/javax/management/relation/RelationSupport.java ! src/share/classes/javax/management/relation/Role.java ! src/share/classes/javax/management/relation/RoleList.java ! src/share/classes/javax/management/relation/RoleResult.java ! src/share/classes/javax/management/relation/RoleUnresolved.java ! src/share/classes/javax/management/relation/RoleUnresolvedList.java ! src/share/classes/javax/management/remote/JMXConnectorFactory.java ! src/share/classes/javax/management/remote/rmi/NoCallStackClassLoader.java ! src/share/classes/javax/management/remote/rmi/RMIConnection.java ! src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java ! src/share/classes/javax/management/remote/rmi/RMIConnector.java ! src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java ! src/share/classes/javax/management/remote/rmi/RMIServerImpl.java ! src/share/classes/javax/management/timer/Timer.java Changeset: 98ac3d398ed6 Author: chegar Date: 2008-10-28 16:14 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/98ac3d398ed6 6756771: com.sun.net.httpserver.HttpServer should handle POSTs larger than 2Gig Summary: update implementation to use long instead of int Reviewed-by: michaelm ! src/share/classes/sun/net/httpserver/ExchangeImpl.java ! src/share/classes/sun/net/httpserver/FixedLengthInputStream.java ! src/share/classes/sun/net/httpserver/Request.java ! src/share/classes/sun/net/httpserver/ServerImpl.java + test/com/sun/net/httpserver/bugs/FixedLengthInputStream.java Changeset: 58e52eb46bd3 Author: emcmanus Date: 2008-10-28 18:21 +0100 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/58e52eb46bd3 6763051: MXBean: Incorrect type names for parametrized dealing with arrays (openType) 6713777: developer diagnosability of errors in uncompliant mxbean interfaces Reviewed-by: dfuchs ! src/share/classes/com/sun/jmx/mbeanserver/DefaultMXBeanMappingFactory.java ! src/share/classes/com/sun/jmx/mbeanserver/MXBeanIntrospector.java ! src/share/classes/javax/management/MBeanServerInvocationHandler.java + test/javax/management/mxbean/ExceptionDiagnosisTest.java ! test/javax/management/mxbean/TypeNameTest.java Changeset: 8dcde0b16199 Author: emcmanus Date: 2008-10-30 17:46 +0100 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/8dcde0b16199 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport 6253137: Documentation for NotificationListener's handback parameter is confusing 6368691: javadoc for JMX Descriptors has bugs and is very hard to navigate. 6602699: support for async notification of mbeaninfo update 6759612: [javadoc] EventClient.NOTIFS_LOST has a garbled href to addEventClientListener 6759619: Clarify what EventClient.getEventClientNotificationInfo does 6759622: Clarify what EventClient.getListeners list does Summary: Documentation fixes, plus simple bugfix for 6759619. Reviewed-by: dfuchs ! src/share/classes/javax/management/Descriptor.java ! src/share/classes/javax/management/MBeanInfo.java ! src/share/classes/javax/management/MBeanServer.java ! src/share/classes/javax/management/NotificationListener.java ! src/share/classes/javax/management/event/EventClient.java ! src/share/classes/javax/management/modelmbean/DescriptorSupport.java ! src/share/classes/javax/management/modelmbean/ModelMBeanAttributeInfo.java ! src/share/classes/javax/management/modelmbean/ModelMBeanConstructorInfo.java ! src/share/classes/javax/management/modelmbean/ModelMBeanInfo.java ! src/share/classes/javax/management/modelmbean/ModelMBeanNotificationInfo.java ! src/share/classes/javax/management/modelmbean/ModelMBeanOperationInfo.java ! test/javax/management/eventService/CustomForwarderTest.java ! test/javax/management/mxbean/TypeNameTest.java Changeset: cdfb6f963a60 Author: emcmanus Date: 2008-10-30 18:19 +0100 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/cdfb6f963a60 6450848: make it easier to get the ObjectName of a JMX Proxy Summary: Rework proxy javadoc to explain how to do this. Reviewed-by: sjiang ! src/share/classes/javax/management/JMX.java Changeset: 4ff842aee1fd Author: mullan Date: 2008-10-30 17:24 -0400 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/4ff842aee1fd 6764553: com.sun.org.apache.xml.internal.security.utils.IdResolver is not thread safe Reviewed-by: valeriep ! src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java Changeset: f246770bcc78 Author: mullan Date: 2008-10-30 17:28 -0400 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/f246770bcc78 Merge Changeset: 8d17cc67a857 Author: emcmanus Date: 2008-10-31 17:34 +0100 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/8d17cc67a857 6766173: Spec should say that createMBean wraps a constructor RuntimeException in a RuntimeMBeanException Summary: JMX spec clarification Reviewed-by: dfuchs ! src/share/classes/javax/management/MBeanServerConnection.java ! src/share/classes/javax/management/namespace/MBeanServerSupport.java ! test/javax/management/MBeanServer/MBeanExceptionTest.java Changeset: f4537b85a97a Author: alanb Date: 2008-11-01 21:34 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/f4537b85a97a Merge ! .hgtags Changeset: 9417a5078188 Author: alanb Date: 2008-11-06 20:59 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/9417a5078188 Hang when wakeup pipe full during Grizzly test(Linux only) ! src/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java ! src/share/classes/sun/nio/ch/Invoker.java ! src/share/classes/sun/nio/ch/SimpleAsynchronousDatagramChannelImpl.java ! src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java ! src/share/classes/sun/nio/ch/ThreadPool.java ! src/solaris/classes/sun/nio/ch/EPollPort.java ! src/solaris/classes/sun/nio/ch/SolarisEventPort.java ! src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java ! src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java Changeset: 3ed3c95e5a62 Author: alanb Date: 2008-11-07 13:12 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/3ed3c95e5a62 Minor clean-ups - eliminate raw type warnings - typos in spec ! src/share/classes/java/io/File.java ! src/share/classes/java/io/FilePermission.java ! src/share/classes/java/nio/channels/AsynchronousFileChannel.java ! src/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java ! src/share/classes/java/nio/channels/Channels.java ! src/share/classes/java/nio/channels/ServerSocketChannel.java ! src/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java ! src/share/classes/java/nio/channels/spi/SelectorProvider.java ! src/share/classes/java/nio/file/DirectoryStream.java ! src/share/classes/java/nio/file/DirectoryStreamFilters.java ! src/share/classes/java/nio/file/Path.java ! src/share/classes/java/nio/file/attribute/PosixFileAttributeView.java ! src/share/classes/java/nio/file/attribute/UserPrincipalLookupService.java ! src/share/classes/java/nio/file/spi/AbstractPath.java ! src/share/classes/java/nio/file/spi/FileSystemProvider.java ! src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java ! src/share/classes/sun/nio/ch/CompletedFuture.java ! src/share/classes/sun/nio/ch/Net.java ! src/share/classes/sun/nio/fs/AbstractWatchKey.java ! src/share/classes/sun/nio/fs/NativeBuffers.java ! src/share/classes/sun/nio/fs/Reflect.java ! src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java ! src/windows/classes/sun/nio/fs/WindowsAclFileAttributeView.java ! src/windows/classes/sun/nio/fs/WindowsFileSystem.java From alan.bateman at sun.com Sat Nov 8 08:49:44 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sat, 08 Nov 2008 16:49:44 +0000 Subject: hg: nio/nio/langtools: 5 new changesets Message-ID: <20081108164956.16130D0E0@hg.openjdk.java.net> Changeset: c7315642fa1b Author: xdono Date: 2008-10-23 10:13 -0700 URL: http://hg.openjdk.java.net/nio/nio/langtools/rev/c7315642fa1b Added tag jdk7-b38 for changeset 3fd42dfa6f27 ! .hgtags Changeset: 3fb51e47622b Author: tbell Date: 2008-10-23 21:56 -0700 URL: http://hg.openjdk.java.net/nio/nio/langtools/rev/3fb51e47622b Merge Changeset: 8d7fa40da0eb Author: tbell Date: 2008-10-24 20:47 -0700 URL: http://hg.openjdk.java.net/nio/nio/langtools/rev/8d7fa40da0eb Merge - test/tools/javac/generics/wildcards/6651719/T6651719b.java Changeset: 5ebe90e0afff Author: jjg Date: 2008-10-27 14:25 -0700 URL: http://hg.openjdk.java.net/nio/nio/langtools/rev/5ebe90e0afff 6764226: ListTest fails on javap output with bad characters Reviewed-by: darcy ! test/tools/javap/ListTest.java Changeset: 4f7b344a1ce0 Author: mcimadamore Date: 2008-10-28 14:05 +0000 URL: http://hg.openjdk.java.net/nio/nio/langtools/rev/4f7b344a1ce0 6763518: Impossible to suppress raw-type warnings Summary: Check.validate(Type) should be invoked after -Xlint is augmented in Attr.visitVarDef Reviewed-by: darcy ! src/share/classes/com/sun/tools/javac/comp/Attr.java ! src/share/classes/com/sun/tools/javac/resources/compiler.properties ! test/tools/javac/6304921/T6304921.out + test/tools/javac/warnings/T6763518.java From alan.bateman at sun.com Sun Nov 16 01:05:32 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sun, 16 Nov 2008 09:05:32 +0000 Subject: hg: nio/nio: Added tag jdk7-b39 for changeset ab523b49de1f Message-ID: <20081116090533.1CBB7D531@hg.openjdk.java.net> Changeset: 44be42de6693 Author: xdono Date: 2008-11-06 12:10 -0800 URL: http://hg.openjdk.java.net/nio/nio/rev/44be42de6693 Added tag jdk7-b39 for changeset ab523b49de1f ! .hgtags From alan.bateman at sun.com Sun Nov 16 01:06:25 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sun, 16 Nov 2008 09:06:25 +0000 Subject: hg: nio/nio/corba: Added tag jdk7-b39 for changeset 55078b6661e2 Message-ID: <20081116090626.E09BFD536@hg.openjdk.java.net> Changeset: 184e21992f47 Author: xdono Date: 2008-11-06 12:10 -0800 URL: http://hg.openjdk.java.net/nio/nio/corba/rev/184e21992f47 Added tag jdk7-b39 for changeset 55078b6661e2 ! .hgtags From alan.bateman at sun.com Sun Nov 16 01:07:30 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sun, 16 Nov 2008 09:07:30 +0000 Subject: hg: nio/nio/hotspot: 73 new changesets Message-ID: <20081116090952.864CDD53C@hg.openjdk.java.net> Changeset: ebeb6490b814 Author: ysr Date: 2008-08-26 14:54 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/ebeb6490b814 6722116: CMS: Incorrect overflow handling when using parallel concurrent marking Summary: Fixed CMSConcMarkingTask::reset() to store the restart address upon a marking stack overflow and to use it as the base, suitably aligned, for restarting the scan in CMSConcMarkingTask::do_scan_and_mark(). Reviewed-by: jcoomes, tonyp ! src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp ! src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Changeset: d60e4e6d7f72 Author: ysr Date: 2008-08-27 10:56 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/d60e4e6d7f72 Merge Changeset: 37f87013dfd8 Author: ysr Date: 2008-06-05 15:57 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/37f87013dfd8 6711316: Open source the Garbage-First garbage collector Summary: First mercurial integration of the code for the Garbage-First garbage collector. Reviewed-by: apetrusenko, iveresov, jmasa, sgoldman, tonyp, ysr ! make/linux/makefiles/top.make ! make/solaris/makefiles/top.make ! make/windows/makefiles/generated.make ! make/windows/makefiles/makedeps.make ! make/windows/makefiles/vm.make ! src/cpu/sparc/vm/assembler_sparc.cpp ! src/cpu/sparc/vm/assembler_sparc.hpp ! src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp ! src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp ! src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp ! src/cpu/sparc/vm/c1_Runtime1_sparc.cpp ! src/cpu/sparc/vm/sharedRuntime_sparc.cpp ! src/cpu/sparc/vm/stubGenerator_sparc.cpp ! src/cpu/sparc/vm/templateTable_sparc.cpp ! src/cpu/x86/vm/assembler_x86_32.cpp ! src/cpu/x86/vm/assembler_x86_32.hpp ! src/cpu/x86/vm/assembler_x86_64.cpp ! src/cpu/x86/vm/assembler_x86_64.hpp ! src/cpu/x86/vm/c1_CodeStubs_x86.cpp ! src/cpu/x86/vm/c1_LIRGenerator_x86.cpp ! src/cpu/x86/vm/c1_Runtime1_x86.cpp ! src/cpu/x86/vm/interp_masm_x86_64.cpp ! src/cpu/x86/vm/stubGenerator_x86_32.cpp ! src/cpu/x86/vm/stubGenerator_x86_64.cpp ! src/cpu/x86/vm/templateTable_x86_32.cpp ! src/cpu/x86/vm/templateTable_x86_64.cpp ! src/os/linux/vm/os_linux.cpp ! src/os/solaris/vm/os_solaris.cpp ! src/os/windows/vm/os_windows.cpp ! src/share/vm/adlc/formssel.cpp ! src/share/vm/c1/c1_CodeStubs.hpp ! src/share/vm/c1/c1_LIRAssembler.cpp ! src/share/vm/c1/c1_LIRAssembler.hpp ! src/share/vm/c1/c1_LIRGenerator.cpp ! src/share/vm/c1/c1_LIRGenerator.hpp ! src/share/vm/c1/c1_Runtime1.cpp ! src/share/vm/c1/c1_Runtime1.hpp ! src/share/vm/c1/c1_globals.hpp ! src/share/vm/compiler/methodLiveness.cpp ! src/share/vm/compiler/methodLiveness.hpp ! src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp ! src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp ! src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp ! src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp + src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp + src/share/vm/gc_implementation/g1/collectionSetChooser.cpp + src/share/vm/gc_implementation/g1/collectionSetChooser.hpp + src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp + src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp + src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp + src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp + src/share/vm/gc_implementation/g1/concurrentMark.cpp + src/share/vm/gc_implementation/g1/concurrentMark.hpp + src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp + src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp + src/share/vm/gc_implementation/g1/concurrentMarkThread.inline.hpp + src/share/vm/gc_implementation/g1/concurrentZFThread.cpp + src/share/vm/gc_implementation/g1/concurrentZFThread.hpp + src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp + src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp + src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp + src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp + src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp + src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp + src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp + src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp + src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp + src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp + src/share/vm/gc_implementation/g1/g1MMUTracker.cpp + src/share/vm/gc_implementation/g1/g1MMUTracker.hpp + src/share/vm/gc_implementation/g1/g1MarkSweep.cpp + src/share/vm/gc_implementation/g1/g1MarkSweep.hpp + src/share/vm/gc_implementation/g1/g1OopClosures.hpp + src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp + src/share/vm/gc_implementation/g1/g1RemSet.cpp + src/share/vm/gc_implementation/g1/g1RemSet.hpp + src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp + src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp + src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp + src/share/vm/gc_implementation/g1/g1_globals.cpp + src/share/vm/gc_implementation/g1/g1_globals.hpp + src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp + src/share/vm/gc_implementation/g1/heapRegion.cpp + src/share/vm/gc_implementation/g1/heapRegion.hpp + src/share/vm/gc_implementation/g1/heapRegion.inline.hpp + src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp + src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp + src/share/vm/gc_implementation/g1/heapRegionSeq.cpp + src/share/vm/gc_implementation/g1/heapRegionSeq.hpp + src/share/vm/gc_implementation/g1/heapRegionSeq.inline.hpp + src/share/vm/gc_implementation/g1/ptrQueue.cpp + src/share/vm/gc_implementation/g1/ptrQueue.hpp + src/share/vm/gc_implementation/g1/ptrQueue.inline.hpp + src/share/vm/gc_implementation/g1/satbQueue.cpp + src/share/vm/gc_implementation/g1/satbQueue.hpp + src/share/vm/gc_implementation/g1/sparsePRT.cpp + src/share/vm/gc_implementation/g1/sparsePRT.hpp + src/share/vm/gc_implementation/g1/survRateGroup.cpp + src/share/vm/gc_implementation/g1/survRateGroup.hpp + src/share/vm/gc_implementation/g1/vm_operations_g1.cpp + src/share/vm/gc_implementation/g1/vm_operations_g1.hpp ! src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep + src/share/vm/gc_implementation/includeDB_gc_g1 ! src/share/vm/gc_implementation/includeDB_gc_parallelScavenge ! src/share/vm/gc_implementation/includeDB_gc_shared ! src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp ! src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp + src/share/vm/gc_implementation/shared/coTracker.cpp + src/share/vm/gc_implementation/shared/coTracker.hpp + src/share/vm/gc_implementation/shared/concurrentGCThread.cpp + src/share/vm/gc_implementation/shared/concurrentGCThread.hpp + src/share/vm/gc_implementation/shared/gcOverheadReporter.cpp + src/share/vm/gc_implementation/shared/gcOverheadReporter.hpp ! src/share/vm/gc_implementation/shared/vmGCOperations.cpp ! src/share/vm/gc_interface/collectedHeap.cpp ! src/share/vm/gc_interface/collectedHeap.hpp ! src/share/vm/gc_interface/collectedHeap.inline.hpp ! src/share/vm/gc_interface/gcCause.hpp ! src/share/vm/includeDB_compiler1 ! src/share/vm/includeDB_compiler2 ! src/share/vm/includeDB_core ! src/share/vm/includeDB_gc_parallel ! src/share/vm/includeDB_jvmti ! src/share/vm/interpreter/templateTable.cpp ! src/share/vm/interpreter/templateTable.hpp ! src/share/vm/memory/allocation.hpp + src/share/vm/memory/barrierSet.cpp ! src/share/vm/memory/barrierSet.hpp ! src/share/vm/memory/barrierSet.inline.hpp ! src/share/vm/memory/blockOffsetTable.cpp ! src/share/vm/memory/blockOffsetTable.hpp ! src/share/vm/memory/cardTableModRefBS.cpp ! src/share/vm/memory/cardTableModRefBS.hpp ! src/share/vm/memory/cardTableRS.cpp ! src/share/vm/memory/cardTableRS.hpp ! src/share/vm/memory/collectorPolicy.cpp ! src/share/vm/memory/collectorPolicy.hpp ! src/share/vm/memory/defNewGeneration.cpp ! src/share/vm/memory/genCollectedHeap.hpp ! src/share/vm/memory/genMarkSweep.hpp ! src/share/vm/memory/genOopClosures.hpp ! src/share/vm/memory/genOopClosures.inline.hpp ! src/share/vm/memory/genRemSet.hpp ! src/share/vm/memory/heapInspection.cpp ! src/share/vm/memory/iterator.hpp ! src/share/vm/memory/modRefBarrierSet.hpp ! src/share/vm/memory/referenceProcessor.cpp ! src/share/vm/memory/referenceProcessor.hpp ! src/share/vm/memory/sharedHeap.cpp ! src/share/vm/memory/sharedHeap.hpp ! src/share/vm/memory/space.cpp ! src/share/vm/memory/space.hpp ! src/share/vm/memory/space.inline.hpp ! src/share/vm/memory/specialized_oop_closures.hpp ! src/share/vm/memory/universe.cpp ! src/share/vm/oops/generateOopMap.cpp ! src/share/vm/oops/generateOopMap.hpp ! src/share/vm/oops/instanceKlass.cpp ! src/share/vm/oops/instanceKlass.hpp ! src/share/vm/oops/instanceRefKlass.cpp ! src/share/vm/oops/instanceRefKlass.hpp ! src/share/vm/oops/klass.hpp ! src/share/vm/oops/markOop.hpp ! src/share/vm/oops/markOop.inline.hpp ! src/share/vm/oops/objArrayKlass.cpp ! src/share/vm/oops/objArrayKlass.hpp ! src/share/vm/oops/objArrayOop.cpp ! src/share/vm/oops/objArrayOop.hpp ! src/share/vm/oops/oop.hpp ! src/share/vm/oops/oop.inline.hpp ! src/share/vm/opto/graphKit.cpp ! src/share/vm/opto/graphKit.hpp ! src/share/vm/opto/lcm.cpp ! src/share/vm/opto/macro.cpp ! src/share/vm/opto/runtime.cpp ! src/share/vm/opto/runtime.hpp ! src/share/vm/prims/jvm.cpp ! src/share/vm/prims/jvmtiExport.cpp ! src/share/vm/prims/jvmtiTagMap.cpp ! src/share/vm/prims/unsafe.cpp ! src/share/vm/runtime/aprofiler.hpp ! src/share/vm/runtime/arguments.cpp ! src/share/vm/runtime/arguments.hpp ! src/share/vm/runtime/globals.cpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/runtime/globals_extension.hpp ! src/share/vm/runtime/mutexLocker.cpp ! src/share/vm/runtime/mutexLocker.hpp ! src/share/vm/runtime/os.hpp ! src/share/vm/runtime/sharedRuntime.cpp ! src/share/vm/runtime/sharedRuntime.hpp ! src/share/vm/runtime/task.cpp ! src/share/vm/runtime/thread.cpp ! src/share/vm/runtime/thread.hpp ! src/share/vm/runtime/virtualspace.cpp ! src/share/vm/runtime/vmStructs.cpp ! src/share/vm/runtime/vm_operations.hpp ! src/share/vm/services/heapDumper.cpp ! src/share/vm/services/memoryService.cpp ! src/share/vm/utilities/bitMap.cpp ! src/share/vm/utilities/bitMap.hpp ! src/share/vm/utilities/bitMap.inline.hpp ! src/share/vm/utilities/debug.cpp + src/share/vm/utilities/intHisto.cpp + src/share/vm/utilities/intHisto.hpp + src/share/vm/utilities/numberSeq.cpp + src/share/vm/utilities/numberSeq.hpp ! src/share/vm/utilities/ostream.cpp ! src/share/vm/utilities/ostream.hpp ! src/share/vm/utilities/taskqueue.cpp ! src/share/vm/utilities/taskqueue.hpp ! src/share/vm/utilities/workgroup.cpp ! src/share/vm/utilities/workgroup.hpp ! src/share/vm/utilities/yieldingWorkgroup.cpp ! src/share/vm/utilities/yieldingWorkgroup.hpp Changeset: afc1ce1efe66 Author: iveresov Date: 2008-06-11 05:12 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/afc1ce1efe66 6710665: G1: guarantee(_cm->out_of_regions() && _cm->region_stack_empty() && _task_queue->size() == 0, ...) Summary: Remove the incorrect assumptions from guarantee()s. Reviewed-by: ysr, tonyp ! src/share/vm/gc_implementation/g1/concurrentMark.cpp Changeset: 6aae2f9d0294 Author: ysr Date: 2008-06-12 13:50 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/6aae2f9d0294 Merge ! src/cpu/sparc/vm/assembler_sparc.cpp ! src/cpu/sparc/vm/assembler_sparc.hpp ! src/cpu/sparc/vm/sharedRuntime_sparc.cpp ! src/cpu/sparc/vm/templateTable_sparc.cpp ! src/cpu/x86/vm/assembler_x86_32.hpp ! src/cpu/x86/vm/assembler_x86_64.cpp ! src/cpu/x86/vm/assembler_x86_64.hpp ! src/cpu/x86/vm/interp_masm_x86_64.cpp ! src/cpu/x86/vm/templateTable_x86_64.cpp ! src/share/vm/adlc/formssel.cpp ! src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp ! src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp ! src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep ! src/share/vm/gc_implementation/includeDB_gc_shared ! src/share/vm/gc_interface/collectedHeap.inline.hpp ! src/share/vm/includeDB_core ! src/share/vm/memory/space.cpp ! src/share/vm/oops/instanceKlass.hpp ! src/share/vm/oops/markOop.hpp ! src/share/vm/oops/oop.hpp ! src/share/vm/oops/oop.inline.hpp ! src/share/vm/opto/graphKit.cpp ! src/share/vm/opto/lcm.cpp ! src/share/vm/opto/macro.cpp ! src/share/vm/runtime/arguments.cpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/runtime/vmStructs.cpp Changeset: 33e001c095fe Author: ysr Date: 2008-06-12 14:02 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/33e001c095fe Merge Changeset: bb254e57d2f4 Author: ysr Date: 2008-06-17 08:40 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/bb254e57d2f4 Merge ! src/share/vm/memory/cardTableModRefBS.cpp Changeset: 60fb9c4db4e6 Author: ysr Date: 2008-06-23 16:49 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/60fb9c4db4e6 6718086: CMS assert: _concurrent_iteration_safe_limit update missed Summary: Initialize the field correctly in ContiguousSpace's constructor and initialize() methods, using the latter for the survivor spaces upon initial construction or a subsequent resizing of the young generation. Add some missing Space sub-class constructors. Reviewed-by: apetrusenko ! src/share/vm/memory/defNewGeneration.cpp ! src/share/vm/memory/space.cpp ! src/share/vm/memory/space.hpp Changeset: 69fefd031e6c Author: ysr Date: 2008-06-24 13:20 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/69fefd031e6c Merge ! src/os/linux/vm/os_linux.cpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/runtime/thread.cpp Changeset: 73278b62f36c Author: ysr Date: 2008-06-26 11:43 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/73278b62f36c 6718811: Mismerge of 6680469:macro.cpp Summary: Fixed the mismerge by deleting the lines that were inadvertently left in place. Reviewed-by: iveresov ! src/share/vm/opto/macro.cpp Changeset: d28aa69f0959 Author: ysr Date: 2008-06-30 17:04 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/d28aa69f0959 6618726: Introduce -XX:+UnlockExperimentalVMOptions flag Summary: experimental() flags will protect features of an experimental nature that are not supported in the regular product build. Made UseG1GC an experimental flag. Reviewed-by: jmasa, kamg, coleenp ! src/share/vm/gc_implementation/g1/g1_globals.cpp ! src/share/vm/gc_implementation/g1/g1_globals.hpp ! src/share/vm/runtime/globals.cpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/runtime/globals_extension.hpp ! src/share/vm/services/management.cpp Changeset: fab5f738c515 Author: ysr Date: 2008-07-01 11:59 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/fab5f738c515 Merge ! src/share/vm/adlc/formssel.cpp ! src/share/vm/includeDB_compiler2 ! src/share/vm/opto/macro.cpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/utilities/ostream.cpp ! src/share/vm/utilities/ostream.hpp Changeset: e0c09f7ec5c4 Author: iveresov Date: 2008-07-03 03:17 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/e0c09f7ec5c4 6702387: G1: assertion failure: assert(p == current_top || oop(p)->is_oop(),"p is not a block start") Summary: Do not coalesce dead and moved objects when removing self-forwarding pointers during the evacuation failure. Also fixed a issue in a BOT refinement code for TLABs. Reviewed-by: tonyp, jcoomes ! src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Changeset: 9bb2c10ac07b Author: iveresov Date: 2008-07-10 09:29 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/9bb2c10ac07b 6723570: G1: assertion failure: p == current_top or oop(p)->is_oop(),"p is not a block start" (revisited!) Summary: Fixed the incorrect assigment to G1OffsetTableContigSpace::_gc_time_stamp. Also added a little more paranoia to operations on a global timestamp. Reviewed-by: tonyp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp ! src/share/vm/gc_implementation/g1/heapRegion.cpp Changeset: c0f8f7790199 Author: iveresov Date: 2008-07-30 10:45 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/c0f8f7790199 6652160: G1: assert(cur_used_bytes == _g1->recalculate_used(),"It should!") at g1CollectorPolicy.cpp:1425 Summary: In attempt_allocation_slow() wait for the concurrent cleanup to complete before modifying _summary_bytes_used. Reviewed-by: jmasa, apetrusenko ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Changeset: 0edda524b58c Author: tonyp Date: 2008-08-06 11:57 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/0edda524b58c 6722565: G1: assert !r->is_on_unclean_list() fires Summary: Under certain circumstances, two cleanup threads can claim and process the same region. Reviewed-by: apetrusenko, ysr ! src/share/vm/gc_implementation/g1/concurrentMark.cpp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp ! src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp ! src/share/vm/gc_implementation/g1/heapRegion.cpp ! src/share/vm/gc_implementation/g1/heapRegion.hpp Changeset: 1ee8caae33af Author: tonyp Date: 2008-08-21 23:36 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/1ee8caae33af Merge - agent/src/share/lib/jlfgr-1_0.jar - agent/src/share/lib/maf-1_0.jar - make/linux/Queens.class ! make/linux/makefiles/top.make - make/solaris/Queens.class ! make/solaris/makefiles/top.make ! make/windows/makefiles/generated.make ! make/windows/makefiles/makedeps.make ! make/windows/makefiles/vm.make ! src/cpu/sparc/vm/assembler_sparc.cpp ! src/cpu/sparc/vm/assembler_sparc.hpp ! src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp ! src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp ! src/cpu/sparc/vm/sharedRuntime_sparc.cpp ! src/cpu/sparc/vm/stubGenerator_sparc.cpp ! src/cpu/sparc/vm/templateTable_sparc.cpp ! src/cpu/x86/vm/assembler_x86_32.cpp ! src/cpu/x86/vm/assembler_x86_32.hpp ! src/cpu/x86/vm/assembler_x86_64.cpp ! src/cpu/x86/vm/assembler_x86_64.hpp ! src/cpu/x86/vm/c1_LIRGenerator_x86.cpp ! src/cpu/x86/vm/interp_masm_x86_64.cpp ! src/cpu/x86/vm/stubGenerator_x86_32.cpp ! src/cpu/x86/vm/stubGenerator_x86_64.cpp ! src/cpu/x86/vm/templateTable_x86_32.cpp ! src/cpu/x86/vm/templateTable_x86_64.cpp ! src/os/linux/vm/os_linux.cpp ! src/os/solaris/vm/os_solaris.cpp ! src/os/windows/vm/os_windows.cpp ! src/share/vm/adlc/formssel.cpp ! src/share/vm/c1/c1_Runtime1.cpp ! src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp ! src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp ! src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp ! src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp ! src/share/vm/gc_implementation/g1/heapRegion.cpp ! src/share/vm/gc_implementation/g1/heapRegion.hpp ! src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep ! src/share/vm/gc_implementation/includeDB_gc_g1 ! src/share/vm/gc_implementation/includeDB_gc_parallelScavenge ! src/share/vm/gc_implementation/includeDB_gc_shared ! src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp ! src/share/vm/gc_implementation/shared/vmGCOperations.cpp ! src/share/vm/gc_interface/collectedHeap.cpp ! src/share/vm/gc_interface/collectedHeap.hpp ! src/share/vm/gc_interface/collectedHeap.inline.hpp ! src/share/vm/includeDB_compiler1 ! src/share/vm/includeDB_compiler2 ! src/share/vm/includeDB_core ! src/share/vm/memory/barrierSet.hpp ! src/share/vm/memory/barrierSet.inline.hpp ! src/share/vm/memory/cardTableModRefBS.cpp ! src/share/vm/memory/cardTableModRefBS.hpp ! src/share/vm/memory/cardTableRS.cpp ! src/share/vm/memory/cardTableRS.hpp ! src/share/vm/memory/collectorPolicy.cpp ! src/share/vm/memory/collectorPolicy.hpp ! src/share/vm/memory/defNewGeneration.cpp ! src/share/vm/memory/genCollectedHeap.hpp ! src/share/vm/memory/genMarkSweep.cpp ! src/share/vm/memory/genOopClosures.hpp ! src/share/vm/memory/genOopClosures.inline.hpp ! src/share/vm/memory/genRemSet.hpp ! src/share/vm/memory/heapInspection.cpp ! src/share/vm/memory/iterator.hpp ! src/share/vm/memory/modRefBarrierSet.hpp ! src/share/vm/memory/referenceProcessor.cpp ! src/share/vm/memory/referenceProcessor.hpp ! src/share/vm/memory/sharedHeap.cpp ! src/share/vm/memory/space.cpp ! src/share/vm/memory/space.hpp ! src/share/vm/memory/universe.cpp ! src/share/vm/oops/instanceKlass.cpp ! src/share/vm/oops/instanceKlass.hpp ! src/share/vm/oops/instanceRefKlass.cpp ! src/share/vm/oops/klass.hpp ! src/share/vm/oops/markOop.hpp ! src/share/vm/oops/objArrayKlass.cpp ! src/share/vm/oops/objArrayKlass.hpp ! src/share/vm/oops/objArrayOop.cpp ! src/share/vm/oops/objArrayOop.hpp ! src/share/vm/oops/oop.hpp ! src/share/vm/oops/oop.inline.hpp ! src/share/vm/opto/graphKit.cpp ! src/share/vm/opto/lcm.cpp ! src/share/vm/opto/macro.cpp ! src/share/vm/prims/jvm.cpp ! src/share/vm/prims/jvmtiTagMap.cpp ! src/share/vm/prims/unsafe.cpp ! src/share/vm/runtime/arguments.cpp ! src/share/vm/runtime/arguments.hpp ! src/share/vm/runtime/globals.cpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/runtime/globals_extension.hpp ! src/share/vm/runtime/mutexLocker.cpp ! src/share/vm/runtime/mutexLocker.hpp ! src/share/vm/runtime/os.hpp ! src/share/vm/runtime/sharedRuntime.cpp ! src/share/vm/runtime/sharedRuntime.hpp ! src/share/vm/runtime/task.cpp ! src/share/vm/runtime/thread.cpp ! src/share/vm/runtime/virtualspace.cpp ! src/share/vm/runtime/vmStructs.cpp ! src/share/vm/runtime/vm_operations.hpp ! src/share/vm/services/heapDumper.cpp ! src/share/vm/utilities/debug.cpp ! src/share/vm/utilities/ostream.cpp ! src/share/vm/utilities/ostream.hpp ! src/share/vm/utilities/taskqueue.hpp Changeset: 2564c620fa42 Author: tonyp Date: 2008-08-21 23:38 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/2564c620fa42 Merge ! src/share/vm/memory/blockOffsetTable.hpp ! src/share/vm/runtime/globals.hpp Changeset: 8651a65ac4b4 Author: iveresov Date: 2008-08-22 11:48 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/8651a65ac4b4 6735416: G1: runThese javasoft.sqe.tests.lang.thrd011.thrd01101.thrd01101 fails 6622418: G1: assert(false,"Non-balanced monitor enter/exit!") fails Summary: The mark-sweep compact (which we use for full gc) wrapper did not save the mark words for biased locked objects. The fix is to trivially call the appropriate methods. Reviewed-by: tonyp, ysr ! src/share/vm/gc_implementation/g1/g1MarkSweep.cpp ! src/share/vm/gc_implementation/includeDB_gc_g1 Changeset: d515536da189 Author: tonyp Date: 2008-08-26 00:46 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/d515536da189 6740930: G1: compilation failure with latest gcc Summary: Include DB fix to resolve a compilation issue with the latest gcc. Reviewed-by: iveresov, ysr ! src/share/vm/gc_implementation/includeDB_gc_g1 Changeset: 5d254928c888 Author: ysr Date: 2008-08-27 11:20 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/5d254928c888 Merge ! src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp ! src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp ! src/share/vm/runtime/thread.cpp Changeset: a4f9ef0c0375 Author: jmasa Date: 2008-09-04 14:49 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/a4f9ef0c0375 6743059: Error in spaceDecorator.cpp "optimized" build. Summary: Changed the guard on the definition of the method value in HeapWord from ASSERT to not PRODUCT. Reviewed-by: iveresov, apetrusenko ! src/share/vm/utilities/globalDefinitions.hpp Changeset: f8199438385b Author: apetrusenko Date: 2008-09-17 16:49 +0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/f8199438385b Merge ! src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp ! src/cpu/sparc/vm/sharedRuntime_sparc.cpp ! src/cpu/x86/vm/assembler_x86.cpp ! src/cpu/x86/vm/assembler_x86.hpp ! src/cpu/x86/vm/c1_CodeStubs_x86.cpp ! src/cpu/x86/vm/c1_LIRGenerator_x86.cpp ! src/cpu/x86/vm/c1_Runtime1_x86.cpp ! src/cpu/x86/vm/interp_masm_x86_64.cpp ! src/cpu/x86/vm/stubGenerator_x86_32.cpp ! src/cpu/x86/vm/stubGenerator_x86_64.cpp ! src/cpu/x86/vm/templateTable_x86_32.cpp ! src/cpu/x86/vm/templateTable_x86_64.cpp ! src/share/vm/c1/c1_LIRAssembler.cpp ! src/share/vm/c1/c1_LIRAssembler.hpp ! src/share/vm/c1/c1_LIRGenerator.cpp ! src/share/vm/c1/c1_Runtime1.cpp ! src/share/vm/includeDB_compiler1 ! src/share/vm/includeDB_compiler2 ! src/share/vm/includeDB_core ! src/share/vm/includeDB_gc_parallel ! src/share/vm/opto/macro.cpp ! src/share/vm/runtime/vmStructs.cpp Changeset: 032ddb9432ad Author: apetrusenko Date: 2008-09-17 19:59 +0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/032ddb9432ad Merge ! src/share/vm/runtime/arguments.cpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/runtime/thread.cpp ! src/share/vm/runtime/virtualspace.cpp Changeset: 919e7959392a Author: tonyp Date: 2008-09-22 09:56 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/919e7959392a 6742641: G1: NullPointerException during GCOld Summary: An update buffer is not processed correctly, which causes roots into the collection set not to be scanned and, hence, for the heap to be corrupted. The cause is that an object is accessed after it has been explicitly deleted, which causes a race. Reviewed-by: jcoomes, ysr ! src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp Changeset: 5f44674206d3 Author: apetrusenko Date: 2008-09-24 15:34 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/5f44674206d3 Merge ! src/share/vm/opto/graphKit.cpp ! src/share/vm/opto/lcm.cpp ! src/share/vm/runtime/vmStructs.cpp Changeset: 8261ee795323 Author: rasbold Date: 2008-09-17 08:29 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/8261ee795323 6711100: 64bit fastdebug server vm crashes with assert(_base == Int,"Not an Int") Summary: insert CastII nodes to narrow type of load_array_length() node Reviewed-by: never, kvn ! src/share/vm/opto/callnode.cpp ! src/share/vm/opto/callnode.hpp ! src/share/vm/opto/graphKit.cpp ! src/share/vm/opto/memnode.cpp ! src/share/vm/opto/memnode.hpp ! src/share/vm/opto/parse2.cpp ! src/share/vm/opto/type.cpp ! src/share/vm/opto/type.hpp + test/compiler/6711100/Test.java Changeset: 194b8e3a2fc4 Author: never Date: 2008-09-17 12:59 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/194b8e3a2fc4 6384206: Phis which are later unneeded are impairing our ability to inline based on static types Reviewed-by: rasbold, jrose ! src/share/vm/ci/ciMethodBlocks.cpp ! src/share/vm/ci/ciMethodBlocks.hpp ! src/share/vm/ci/ciTypeFlow.cpp ! src/share/vm/ci/ciTypeFlow.hpp ! src/share/vm/includeDB_compiler2 ! src/share/vm/opto/bytecodeInfo.cpp ! src/share/vm/opto/cfgnode.cpp ! src/share/vm/opto/compile.cpp ! src/share/vm/opto/compile.hpp ! src/share/vm/opto/doCall.cpp ! src/share/vm/opto/graphKit.cpp ! src/share/vm/opto/loopTransform.cpp ! src/share/vm/opto/loopnode.cpp ! src/share/vm/opto/loopnode.hpp ! src/share/vm/opto/loopopts.cpp ! src/share/vm/opto/matcher.cpp ! src/share/vm/opto/parse.hpp ! src/share/vm/opto/parse1.cpp Changeset: 36ccc817fca4 Author: kvn Date: 2008-09-23 12:29 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/36ccc817fca4 6747051: Improve code and implicit null check generation for compressed oops Summary: Push DecodeN node below the Null check to the non-null path to use the mach node without 0 test. Reviewed-by: rasbold, never ! src/share/vm/asm/assembler.cpp ! src/share/vm/opto/cfgnode.cpp ! src/share/vm/opto/compile.cpp ! src/share/vm/opto/connode.cpp ! src/share/vm/opto/matcher.cpp ! src/share/vm/opto/matcher.hpp Changeset: 5f85534046c2 Author: rasbold Date: 2008-09-24 15:56 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/5f85534046c2 6750588: assert(lrg._area >= 0,"negative spill area") running NSK stmp0101 test Summary: handle NaN costs more carefully Reviewed-by: kvn, never ! src/share/vm/opto/ifg.cpp Changeset: 885fe0f95828 Author: never Date: 2008-09-25 12:50 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/885fe0f95828 6744783: HotSpot segfaults if given -XX options with an empty string argument Reviewed-by: kamg, kvn Contributed-by: volker.simonis at gmail.com ! src/share/vm/prims/jvmtiTrace.cpp ! src/share/vm/runtime/globals.cpp ! src/share/vm/runtime/globals.hpp Changeset: dbec32712472 Author: never Date: 2008-09-30 11:56 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/dbec32712472 6753795: HotSpot crash in strlen() when JVMTI is used Summary: test for null instead of strlen Reviewed-by: rasbold ! src/share/vm/prims/jvmtiEnvBase.cpp Changeset: be41fa651400 Author: rasbold Date: 2008-09-30 15:53 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/be41fa651400 Merge ! src/share/vm/includeDB_compiler2 ! src/share/vm/opto/graphKit.cpp ! src/share/vm/runtime/globals.cpp ! src/share/vm/runtime/globals.hpp Changeset: 06df86c2ec37 Author: iveresov Date: 2008-09-27 00:33 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/06df86c2ec37 6740923: NUMA allocator: Ensure the progress of adaptive chunk resizing Summary: Treat a chuck where the allocation has failed as fully used. Reviewed-by: ysr ! src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp ! src/share/vm/gc_implementation/shared/immutableSpace.hpp ! src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp ! src/share/vm/gc_implementation/shared/mutableNUMASpace.hpp Changeset: a4b729f5b611 Author: jcoomes Date: 2008-09-30 11:49 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/a4b729f5b611 6716466: par compact - remove VerifyParallelOldWithMarkSweep code Reviewed-by: jmasa ! src/share/vm/code/nmethod.cpp ! src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp ! src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp ! src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.cpp ! src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp ! src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp ! src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp ! src/share/vm/gc_implementation/shared/markSweep.inline.hpp ! src/share/vm/runtime/globals.hpp Changeset: 81cd571500b0 Author: jcoomes Date: 2008-09-30 12:20 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/81cd571500b0 6725697: par compact - rename class ChunkData to RegionData Reviewed-by: iveresov, tonyp ! src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp ! src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp ! src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp ! src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp ! src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp ! src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/utilities/taskqueue.cpp ! src/share/vm/utilities/taskqueue.hpp Changeset: 0166ac265d53 Author: jcoomes Date: 2008-09-30 13:15 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/0166ac265d53 6729594: par compact - remove unused block table implementation Reviewed-by: tonyp, jmasa, apetrusenko ! src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp ! src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp ! src/share/vm/runtime/globals.hpp Changeset: ddfad9496151 Author: tonyp Date: 2008-10-01 15:05 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/ddfad9496151 Merge ! src/share/vm/runtime/globals.hpp Changeset: 0e31d37915ff Author: trims Date: 2008-10-01 16:57 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/0e31d37915ff 6754998: Update Hotspot version for hs14 b06 Summary: Bump Hotspot build number to 06 Reviewed-by: jcoomes ! make/hotspot_version Changeset: af90fe21c1e3 Author: trims Date: 2008-10-01 16:57 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/af90fe21c1e3 Merge Changeset: eb28cf662f56 Author: trims Date: 2008-10-07 11:01 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/eb28cf662f56 Merge ! src/cpu/x86/vm/c1_CodeStubs_x86.cpp ! src/cpu/x86/vm/c1_Runtime1_x86.cpp ! src/cpu/x86/vm/stubGenerator_x86_32.cpp ! src/share/vm/asm/assembler.cpp ! src/share/vm/c1/c1_LIRAssembler.cpp ! src/share/vm/c1/c1_LIRAssembler.hpp ! src/share/vm/c1/c1_LIRGenerator.cpp ! src/share/vm/ci/ciTypeFlow.hpp ! src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp ! src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp ! src/share/vm/memory/blockOffsetTable.hpp ! src/share/vm/opto/ifg.cpp ! src/share/vm/runtime/virtualspace.cpp Changeset: 3dfb71f4a560 Author: trims Date: 2008-10-15 18:49 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/3dfb71f4a560 Merge Changeset: e4355b352b7d Author: coleenp Date: 2008-09-26 13:33 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/e4355b352b7d 6719149: Wrong "java/lang/String should not be loaded yet" assertion in fastdebug bits with UseStringCache Summary: Assertion is invalid because java.lang.String may be initialized just before this assertion. Reviewed-by: phh ! src/share/vm/runtime/thread.cpp Changeset: 99dd4bbd9eec Author: acorn Date: 2008-09-30 12:24 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/99dd4bbd9eec Merge ! src/share/vm/runtime/thread.cpp Changeset: b7483806cc49 Author: acorn Date: 2008-10-01 20:15 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/b7483806cc49 Merge Changeset: c005b6eac36e Author: dcubed Date: 2008-10-02 06:54 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/c005b6eac36e Merge Changeset: f1ecf9191140 Author: trims Date: 2008-10-02 14:11 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/f1ecf9191140 6755406: minor mistakes in copyright notices Summary: Mismatch in some header copyrights from standard templates Reviewed-by: jcoomes ! make/hotspot_distro ! test/compiler/6646019/Test.java ! test/compiler/6689060/Test.java ! test/compiler/6695810/Test.java Changeset: fad66fdcb7fc Author: xlu Date: 2008-10-06 11:39 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/fad66fdcb7fc 6673124: Runtime.availableProcessors / os::active_processor_count wrong if unused processor sets exist Reviewed-by: acorn, dholmes ! src/os/solaris/vm/os_solaris.cpp Changeset: f008d3631bd1 Author: ksrini Date: 2008-10-08 08:10 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/f008d3631bd1 6755845: JVM_FindClassFromBoot triggers assertions Summary: Fixes assertions caused by one jvm_entry calling another, solved by refactoring code and modified gamma test. Reviewed-by: dholmes, xlu ! src/os/linux/launcher/java.c ! src/os/linux/launcher/java.h ! src/os/linux/launcher/java_md.c ! src/os/solaris/launcher/java.c ! src/os/solaris/launcher/java.h ! src/os/solaris/launcher/java_md.c ! src/share/vm/prims/jvm.cpp Changeset: ee21eaa8ffe1 Author: jmasa Date: 2008-10-02 12:01 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/ee21eaa8ffe1 6660681: Incrementally reserve pages on win server 2003 for better large page affinity Summary: For windows server 2003 added option to reserve large pages individually. Reviewed-by: alanb, jcoomes, tonyp, apetrusenko ! src/os/linux/vm/globals_linux.hpp ! src/os/solaris/vm/globals_solaris.hpp ! src/os/windows/vm/globals_windows.hpp ! src/os/windows/vm/os_windows.cpp ! src/os/windows/vm/os_windows.hpp ! src/share/vm/runtime/globals.hpp Changeset: cc68c8e9b309 Author: tonyp Date: 2008-10-06 13:16 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/cc68c8e9b309 6752248: G1: introduce parallel heap verification Summary: Introduce parallel heap verification in G1. Reviewed-by: jcoomes, apetrusenko ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp ! src/share/vm/gc_implementation/g1/heapRegion.hpp ! src/share/vm/runtime/globals.hpp Changeset: ab4a7734b9c4 Author: iveresov Date: 2008-10-06 20:59 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/ab4a7734b9c4 6753547: NUMA allocator: Invalid chunk size computation during adaptive resizing Summary: The per-lgrp chuck size can be incorrectly computed (causing an assertion failure) because of the non-associativity of the floating point operations. The fix is to rearrange the operations. Reviewed-by: ysr ! src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp Changeset: 05366dad12cf Author: tonyp Date: 2008-10-09 12:06 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/05366dad12cf Merge Changeset: 078b8a0d8d7c Author: iveresov Date: 2008-10-13 21:41 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/078b8a0d8d7c 6758633: G1: SEGV with GCOld on Linux Summary: Avoid growth of a GrowableArray backend of HeapRegionSeq. Reviewed-by: tonyp, jcoomes ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ! src/share/vm/gc_implementation/g1/heapRegionSeq.cpp ! src/share/vm/gc_implementation/g1/heapRegionSeq.hpp Changeset: bc1cf4d7cab3 Author: trims Date: 2008-10-15 18:51 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/bc1cf4d7cab3 Merge Changeset: 7c99a4bb76a1 Author: trims Date: 2008-10-29 19:18 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/7c99a4bb76a1 Merge Changeset: 4d05b7cb7842 Author: mchung Date: 2008-10-14 15:16 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/4d05b7cb7842 6306922: Dump dump created by +HeapDumpOnOutOfMemoryError should include stack traces for stack roots Summary: Include stack traces of all threads in the heap dump Reviewed-by: alanb ! src/share/vm/includeDB_features ! src/share/vm/services/heapDumper.cpp ! src/share/vm/services/threadService.hpp Changeset: 1bf7a2ce4895 Author: dcubed Date: 2008-10-16 11:07 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/1bf7a2ce4895 Merge ! src/share/vm/includeDB_features Changeset: 443791f333a2 Author: coleenp Date: 2008-10-14 10:15 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/443791f333a2 6700107: java/lang/Class/forName/TooManyDimensions.java crashes with SIGSEGV in c2 compiler with fastdebug Summary: objArrayKlass::compute_modifier_flags was unnecessarily recursive Reviewed-by: kamg ! src/share/vm/oops/objArrayKlass.cpp Changeset: 7b51912bdf9a Author: xlu Date: 2008-10-17 15:18 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/7b51912bdf9a Merge Changeset: cc80376deb0c Author: kvn Date: 2008-10-02 08:37 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/cc80376deb0c 6667595: Set probability FAIR for pre-, post- loops and ALWAYS for main loop Summary: Fix loop's probability. Add optimizations to avoid spilling. Change InlineSmallCode to product flag. Reviewed-by: never ! src/share/vm/opto/addnode.cpp ! src/share/vm/opto/cfgnode.cpp ! src/share/vm/opto/cfgnode.hpp ! src/share/vm/opto/divnode.cpp ! src/share/vm/opto/loopTransform.cpp ! src/share/vm/opto/node.hpp ! src/share/vm/opto/postaloc.cpp ! src/share/vm/opto/subnode.cpp ! src/share/vm/runtime/globals.hpp Changeset: ee8f06bfb27c Author: never Date: 2008-10-03 13:58 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/ee8f06bfb27c 6743188: incomplete fix for 6700047 C2 failed in idom_no_update Reviewed-by: rasbold, kvn ! src/share/vm/opto/loopTransform.cpp ! src/share/vm/opto/loopnode.hpp ! src/share/vm/opto/loopopts.cpp ! test/compiler/6700047/Test6700047.java Changeset: b4e0a161f551 Author: never Date: 2008-10-06 13:11 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/b4e0a161f551 Merge ! src/share/vm/runtime/globals.hpp Changeset: b744678d4d71 Author: rasbold Date: 2008-10-10 09:47 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/b744678d4d71 6752257: Use NOT instead of XOR -1 on x86 Summary: add match rule for xor -1 Reviewed-by: never, kvn ! src/cpu/x86/vm/x86_32.ad ! src/cpu/x86/vm/x86_64.ad Changeset: 78c058bc5cdc Author: rasbold Date: 2008-10-14 06:58 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/78c058bc5cdc 6717150: improper constant folding of subnormal strictfp multiplications and divides Summary: suppress constant folding of double divides and multiplications on ia32 Reviewed-by: never ! src/share/vm/opto/divnode.cpp ! src/share/vm/opto/mulnode.cpp Changeset: 2649e5276dd7 Author: kvn Date: 2008-10-14 15:10 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/2649e5276dd7 6532536: Optimize arraycopy stubs for Intel cpus Summary: Use SSE2 movdqu in arraycopy stubs on newest Intel's cpus Reviewed-by: rasbold ! src/cpu/x86/vm/assembler_x86.cpp ! src/cpu/x86/vm/assembler_x86.hpp ! src/cpu/x86/vm/stubGenerator_x86_32.cpp ! src/cpu/x86/vm/stubGenerator_x86_64.cpp ! src/cpu/x86/vm/vm_version_x86_32.cpp ! src/cpu/x86/vm/vm_version_x86_32.hpp ! src/cpu/x86/vm/vm_version_x86_64.cpp ! src/cpu/x86/vm/vm_version_x86_64.hpp ! src/os/solaris/vm/os_solaris.cpp ! src/share/vm/runtime/globals.hpp Changeset: 67e8b4d06369 Author: never Date: 2008-10-21 11:21 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/67e8b4d06369 Merge ! src/cpu/x86/vm/stubGenerator_x86_32.cpp ! src/os/solaris/vm/os_solaris.cpp ! src/share/vm/runtime/globals.hpp Changeset: ebfd4ae89bf6 Author: never Date: 2008-10-21 11:23 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/ebfd4ae89bf6 6762004: 6532536 fix contains changes in os_solaris.cpp which were pushed by mistake Reviewed-by: kvn ! src/os/solaris/vm/os_solaris.cpp Changeset: 52e32c8b317e Author: acorn Date: 2008-10-22 14:48 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/52e32c8b317e 6761092: jvm crashes when CDS is enabled. Summary: CDS hardcoded max c++ virtual method table increased Reviewed-by: coleenp, xlu, jmasa ! src/share/vm/memory/compactingPermGenGen.hpp ! src/share/vm/memory/dump.cpp Changeset: 218f0fd3ca88 Author: acorn Date: 2008-10-22 15:07 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/218f0fd3ca88 Merge ! src/share/vm/memory/compactingPermGenGen.hpp Changeset: 8fb16f199266 Author: xlu Date: 2008-10-22 20:47 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/8fb16f199266 Merge Changeset: 49ca90d77f34 Author: trims Date: 2008-10-29 19:22 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/49ca90d77f34 Merge Changeset: 42ca4002efc2 Author: xdono Date: 2008-11-06 12:10 -0800 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/42ca4002efc2 Added tag jdk7-b39 for changeset 49ca90d77f34 ! .hgtags From alan.bateman at sun.com Sun Nov 16 01:10:43 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sun, 16 Nov 2008 09:10:43 +0000 Subject: hg: nio/nio/jaxp: Added tag jdk7-b39 for changeset 831b80be6cea Message-ID: <20081116091046.38ADED545@hg.openjdk.java.net> Changeset: 54946f466e2c Author: xdono Date: 2008-11-06 12:10 -0800 URL: http://hg.openjdk.java.net/nio/nio/jaxp/rev/54946f466e2c Added tag jdk7-b39 for changeset 831b80be6cea ! .hgtags From alan.bateman at sun.com Sun Nov 16 01:11:38 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sun, 16 Nov 2008 09:11:38 +0000 Subject: hg: nio/nio/jaxws: Added tag jdk7-b39 for changeset 077bc9b1b035 Message-ID: <20081116091140.C5128D54B@hg.openjdk.java.net> Changeset: 70a6ac6dd737 Author: xdono Date: 2008-11-06 12:10 -0800 URL: http://hg.openjdk.java.net/nio/nio/jaxws/rev/70a6ac6dd737 Added tag jdk7-b39 for changeset 077bc9b1b035 ! .hgtags From alan.bateman at sun.com Sun Nov 16 01:12:43 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sun, 16 Nov 2008 09:12:43 +0000 Subject: hg: nio/nio/jdk: 21 new changesets Message-ID: <20081116091706.6EDE4D550@hg.openjdk.java.net> Changeset: 5102df668164 Author: mullan Date: 2008-11-05 15:55 -0500 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/5102df668164 6744888: OCSP validation code should permit some clock skew when checking validity of OCSP responses Summary: Allow for up to 10 minutes of clock skew when validating OCSP responses Reviewed-by: vinnie ! src/share/classes/sun/security/provider/certpath/OCSPResponse.java Changeset: 6923a82c1036 Author: mullan Date: 2008-11-06 11:58 -0500 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/6923a82c1036 Merge Changeset: 3a3e02a55de8 Author: mullan Date: 2008-11-06 12:12 -0500 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/3a3e02a55de8 6765046: CertPathValidatorException(Throwable).getMessage() always returns null since b37 Reviewed-by: vinnie ! src/share/classes/java/security/cert/CertPathValidatorException.java + test/java/security/cert/CertPathValidatorException/GetMessage.java Changeset: 810a95940b99 Author: emcmanus Date: 2008-11-07 11:48 +0100 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/810a95940b99 5072267: A way to communicate client context such as locale to the JMX server Summary: Support for client contexts and also for localization of descriptions Reviewed-by: dfuchs ! src/share/classes/com/sun/jmx/defaults/ServiceName.java ! src/share/classes/com/sun/jmx/event/EventParams.java ! src/share/classes/com/sun/jmx/event/LeaseManager.java ! src/share/classes/com/sun/jmx/interceptor/SingleMBeanForwarder.java ! src/share/classes/com/sun/jmx/mbeanserver/JmxMBeanServer.java - src/share/classes/com/sun/jmx/namespace/JMXNamespaceUtils.java ! src/share/classes/com/sun/jmx/namespace/ObjectNameRouter.java ! src/share/classes/com/sun/jmx/namespace/RoutingConnectionProxy.java ! src/share/classes/com/sun/jmx/namespace/RoutingProxy.java ! src/share/classes/com/sun/jmx/namespace/RoutingServerProxy.java ! src/share/classes/com/sun/jmx/remote/util/EventClientConnection.java + src/share/classes/javax/management/ClientContext.java ! src/share/classes/javax/management/Descriptor.java ! src/share/classes/javax/management/JMX.java ! src/share/classes/javax/management/MBeanInfo.java ! src/share/classes/javax/management/MBeanServerNotification.java ! src/share/classes/javax/management/Notification.java ! src/share/classes/javax/management/event/EventClient.java ! src/share/classes/javax/management/event/EventClientDelegate.java ! src/share/classes/javax/management/event/EventClientDelegateMBean.java ! src/share/classes/javax/management/event/EventRelay.java ! src/share/classes/javax/management/event/package-info.java ! src/share/classes/javax/management/namespace/JMXNamespaces.java ! src/share/classes/javax/management/namespace/JMXRemoteNamespace.java ! src/share/classes/javax/management/remote/JMXConnectorFactory.java ! src/share/classes/javax/management/remote/JMXConnectorServer.java ! src/share/classes/javax/management/remote/JMXConnectorServerMBean.java ! src/share/classes/javax/management/remote/rmi/RMIConnector.java ! src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java ! test/javax/management/Introspector/AnnotationTest.java + test/javax/management/context/ContextForwarderTest.java + test/javax/management/context/ContextTest.java + test/javax/management/context/LocaleAwareBroadcasterTest.java + test/javax/management/context/LocaleTest.java + test/javax/management/context/LocalizableTest.java + test/javax/management/context/RemoteContextTest.java + test/javax/management/context/localizable/MBeanDescriptions.properties + test/javax/management/context/localizable/MBeanDescriptions_fr.java + test/javax/management/context/localizable/Whatsit.java + test/javax/management/context/localizable/WhatsitMBean.java ! test/javax/management/eventService/CustomForwarderTest.java ! test/javax/management/eventService/EventClientExecutorTest.java ! test/javax/management/eventService/EventManagerTest.java ! test/javax/management/eventService/ListenerTest.java ! test/javax/management/eventService/NotSerializableNotifTest.java ! test/javax/management/eventService/UsingEventService.java ! test/javax/management/namespace/EventWithNamespaceControlTest.java ! test/javax/management/namespace/JMXNamespaceSecurityTest.java ! test/javax/management/namespace/JMXNamespaceViewTest.java ! test/javax/management/namespace/JMXRemoteTargetNamespace.java ! test/javax/management/namespace/NamespaceNotificationsTest.java ! test/javax/management/namespace/NullDomainObjectNameTest.java ! test/javax/management/namespace/NullObjectNameTest.java ! test/javax/management/openmbean/CompositeDataStringTest.java ! test/javax/management/remote/mandatory/connectorServer/ForwarderChainTest.java ! test/javax/management/remote/mandatory/connectorServer/StandardForwardersTest.java ! test/javax/management/remote/mandatory/provider/ProviderTest.java ! test/javax/management/remote/mandatory/subjectDelegation/SimpleStandard.java Changeset: 2410a0b48d06 Author: emcmanus Date: 2008-11-07 19:19 +0100 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/2410a0b48d06 6336968: Methods to convert AttributeList to/from Map 6750008: Add JMX.getSpecificationVersion(MBeanServerConnection) and document interop 6750472: Add a way to convert a CompositeData into a Map 6752563: Allow CompositeDataSupport to have zero items Summary: Small JMX RFEs Reviewed-by: dfuchs ! src/share/classes/javax/management/AttributeList.java ! src/share/classes/javax/management/JMX.java ! src/share/classes/javax/management/MBeanServerConnection.java ! src/share/classes/javax/management/MBeanServerNotification.java ! src/share/classes/javax/management/QueryNotificationFilter.java ! src/share/classes/javax/management/openmbean/CompositeDataSupport.java ! src/share/classes/javax/management/package.html + test/javax/management/MBeanServer/AttributeListMapTest.java + test/javax/management/MBeanServer/AttributeListTypeSafeTest.java + test/javax/management/openmbean/CompositeDataToMapTest.java + test/javax/management/remote/mandatory/version/JMXSpecVersionTest.java Changeset: 1b828db8e180 Author: alanb Date: 2008-11-10 12:28 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/1b828db8e180 Merge - src/share/classes/com/sun/jmx/namespace/JMXNamespaceUtils.java Changeset: 275fa248e808 Author: alanb Date: 2008-11-11 08:59 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/275fa248e808 6763122: ZipFile ctor does not throw exception when file is not a zip file Reviewed-by: bristor ! src/share/native/java/util/zip/zip_util.c ! test/java/util/zip/TestEmptyZip.java Changeset: e81b47f0b40f Author: alanb Date: 2008-11-11 09:07 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/e81b47f0b40f Merge - src/share/classes/com/sun/jmx/namespace/JMXNamespaceUtils.java Changeset: d2f96992b77b Author: weijun Date: 2008-11-12 16:00 +0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/d2f96992b77b 6733095: Failure when SPNEGO request non-Mutual Reviewed-by: valeriep ! src/share/classes/sun/security/jgss/GSSContextImpl.java ! src/share/classes/sun/security/jgss/spnego/SpNegoContext.java ! test/sun/security/krb5/auto/Context.java + test/sun/security/krb5/auto/NonMutualSpnego.java Changeset: 76edd0698e0a Author: weijun Date: 2008-11-12 16:01 +0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/76edd0698e0a 6765491: Krb5LoginModule a little too restrictive, and the doc is not clear. Reviewed-by: valeriep ! src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java ! test/sun/security/krb5/auto/Context.java ! test/sun/security/krb5/auto/KDC.java + test/sun/security/krb5/auto/LoginModuleOptions.java Changeset: a85ef87f9eaa Author: chegar Date: 2008-11-12 16:38 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/a85ef87f9eaa 6755625: Add HttpURLConnection.setFixedLengthStreamingMode(long) Reviewed-by: jccollet ! src/share/classes/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.java ! src/share/classes/java/net/HttpURLConnection.java ! src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java ! src/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java ! test/com/sun/net/httpserver/bugs/FixedLengthInputStream.java Changeset: 84bd7fd5fb65 Author: chegar Date: 2008-11-13 09:40 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/84bd7fd5fb65 Merge Changeset: 2914c04c8644 Author: xdono Date: 2008-11-06 12:10 -0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/2914c04c8644 Added tag jdk7-b39 for changeset 4e51997582ef ! .hgtags Changeset: 2201dad60231 Author: tbell Date: 2008-11-07 11:45 -0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/2201dad60231 Merge Changeset: 5c1a8571946f Author: tbell Date: 2008-11-13 11:15 -0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/5c1a8571946f Merge - src/share/classes/com/sun/jmx/namespace/JMXNamespaceUtils.java Changeset: 16efbe49c725 Author: xuelei Date: 2008-11-13 23:08 -0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/16efbe49c725 6728126: Parsing Extensions in Client Hello message is done in a wrong way Summary: the inputStream.read(byte[], int, 0) is not always return zero. Reviewed-by: wetmore, weijun ! src/share/classes/sun/security/ssl/HelloExtensions.java + test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLEngineImpl/EmptyExtensionData.java Changeset: dcb8d806d731 Author: xuelei Date: 2008-11-13 23:25 -0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/dcb8d806d731 6745052: SLServerSocket file descriptor leak Summary: SSLServerSocketImpl.checkEnabledSuites() does not release the temporary socket properly Reviewed-by: wetmore, weijun ! src/share/classes/sun/security/ssl/BaseSSLSocketImpl.java ! src/share/classes/sun/security/ssl/SSLServerSocketImpl.java ! src/share/classes/sun/security/ssl/SSLSocketImpl.java Changeset: 81d186c34e54 Author: alanb Date: 2008-11-14 09:43 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/81d186c34e54 Merge ! .hgtags Changeset: a7d137d96cf5 Author: alanb Date: 2008-11-14 11:00 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/a7d137d96cf5 Replace followLinks with LinkOption ! src/share/classes/java/nio/file/FileRef.java ! src/share/classes/java/nio/file/FileTreeWalker.java + src/share/classes/java/nio/file/LinkOption.java ! src/share/classes/java/nio/file/Path.java ! src/share/classes/java/nio/file/SecureDirectoryStream.java ! src/share/classes/java/nio/file/StandardCopyOption.java ! src/share/classes/java/nio/file/StandardOpenOption.java ! src/share/classes/java/nio/file/attribute/AclFileAttributeView.java ! src/share/classes/java/nio/file/attribute/Attributes.java ! src/share/classes/java/nio/file/attribute/BasicFileAttributes.java ! src/share/classes/java/nio/file/attribute/FileAttributeView.java ! src/share/classes/java/nio/file/attribute/NamedAttributeView.java ! src/share/classes/java/nio/file/attribute/PosixFileAttributeView.java ! src/share/classes/java/nio/file/spi/AbstractPath.java ! src/share/classes/sun/nio/fs/AbstractFileStoreSpaceAttributeView.java ! src/share/classes/sun/nio/fs/AbstractFileTypeDetector.java ! src/share/classes/sun/nio/fs/PollingWatchService.java ! src/share/demo/nio/ZipFileSystem/com/sun/nio/zipfs/ZipFilePath.java ! src/share/demo/nio/ZipFileSystem/com/sun/nio/zipfs/ZipFileStore.java ! src/share/demo/nio/ZipFileSystem/com/sun/nio/zipfs/ZipUtils.java ! src/share/sample/nio/file/AclEdit.java ! src/share/sample/nio/file/Chmod.java ! src/share/sample/nio/file/Copy.java ! src/share/sample/nio/file/FileType.java ! src/share/sample/nio/file/WatchDir.java ! src/share/sample/nio/file/Xdd.java ! src/solaris/classes/sun/nio/fs/LinuxFileSystem.java ! src/solaris/classes/sun/nio/fs/SolarisFileSystem.java ! src/solaris/classes/sun/nio/fs/UnixChannelFactory.java ! src/solaris/classes/sun/nio/fs/UnixCopyFile.java ! src/solaris/classes/sun/nio/fs/UnixFileSystem.java ! src/solaris/classes/sun/nio/fs/UnixPath.java ! src/solaris/classes/sun/nio/fs/UnixSecureDirectoryStream.java ! src/windows/classes/sun/nio/fs/WindowsChannelFactory.java ! src/windows/classes/sun/nio/fs/WindowsFileCopy.java ! src/windows/classes/sun/nio/fs/WindowsPath.java ! test/java/nio/file/DirectoryStream/Filters.java ! test/java/nio/file/DirectoryStream/SecureDS.java ! test/java/nio/file/Path/CopyAndMove.java ! test/java/nio/file/Path/Links.java ! test/java/nio/file/Path/Misc.java ! test/java/nio/file/Path/SBC.java ! test/java/nio/file/Path/TemporaryFiles.java ! test/java/nio/file/attribute/AclFileAttributeView/Basic.java ! test/java/nio/file/attribute/Attributes/Basic.java ! test/java/nio/file/attribute/BasicFileAttributeView/Basic.java ! test/java/nio/file/attribute/DosFileAttributeView/Basic.java ! test/java/nio/file/attribute/NamedAttributeView/Basic.java ! test/java/nio/file/attribute/PosixFileAttributeView/Basic.java Changeset: 2ac3e64920d5 Author: alanb Date: 2008-11-14 12:00 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/2ac3e64920d5 Allow AsynchronousChannelGroup be used as Executor (experimental use to allow development of SSL/TLS filter) ! src/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java ! src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java ! src/share/classes/sun/nio/ch/DatagramChannelImpl.java ! src/share/classes/sun/nio/ch/FileChannelImpl.java ! src/share/classes/sun/nio/ch/Invoker.java ! src/share/classes/sun/nio/ch/PendingFuture.java ! src/share/classes/sun/nio/ch/SimpleAsynchronousDatagramChannelImpl.java ! src/solaris/classes/sun/nio/ch/LinuxAsynchronousChannelProvider.java ! src/solaris/classes/sun/nio/ch/SolarisAsynchronousChannelProvider.java ! src/windows/classes/sun/nio/ch/Iocp.java ! src/windows/classes/sun/nio/ch/PendingIoCache.java ! src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java ! src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java + test/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java + test/java/nio/channels/AsynchronousChannelGroup/Attack.java + test/java/nio/channels/AsynchronousChannelGroup/PrivilegedThreadFactory.java + test/java/nio/channels/AsynchronousChannelGroup/run_any_task.sh Changeset: d6c73618eaf6 Author: alanb Date: 2008-11-14 20:46 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/d6c73618eaf6 EoD updates for java.io (experimental) ! make/java/java/FILES_java.gmk + src/share/classes/java/io/Inputs.java + src/share/classes/java/io/Outputs.java From alan.bateman at sun.com Sun Nov 16 01:28:00 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Sun, 16 Nov 2008 09:28:00 +0000 Subject: hg: nio/nio/langtools: 3 new changesets Message-ID: <20081116092806.A3073D555@hg.openjdk.java.net> Changeset: 968ca53217a1 Author: xdono Date: 2008-11-06 12:10 -0800 URL: http://hg.openjdk.java.net/nio/nio/langtools/rev/968ca53217a1 Added tag jdk7-b39 for changeset 3fb51e47622b ! .hgtags Changeset: 32e309883246 Author: tbell Date: 2008-11-07 11:45 -0800 URL: http://hg.openjdk.java.net/nio/nio/langtools/rev/32e309883246 Merge Changeset: 4cdaaf4c5dca Author: mcimadamore Date: 2008-11-12 14:17 +0000 URL: http://hg.openjdk.java.net/nio/nio/langtools/rev/4cdaaf4c5dca 6768932: Add support for multiline diagnostics Summary: Added basic support for multiline/tabular diagnostics Reviewed-by: jjg ! src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java ! src/share/classes/com/sun/tools/javac/util/AbstractLog.java ! src/share/classes/com/sun/tools/javac/util/JCDiagnostic.java ! src/share/classes/com/sun/tools/javac/util/LayoutCharacters.java ! src/share/classes/com/sun/tools/javac/util/Log.java ! src/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java ! src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java From forax at univ-mlv.fr Sun Nov 16 06:21:52 2008 From: forax at univ-mlv.fr (=?ISO-8859-1?Q?R=E9mi_Forax?=) Date: Sun, 16 Nov 2008 15:21:52 +0100 Subject: java.io.Inputs and java.io.Ouputs In-Reply-To: <20081116091706.6EDE4D550@hg.openjdk.java.net> References: <20081116091706.6EDE4D550@hg.openjdk.java.net> Message-ID: <49202C80.30300@univ-mlv.fr> Hi alan, hi all, Wow, I think its a very good idea to introduce static methods for reading/writing lines. Here is my review of those methods (based on putback http://hg.openjdk.java.net/nio/nio/jdk/rev/d6c73618eaf6) - Providing a closeUnchecked is a good idea but i don't see why readAllBytes*() need use it. - characters based method readAllLines/writeLines() should have a variation that takes a Charset as parameter. It will avoid to use Charset.defaultCharset().name() in some writeLines(). Btw, readAllLines and writeLines is not a coherent naming scheme, in my opinion, writeLines should be rewritten writeAllLines. - readAllLines should be lazy, i.e. returns an Iterable, its iterator should close the stream when hasNext() return false. I think Python already do something like that. - writeLines should take an Iterable instead of a List, implwriteLines() should be re-written : for (CharSequence line: lines) { writer.write(line.toString()); writer.newLine(); } A more general question, how about word based read methods ? I am a commiter on another OpenJDK workspace, so if you want I think I am able to create a patch, ask for reviews and if it's ok, push the patch. regards, R?mi From Alan.Bateman at Sun.COM Sun Nov 16 09:40:09 2008 From: Alan.Bateman at Sun.COM (Alan Bateman) Date: Sun, 16 Nov 2008 17:40:09 +0000 Subject: java.io.Inputs and java.io.Ouputs In-Reply-To: <49202C80.30300@univ-mlv.fr> References: <20081116091706.6EDE4D550@hg.openjdk.java.net> <49202C80.30300@univ-mlv.fr> Message-ID: <49205AF9.3010606@sun.com> R?mi Forax wrote: > Hi alan, hi all, > Wow, I think its a very good idea to introduce static methods > for reading/writing lines. > Thanks for noticing. I've been meaning to some utility classes for this for some time as it's an area that many developers get annoyed with. > > - Providing a closeUnchecked is a good idea but i don't see > why readAllBytes*() need use it. It doesn't matter too much, but I agree that it would be better to invoke close directly. > - characters based method readAllLines/writeLines() should have > a variation that takes a Charset as parameter. > It will avoid to use Charset.defaultCharset().name() in some > writeLines(). > Btw, readAllLines and writeLines is not a coherent naming scheme, > in my opinion, writeLines should be rewritten writeAllLines. There is a version of each method, one that takes the charset (as a String), and the other that uses the default charset. I don't have any objection to a third variant that specifies the charset as a Charset (the other obvious one is a variant that specifies the CharsetDecoder but I wouldn't expect the average developer to use it). > > - readAllLines should be lazy, i.e. returns an Iterable, > its iterator should close the stream when hasNext() return false. > I think Python already do something like that. I don't think this is feasible here. There is no guarantee that the user will iterate to the end (due to an exception for example). Also, there is no guarantee that the source will remain accessible. For example, somebody might want to read all the lines from a text file and delete the file immediately. Also, if the InputStream is to a network resource (a http connection for example) then I/O would need to be exposed by the iterator. > > - writeLines should take an Iterable instead > of a List, implwriteLines() should be re-written : > for (CharSequence line: lines) { > writer.write(line.toString()); > writer.newLine(); > } Making it more general is a good idea. > > A more general question, how about word based read methods ? I'm not sure about this because it is locale sensitive. An alternative might be some improvements to the java.text package that could be used in conjunction with the java.io package. This is an area we would need to discuss with the i18n group. > > I am a commiter on another OpenJDK workspace, > so if you want I think I am able to create a patch, > ask for reviews and if it's ok, push the patch. Got for it! -Alan. From alan.bateman at sun.com Mon Nov 17 11:15:26 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Mon, 17 Nov 2008 19:15:26 +0000 Subject: hg: nio/nio/jdk: 6 new changesets Message-ID: <20081117191814.4F497D57C@hg.openjdk.java.net> Changeset: 67718d2bd49c Author: dfuchs Date: 2008-11-14 17:22 +0100 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/67718d2bd49c 6683213: CounterMonitor's derived Gauge badly initialized Reviewed-by: emcmanus ! src/share/classes/javax/management/monitor/CounterMonitor.java ! src/share/classes/javax/management/monitor/GaugeMonitor.java ! src/share/classes/javax/management/monitor/Monitor.java + test/javax/management/monitor/DerivedGaugeMonitorTest.java Changeset: 4a6c17917d6f Author: alanb Date: 2008-11-17 09:00 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/4a6c17917d6f Merge Changeset: dd0493a55c69 Author: alanb Date: 2008-11-17 18:12 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/dd0493a55c69 Release temporary buffer immediately when buffer cache full to avoid waiting for GC/reference processing. ! src/share/classes/sun/nio/ch/IOUtil.java ! src/share/classes/sun/nio/ch/Util.java + test/java/nio/channels/AsynchronousSocketChannel/Leaky.java Changeset: 9faac5caf148 Author: alanb Date: 2008-11-17 18:19 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/9faac5caf148 Charset validation in java.io.Inputs/Outputs not sufficient Minor clean-up Added test case ! src/share/classes/java/io/Inputs.java ! src/share/classes/java/io/Outputs.java + test/java/io/Inputs/Basic.java Changeset: 4050fa8a7f9a Author: alanb Date: 2008-11-17 18:24 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/4050fa8a7f9a AsynchronousDatagramChannel always binds to default group ! src/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java ! src/share/classes/sun/nio/ch/SimpleAsynchronousDatagramChannelImpl.java ! src/solaris/classes/sun/nio/ch/Port.java ! src/windows/classes/sun/nio/ch/Iocp.java ! test/java/nio/channels/AsynchronousChannelGroup/Basic.java Changeset: 899b37697d5c Author: alanb Date: 2008-11-17 18:43 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/899b37697d5c Eliminate usage of raw types in generated code. ! src/share/native/sun/nio/ch/genSocketOptionRegistry.c From forax at univ-mlv.fr Mon Nov 17 13:20:14 2008 From: forax at univ-mlv.fr (=?ISO-8859-1?Q?R=E9mi_Forax?=) Date: Mon, 17 Nov 2008 22:20:14 +0100 Subject: java.io.Inputs and java.io.Ouputs In-Reply-To: <49205AF9.3010606@sun.com> References: <20081116091706.6EDE4D550@hg.openjdk.java.net> <49202C80.30300@univ-mlv.fr> <49205AF9.3010606@sun.com> Message-ID: <4921E00E.2070709@univ-mlv.fr> Alan Bateman a ?crit : > R?mi Forax wrote: >> Hi alan, hi all, >> Wow, I think its a very good idea to introduce static methods >> for reading/writing lines. >> > Thanks for noticing. I've been meaning to some utility classes for > this for some time as it's an area that many developers get annoyed with. > >> >> - Providing a closeUnchecked is a good idea but i don't see >> why readAllBytes*() need use it. > It doesn't matter too much, but I agree that it would be better to > invoke close directly. > >> - characters based method readAllLines/writeLines() should have >> a variation that takes a Charset as parameter. >> It will avoid to use Charset.defaultCharset().name() in some >> writeLines(). >> Btw, readAllLines and writeLines is not a coherent naming scheme, >> in my opinion, writeLines should be rewritten writeAllLines. > There is a version of each method, one that takes the charset (as a > String), and the other that uses the default charset. I don't have any > objection to a third variant that specifies the charset as a Charset > (the other obvious one is a variant that specifies the CharsetDecoder > but I wouldn't expect the average developer to use it). I agree. There is an implementation problem in Inputs because Scanner doesn't take a Charset but a String. I've send a bug file. There is no such problem in Output because InputStreamWriter and Channels.newWriter() takes a Charset (a CharsetEncoder in case of Channels.newWriter()) > >> >> - readAllLines should be lazy, i.e. returns an Iterable, >> its iterator should close the stream when hasNext() return false. >> I think Python already do something like that. > I don't think this is feasible here. There is no guarantee that the > user will iterate to the end (due to an exception for example). Also, > there is no guarantee that the source will remain accessible. For > example, somebody might want to read all the lines from a text file > and delete the file immediately. Also, if the InputStream is to a > network resource (a http connection for example) then I/O would need > to be exposed by the iterator. I suppose we have to wait closures :) > >> >> - writeLines should take an Iterable instead >> of a List, implwriteLines() should be re-written : >> for (CharSequence line: lines) { >> writer.write(line.toString()); >> writer.newLine(); >> } > Making it more general is a good idea. ok > >> >> A more general question, how about word based read methods ? > I'm not sure about this because it is locale sensitive. An alternative > might be some improvements to the java.text package that could be used > in conjunction with the java.io package. This is an area we would need > to discuss with the i18n group. ok, I will do that later. > >> >> I am a commiter on another OpenJDK workspace, >> so if you want I think I am able to create a patch, >> ask for reviews and if it's ok, push the patch. > Got for it! > > -Alan. R?mi From mthornton at optrak.co.uk Mon Nov 17 13:35:19 2008 From: mthornton at optrak.co.uk (Mark Thornton) Date: Mon, 17 Nov 2008 21:35:19 +0000 Subject: java.io.Inputs and java.io.Ouputs In-Reply-To: <4921E00E.2070709@univ-mlv.fr> References: <20081116091706.6EDE4D550@hg.openjdk.java.net> <49202C80.30300@univ-mlv.fr> <49205AF9.3010606@sun.com> <4921E00E.2070709@univ-mlv.fr> Message-ID: <4921E397.6040604@optrak.co.uk> R?mi Forax wrote: >>> - readAllLines should be lazy, i.e. returns an Iterable, >>> its iterator should close the stream when hasNext() return false. >>> I think Python already do something like that. >> I don't think this is feasible here. There is no guarantee that the >> user will iterate to the end (due to an exception for example). Also, >> there is no guarantee that the source will remain accessible. For >> example, somebody might want to read all the lines from a text file >> and delete the file immediately. Also, if the InputStream is to a >> network resource (a http connection for example) then I/O would need >> to be exposed by the iterator. > I suppose we have to wait closures :) You consider an interface like interface LineFilter { appendLine(CharSequence s); } and then readAllLines(LineFilter f); BufferedWriter could implement the interface. Mark Thornton From forax at univ-mlv.fr Mon Nov 17 15:41:24 2008 From: forax at univ-mlv.fr (=?ISO-8859-1?Q?R=E9mi_Forax?=) Date: Tue, 18 Nov 2008 00:41:24 +0100 Subject: review patch java.io.Ouputs Message-ID: <49220124.3060100@univ-mlv.fr> Ok, i've re-applied my changes to Ouputs.java, there is no more change to Inputs.java until java.util.Scanner is not changed. All writeLines now use a List instead of a List. I've added methods - writeLines(FileRef file, List lines, Charset charset) - writeLines(File file, List lines, Charset charset) - writeLines(OutputStream out, List lines, Charset charset) they all use ensureCharsetIsNotNull that performs a null check. I've rewritten all methods that use Charset.defaultCharset().name() to use Charset.defaultCharset(). I've also noted that writeLines(OutputStream out, List lines, String csn) (now writeLines(OutputStream out, List lines, String csn)) currently doesn't call ensureCharsetIsSupported so I've fix that too. R?mi Here is the patch: diff --git a/src/share/classes/java/io/Outputs.java b/src/share/classes/java/io/Outputs.java --- a/src/share/classes/java/io/Outputs.java +++ b/src/share/classes/java/io/Outputs.java @@ -57,6 +57,12 @@ public final class Outputs { if (!Charset.isSupported(csn)) throw new UnsupportedCharsetException(csn); } + + // checks that charset is not null + private static void ensureCharsetIsNotNull(Charset charset) { + if (charset == null) + throw new NullPointerException("'charset' is null"); + } /** * Writes a byte array to a file. The file is created if it does not exist. @@ -105,6 +111,40 @@ public final class Outputs { * The file * @param lines * The list of lines to write (in order) + * @param charset + * The charset to be used + * + * @throws java.nio.charset.UnsupportedCharsetException + * If no support for the named charset is available + * in this instance of the Java virtual machine + * @throws java.nio.charset.UnmappableCharacterException + * Where a line contains a character that cannot be mapped to an + * output byte sequence + * @throws IOException + * If an I/O error occurs + */ + public static void writeLines(FileRef file, List lines, Charset charset) + throws IOException + { + ensureCharsetIsNotNull(charset); + WritableByteChannel wbc = file.newByteChannel(WRITE, CREATE, TRUNCATE_EXISTING); + BufferedWriter writer = new BufferedWriter(Channels.newWriter(wbc, charset.newEncoder(), -1)); + try { + implWriteLines(writer, lines); + } finally { + writer.close(); + } + } + + /** + * Writes the given lines of text to the specified file. The characters in + * each line are encoded into bytes using the specified charset. When all + * lines have been written, or an I/O error occurs, then the file is closed. + * + * @param file + * The file + * @param lines + * The list of lines to write (in order) * @param csn * The name of the charset to be used * @@ -117,7 +157,7 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(FileRef file, List lines, String csn) + public static void writeLines(FileRef file, List lines, String csn) throws IOException { ensureCharsetIsSupported(csn); @@ -147,10 +187,10 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(FileRef file, List lines) - throws IOException - { - writeLines(file, lines, Charset.defaultCharset().name()); + public static void writeLines(FileRef file, List lines) + throws IOException + { + writeLines(file, lines, Charset.defaultCharset()); } /** @@ -170,10 +210,10 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(FileRef file, String... lines) - throws IOException - { - writeLines(file, Arrays.asList(lines), Charset.defaultCharset().name()); + public static void writeLines(FileRef file, CharSequence... lines) + throws IOException + { + writeLines(file, Arrays.asList(lines), Charset.defaultCharset()); } /** @@ -222,6 +262,40 @@ public final class Outputs { * The file * @param lines * The list of lines to write (in order) + * @param charset + * The charset to be used + * + * @throws java.nio.charset.UnsupportedCharsetException + * If no support for the named charset is available + * in this instance of the Java virtual machine + * @throws java.nio.charset.UnmappableCharacterException + * Where a line contains a character that cannot be mapped to an + * output byte sequence + * @throws IOException + * If an I/O error occurs + */ + public static void writeLines(File file, List lines, Charset charset) + throws IOException + { + ensureCharsetIsNotNull(charset); + FileOutputStream out = new FileOutputStream(file); + BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, charset)); + try { + implWriteLines(writer, lines); + } finally { + writer.close(); + } + } + + /** + * Writes the given lines of text to the specified file. The characters in + * each line are encoded into bytes using the specified charset. When all + * lines have been written, or an I/O error occurs, then the file is closed. + * + * @param file + * The file + * @param lines + * The list of lines to write (in order) * @param csn * The name of the charset to be used * @@ -234,7 +308,7 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(File file, List lines, String csn) + public static void writeLines(File file, List lines, String csn) throws IOException { ensureCharsetIsSupported(csn); @@ -264,10 +338,10 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(File file, List lines) - throws IOException - { - writeLines(file, lines, Charset.defaultCharset().name()); + public static void writeLines(File file, List lines) + throws IOException + { + writeLines(file, lines, Charset.defaultCharset()); } /** @@ -287,10 +361,10 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(File file, String... lines) - throws IOException - { - writeLines(file, Arrays.asList(lines), Charset.defaultCharset().name()); + public static void writeLines(File file, CharSequence... lines) + throws IOException + { + writeLines(file, Arrays.asList(lines), Charset.defaultCharset()); } /** @@ -301,18 +375,48 @@ public final class Outputs { * The output stream * @param lines * The list of lines to write (in order) + * @param charset + * The charset to be used + * + * @throws java.nio.charset.UnmappableCharacterException + * Where a line contains a character that cannot be mapped to an + * output byte sequence + * @throws IOException + * If an I/O error occurs + */ + public static void writeLines(OutputStream out, List lines, Charset charset) + throws IOException + { + ensureCharsetIsNotNull(charset); + BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, charset)); + implWriteLines(writer, lines); + writer.flush(); + } + + /** + * Writes the given lines of text to the specified output stream. The + * characters in each line are encoded into bytes using the specified charset. + * + * @param out + * The output stream + * @param lines + * The list of lines to write (in order) * @param csn * The name of the charset to be used * - * @throws java.nio.charset.UnmappableCharacterException - * Where a line contains a character that cannot be mapped to an - * output byte sequence - * @throws IOException - * If an I/O error occurs - */ - public static void writeLines(OutputStream out, List lines, String csn) - throws IOException - { + * @throws java.nio.charset.UnsupportedCharsetException + * If no support for the named charset is available + * in this instance of the Java virtual machine + * @throws java.nio.charset.UnmappableCharacterException + * Where a line contains a character that cannot be mapped to an + * output byte sequence + * @throws IOException + * If an I/O error occurs + */ + public static void writeLines(OutputStream out, List lines, String csn) + throws IOException + { + ensureCharsetIsSupported(csn); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, csn)); implWriteLines(writer, lines); writer.flush(); @@ -334,17 +438,17 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(OutputStream out, List lines) - throws IOException - { - writeLines(out, lines, Charset.defaultCharset().name()); - } - - private static void implWriteLines(BufferedWriter writer, List lines) - throws IOException - { - for (String line: lines) { - writer.write(line); + public static void writeLines(OutputStream out, List lines) + throws IOException + { + writeLines(out, lines, Charset.defaultCharset()); + } + + private static void implWriteLines(BufferedWriter writer, List lines) + throws IOException + { + for (CharSequence line: lines) { + writer.write(line.toString()); writer.newLine(); } } From forax at univ-mlv.fr Fri Nov 21 01:01:52 2008 From: forax at univ-mlv.fr (=?ISO-8859-1?Q?R=E9mi_Forax?=) Date: Fri, 21 Nov 2008 10:01:52 +0100 Subject: Ask for review: java.io.Ouputs Message-ID: <49267900.90409@univ-mlv.fr> Hi alan, hi all, following your comments : - ensureCharsetIsSupported now calls ensureCharsetIsSupported - all writeLines use an Iterable instead of a List. I wait your agrement before pushing the change. cheers, R?mi diff --git a/src/share/classes/java/io/Outputs.java b/src/share/classes/java/io/Outputs.java --- a/src/share/classes/java/io/Outputs.java +++ b/src/share/classes/java/io/Outputs.java @@ -33,7 +33,6 @@ import java.nio.channels.Channels; import java.nio.channels.Channels; import java.nio.channels.WritableByteChannel; import java.util.Arrays; -import java.util.List; /** * {@note experimental} @@ -52,10 +51,15 @@ public final class Outputs { // checks that charset is supported private static void ensureCharsetIsSupported(String csn) { - if (csn == null) - throw new NullPointerException("'csn' is null"); + ensureCharsetIsNotNull(csn); if (!Charset.isSupported(csn)) throw new UnsupportedCharsetException(csn); + } + + // checks that charset is not null + private static void ensureCharsetIsNotNull(Object charset) { + if (charset == null) + throw new NullPointerException("charset is null"); } /** @@ -105,6 +109,40 @@ public final class Outputs { * The file * @param lines * The list of lines to write (in order) + * @param charset + * The charset to be used + * + * @throws java.nio.charset.UnsupportedCharsetException + * If no support for the named charset is available + * in this instance of the Java virtual machine + * @throws java.nio.charset.UnmappableCharacterException + * Where a line contains a character that cannot be mapped to an + * output byte sequence + * @throws IOException + * If an I/O error occurs + */ + public static void writeLines(FileRef file, Iterable lines, Charset charset) + throws IOException + { + ensureCharsetIsNotNull(charset); + WritableByteChannel wbc = file.newByteChannel(WRITE, CREATE, TRUNCATE_EXISTING); + BufferedWriter writer = new BufferedWriter(Channels.newWriter(wbc, charset.newEncoder(), -1)); + try { + implWriteLines(writer, lines); + } finally { + writer.close(); + } + } + + /** + * Writes the given lines of text to the specified file. The characters in + * each line are encoded into bytes using the specified charset. When all + * lines have been written, or an I/O error occurs, then the file is closed. + * + * @param file + * The file + * @param lines + * The list of lines to write (in order) * @param csn * The name of the charset to be used * @@ -117,7 +155,7 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(FileRef file, List lines, String csn) + public static void writeLines(FileRef file, Iterable lines, String csn) throws IOException { ensureCharsetIsSupported(csn); @@ -147,10 +185,10 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(FileRef file, List lines) - throws IOException - { - writeLines(file, lines, Charset.defaultCharset().name()); + public static void writeLines(FileRef file, Iterable lines) + throws IOException + { + writeLines(file, lines, Charset.defaultCharset()); } /** @@ -170,10 +208,10 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(FileRef file, String... lines) - throws IOException - { - writeLines(file, Arrays.asList(lines), Charset.defaultCharset().name()); + public static void writeLines(FileRef file, CharSequence... lines) + throws IOException + { + writeLines(file, Arrays.asList(lines), Charset.defaultCharset()); } /** @@ -222,6 +260,40 @@ public final class Outputs { * The file * @param lines * The list of lines to write (in order) + * @param charset + * The charset to be used + * + * @throws java.nio.charset.UnsupportedCharsetException + * If no support for the named charset is available + * in this instance of the Java virtual machine + * @throws java.nio.charset.UnmappableCharacterException + * Where a line contains a character that cannot be mapped to an + * output byte sequence + * @throws IOException + * If an I/O error occurs + */ + public static void writeLines(File file, Iterable lines, Charset charset) + throws IOException + { + ensureCharsetIsNotNull(charset); + FileOutputStream out = new FileOutputStream(file); + BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, charset)); + try { + implWriteLines(writer, lines); + } finally { + writer.close(); + } + } + + /** + * Writes the given lines of text to the specified file. The characters in + * each line are encoded into bytes using the specified charset. When all + * lines have been written, or an I/O error occurs, then the file is closed. + * + * @param file + * The file + * @param lines + * The list of lines to write (in order) * @param csn * The name of the charset to be used * @@ -234,7 +306,7 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(File file, List lines, String csn) + public static void writeLines(File file, Iterable lines, String csn) throws IOException { ensureCharsetIsSupported(csn); @@ -264,10 +336,10 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(File file, List lines) - throws IOException - { - writeLines(file, lines, Charset.defaultCharset().name()); + public static void writeLines(File file, Iterable lines) + throws IOException + { + writeLines(file, lines, Charset.defaultCharset()); } /** @@ -287,10 +359,10 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(File file, String... lines) - throws IOException - { - writeLines(file, Arrays.asList(lines), Charset.defaultCharset().name()); + public static void writeLines(File file, CharSequence... lines) + throws IOException + { + writeLines(file, Arrays.asList(lines), Charset.defaultCharset()); } /** @@ -301,18 +373,48 @@ public final class Outputs { * The output stream * @param lines * The list of lines to write (in order) + * @param charset + * The charset to be used + * + * @throws java.nio.charset.UnmappableCharacterException + * Where a line contains a character that cannot be mapped to an + * output byte sequence + * @throws IOException + * If an I/O error occurs + */ + public static void writeLines(OutputStream out, Iterable lines, Charset charset) + throws IOException + { + ensureCharsetIsNotNull(charset); + BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, charset)); + implWriteLines(writer, lines); + writer.flush(); + } + + /** + * Writes the given lines of text to the specified output stream. The + * characters in each line are encoded into bytes using the specified charset. + * + * @param out + * The output stream + * @param lines + * The list of lines to write (in order) * @param csn * The name of the charset to be used * - * @throws java.nio.charset.UnmappableCharacterException - * Where a line contains a character that cannot be mapped to an - * output byte sequence - * @throws IOException - * If an I/O error occurs - */ - public static void writeLines(OutputStream out, List lines, String csn) - throws IOException - { + * @throws java.nio.charset.UnsupportedCharsetException + * If no support for the named charset is available + * in this instance of the Java virtual machine + * @throws java.nio.charset.UnmappableCharacterException + * Where a line contains a character that cannot be mapped to an + * output byte sequence + * @throws IOException + * If an I/O error occurs + */ + public static void writeLines(OutputStream out, Iterable lines, String csn) + throws IOException + { + ensureCharsetIsSupported(csn); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, csn)); implWriteLines(writer, lines); writer.flush(); @@ -334,17 +436,17 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(OutputStream out, List lines) - throws IOException - { - writeLines(out, lines, Charset.defaultCharset().name()); - } - - private static void implWriteLines(BufferedWriter writer, List lines) - throws IOException - { - for (String line: lines) { - writer.write(line); + public static void writeLines(OutputStream out, Iterable lines) + throws IOException + { + writeLines(out, lines, Charset.defaultCharset()); + } + + private static void implWriteLines(BufferedWriter writer, Iterable lines) + throws IOException + { + for (CharSequence line: lines) { + writer.write(line.toString()); writer.newLine(); } } From Alan.Bateman at Sun.COM Fri Nov 21 05:02:59 2008 From: Alan.Bateman at Sun.COM (Alan Bateman) Date: Fri, 21 Nov 2008 13:02:59 +0000 Subject: b98? Message-ID: <4926B183.2070602@sun.com> It has been a couple of weeks since the last snapshot so I plan to check with Xiomara today to see if she can push a new build for us on Monday or Tuesday. If anyone has any bugs/issues that they need fixed in this build then let me know today. -Alan. From Xueming.Shen at Sun.COM Fri Nov 21 16:15:42 2008 From: Xueming.Shen at Sun.COM (Xueming Shen) Date: Fri, 21 Nov 2008 16:15:42 -0800 Subject: Ask for review: java.io.Ouputs In-Reply-To: References: Message-ID: <49274F2E.1010807@sun.com> Comments not necessary to the updated version. (1) The UnsupportedCharsetException should not be "extected" if we pass in a Charset, you got one already:-) (2)Is it really necessary to check "Charset.isSupproted()"? The csn will be checked when the Charset is created later anyway, why do lookup twice. Yes, understood it can catch the problem 1-2 step(s) earlier, I double you want to pay that price. (3) The UnmappableCharacterException is tricky the current StreamEncoder implementation always sets to use Action.REPLACE if you pass a charset (for "old java.io" OutputStreamWriter case) but goes whatever the "current" setting of the encoder, which will be the default "report" if the action is NOT set to something else, so you might get uce (from all nio implementation). OutputStreamWriter specifically "defines" the behavior when malfromed or unmappable situation occurs (replace, if not the constructor that uses CharsetEncoder), the question is what we want to do for this utility class, we kindly of mix the "old" io and nio:-) One alternative is to explicitly use CharsetEncoder for OutputStreamWriter. If you specify the UCE, you might also want to say something about malformed as well. > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 21 Nov 2008 10:01:52 +0100 > From: R?mi Forax > Subject: Ask for review: java.io.Ouputs > To: nio-dev at openjdk.java.net, Alan Bateman > Message-ID: <49267900.90409 at univ-mlv.fr> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi alan, hi all, > following your comments : > - ensureCharsetIsSupported now calls ensureCharsetIsSupported > - all writeLines use an Iterable instead of a List. > > I wait your agrement before pushing the change. > cheers, > R?mi > > diff --git a/src/share/classes/java/io/Outputs.java > b/src/share/classes/java/io/Outputs.java > --- a/src/share/classes/java/io/Outputs.java > +++ b/src/share/classes/java/io/Outputs.java > @@ -33,7 +33,6 @@ import java.nio.channels.Channels; > import java.nio.channels.Channels; > import java.nio.channels.WritableByteChannel; > import java.util.Arrays; > -import java.util.List; > > /** > * {@note experimental} > @@ -52,10 +51,15 @@ public final class Outputs { > > // checks that charset is supported > private static void ensureCharsetIsSupported(String csn) { > - if (csn == null) > - throw new NullPointerException("'csn' is null"); > + ensureCharsetIsNotNull(csn); > if (!Charset.isSupported(csn)) > throw new UnsupportedCharsetException(csn); > + } > + > + // checks that charset is not null > + private static void ensureCharsetIsNotNull(Object charset) { > + if (charset == null) > + throw new NullPointerException("charset is null"); > } > > /** > @@ -105,6 +109,40 @@ public final class Outputs { > * The file > * @param lines > * The list of lines to write (in order) > + * @param charset > + * The charset to be used > + * > + * @throws java.nio.charset.UnsupportedCharsetException > + * If no support for the named charset is available > + * in this instance of the Java virtual machine > + * @throws java.nio.charset.UnmappableCharacterException > + * Where a line contains a character that cannot be mapped > to an > + * output byte sequence > + * @throws IOException > + * If an I/O error occurs > + */ > + public static void writeLines(FileRef file, Iterable CharSequence> lines, Charset charset) > + throws IOException > + { > + ensureCharsetIsNotNull(charset); > + WritableByteChannel wbc = file.newByteChannel(WRITE, CREATE, > TRUNCATE_EXISTING); > + BufferedWriter writer = new > BufferedWriter(Channels.newWriter(wbc, charset.newEncoder(), -1)); > + try { > + implWriteLines(writer, lines); > + } finally { > + writer.close(); > + } > + } > + > + /** > + * Writes the given lines of text to the specified file. The > characters in > + * each line are encoded into bytes using the specified charset. > When all > + * lines have been written, or an I/O error occurs, then the file > is closed. > + * > + * @param file > + * The file > + * @param lines > + * The list of lines to write (in order) > * @param csn > * The name of the charset to be used > * > @@ -117,7 +155,7 @@ public final class Outputs { > * @throws IOException > * If an I/O error occurs > */ > - public static void writeLines(FileRef file, List lines, > String csn) > + public static void writeLines(FileRef file, Iterable CharSequence> lines, String csn) > throws IOException > { > ensureCharsetIsSupported(csn); > @@ -147,10 +185,10 @@ public final class Outputs { > * @throws IOException > * If an I/O error occurs > */ > - public static void writeLines(FileRef file, List lines) > - throws IOException > - { > - writeLines(file, lines, Charset.defaultCharset().name()); > + public static void writeLines(FileRef file, Iterable CharSequence> lines) > + throws IOException > + { > + writeLines(file, lines, Charset.defaultCharset()); > } > > /** > @@ -170,10 +208,10 @@ public final class Outputs { > * @throws IOException > * If an I/O error occurs > */ > - public static void writeLines(FileRef file, String... lines) > - throws IOException > - { > - writeLines(file, Arrays.asList(lines), > Charset.defaultCharset().name()); > + public static void writeLines(FileRef file, CharSequence... lines) > + throws IOException > + { > + writeLines(file, Arrays.asList(lines), Charset.defaultCharset()); > } > > /** > @@ -222,6 +260,40 @@ public final class Outputs { > * The file > * @param lines > * The list of lines to write (in order) > + * @param charset > + * The charset to be used > + * > + * @throws java.nio.charset.UnsupportedCharsetException > + * If no support for the named charset is available > + * in this instance of the Java virtual machine > + * @throws java.nio.charset.UnmappableCharacterException > + * Where a line contains a character that cannot be mapped > to an > + * output byte sequence > + * @throws IOException > + * If an I/O error occurs > + */ > + public static void writeLines(File file, Iterable CharSequence> lines, Charset charset) > + throws IOException > + { > + ensureCharsetIsNotNull(charset); > + FileOutputStream out = new FileOutputStream(file); > + BufferedWriter writer = new BufferedWriter(new > OutputStreamWriter(out, charset)); > + try { > + implWriteLines(writer, lines); > + } finally { > + writer.close(); > + } > + } > + > + /** > + * Writes the given lines of text to the specified file. The > characters in > + * each line are encoded into bytes using the specified charset. > When all > + * lines have been written, or an I/O error occurs, then the file > is closed. > + * > + * @param file > + * The file > + * @param lines > + * The list of lines to write (in order) > * @param csn > * The name of the charset to be used > * > @@ -234,7 +306,7 @@ public final class Outputs { > * @throws IOException > * If an I/O error occurs > */ > - public static void writeLines(File file, List lines, String > csn) > + public static void writeLines(File file, Iterable CharSequence> lines, String csn) > throws IOException > { > ensureCharsetIsSupported(csn); > @@ -264,10 +336,10 @@ public final class Outputs { > * @throws IOException > * If an I/O error occurs > */ > - public static void writeLines(File file, List lines) > - throws IOException > - { > - writeLines(file, lines, Charset.defaultCharset().name()); > + public static void writeLines(File file, Iterable CharSequence> lines) > + throws IOException > + { > + writeLines(file, lines, Charset.defaultCharset()); > } > > /** > @@ -287,10 +359,10 @@ public final class Outputs { > * @throws IOException > * If an I/O error occurs > */ > - public static void writeLines(File file, String... lines) > - throws IOException > - { > - writeLines(file, Arrays.asList(lines), > Charset.defaultCharset().name()); > + public static void writeLines(File file, CharSequence... lines) > + throws IOException > + { > + writeLines(file, Arrays.asList(lines), Charset.defaultCharset()); > } > > /** > @@ -301,18 +373,48 @@ public final class Outputs { > * The output stream > * @param lines > * The list of lines to write (in order) > + * @param charset > + * The charset to be used > + * > + * @throws java.nio.charset.UnmappableCharacterException > + * Where a line contains a character that cannot be mapped > to an > + * output byte sequence > + * @throws IOException > + * If an I/O error occurs > + */ > + public static void writeLines(OutputStream out, Iterable CharSequence> lines, Charset charset) > + throws IOException > + { > + ensureCharsetIsNotNull(charset); > + BufferedWriter writer = new BufferedWriter(new > OutputStreamWriter(out, charset)); > + implWriteLines(writer, lines); > + writer.flush(); > + } > + > + /** > + * Writes the given lines of text to the specified output stream. The > + * characters in each line are encoded into bytes using the > specified charset. > + * > + * @param out > + * The output stream > + * @param lines > + * The list of lines to write (in order) > * @param csn > * The name of the charset to be used > * > - * @throws java.nio.charset.UnmappableCharacterException > - * Where a line contains a character that cannot be mapped > to an > - * output byte sequence > - * @throws IOException > - * If an I/O error occurs > - */ > - public static void writeLines(OutputStream out, List lines, > String csn) > - throws IOException > - { > + * @throws java.nio.charset.UnsupportedCharsetException > + * If no support for the named charset is available > + * in this instance of the Java virtual machine > + * @throws java.nio.charset.UnmappableCharacterException > + * Where a line contains a character that cannot be mapped > to an > + * output byte sequence > + * @throws IOException > + * If an I/O error occurs > + */ > + public static void writeLines(OutputStream out, Iterable CharSequence> lines, String csn) > + throws IOException > + { > + ensureCharsetIsSupported(csn); > BufferedWriter writer = new BufferedWriter(new > OutputStreamWriter(out, csn)); > implWriteLines(writer, lines); > writer.flush(); > @@ -334,17 +436,17 @@ public final class Outputs { > * @throws IOException > * If an I/O error occurs > */ > - public static void writeLines(OutputStream out, List lines) > - throws IOException > - { > - writeLines(out, lines, Charset.defaultCharset().name()); > - } > - > - private static void implWriteLines(BufferedWriter writer, > List lines) > - throws IOException > - { > - for (String line: lines) { > - writer.write(line); > + public static void writeLines(OutputStream out, Iterable CharSequence> lines) > + throws IOException > + { > + writeLines(out, lines, Charset.defaultCharset()); > + } > + > + private static void implWriteLines(BufferedWriter writer, > Iterable lines) > + throws IOException > + { > + for (CharSequence line: lines) { > + writer.write(line.toString()); > writer.newLine(); > } > } > > > From Alan.Bateman at Sun.COM Sat Nov 22 00:22:42 2008 From: Alan.Bateman at Sun.COM (Alan Bateman) Date: Sat, 22 Nov 2008 08:22:42 +0000 Subject: Ask for review: java.io.Ouputs In-Reply-To: <49274F2E.1010807@sun.com> References: <49274F2E.1010807@sun.com> Message-ID: <4927C152.30400@sun.com> Xueming Shen wrote: > > Comments not necessary to the updated version. > > (1) The UnsupportedCharsetException should not be "extected" if we > pass in a Charset, you got one > already:-) Good catch! I missed this when reviewing these changes. Remi has not pushed these changes yet so no problem. > > (2)Is it really necessary to check "Charset.isSupproted()"? The csn > will be checked when the > Charset is created later anyway, why do lookup twice. Yes, understood > it can catch the problem > 1-2 step(s) earlier, I double you want to pay that price. All parameters need to be checked before the file is created (or truncated). > > (3) The UnmappableCharacterException is tricky the current > StreamEncoder implementation > always sets to use Action.REPLACE if you pass a charset (for "old > java.io" OutputStreamWriter > case) but goes whatever the "current" setting of the encoder, which > will be the default "report" if the > action is NOT set to something else, so you might get uce (from all > nio implementation). > OutputStreamWriter specifically "defines" the behavior when malfromed > or unmappable situation > occurs (replace, if not the constructor that uses CharsetEncoder), the > question is what we want to > do for this utility class, we kindly of mix the "old" io and nio:-) > One alternative is to explicitly use > CharsetEncoder for OutputStreamWriter. If you specify the UCE, you > might also want to say > something about malformed as well. I have been meaning to talk to you about this. We need the REPORT action so using the CharsetEncoder form seems a good idea (thanks for thinking about this one). -Alan. From Xueming.Shen at Sun.COM Sat Nov 22 09:07:06 2008 From: Xueming.Shen at Sun.COM (Xueming Shen) Date: Sat, 22 Nov 2008 09:07:06 -0800 Subject: Ask for review: java.io.Ouputs In-Reply-To: <4927C152.30400@sun.com> References: <49274F2E.1010807@sun.com> <4927C152.30400@sun.com> Message-ID: <49283C3A.6060408@sun.com> Alan Bateman wrote: > >> >> (2)Is it really necessary to check "Charset.isSupproted()"? The csn >> will be checked when the >> Charset is created later anyway, why do lookup twice. Yes, understood >> it can catch the problem >> 1-2 step(s) earlier, I double you want to pay that price. > All parameters need to be checked before the file is created (or > truncated). Did not consider that:-) an alternative is to get the encoder first then the file creation. From Alan.Bateman at Sun.COM Sat Nov 22 09:47:11 2008 From: Alan.Bateman at Sun.COM (Alan Bateman) Date: Sat, 22 Nov 2008 17:47:11 +0000 Subject: Ask for review: java.io.Ouputs In-Reply-To: <49283C3A.6060408@sun.com> References: <49274F2E.1010807@sun.com> <4927C152.30400@sun.com> <49283C3A.6060408@sun.com> Message-ID: <4928459F.4080404@sun.com> Xueming Shen wrote: > Alan Bateman wrote: >> >>> >>> (2)Is it really necessary to check "Charset.isSupproted()"? The csn >>> will be checked when the >>> Charset is created later anyway, why do lookup twice. Yes, >>> understood it can catch the problem >>> 1-2 step(s) earlier, I double you want to pay that price. >> All parameters need to be checked before the file is created (or >> truncated). > > Did not consider that:-) an alternative is to get the encoder first > then the file creation. Yes, that is the right thing to do and this also ensures that the encoder has the default action to report errors. -Alan. From alan.bateman at sun.com Tue Nov 25 04:56:39 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Tue, 25 Nov 2008 12:56:39 +0000 Subject: hg: nio/nio: Added tag jdk7-b40 for changeset 44be42de6693 Message-ID: <20081125125639.3095DDBCE@hg.openjdk.java.net> Changeset: 8c34e4abcb43 Author: xdono Date: 2008-11-20 11:39 -0800 URL: http://hg.openjdk.java.net/nio/nio/rev/8c34e4abcb43 Added tag jdk7-b40 for changeset 44be42de6693 ! .hgtags From alan.bateman at sun.com Tue Nov 25 04:58:21 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Tue, 25 Nov 2008 12:58:21 +0000 Subject: hg: nio/nio/corba: Added tag jdk7-b40 for changeset 184e21992f47 Message-ID: <20081125125822.1CA4DDBD3@hg.openjdk.java.net> Changeset: c90eeda9594e Author: xdono Date: 2008-11-20 11:39 -0800 URL: http://hg.openjdk.java.net/nio/nio/corba/rev/c90eeda9594e Added tag jdk7-b40 for changeset 184e21992f47 ! .hgtags From alan.bateman at sun.com Tue Nov 25 05:00:07 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Tue, 25 Nov 2008 13:00:07 +0000 Subject: hg: nio/nio/hotspot: 14 new changesets Message-ID: <20081125130034.419C4DBD9@hg.openjdk.java.net> Changeset: c7ec737733a6 Author: kamg Date: 2008-10-30 15:48 -0400 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/c7ec737733a6 6756528: Bytecodes::special_length_at reads past end of code buffer Summary: Add end-of-buffer indicator for paths used by the verifier Reviewed-by: acorn, coleenp ! src/share/vm/interpreter/bytecodeStream.cpp ! src/share/vm/interpreter/bytecodes.cpp ! src/share/vm/interpreter/bytecodes.hpp Changeset: 348be627a148 Author: xlu Date: 2008-10-31 10:34 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/348be627a148 Merge Changeset: 4d9884b01ba6 Author: never Date: 2008-10-28 09:31 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/4d9884b01ba6 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it Reviewed-by: kvn, rasbold ! src/cpu/sparc/vm/sparc.ad ! src/cpu/x86/vm/x86_32.ad ! src/cpu/x86/vm/x86_64.ad ! src/share/vm/adlc/adlparse.cpp ! src/share/vm/adlc/adlparse.hpp ! src/share/vm/adlc/filebuff.cpp ! src/share/vm/adlc/filebuff.hpp ! src/share/vm/adlc/forms.cpp ! src/share/vm/adlc/forms.hpp ! src/share/vm/adlc/formssel.cpp ! src/share/vm/adlc/formssel.hpp ! src/share/vm/adlc/output_c.cpp ! src/share/vm/adlc/output_h.cpp ! src/share/vm/opto/matcher.hpp ! src/share/vm/opto/output.cpp ! src/share/vm/opto/reg_split.cpp Changeset: b6cfd754403d Author: never Date: 2008-10-28 18:02 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/b6cfd754403d 6649622: HotSpot Biased locking needs tuning on latest CPUs Reviewed-by: rasbold, kvn, kamg ! src/share/vm/runtime/arguments.cpp Changeset: f4fe12e429a4 Author: never Date: 2008-10-30 17:08 -0700 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/f4fe12e429a4 6764622: IdealGraphVisualizer fixes Reviewed-by: rasbold, jrose ! src/share/tools/IdealGraphVisualizer/Bytecodes/src/com/sun/hotspot/igv/bytecodes/BytecodeViewTopComponent.java ! src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowScene.java ! src/share/tools/IdealGraphVisualizer/ControlFlow/src/com/sun/hotspot/igv/controlflow/ControlFlowTopComponent.java ! src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/FolderNode.java ! src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/GraphDocument.java ! src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Group.java ! src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputGraph.java ! src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputMethod.java ! src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/InputNode.java ! src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Properties.java ! src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/Property.java ! src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/serialization/Parser.java ! src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/serialization/Printer.java ! src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/serialization/XMLParser.java ! src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/serialization/XMLWriter.java ! src/share/tools/IdealGraphVisualizer/Difference/src/com/sun/hotspot/igv/difference/Difference.java ! src/share/tools/IdealGraphVisualizer/Filter/manifest.mf ! src/share/tools/IdealGraphVisualizer/Filter/src/com/sun/hotspot/igv/filter/CustomFilter.java ! src/share/tools/IdealGraphVisualizer/Filter/src/com/sun/hotspot/igv/filter/SplitFilter.java ! src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Diagram.java ! src/share/tools/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Figure.java ! src/share/tools/IdealGraphVisualizer/HierarchicalLayout/src/com/sun/hotspot/igv/hierarchicallayout/Graph.java ! src/share/tools/IdealGraphVisualizer/HierarchicalLayout/src/com/sun/hotspot/igv/hierarchicallayout/HierarchicalClusterLayoutManager.java ! src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/LayoutGraph.java ! src/share/tools/IdealGraphVisualizer/README ! src/share/tools/IdealGraphVisualizer/Util/src/com/sun/hotspot/igv/util/PropertiesSheet.java ! src/share/tools/IdealGraphVisualizer/Util/src/com/sun/hotspot/igv/util/RangeSliderModel.java ! src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramScene.java ! src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramViewModel.java ! src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/FindPanel.java ! src/share/tools/IdealGraphVisualizer/nbproject/platform.properties ! src/share/tools/IdealGraphVisualizer/nbproject/project.properties ! src/share/vm/adlc/output_h.cpp ! src/share/vm/opto/compile.cpp ! src/share/vm/opto/type.cpp ! src/share/vm/runtime/frame.cpp Changeset: 72c5366e5d86 Author: rasbold Date: 2008-11-06 14:59 -0800 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/72c5366e5d86 6743900: frequency based block layout Summary: post-register allocation pass that drives block layout by edge frequencies Reviewed-by: never, kvn ! src/share/vm/opto/block.cpp ! src/share/vm/opto/block.hpp ! src/share/vm/opto/c2_globals.hpp ! src/share/vm/opto/compile.cpp ! src/share/vm/opto/compile.hpp ! src/share/vm/opto/gcm.cpp ! src/share/vm/opto/output.cpp ! src/share/vm/opto/phase.cpp ! src/share/vm/opto/phase.hpp Changeset: 0bf25c4807f9 Author: never Date: 2008-11-06 20:00 -0800 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/0bf25c4807f9 6761594: framesize rounding code rounds using wrong units leading to slightly oversized frames Reviewed-by: rasbold, kvn ! src/share/vm/opto/chaitin.cpp Changeset: a1980da045cc Author: kvn Date: 2008-11-07 09:29 -0800 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/a1980da045cc 6462850: generate biased locking code in C2 ideal graph Summary: Inline biased locking code in C2 ideal graph during macro nodes expansion Reviewed-by: never ! src/cpu/sparc/vm/assembler_sparc.cpp ! src/cpu/sparc/vm/assembler_sparc.hpp ! src/cpu/sparc/vm/sparc.ad ! src/cpu/x86/vm/assembler_x86.cpp ! src/cpu/x86/vm/assembler_x86.hpp ! src/cpu/x86/vm/x86_32.ad ! src/cpu/x86/vm/x86_64.ad ! src/os_cpu/linux_x86/vm/linux_x86_32.ad ! src/os_cpu/solaris_x86/vm/solaris_x86_32.ad ! src/share/vm/adlc/formssel.cpp ! src/share/vm/opto/c2_globals.hpp ! src/share/vm/opto/callnode.cpp ! src/share/vm/opto/callnode.hpp ! src/share/vm/opto/classes.hpp ! src/share/vm/opto/compile.cpp ! src/share/vm/opto/library_call.cpp ! src/share/vm/opto/loopTransform.cpp ! src/share/vm/opto/macro.cpp ! src/share/vm/opto/macro.hpp ! src/share/vm/opto/matcher.cpp ! src/share/vm/opto/memnode.cpp ! src/share/vm/opto/memnode.hpp ! src/share/vm/opto/type.hpp ! src/share/vm/runtime/arguments.cpp ! src/share/vm/utilities/vmError.cpp Changeset: 577f3a2e0662 Author: never Date: 2008-11-07 13:55 -0800 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/577f3a2e0662 Merge Changeset: 05db98ed59ba Author: coleenp Date: 2008-11-07 11:03 -0500 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/05db98ed59ba 6760773: UseCompressedOops is broken with UseParNewGC Summary: sparc code for gen_subtype_check was doing an ld for a compressed oop with the sign bit set so not comparing, leading to a ClassCastException. Reviewed-by: phh, never, acorn, kvn, xlu ! src/cpu/sparc/vm/interp_masm_sparc.cpp ! src/cpu/sparc/vm/stubGenerator_sparc.cpp Changeset: 909cfd030fab Author: kamg Date: 2008-11-12 11:23 -0500 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/909cfd030fab Merge Changeset: 7704802ec1ce Author: trims Date: 2008-11-14 19:23 -0800 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/7704802ec1ce Merge Changeset: 81a0cbe3b284 Author: trims Date: 2008-11-14 19:26 -0800 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/81a0cbe3b284 6771977: Bump HS14 build number to 07 Summary: Update the Hotspot build number to 07 Reviewed-by: jcoomes ! make/hotspot_version Changeset: 316c0b576ea1 Author: xdono Date: 2008-11-20 11:39 -0800 URL: http://hg.openjdk.java.net/nio/nio/hotspot/rev/316c0b576ea1 Added tag jdk7-b40 for changeset 81a0cbe3b284 ! .hgtags From alan.bateman at sun.com Tue Nov 25 05:02:16 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Tue, 25 Nov 2008 13:02:16 +0000 Subject: hg: nio/nio/jaxp: Added tag jdk7-b40 for changeset 54946f466e2c Message-ID: <20081125130218.20B93DBE1@hg.openjdk.java.net> Changeset: 0758bd3e2852 Author: xdono Date: 2008-11-20 11:39 -0800 URL: http://hg.openjdk.java.net/nio/nio/jaxp/rev/0758bd3e2852 Added tag jdk7-b40 for changeset 54946f466e2c ! .hgtags From alan.bateman at sun.com Tue Nov 25 05:04:02 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Tue, 25 Nov 2008 13:04:02 +0000 Subject: hg: nio/nio/jaxws: Added tag jdk7-b40 for changeset 70a6ac6dd737 Message-ID: <20081125130403.CAB03DBE7@hg.openjdk.java.net> Changeset: a8379d24aa03 Author: xdono Date: 2008-11-20 11:39 -0800 URL: http://hg.openjdk.java.net/nio/nio/jaxws/rev/a8379d24aa03 Added tag jdk7-b40 for changeset 70a6ac6dd737 ! .hgtags From alan.bateman at sun.com Tue Nov 25 05:05:50 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Tue, 25 Nov 2008 13:05:50 +0000 Subject: hg: nio/nio/jdk: 13 new changesets Message-ID: <20081125130823.09C44DBEC@hg.openjdk.java.net> Changeset: 4f985ba72055 Author: sherman Date: 2008-11-19 14:29 -0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/4f985ba72055 6714428: 'os.name' system property shows wrong value on 64-bit Windows XP Summary: update to detect the correct os.name for 64-bit XP Reviewed-by: darcy ! src/windows/native/java/lang/java_props_md.c Changeset: 098e456e860e Author: emcmanus Date: 2008-11-20 10:10 +0100 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/098e456e860e 6772779: @NotificationInfo does not create MBeanNotificationInfo in the MBean's MBeanInfo 6773593: CompositeDataSupport constructor javadoc is not in sync with the implementation Reviewed-by: sjiang ! src/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java ! src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java ! src/share/classes/javax/management/openmbean/CompositeDataSupport.java ! test/javax/management/Introspector/AnnotatedNotificationInfoTest.java Changeset: b132be5b3a69 Author: alanb Date: 2008-11-20 13:54 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/b132be5b3a69 Merge Changeset: 5fdbcb9bff56 Author: alanb Date: 2008-11-20 21:58 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/5fdbcb9bff56 Misc. clean-up of Windows file system implementation - eliminate reference to resolved path - reference to win32 path not needed for absolute paths < MAX_PATH - reduce overhead of processing open options - ! src/windows/classes/sun/nio/fs/WindowsAclFileAttributeView.java ! src/windows/classes/sun/nio/fs/WindowsChannelFactory.java ! src/windows/classes/sun/nio/fs/WindowsDirectoryStream.java ! src/windows/classes/sun/nio/fs/WindowsFileAttributeViews.java ! src/windows/classes/sun/nio/fs/WindowsFileCopy.java ! src/windows/classes/sun/nio/fs/WindowsFileStore.java ! src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java ! src/windows/classes/sun/nio/fs/WindowsLinkSupport.java ! src/windows/classes/sun/nio/fs/WindowsNamedAttributeView.java ! src/windows/classes/sun/nio/fs/WindowsPath.java Changeset: e5bd14c41de3 Author: alanb Date: 2008-11-22 13:07 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/e5bd14c41de3 Dynamic access to user-defined/extended attributes can use byte arrays Improve test coverage ! src/share/classes/java/nio/file/attribute/NamedAttributeView.java ! src/share/classes/sun/nio/fs/AbstractNamedAttributeView.java ! test/java/nio/file/attribute/NamedAttributeView/Basic.java Changeset: d0e27480e7b5 Author: alanb Date: 2008-11-22 13:59 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/d0e27480e7b5 Interrupting copyTo with INTERRUPTIBLE option should not reset interrupt status ! src/share/classes/sun/nio/fs/Cancellable.java ! test/java/nio/file/Path/InterruptCopy.java Changeset: 9df22bc448a3 Author: sherman Date: 2008-11-20 14:06 -0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/9df22bc448a3 6745216: missing 4 chraset aliases in sun.nio.cs package Summary: added "834" into x-IBM834's aliase list. Reviewed-by: alanb ! src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java Changeset: 97e2e87aa035 Author: dfuchs Date: 2008-11-21 18:18 +0100 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/97e2e87aa035 6774170: LocalRMIServerSocketFactory should protect against ServerSocket.accept().getInetAddress() being null Reviewed-by: emcmanus, jfdenise ! src/share/classes/sun/management/jmxremote/LocalRMIServerSocketFactory.java + test/sun/management/jmxremote/LocalRMIServerSocketFactoryTest.java Changeset: d00c685ae55e Author: xdono Date: 2008-11-20 11:39 -0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/d00c685ae55e Added tag jdk7-b40 for changeset 2201dad60231 ! .hgtags Changeset: 44941f893cea Author: tbell Date: 2008-11-21 15:21 -0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/44941f893cea Merge Changeset: ce2d0938ea27 Author: tbell Date: 2008-11-21 20:53 -0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/ce2d0938ea27 Merge Changeset: d7b0a715bd3b Author: martin Date: 2008-11-23 09:56 -0800 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/d7b0a715bd3b 6775152: freetype version check program problem main arg order Summary: Fix all compiler warnings Reviewed-by: ohair, tbell ! make/common/shared/Sanity.gmk Changeset: 0a384911d4e6 Author: alanb Date: 2008-11-24 06:51 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/0a384911d4e6 Merge ! .hgtags From alan.bateman at sun.com Tue Nov 25 05:13:14 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Tue, 25 Nov 2008 13:13:14 +0000 Subject: hg: nio/nio/langtools: 2 new changesets Message-ID: <20081125131317.74B4FDBF1@hg.openjdk.java.net> Changeset: 82463d00ac70 Author: xdono Date: 2008-11-20 11:39 -0800 URL: http://hg.openjdk.java.net/nio/nio/langtools/rev/82463d00ac70 Added tag jdk7-b40 for changeset 32e309883246 ! .hgtags Changeset: ded6b40f558e Author: tbell Date: 2008-11-21 15:21 -0800 URL: http://hg.openjdk.java.net/nio/nio/langtools/rev/ded6b40f558e Merge From alan.bateman at sun.com Tue Nov 25 11:49:41 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Tue, 25 Nov 2008 19:49:41 +0000 Subject: hg: nio/nio/jdk: Added tag nio2-b98 for changeset 0a384911d4e6 Message-ID: <20081125194958.0C9AADC33@hg.openjdk.java.net> Changeset: 52fc75ecaebb Author: alanb Date: 2008-11-25 16:56 +0000 URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/52fc75ecaebb Added tag nio2-b98 for changeset 0a384911d4e6 ! .hgtags From forax at univ-mlv.fr Tue Nov 25 16:11:30 2008 From: forax at univ-mlv.fr (=?ISO-8859-1?Q?R=E9mi_Forax?=) Date: Wed, 26 Nov 2008 01:11:30 +0100 Subject: Ask for review: java.io.Ouputs In-Reply-To: <4928459F.4080404@sun.com> References: <49274F2E.1010807@sun.com> <4927C152.30400@sun.com> <49283C3A.6060408@sun.com> <4928459F.4080404@sun.com> Message-ID: <492C9432.4050901@univ-mlv.fr> Alan Bateman a ?crit : > Xueming Shen wrote: >> Alan Bateman wrote: >>> >>>> >>>> (2)Is it really necessary to check "Charset.isSupproted()"? The csn >>>> will be checked when the >>>> Charset is created later anyway, why do lookup twice. Yes, >>>> understood it can catch the problem >>>> 1-2 step(s) earlier, I double you want to pay that price. >>> All parameters need to be checked before the file is created (or >>> truncated). >> >> Did not consider that:-) an alternative is to get the encoder first >> then the file creation. > Yes, that is the right thing to do and this also ensures that the > encoder has the default action to report errors. Ok, here is the new diff since the last diff - writeLines that takes a charset no longer says that UnsupportedCharsetException can be thrown. - all writeLines now use an encoder which is get before the file is created to dectet null charset or unsupported ones. > > -Alan. R?mi diff --git a/src/share/classes/java/io/Outputs.java b/src/share/classes/java/io/Outputs.java --- a/src/share/classes/java/io/Outputs.java +++ b/src/share/classes/java/io/Outputs.java @@ -27,13 +27,12 @@ package java.io; import java.nio.ByteBuffer; import java.nio.charset.Charset; -import java.nio.charset.UnsupportedCharsetException; +import java.nio.charset.CharsetEncoder; import java.nio.file.FileRef; import static java.nio.file.StandardOpenOption.*; import java.nio.channels.Channels; import java.nio.channels.WritableByteChannel; import java.util.Arrays; -import java.util.List; /** * {@note experimental} @@ -50,14 +49,26 @@ public final class Outputs { public final class Outputs { private Outputs() { } - // checks that charset is supported - private static void ensureCharsetIsSupported(String csn) { - if (csn == null) - throw new NullPointerException("'csn' is null"); - if (!Charset.isSupported(csn)) - throw new UnsupportedCharsetException(csn); - } - + // checks that charset is not null + // returns an encoder with action REPORT for unmappable-character errors + private static CharsetEncoder getEncoder(Charset charset) { + ensureCharsetIsNotNull(charset); + return charset.newEncoder(); + } + + // checks that charset is not null and get encoder + // returns an encoder with action REPORT for unmappable-character errors + private static CharsetEncoder getEncoder(String csn) { + ensureCharsetIsNotNull(csn); + return Charset.forName(csn).newEncoder(); + } + + // checks that charset is not null + private static void ensureCharsetIsNotNull(Object charset) { + if (charset == null) + throw new NullPointerException("charset is null"); + } + /** * Writes a byte array to a file. The file is created if it does not exist. * If the file already exists, it is first truncated. @@ -105,6 +116,37 @@ public final class Outputs { * The file * @param lines * The list of lines to write (in order) + * @param charset + * The charset to be used + * + * @throws java.nio.charset.UnmappableCharacterException + * Where a line contains a character that cannot be mapped to an + * output byte sequence + * @throws IOException + * If an I/O error occurs + */ + public static void writeLines(FileRef file, Iterable lines, Charset charset) + throws IOException + { + CharsetEncoder encoder = getEncoder(charset); + WritableByteChannel wbc = file.newByteChannel(WRITE, CREATE, TRUNCATE_EXISTING); + BufferedWriter writer = new BufferedWriter(Channels.newWriter(wbc, encoder, -1)); + try { + implWriteLines(writer, lines); + } finally { + writer.close(); + } + } + + /** + * Writes the given lines of text to the specified file. The characters in + * each line are encoded into bytes using the specified charset. When all + * lines have been written, or an I/O error occurs, then the file is closed. + * + * @param file + * The file + * @param lines + * The list of lines to write (in order) * @param csn * The name of the charset to be used * @@ -117,12 +159,12 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(FileRef file, List lines, String csn) - throws IOException - { - ensureCharsetIsSupported(csn); + public static void writeLines(FileRef file, Iterable lines, String csn) + throws IOException + { + CharsetEncoder encoder = getEncoder(csn); WritableByteChannel wbc = file.newByteChannel(WRITE, CREATE, TRUNCATE_EXISTING); - BufferedWriter writer = new BufferedWriter(Channels.newWriter(wbc, csn)); + BufferedWriter writer = new BufferedWriter(Channels.newWriter(wbc, encoder, -1)); try { implWriteLines(writer, lines); } finally { @@ -147,10 +189,10 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(FileRef file, List lines) - throws IOException - { - writeLines(file, lines, Charset.defaultCharset().name()); + public static void writeLines(FileRef file, Iterable lines) + throws IOException + { + writeLines(file, lines, Charset.defaultCharset()); } /** @@ -170,10 +212,10 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(FileRef file, String... lines) - throws IOException - { - writeLines(file, Arrays.asList(lines), Charset.defaultCharset().name()); + public static void writeLines(FileRef file, CharSequence... lines) + throws IOException + { + writeLines(file, Arrays.asList(lines), Charset.defaultCharset()); } /** @@ -222,6 +264,37 @@ public final class Outputs { * The file * @param lines * The list of lines to write (in order) + * @param charset + * The charset to be used + * + * @throws java.nio.charset.UnmappableCharacterException + * Where a line contains a character that cannot be mapped to an + * output byte sequence + * @throws IOException + * If an I/O error occurs + */ + public static void writeLines(File file, Iterable lines, Charset charset) + throws IOException + { + CharsetEncoder encoder = getEncoder(charset); + FileOutputStream out = new FileOutputStream(file); + BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, encoder)); + try { + implWriteLines(writer, lines); + } finally { + writer.close(); + } + } + + /** + * Writes the given lines of text to the specified file. The characters in + * each line are encoded into bytes using the specified charset. When all + * lines have been written, or an I/O error occurs, then the file is closed. + * + * @param file + * The file + * @param lines + * The list of lines to write (in order) * @param csn * The name of the charset to be used * @@ -234,12 +307,12 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(File file, List lines, String csn) - throws IOException - { - ensureCharsetIsSupported(csn); + public static void writeLines(File file, Iterable lines, String csn) + throws IOException + { + CharsetEncoder encoder = getEncoder(csn); FileOutputStream out = new FileOutputStream(file); - BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, csn)); + BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, encoder)); try { implWriteLines(writer, lines); } finally { @@ -264,10 +337,10 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(File file, List lines) - throws IOException - { - writeLines(file, lines, Charset.defaultCharset().name()); + public static void writeLines(File file, Iterable lines) + throws IOException + { + writeLines(file, lines, Charset.defaultCharset()); } /** @@ -287,10 +360,10 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(File file, String... lines) - throws IOException - { - writeLines(file, Arrays.asList(lines), Charset.defaultCharset().name()); + public static void writeLines(File file, CharSequence... lines) + throws IOException + { + writeLines(file, Arrays.asList(lines), Charset.defaultCharset()); } /** @@ -301,19 +374,49 @@ public final class Outputs { * The output stream * @param lines * The list of lines to write (in order) + * @param charset + * The charset to be used + * + * @throws java.nio.charset.UnmappableCharacterException + * Where a line contains a character that cannot be mapped to an + * output byte sequence + * @throws IOException + * If an I/O error occurs + */ + public static void writeLines(OutputStream out, Iterable lines, Charset charset) + throws IOException + { + CharsetEncoder encoder = getEncoder(charset); + BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, encoder)); + implWriteLines(writer, lines); + writer.flush(); + } + + /** + * Writes the given lines of text to the specified output stream. The + * characters in each line are encoded into bytes using the specified charset. + * + * @param out + * The output stream + * @param lines + * The list of lines to write (in order) * @param csn * The name of the charset to be used * - * @throws java.nio.charset.UnmappableCharacterException - * Where a line contains a character that cannot be mapped to an - * output byte sequence - * @throws IOException - * If an I/O error occurs - */ - public static void writeLines(OutputStream out, List lines, String csn) - throws IOException - { - BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, csn)); + * @throws java.nio.charset.UnsupportedCharsetException + * If no support for the named charset is available + * in this instance of the Java virtual machine + * @throws java.nio.charset.UnmappableCharacterException + * Where a line contains a character that cannot be mapped to an + * output byte sequence + * @throws IOException + * If an I/O error occurs + */ + public static void writeLines(OutputStream out, Iterable lines, String csn) + throws IOException + { + CharsetEncoder encoder = getEncoder(csn); + BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, encoder)); implWriteLines(writer, lines); writer.flush(); } @@ -334,17 +437,17 @@ public final class Outputs { * @throws IOException * If an I/O error occurs */ - public static void writeLines(OutputStream out, List lines) - throws IOException - { - writeLines(out, lines, Charset.defaultCharset().name()); - } - - private static void implWriteLines(BufferedWriter writer, List lines) - throws IOException - { - for (String line: lines) { - writer.write(line); + public static void writeLines(OutputStream out, Iterable lines) + throws IOException + { + writeLines(out, lines, Charset.defaultCharset()); + } + + private static void implWriteLines(BufferedWriter writer, Iterable lines) + throws IOException + { + for (CharSequence line: lines) { + writer.write(line.toString()); writer.newLine(); } } From david.lloyd at redhat.com Wed Nov 26 16:06:36 2008 From: david.lloyd at redhat.com (David M. Lloyd) Date: Wed, 26 Nov 2008 18:06:36 -0600 Subject: java.nio.channels.MembershipKey API In-Reply-To: <48FF88F0.5080503@redhat.com> References: <48EE62C5.9040204@sun.com> <48FDECF9.8070309@univ-mlv.fr> <48FDF91F.3090502@sun.com> <48FE2E6C.7040208@univ-mlv.fr> <48FF7DF2.2050603@sun.com> <48FF88F0.5080503@redhat.com> Message-ID: <492DE48C.2010704@redhat.com> Ressurrecting this old thread - I have one additional comment about the MembershipKey interface. Rather than have drop()/isValid(), why not extend Channel (or at least Closeable) and have close()/isOpen() instead? This way any code which has a common resource cleanup mechanism based on Closeable will be able to clean up MembershipKeys in the same way. - DML From Alan.Bateman at Sun.COM Thu Nov 27 01:06:58 2008 From: Alan.Bateman at Sun.COM (Alan Bateman) Date: Thu, 27 Nov 2008 09:06:58 +0000 Subject: java.nio.channels.MembershipKey API In-Reply-To: <492DE48C.2010704@redhat.com> References: <48EE62C5.9040204@sun.com> <48FDECF9.8070309@univ-mlv.fr> <48FDF91F.3090502@sun.com> <48FE2E6C.7040208@univ-mlv.fr> <48FF7DF2.2050603@sun.com> <48FF88F0.5080503@redhat.com> <492DE48C.2010704@redhat.com> Message-ID: <492E6332.2030704@sun.com> David M. Lloyd wrote: > Ressurrecting this old thread - I have one additional comment about > the MembershipKey interface. Rather than have drop()/isValid(), why > not extend Channel (or at least Closeable) and have close()/isOpen() > instead? This way any code which has a common resource cleanup > mechanism based on Closeable will be able to clean up MembershipKeys > in the same way. > > - DML For resource cleanup, I would expect the multicast channel to be registered for close rather than the membership keys. When the multicast channel is closed then it drops membership of all groups and invalidates all keys. Looking at the javadoc again, I see that this isn't as clear as it should. There is wording in MembershipKey to require the key to be invalidated when the channel is closed but we don't have wording in MulticsatChannel to make it clear that membership is dropped when the channel is closed - I will fix that (thanks!). With that fixed, I am happy with "drop" (same thing in FileLock with the "release" method). -Alan. From david.lloyd at redhat.com Thu Nov 27 10:42:19 2008 From: david.lloyd at redhat.com (David M. Lloyd) Date: Thu, 27 Nov 2008 12:42:19 -0600 Subject: java.nio.channels.MembershipKey API In-Reply-To: <492E6332.2030704@sun.com> References: <48EE62C5.9040204@sun.com> <48FDECF9.8070309@univ-mlv.fr> <48FDF91F.3090502@sun.com> <48FE2E6C.7040208@univ-mlv.fr> <48FF7DF2.2050603@sun.com> <48FF88F0.5080503@redhat.com> <492DE48C.2010704@redhat.com> <492E6332.2030704@sun.com> Message-ID: <492EEA0B.3050600@redhat.com> On 11/27/2008 03:06 AM, Alan Bateman wrote: > David M. Lloyd wrote: >> Ressurrecting this old thread - I have one additional comment about >> the MembershipKey interface. Rather than have drop()/isValid(), why >> not extend Channel (or at least Closeable) and have close()/isOpen() >> instead? This way any code which has a common resource cleanup >> mechanism based on Closeable will be able to clean up MembershipKeys >> in the same way. >> >> - DML > For resource cleanup, I would expect the multicast channel to be > registered for close rather than the membership keys. When the multicast > channel is closed then it drops membership of all groups and invalidates > all keys. Looking at the javadoc again, I see that this isn't as clear > as it should. There is wording in MembershipKey to require the key to be > invalidated when the channel is closed but we don't have wording in > MulticsatChannel to make it clear that membership is dropped when the > channel is closed - I will fix that (thanks!). With that fixed, I am > happy with "drop" (same thing in FileLock with the "release" method). Well, that wasn't my point. I don't think anyone would reasonably expect a multicast membership key to outlive the channel. My point is that, given that there's a standard resource cleanup I/O interface (Closeable), and that drop() conforms to it exactly apart from the name, why not use it? - DML From Alan.Bateman at Sun.COM Thu Nov 27 12:28:45 2008 From: Alan.Bateman at Sun.COM (Alan Bateman) Date: Thu, 27 Nov 2008 20:28:45 +0000 Subject: java.nio.channels.MembershipKey API In-Reply-To: <492EEA0B.3050600@redhat.com> References: <48EE62C5.9040204@sun.com> <48FDECF9.8070309@univ-mlv.fr> <48FDF91F.3090502@sun.com> <48FE2E6C.7040208@univ-mlv.fr> <48FF7DF2.2050603@sun.com> <48FF88F0.5080503@redhat.com> <492DE48C.2010704@redhat.com> <492E6332.2030704@sun.com> <492EEA0B.3050600@redhat.com> Message-ID: <492F02FD.5030208@sun.com> David M. Lloyd wrote: > : > Well, that wasn't my point. I don't think anyone would reasonably > expect a multicast membership key to outlive the channel. My point is > that, given that there's a standard resource cleanup I/O interface > (Closeable), and that drop() conforms to it exactly apart from the > name, why not use it? I appreciate this wasn't your point but your comment helped to highlight that an explicit statement to that effect was missing. I agree that implementing Closeable to work with resource clean-up facilities is good (we need to retrofit Selector implement it, as you pointed out a few months ago). However, I don't see a big need for classes such as FileLock, SelectionKey, and MembershipKey to implement it. These are tokens rather than data sources or destinations. I would expect the channel to be registered with the clean-up facility; when its close method is invoked, then it releases all resources and invalidates all the associated token objects. -Alan. From david.lloyd at redhat.com Fri Nov 28 14:16:43 2008 From: david.lloyd at redhat.com (David M. Lloyd) Date: Fri, 28 Nov 2008 16:16:43 -0600 Subject: java.nio.channels.MembershipKey API In-Reply-To: <492F02FD.5030208@sun.com> References: <48EE62C5.9040204@sun.com> <48FDECF9.8070309@univ-mlv.fr> <48FDF91F.3090502@sun.com> <48FE2E6C.7040208@univ-mlv.fr> <48FF7DF2.2050603@sun.com> <48FF88F0.5080503@redhat.com> <492DE48C.2010704@redhat.com> <492E6332.2030704@sun.com> <492EEA0B.3050600@redhat.com> <492F02FD.5030208@sun.com> Message-ID: <49306DCB.7070801@redhat.com> On 11/27/2008 02:28 PM, Alan Bateman wrote: > David M. Lloyd wrote: >> : >> Well, that wasn't my point. I don't think anyone would reasonably >> expect a multicast membership key to outlive the channel. My point is >> that, given that there's a standard resource cleanup I/O interface >> (Closeable), and that drop() conforms to it exactly apart from the >> name, why not use it? > I appreciate this wasn't your point but your comment helped to highlight > that an explicit statement to that effect was missing. > > I agree that implementing Closeable to work with resource clean-up > facilities is good (we need to retrofit Selector implement it, as you > pointed out a few months ago). However, I don't see a big need for > classes such as FileLock, SelectionKey, and MembershipKey to implement > it. These are tokens rather than data sources or destinations. I would > expect the channel to be registered with the clean-up facility; when its > close method is invoked, then it releases all resources and invalidates > all the associated token objects. FileLock and SelectionKey are, apart from other issues, already set in stone as they are part of the JDK. I don't think these two classes have any bearing on MembershipKey as a new class. Consider this simple case: Jane User realizes that she frequently has to write code that looks like this: SomeResource r = ...create...; try { ...do stuff.. } finally { try { r.close(); } catch (IOException e) { log.error("Failed to close " + r, e); } } Realizing that the finally block is boilerplate, she introduces a static method on a util class: public static void safeClose(Closeable c) { try { c.close(); } catch (IOException e) { log.error("Failed to close " + c, e); } } Much typing and annoyance is saved. Everything is well and good until she runs across this new case: public void addMembership(DatagramChannel ch, InetAddress group, NetworkInterface intf) throws IOException { boolean ok = false; MembershipKey key = ch.join(group, intf); try { ...send & receive some messages, and run some app logic, any of which might fail... ok = true; } finally { // rats. if only I could use safeClose(), this whole thing would be one simple, readable line if (! ok) { try { key.drop(); } catch (IOException e) { log.error("Failed to close " + key, e); } } } } Her only recourse is to add another safeClose() method: /** * I repeat myself when under stress. I repeat myself when under stress. I repeat myself when under stress. * I repeat myself when under stress. I repeat myself when under stress. I repeat myself when under stress. * I repeat myself when under stress. I repeat myself when under stress. I repeat myself when under stress. */ public static void safeClose(MembershipKey key) { try { key.drop(); } catch (IOException e) { log.error("Failed to close " + key, e); } } Minor, but annoying. This kind of thing happens far too much in the JDK. Jane User already has the same method defined for selectors, ZipFiles, Sockets, and ServerSockets, not to mention JDBC resources, JDK logging handlers, MIDI stuff, etc. Why perpetuate it to one more class? Just because it ends in *Key? The usage pattern is the same. My final attempt, - DML From Alan.Bateman at Sun.COM Sat Nov 29 02:50:08 2008 From: Alan.Bateman at Sun.COM (Alan Bateman) Date: Sat, 29 Nov 2008 10:50:08 +0000 Subject: java.nio.channels.MembershipKey API In-Reply-To: <49306DCB.7070801@redhat.com> References: <48EE62C5.9040204@sun.com> <48FDECF9.8070309@univ-mlv.fr> <48FDF91F.3090502@sun.com> <48FE2E6C.7040208@univ-mlv.fr> <48FF7DF2.2050603@sun.com> <48FF88F0.5080503@redhat.com> <492DE48C.2010704@redhat.com> <492E6332.2030704@sun.com> <492EEA0B.3050600@redhat.com> <492F02FD.5030208@sun.com> <49306DCB.7070801@redhat.com> Message-ID: <49311E60.1010307@sun.com> Thanks for being persistent on it. I'll think more about it. It may be that the right thing is that the drop method should not throw IOException. Off-hand, I cannot think of any reason why it can fail (except a bug). This is unlike close which might need to fail when the object is a destination and buffered data could not be flushed. A few comments inlined. David M. Lloyd wrote: > : > FileLock and SelectionKey are, apart from other issues, already set in > stone as they are part of the JDK. I don't think these two classes > have any bearing on MembershipKey as a new class. I mention these classes because we want consistency in the package. Each of these objects are obtained from channels and define methods that are named opposite to the action that obtained them. > Consider this simple case: > > Jane User realizes that she frequently has to write code that looks > like this: > > SomeResource r = ...create...; > try { > ...do stuff.. > } finally { > try { > r.close(); > } catch (IOException e) { > log.error("Failed to close " + r, e); > } > } > > Realizing that the finally block is boilerplate, she introduces a > static method on a util class: > > public static void safeClose(Closeable c) { > try { > c.close(); > } catch (IOException e) { > log.error("Failed to close " + c, e); > } > } > > Much typing and annoyance is saved. Yep, and there are many like Jane that have done exactly that. The Inputs#closeUnchecked method maybe useful for some of those cases (for input sources anyway, not output destinations where there may be unsent data). > Everything is well and good until she runs across this new case: > > public void addMembership(DatagramChannel ch, InetAddress group, > NetworkInterface intf) throws IOException { > boolean ok = false; > MembershipKey key = ch.join(group, intf); > try { > ...send & receive some messages, and run some app logic, any > of which might fail... > ok = true; > } finally { > // rats. if only I could use safeClose(), this whole thing > would be one simple, readable line > if (! ok) { > try { > key.drop(); > } catch (IOException e) { > log.error("Failed to close " + key, e); > } > } > } > } This is certainly a valid annoyance although I would not expect membership to be as transient as this example might suggest. We've had many bug reports and sample applications using the legacy MulticastSocket over the years and most of the time the application joins the group at startup and doesn't ever leave. However, point taken. > > : > Minor, but annoying. This kind of thing happens far too much in the > JDK. Jane User already has the same method defined for selectors, > ZipFiles, Sockets, and ServerSockets, not to mention JDBC resources, > JDK logging handlers, MIDI stuff, etc. Why perpetuate it to one more > class? Just because it ends in *Key? The usage pattern is the same. There are indeed cases that were missed when java.io.Closeable was added. Jessie retrofitted Socket and ServerSocket some time ago for jdk7. We need to do Selector and ZipFile. I'm not sure about the others - for example, in java.sql there are close methods that throw SQLException and cannot be changed; in the MIDI package the close methods don't throw IOException so they can be changed either. Thanks again for pushing on this one. -Alan.