Code review request: 7198205: CloseTest fails on mac
http://cr.openjdk.java.net/~weijun/7198205/webrev.00/ The test hangs on this line loadClass ("java.awt.Button", loader, true); It looks like no AWT class can be loaded in the testing environment. The fix uses "java.sql.Array" instead. I guess it should be a class inside JRE but also not loaded yet. JPRT run shows it passes on all platforms. (Well, not exactly, the windows-x64 target still not started, but I think I can just ignore it.) Thanks Max Original Message 7198205: CloseTest fails on mac http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7198205 === *Description* java/net/URLClassLoader/closetest/CloseTest.java This tests tries to load the java.awt.Button class and fails on macosx because of 7162111
Re: Code review request: 7198205: CloseTest fails on mac
On 13/09/2012 09:10, Weijun Wang wrote: http://cr.openjdk.java.net/~weijun/7198205/webrev.00/ The test hangs on this line loadClass ("java.awt.Button", loader, true); It looks like no AWT class can be loaded in the testing environment. The fix uses "java.sql.Array" instead. I guess it should be a class inside JRE but also not loaded yet. It looks like this test was excluded because of proxy settings rather than its usage of AWT (on Mac then using system proxy settings is enabled by default and I think this causes problems on machines where http connections to 127.0.0.1 are wrongly configured to go through the proxy). So no issue with removing the dependency on AWT, I'm just not sure that it was the reason it was excluded. BTW: Just above it then looks like someone has put a security test in the jdk_net section of the file, I think that should be moved to jdk_security. -Alan.
Re: Code review request: 7198205: CloseTest fails on mac
On 09/13/2012 04:20 PM, Alan Bateman wrote: On 13/09/2012 09:10, Weijun Wang wrote: http://cr.openjdk.java.net/~weijun/7198205/webrev.00/ The test hangs on this line loadClass ("java.awt.Button", loader, true); It looks like no AWT class can be loaded in the testing environment. The fix uses "java.sql.Array" instead. I guess it should be a class inside JRE but also not loaded yet. It looks like this test was excluded because of proxy settings rather than its usage of AWT (on Mac then using system proxy settings is enabled by default and I think this causes problems on machines where http connections to 127.0.0.1 are wrongly configured to go through the proxy). So no issue with removing the dependency on AWT, I'm just not sure that it was the reason it was excluded. It was added thru http://hg.openjdk.java.net/jdk8/tl/jdk/rev/9de97594f062 At first I thought this is the reason and the machine does shows an environment variable http_proxy. However, I unset it and nothing changed. After some println it seems the test only hangs at loading the java.awt.Button class. Also, aren't java.net.useSystemProxies=false http.nonProxyHosts=localhost|127.*|[::1] default in net.properties? Shouldn't JRE on macosx honor them? BTW: Just above it then looks like someone has put a security test in the jdk_net section of the file, I think that should be moved to jdk_security. I put it there. It is a test in sun/security but the reason is net (No PortUnreachableE on macosx). I thought putting it in the java_net section would alert networking guys more. :) Thanks Max -Alan.
Re: Code review request: 7198205: CloseTest fails on mac
On 13/09/2012 09:41, Weijun Wang wrote: : It was added thru http://hg.openjdk.java.net/jdk8/tl/jdk/rev/9de97594f062 At first I thought this is the reason and the machine does shows an environment variable http_proxy. However, I unset it and nothing changed. After some println it seems the test only hangs at loading the java.awt.Button class. Also, aren't java.net.useSystemProxies=false http.nonProxyHosts=localhost|127.*|[::1] default in net.properties? Shouldn't JRE on macosx honor them? If you happy that this wasn't a proxy settings issue then I'm happy to see it removed from the exclude list. Michael can jump in to exclude the proxy settings story on Mac but it's to keep compatibility with Apple's jdk6 where it uses the system's proxy settings by default (and folks on that platform except it to be integrated so that the settings are in one place). I put it there. It is a test in sun/security but the reason is net (No PortUnreachableE on macosx). I thought putting it in the java_net section would alert networking guys more. :) Can you move it to the jdk_security section please, this file is organized by sections so that it's clear which tests are excluded for each area. -Alan
Re: Code review request: 7198205: CloseTest fails on mac
On 09/13/2012 04:46 PM, Alan Bateman wrote: On 13/09/2012 09:41, Weijun Wang wrote: : It was added thru http://hg.openjdk.java.net/jdk8/tl/jdk/rev/9de97594f062 At first I thought this is the reason and the machine does shows an environment variable http_proxy. However, I unset it and nothing changed. After some println it seems the test only hangs at loading the java.awt.Button class. Also, aren't java.net.useSystemProxies=false http.nonProxyHosts=localhost|127.*|[::1] default in net.properties? Shouldn't JRE on macosx honor them? If you happy that this wasn't a proxy settings issue then I'm happy to see it removed from the exclude list. Michael can jump in to exclude the proxy settings story on Mac but it's to keep compatibility with Apple's jdk6 where it uses the system's proxy settings by default (and folks on that platform except it to be integrated so that the settings are in one place). As I said. I unset the http_proxy env var in the terminal window. I'm not familiar with the networking codes, but does that change the Java behavior somehow? I'd be glad to know answers on all platforms, not just macosx. I put it there. It is a test in sun/security but the reason is net (No PortUnreachableE on macosx). I thought putting it in the java_net section would alert networking guys more. :) Can you move it to the jdk_security section please, this file is organized by sections so that it's clear which tests are excluded for each area. OK. -Max -Alan
hg: jdk8/tl/jdk: 7197203: sun/misc/URLClassPath/ClassnameCharTest.sh failed, compile error
Changeset: e095be3820ee Author:chegar Date: 2012-09-13 11:17 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/e095be3820ee 7197203: sun/misc/URLClassPath/ClassnameCharTest.sh failed, compile error Reviewed-by: alanb ! test/sun/misc/URLClassPath/ClassnameCharTest.java - test/sun/misc/URLClassPath/ClassnameCharTest.sh
Indenting code?
Greetings: I have a simple question about how to enforce code styles for: java, c, and c++. I know there are style guides that legislate the indentation, "curly brace and parenthesis management", etc. I'm looking for a simple automatic way to transform any source code file so that it's image is guaranteed to be "correct". No thinking required. What I normally do is use an open source tool named "indent", e.g., indent -bap -bbb -bl -nce -l80 file1.cpp file2.h file3.c file4.java And, I put an "indent" target in my make files. Consequently whenever I make something, the very first step is to format the code, and I know that when I do a check in later on... I never have to think about whether or not the code conforms to a style guide... because the options I gave to "indent" implemented this guide. (You can do similar things with emacs too.) Any ideas? Thanks! John Zavgren john.zavg...@oracle.com
hg: jdk8/tl/jdk: 7197637: (ch) sun.nio.ch.Default* cause providers for other platforms to be included in rt.jar
Changeset: e8a3807de977 Author:alanb Date: 2012-09-13 15:04 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/e8a3807de977 7197637: (ch) sun.nio.ch.Default* cause providers for other platforms to be included in rt.jar Reviewed-by: mchung ! src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java ! src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java ! src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java
hg: jdk8/tl/langtools: 7177970: fix issues in langtools doc comments
Changeset: 30c36e23f154 Author:jjg Date: 2012-09-13 14:29 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/30c36e23f154 7177970: fix issues in langtools doc comments Reviewed-by: mcimadamore ! src/share/classes/com/sun/javadoc/Doc.java ! src/share/classes/com/sun/javadoc/ExecutableMemberDoc.java ! src/share/classes/com/sun/javadoc/Tag.java ! src/share/classes/com/sun/source/tree/LambdaExpressionTree.java ! src/share/classes/com/sun/source/tree/LineMap.java ! src/share/classes/com/sun/source/util/TreeScanner.java ! src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java ! src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java ! src/share/classes/com/sun/tools/javac/code/Symtab.java ! src/share/classes/com/sun/tools/javac/code/Type.java ! src/share/classes/com/sun/tools/javac/comp/Check.java ! src/share/classes/com/sun/tools/javac/comp/Enter.java ! src/share/classes/com/sun/tools/javac/comp/Lower.java ! src/share/classes/com/sun/tools/javac/comp/Resolve.java ! src/share/classes/com/sun/tools/javac/jvm/ByteCodes.java ! src/share/classes/com/sun/tools/javac/jvm/CRTable.java ! src/share/classes/com/sun/tools/javac/jvm/ClassFile.java ! src/share/classes/com/sun/tools/javac/jvm/Code.java ! src/share/classes/com/sun/tools/javac/jvm/Gen.java ! src/share/classes/com/sun/tools/javac/parser/JavacParser.java ! src/share/classes/com/sun/tools/javac/parser/Lexer.java ! src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java ! src/share/classes/com/sun/tools/javac/tree/JCTree.java ! src/share/classes/com/sun/tools/javac/tree/Pretty.java ! src/share/classes/com/sun/tools/javac/util/Bits.java ! src/share/classes/com/sun/tools/javac/util/Context.java ! src/share/classes/com/sun/tools/javac/util/Name.java ! src/share/classes/com/sun/tools/javac/util/Position.java ! src/share/classes/com/sun/tools/javadoc/Comment.java ! src/share/classes/com/sun/tools/javadoc/DocImpl.java ! src/share/classes/com/sun/tools/javadoc/FieldDocImpl.java ! src/share/classes/com/sun/tools/javah/JavahTask.java ! src/share/classes/javax/lang/model/util/Elements.java ! src/share/classes/javax/tools/JavaCompiler.java
Re: Indenting code?
Netbean's automatic formatting does a pretty good job with new code. However, I think the general advice is to not change existing code just because. When you're dealing with multiple release families, it makes the merges much more difficult. Brad On 9/13/2012 6:18 AM, John Zavgren wrote: Greetings: I have a simple question about how to enforce code styles for: java, c, and c++. I know there are style guides that legislate the indentation, "curly brace and parenthesis management", etc. I'm looking for a simple automatic way to transform any source code file so that it's image is guaranteed to be "correct". No thinking required. What I normally do is use an open source tool named "indent", e.g., indent -bap -bbb -bl -nce -l80 file1.cpp file2.h file3.c file4.java And, I put an "indent" target in my make files. Consequently whenever I make something, the very first step is to format the code, and I know that when I do a check in later on... I never have to think about whether or not the code conforms to a style guide... because the options I gave to "indent" implemented this guide. (You can do similar things with emacs too.) Any ideas? Thanks! John Zavgren john.zavg...@oracle.com
Re: Indenting code?
On 09/14/2012 08:21 AM, Brad Wetmore wrote: Netbean's automatic formatting does a pretty good job with new code. That's Alt-Shift-F, which I rarely dare to press, because it change existing codes. In fact, NetBeans is doing very smart indentation while you are coding, at least it adheres to the Sun/Oracle convention. The only thing I need to care about is breaking long lines. I also turn on Options|Editor|General|Remove Trailing Whitespace From Modified Lines Only. However, I think the general advice is to not change existing code just because. When you're dealing with multiple release families, it makes the merges much more difficult. Yes, yes, yes, and it makes code reviewers wondering what really changed. -Max Brad On 9/13/2012 6:18 AM, John Zavgren wrote: Greetings: I have a simple question about how to enforce code styles for: java, c, and c++. I know there are style guides that legislate the indentation, "curly brace and parenthesis management", etc. I'm looking for a simple automatic way to transform any source code file so that it's image is guaranteed to be "correct". No thinking required. What I normally do is use an open source tool named "indent", e.g., indent -bap -bbb -bl -nce -l80 file1.cpp file2.h file3.c file4.java And, I put an "indent" target in my make files. Consequently whenever I make something, the very first step is to format the code, and I know that when I do a check in later on... I never have to think about whether or not the code conforms to a style guide... because the options I gave to "indent" implemented this guide. (You can do similar things with emacs too.) Any ideas? Thanks! John Zavgren john.zavg...@oracle.com