There is another reason, aside from our Beloved Compatibility,
to prefer returning length == 1. It is likely that the calling code will
delete the malformed chars and present the rest to a human.
The second char *might* be valid, so why hide it?
Martin
On Wed, Sep 10, 2008 at 08:22, Ulf Zibis <[
Hi Martin,
thanks for the quick first answer.
You are right, both chars could be corrupt.
IMO, if CoderResult.malformedForLength(2) would be returned, this would
be more informative, and the SW developer could decide by himself, if he
would consider the CoderResult.length().
Why having this diff
Changeset: 3e7b9a0f3a6f
Author:dfuchs
Date: 2008-09-10 16:27 +0200
URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/3e7b9a0f3a6f
6746754: jmx namespace: test for leading separator missing
6669137: RFE: InstanceNotFoundException should have a constructor that takes an
ObjectName
6746
Changeset: b35ccd203a7e
Author:emcmanus
Date: 2008-09-10 14:56 +0200
URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b35ccd203a7e
6746759: Fix for 6734813 introduced build break
Reviewed-by: dfuchs
! src/share/classes/sun/management/ClassLoadingImpl.java
! src/share/classes/sun/man
Changeset: 2b44dd8ed72d
Author:emcmanus
Date: 2008-09-10 13:36 +0200
URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/2b44dd8ed72d
6734813: Provide a way to construct an ObjectName without checked exceptions
6746649: ObjectName constructors and methods declare unchecked exceptions in