Re: 6613829: (docs) Readable.read() ReadOnlyBufferException is not linked
Looks good to me Alan. Regards Lance On Nov 16, 2010, at 9:34 AM, Alan Bateman wrote: I need a reviewer to a trivial drive-by fix to java.lang.Readable's javadoc. Thanks, Alan. diff --git a/src/share/classes/java/lang/Readable.java b/src/share/classes/java/lang/Readable.java --- a/src/share/classes/java/lang/Readable.java +++ b/src/share/classes/java/lang/Readable.java @@ -44,11 +44,11 @@ public interface Readable { * rewinding of the buffer is performed. * * @param cb the buffer to read characters into - * @return @return The number of ttchar/tt values added to the buffer, + * @return The number of {...@code char} values added to the buffer, * or -1 if this source of characters is at its end * @throws IOException if an I/O error occurs * @throws NullPointerException if cb is null - * @throws ReadOnlyBufferException if cb is a read only buffer + * @throws java.nio.ReadOnlyBufferException if cb is a read only buffer */ public int read(java.nio.CharBuffer cb) throws IOException; Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering 1 Network Drive Burlington, MA 01803 lance.ander...@oracle.com Oracle is committed to developing practices and products that help protect the environment
Re: 6613829: (docs) Readable.read() ReadOnlyBufferException is not linked
Alan, Looks fine. -Chris. Alan Bateman wrote: I need a reviewer to a trivial drive-by fix to java.lang.Readable's javadoc. Thanks, Alan. diff --git a/src/share/classes/java/lang/Readable.java b/src/share/classes/java/lang/Readable.java --- a/src/share/classes/java/lang/Readable.java +++ b/src/share/classes/java/lang/Readable.java @@ -44,11 +44,11 @@ public interface Readable { * rewinding of the buffer is performed. * * @param cb the buffer to read characters into - * @return @return The number of ttchar/tt values added to the buffer, + * @return The number of {...@code char} values added to the buffer, * or -1 if this source of characters is at its end * @throws IOException if an I/O error occurs * @throws NullPointerException if cb is null - * @throws ReadOnlyBufferException if cb is a read only buffer + * @throws java.nio.ReadOnlyBufferException if cb is a read only buffer */ public int read(java.nio.CharBuffer cb) throws IOException;
hg: jdk7/tl/jdk: 6613829: (docs) Readable.read() ReadOnlyBufferException is not linked
Changeset: 9ec7802cc759 Author:alanb Date: 2010-11-16 15:23 + URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/9ec7802cc759 6613829: (docs) Readable.read() ReadOnlyBufferException is not linked Reviewed-by: chegar, lancea ! src/share/classes/java/lang/Readable.java
Re: Please review java.util.jar.pack.* cleanup/refactoring/generificaiton
Attribute.java/Instruction.java/Package.java.File : - Layout.equals(Object x) { return x instanceof Layout equals((Layout)x); } should be : Layout.equals(Object x) { return (null != x) (x.getClass() == Layout.class) equals((Layout)x); } as sub-classes also using instanceof would have a non-reflexive equals(). ie. layout.equals(someSubClassOfLayout) != someSubclassOfLayout.equals(layout) - Layout.isEmpty() { return layout.isEmpty(); } - BandStructure.java/ClassReader.java/Coding.java/CodingChooser.java/PackageReader.java/PackageWriter.java : is there a reason to use concrete types (HashMap, ArrayList, HashSet) for fields and vars such as basicCodingIndexes, allKQBands? It seems not. - Code.java : Arrays.copyOf and/or copyOfRange could be used rather than separate allocation and System.arrayCopy. - Package.java.stripAttributeKind() : could be a switch. - Package.java.File : possibly static class and final (which would eliminate the complaint about File.equals()) ? - PropMap._listeners could be final (and probably a List rather than explicitly an ArrayList). - PropMap.java : convert newly added final to ARM? - FixedList.java : Anything saved by extending AbstractList rather than implementing List? On Nov 15 2010, at 17:24 , Kumar Srinivasan wrote: Hi John, et. al., This revision contains all fixes noted by Brian below and other comments from Alan. http://cr.openjdk.java.net/~ksrini/6990106/webrev.01/ Thanks Kumar Mostly style issues, but at least one likely bug. In a few places, you've used @SuppressWarnings(unchecked). While this may well be unavoidable, it is worth factoring this out into the smallest possible chunk. For BandStructure, you've applied it to the whole class, and there's some big methods that use it too. You can usually get it down to a small makeArrayOfGenericFoo method, since this is the most common source of non-fixable unchecked warnings. Also using an interface like Constants to import symbols is an antipattern and is better replaced with static imports. In ClassReader you've replaced use of new Integer() and friends with Integer.valueOf(), but its better style to go all the way and just use autoboxing. In Instruction the equals() method takes into account bc, w, length, and bytes, but the hashCode() method also takes into account pc. This may violate the equal objects must have equal hashcodes rule. Throughout you've changed loops from for (Iterator i=...) to for (IteratorT i=...) but didn't go all the way and just use foreach loops. PropMap should extend TreeMap by composition, not extension. This implementation is subject to the hazards outlined in the Effective Java item Prefer composition to extension. (For example you override put() but not putAll(), but this idiom cannot be made to work without tightly coupling it to the superclass implementation.) On 11/11/2010 12:29 PM, Kumar Srinivasan wrote: Hi, Appreciate a review of the pack200 cleanup work, in the following areas: 1. General generification of Collections. 2. fixed worthy findbugs items. 3. fixed worthy Netbeans nags. 4. Elimination of array/generics combination. The webrev is here: http://cr.openjdk.java.net/~ksrini/6990106/webrev.00/ Thanks Kumar
hg: jdk7/tl/jdk: 3 new changesets
Changeset: 86ea594c1d10 Author:valeriep Date: 2010-11-15 14:32 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/86ea594c1d10 6848930: JSN security test jce/Global/Cipher/PKCS5Padding cannot thrown expected BadPaddingException Summary: Disabled CKM_DES_CBC_PAD, CKM_DES3_CBC_PAD, CKM_AES_CBC_PAD mechs by default and use our own internal padding impl. Reviewed-by: wetmore ! src/share/lib/security/sunpkcs11-solaris.cfg Changeset: cb10e1177801 Author:valeriep Date: 2010-11-15 14:38 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/cb10e1177801 6687725: Internal PKCS5Padding impl should throw IllegalBlockSizeException and not BadPaddingException Summary: Changed to throw IllegalBlockSizeException when the data length isn't multiples of block size Reviewed-by: wetmore ! src/share/classes/sun/security/pkcs11/P11Cipher.java + test/sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java Changeset: 8134c0b75da5 Author:valeriep Date: 2010-11-16 11:50 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/8134c0b75da5 Merge
hg: jdk7/tl/corba: 5 new changesets
Changeset: e0f7ed041196 Author:skoppar Date: 2010-10-07 00:59 -0700 URL: http://hg.openjdk.java.net/jdk7/tl/corba/rev/e0f7ed041196 6714797: InitialContext.close does not close NIO socket connections Reviewed-by: asaha ! src/share/classes/com/sun/corba/se/impl/transport/CorbaConnectionCacheBase.java ! src/share/classes/com/sun/corba/se/impl/transport/CorbaTransportManagerImpl.java ! src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java ! src/share/classes/com/sun/corba/se/pept/transport/ConnectionCache.java ! src/share/classes/com/sun/corba/se/spi/transport/CorbaConnection.java Changeset: 459c07278c3c Author:skoppar Date: 2010-10-07 00:49 -0700 URL: http://hg.openjdk.java.net/jdk7/tl/corba/rev/459c07278c3c 6893109: memory leak in readObject() and writeObject() using idlj from jdk 1.6.0_14 Reviewed-by: asaha ! src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Stub.java Changeset: 2d3622317730 Author:skoppar Date: 2010-10-07 00:51 -0700 URL: http://hg.openjdk.java.net/jdk7/tl/corba/rev/2d3622317730 6896157: unsynchronized hashmap in com.sun.corba.se.impl.transport.SelectorImpl.createReaderThread Reviewed-by: asaha ! src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java Changeset: 5f026ab0098c Author:skoppar Date: 2010-10-07 00:53 -0700 URL: http://hg.openjdk.java.net/jdk7/tl/corba/rev/5f026ab0098c 6929137: java-corba: Locking too broad in com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl Reviewed-by: asaha ! src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java Changeset: 34af2070439b Author:skoppar Date: 2010-10-07 01:03 -0700 URL: http://hg.openjdk.java.net/jdk7/tl/corba/rev/34af2070439b 6948223: Corba issue, fail to reload object Reviewed-by: asaha ! src/share/classes/com/sun/corba/se/impl/oa/poa/AOMEntry.java ! src/share/classes/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java
70000691 : (coll) (doc) ConcurrentLinkedQueue @link to ConcurrentModificationException
I'll ask the same as Alan for a small doc review for ConcurrentLinkedQueue Thanks, Mike diff --git a/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java b/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java --- a/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java +++ b/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java @@ -65,8 +65,8 @@ * pIterators are iweakly consistent/i, returning elements * reflecting the state of the queue at some point at or since the * creation of the iterator. They do emnot/em throw {...@link - * ConcurrentModificationException}, and may proceed concurrently with - * other operations. Elements contained in the queue since the creation + * java.util.ConcurrentModificationException}, and may proceed concurrently + * with other operations. Elements contained in the queue since the creation * of the iterator will be returned exactly once. * * pBeware that, unlike in most collections, the {...@code size} method
Re: 70000691 : (coll) (doc) ConcurrentLinkedQueue @link to ConcurrentModificationException
Le 17/11/2010 00:39, Mike Duigou a écrit : I'll ask the same as Alan for a small doc review for ConcurrentLinkedQueue Thanks, Mike diff --git a/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java b/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java --- a/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java +++ b/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java @@ -65,8 +65,8 @@ *pIterators areiweakly consistent/i, returning elements * reflecting the state of the queue at some point at or since the * creation of the iterator. They doemnot/em throw {...@link - * ConcurrentModificationException}, and may proceed concurrently with - * other operations. Elements contained in the queue since the creation + * java.util.ConcurrentModificationException}, and may proceed concurrently + * with other operations. Elements contained in the queue since the creation * of the iterator will be returned exactly once. * *pBeware that, unlike in most collections, the {...@code size} method Looks good. Rémi