hg: jdk8/l10n: 4 new changesets

2012-02-08 Thread michael . fang
Changeset: 5350cd6e0cc0
Author:katleman
Date:  2012-02-02 09:39 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/rev/5350cd6e0cc0

Added tag jdk8-b24 for changeset 1a5f1d6b98d6

! .hgtags

Changeset: 0f653ee93477
Author:alanb
Date:  2012-01-24 09:08 +
URL:   http://hg.openjdk.java.net/jdk8/l10n/rev/0f653ee93477

7132204: Default testset in JPRT should not run all tests
Reviewed-by: ohair

! make/jprt.properties

Changeset: bd3fcc98c5d2
Author:lana
Date:  2012-01-28 20:36 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/rev/bd3fcc98c5d2

Merge


Changeset: 221a378e06a3
Author:lana
Date:  2012-02-07 10:36 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/rev/221a378e06a3

Merge




hg: jdk8/l10n/corba: Added tag jdk8-b24 for changeset b98f0e6dddf9

2012-02-08 Thread michael . fang
Changeset: e45d6b406d5f
Author:katleman
Date:  2012-02-02 09:39 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/corba/rev/e45d6b406d5f

Added tag jdk8-b24 for changeset b98f0e6dddf9

! .hgtags



hg: jdk8/l10n/jaxws: Added tag jdk8-b24 for changeset e0d90803439b

2012-02-08 Thread michael . fang
Changeset: b376d901e006
Author:katleman
Date:  2012-02-02 09:39 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/jaxws/rev/b376d901e006

Added tag jdk8-b24 for changeset e0d90803439b

! .hgtags



hg: jdk8/l10n/jaxp: Added tag jdk8-b24 for changeset 7836655e2495

2012-02-08 Thread michael . fang
Changeset: bb694c151fc7
Author:katleman
Date:  2012-02-02 09:39 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/jaxp/rev/bb694c151fc7

Added tag jdk8-b24 for changeset 7836655e2495

! .hgtags



hg: jdk8/l10n/jdk: 44 new changesets

2012-02-08 Thread michael . fang
Changeset: 8da468cf037b
Author:katleman
Date:  2012-02-02 09:39 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/8da468cf037b

Added tag jdk8-b24 for changeset 34029a0c69bb

! .hgtags

Changeset: ad9f1c8970da
Author:prr
Date:  2012-01-19 12:41 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/ad9f1c8970da

7131153: GetDC called way too many times - causes bad performance.
Reviewed-by: igor, jgodinez

! src/windows/native/sun/font/fontpath.c

Changeset: f7dda4bbf1f9
Author:lana
Date:  2012-01-28 22:47 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/f7dda4bbf1f9

Merge

- test/java/io/File/BlockIsDirectory.java

Changeset: 84b153cd9bd4
Author:denis
Date:  2012-01-19 14:59 +0400
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/84b153cd9bd4

7121761: creation of java.awt.DataFlavour fails for turkish locale
Reviewed-by: anthony

! src/share/classes/java/awt/datatransfer/MimeType.java

Changeset: e32db6535c05
Author:alexsch
Date:  2012-01-23 13:05 +0400
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/e32db6535c05

7112854: [macosx] closed/javax/swing/JPopupMenu/Test6827786.java unstable on 
MacOS
Reviewed-by: rupashka

+ test/javax/swing/JPopupMenu/6827786/bug6827786.java

Changeset: cc88a9c0474f
Author:alexsch
Date:  2012-01-23 13:53 +0400
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/cc88a9c0474f

7116634: [macosx] closed/javax/swing/JTree/6263446/bug6263446Tree.java fails on 
MacOS
Reviewed-by: rupashka

+ test/javax/swing/JTree/6263446/bug6263446.java

Changeset: 19431d07bc19
Author:denis
Date:  2012-01-23 17:26 +0400
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/19431d07bc19

7130140: using horizontal scroll button on mouse causes a message to be printed 
on stdout
Reviewed-by: art

! src/share/classes/java/awt/event/MouseEvent.java

Changeset: 5255fd5b0418
Author:denis
Date:  2012-01-24 18:46 +0400
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/5255fd5b0418

7078460: JDialog is shown as separate icon on the taskbar
Reviewed-by: anthony

! src/solaris/classes/sun/awt/X11/XWindowPeer.java

Changeset: b4589ff4457c
Author:malenkov
Date:  2012-01-24 19:40 +0400
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/b4589ff4457c

7121905: grammatically incorrect apostrophe in BeanInfo javadoc
Reviewed-by: rupashka

! src/share/classes/java/beans/BeanInfo.java

Changeset: 4f2a2bf0ce84
Author:rupashka
Date:  2012-01-26 17:38 +0400
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/4f2a2bf0ce84

7010561: Tab text position with Synth based LaF is different to Java 5/6
Reviewed-by: alexp

! src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
+ test/javax/swing/JTabbedPane/7010561/bug7010561.java

Changeset: cc9ff174a1c3
Author:alexsch
Date:  2012-01-27 16:32 +0400
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/cc9ff174a1c3

7122173: [macosx] Several Regression tests fail on MacOS
Reviewed-by: rupashka

+ test/javax/swing/SwingUtilities/4917669/bug4917669.java
+ test/javax/swing/plaf/basic/BasicHTML/4251579/bug4251579.java
+ test/javax/swing/text/html/CSS/4530474/bug4530474.java
+ test/javax/swing/text/html/CSS/4530474/test.css
+ test/javax/swing/text/html/CSS/4530474/test.html

Changeset: 96b5999af66b
Author:alexsch
Date:  2012-01-27 17:00 +0400
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/96b5999af66b

7109962: [macosx] closed/javax/swing/JList/6462008/bug6462008.java fails on 
MacOS
Reviewed-by: rupashka

+ test/javax/swing/JList/6462008/bug6462008.java

Changeset: 6a7109f52966
Author:alexsch
Date:  2012-01-27 17:36 +0400
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/6a7109f52966

7105040: [macosx] closed/javax/swing/JPopupMenu/4966112/bug4966112.java 
deadlocks on MacOS
Reviewed-by: rupashka

+ test/javax/swing/JPopupMenu/4966112/bug4966112.java

Changeset: bc1c20ac8676
Author:chegar
Date:  2012-01-27 13:48 +
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/bc1c20ac8676

7110002: Rename xawt/libmawt.so and headless/libmawt.so so they can be 
colocated with libawt
Reviewed-by: art, prr, dholmes, alanb

! make/common/Release-embedded.gmk
! make/sun/font/Makefile
! make/sun/font/t2k/Makefile
! make/sun/headless/Makefile
! make/sun/jawt/Makefile
! make/sun/xawt/Makefile
! src/solaris/native/java/lang/java_props_md.c
! src/solaris/native/sun/awt/awt_LoadLibrary.c

Changeset: 5dab2d55bc5b
Author:lana
Date:  2012-01-28 22:21 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/5dab2d55bc5b

Merge

- test/java/io/File/BlockIsDirectory.java

Changeset: 39b661c5867a
Author:alexsch
Date:  2012-01-30 12:52 +0400
URL:   http://hg.openjdk.java.net/jdk8/l10n/jdk/rev/39b661c5867a

7122149: [macosx] closed/javax/swing/UITest/UITest.java fails on MacOS
Reviewed-by: rupashka

! src/share/classes/sun/awt/OSInfo.java
+ test/javax/swing/UITest/UITest.java


hg: jdk8/l10n/langtools: 7 new changesets

2012-02-08 Thread michael . fang
Changeset: 5a784dab75f1
Author:katleman
Date:  2012-02-02 09:39 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/langtools/rev/5a784dab75f1

Added tag jdk8-b24 for changeset 6c9d21ca92c4

! .hgtags

Changeset: 51fb17abfc32
Author:mcimadamore
Date:  2012-01-24 17:52 +
URL:   http://hg.openjdk.java.net/jdk8/l10n/langtools/rev/51fb17abfc32

7129801: Merge the two method applicability routines
Summary: Resolve.java and Infer.java should reuse the same method applicability 
check routine
Reviewed-by: dlsmith, jjg

! src/share/classes/com/sun/tools/javac/comp/Infer.java
! src/share/classes/com/sun/tools/javac/comp/Resolve.java
! src/share/classes/com/sun/tools/javac/resources/compiler.properties
+ test/tools/javac/diags/examples/InferVarargsArgumentMismatch.java

Changeset: ac36176b7de0
Author:jjh
Date:  2012-01-24 15:51 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/langtools/rev/ac36176b7de0

7126832: com.sun.tools.javac.api.ClientCodeWrapper$WrappedJavaFileManager 
cannot be cast
Reviewed-by: jjg

! src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java
! src/share/classes/com/sun/tools/javac/main/Main.java
+ test/tools/javah/T7126832/T7126832.java
+ test/tools/javah/T7126832/java.java

Changeset: d16b464e742c
Author:jjh
Date:  2012-01-24 16:31 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/langtools/rev/d16b464e742c

7129225: javac fails to run annotation processors when star import of package 
of gensrc
Reviewed-by: jjg

! src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
+ test/tools/javac/7129225/Anno.java
+ test/tools/javac/7129225/AnnoProcessor.java
+ test/tools/javac/7129225/NegTest.ref
+ test/tools/javac/7129225/TestImportStar.java
+ test/tools/javac/7129225/TestImportStar.ref

Changeset: 332dfa0f91df
Author:jjh
Date:  2012-01-25 12:20 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/langtools/rev/332dfa0f91df

7133314: The regression test for 7129225 fails when run with jtreg -samevm or 
jtreg -agentvm
Reviewed-by: jjg

! test/tools/javac/7129225/AnnoProcessor.java
! test/tools/javac/7129225/NegTest.ref
! test/tools/javac/7129225/TestImportStar.java
! test/tools/javac/7129225/TestImportStar.ref

Changeset: 7d412606d641
Author:lana
Date:  2012-01-28 20:42 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/langtools/rev/7d412606d641

Merge


Changeset: 520c30f85bb5
Author:lana
Date:  2012-02-07 10:39 -0800
URL:   http://hg.openjdk.java.net/jdk8/l10n/langtools/rev/520c30f85bb5

Merge




Codereview request for 6995537: different behavior in iso-2022-jp encoding between jdk131/140/141 and jdk142/5/6/7

2012-02-08 Thread Xueming Shen

Hi

This is a long standing "regression" from 1.3.1 on how 
OutputStreamWriter.flush()/flushBuffer()
handles escape or shift sequence in some of the charset/encoding, for 
example the ISO-2022-JP.


ISO-2022-JP is encoding that starts with ASCII mode and then switches 
between ASCII andJapanese
characters through an escape sequence. For example, the escape sequence 
ESC $ B (0x1B, 0x24 0x42)
is used to  indicate the following bytes are Japanese (switch from ASCII 
mode to Japanese mode), and

 the ESC ( B (0x1b  0x28  0x42) is used to switch back to ASCII.

In Java's sun.io.CharToByteConvert (old generation charset converter) 
and the nio.io.charset.CharsetEncoder
usually switches back forth between ASCII and Japanese modes based on 
the input character sequence
(for example, if you are in ASCII mode, and your next input character is 
a Japanese, you add the
ESC $ B into the output first and then followed the converted input 
character, or if you are in Japanese
mode and your next input is ASCII, you output ESC ( B first to switch 
the mode and then the ASCII) and
switch back to ASCII mode (if the last mode is non-Japanese) if either 
the encoding is ending or the

flush() method gets invoked.

In JDK1.3.1,  OutputStreamWriter.flushBuffer() explicitly invokes 
sun.io.c2b's flushAny() to switch
back to ASCII mode every time the flush() or flushBuffer() (from 
PrintStream) gets invoked, as
showed at the end of this email. For example, as showed below, the code 
uses OutputStreamWriter
to "write" a Japanese character \u6700 to the underlying stream with 
iso-2022jp,


ByteArrayOutputStream bos = new ByteArrayOutputStream();
String str = "\u6700";
OutputStreamWriter osw = new OutputStreamWriter(bos, "iso-2022-jp");
osw.write(str, 0, str.length());

Since the iso-2022-jp starts with ASCII mode, we now have a Japanese, so we 
need to
switch into Japanese mode first (the first 3 bytes) and then the encoded 
Japanese
character (the following 2 bytes)

0x1b 0x24 0x42 0x3a 0x47

and then the code invokes

osw.flush();

since we are now  in Japanese, the writer continues to write out

 0x1b 0x28 0x 42

to switch back to ASCII mode. The total output is 8 bytes after write() 
and flush().


However, when all encoidng/charset related codes were migrated from 
1.3.1's sun.io based to
1.4's java.nio.charset based implementation (1.4, 1.4.1 and 1.4.2, we 
gradually migrated from
sun.io to java.nio.charset),  the "c2b.flushAny()" invocation obviously 
was dropped in
sun.nio.cs.StreamEncoder. It results in that the "switch back to ASCII 
mode" sequence is no longer
output when OutputStreamWriter.flush() or PrintStream.write(String) is 
invoked.


This does not trigger problem for most use scenario, if the "stream" 
finally gets closed
(in which the StreamEncoder does invoke encoder's flush() to output the 
escape sequence
to switch back to ASCII) or PrintStream.println(String) is used (in 
which it outputs a \n character,
since this \n is in ASCII range, it "accidentally " switches the mode 
back to ASCII).


But it obviously causes problem when you can't not close the 
OutputStreamWriter after
you're done your iso2022-jp writing (for example, you need continue to 
use the underlying
OutputStream for other writing, but not "this" osw),  for 1.3.1, these 
apps invoke osw.flush()
to force the output switch back to ASCII, this no longer works when we 
switch to java.nio.charset
in jdk1.4.2. (we migrated iso-2022-jp to nio.charset in 1.4.2). This is 
what happened in JavaMail,

as described in the bug report.

The solution is to re-store the "flush the encoder" mechanism in 
StreamEncoder's flushBuffer().


I have been hesitated to make this change for a while, mostly because 
this regressed behavior
has been their for 3 releases, and the change triggers yet another 
"behavior change". But given
there is no obvious workaround and it only changes the behavior of the 
charsets with this
shift in/out mechanism, mainly the iso-2022 family and those IBM 
EBCDIC_DBCS charsets,  I

decided to give it a try.

Here is the webreview

http://cr.openjdk.java.net/~sherman/6995537/webrev

Sherman


-1.3.1 
OutputStreamWriter---

/**
 * Flush the output buffer to the underlying byte stream, without 
flushing
 * the byte stream itself.  This method is non-private only so that 
it may

 * be invoked by PrintStream.
 */
void flushBuffer() throws IOException {
synchronized (lock) {
ensureOpen();

for (;;) {
try {
nextByte += ctb.flushAny(bb, nextByte, nBytes);
}
catch (ConversionBufferFullException x) {
nextByte = ctb.nextByteIndex();
}
if (nextByte == 0)
break;
if (nextByte > 0) {
out.write(bb, 0, nextByte);
nextByte = 0;
}
}
}
}

/**
 * Flush the stream.
 *
 * @exce