Search

Categories

Links

Referers

b91 compiler fixes

Jun 26 2006, 07:50:41 PM PDT »Java»Compiler Comments [15]
In Mustang b91, these compiler fixes will be included:

4977607: (javac) Compilation error java.lang.InternalError: jzentry == 0
6379327: (javac) erroneous catch block not detected after try block with anonymous class declaration
6389414: (JSR 269) ExecutableType.asElement should return null
6392782: (javac) TreeScanner.visitImport returns null, not result of nested scan
6402516: (javac) need to determine if an element is accessible as a member of a given type
6410012: (javac) tools/javac/processing/6350124/T6350124.java fails
6411919: (javac) processor path doesn't always get picked up when using JSR199 API
6411930: (javac) poorly worded warning: no processors claimed _present_ annotation types
6413690: (javac) JavacProcessingEnvironment does not enter trees from preceding rounds
6418666: (JSR 269) Determine proper set of type visitor methods
6420156: (javac) JSR 199: rename JavaCompilerTool to JavaCompiler
6420779: (javac) JSR 199: getEffectiveLocation has become obsolete
6421756: (javac) JSR 199: In the method JavaCompilerTool.getTask 'options' can be supplied in the place of 'classes'
6422215: (javac) JSR 199: What happens if a directory is missing
6422327: (javac) JSR 199: JavaCompilerTool can compile and generate '.class' of non '.java' files
6423973: (JSR 269) getReturnType() returns VoidType for a constructor
6424491: (javac) Cannot initialise nested enums
6425592: (JSR 269) please provide RoundEnvironment.getElementsAnnotatedWith(Class)
6425896: (JSR 269) More fully specify behavior of TypeMirror.asElement
6431257: (javac) JSR 199: Changes to JavaFileManager to support JSR 269 Filer API
6433668: (javac) JSR 199: StandardJavaFileManager.setLocation: exception not documented
6435291: (javac) NullPointerException while compiling invalid annotation attribute
6436244: (javac) JSR 199: StandardJavaFileManager.inferBinaryName will give extra message with PLATFORM_CLASS_PATH
6437894: (javac) Javac throws a NullPointerException.
6437999: (javac) JSR 199: Miscellaneous adjustments
6438303: (javac) JSR 199: invalid/unsupported kind overspecified in JavaFileManager.getJavaFileForIn/Output
6439591: (JSR 269) incorrect @link in package-info.java
6439826: (javac) Exception issuing Diagnostic while processing generated errant code
6440099: (javac) JSR 199: Need way to set locale
6440109: (javac) tools/javac/processing/T6416433.java fails
6440111: (javac) JSR 199: file manager should provide hints
6440528: (javac) javac deposits package-info.class in bogus directory
6440583: (javac) better error recovery
6441355: (JSR 269) Incorporate JSR 269 public draft typo fixes
6441871: (javac) suppress stack trace after CompletionFailure in annotation progressing
6443062: (javac) Regression test tools/javac/api/6412656 is not running

Thanks to Joe, Jon, Scott, and Wei. I never mention Igor and Seetharam on my blog but they deserve a big thank you as well as their tests have found a great deal of issues in our JSR 199 reference implementation.

This is the last build before the July vacation time and we are getting very close to Mustang code freeze so the rate of changes will go down from now on.

Most of the changes in b91 are related to the two compiler related JSR. Besides that there are a few changes to the Tree API (Jon added scopes) and we incorporated some parser changes from NetBeans that should make it recover better from common syntax errors.

Let me bring attention to two fixes in this build:

4977607 (jzentry == 0) is an old problem that we are not able to reproduce. We have determined that the cause of the problem is either a corrupt jar file, bad memory, or running out of memory. Instead of the scary please send a bug report message, the compiler will simply say that the affected jar file is corrupted.

6424491 (enum initialization) fixes a problem where the compiler would not diagnose problems with references to uninitialized enum constants:

enum Color {
    Red(Color.Red);
    Color(Color color) { assert color != null; }
}

Previously, the compiler would accept this program and the assertion would fail.

Post a Comment:
Comments are closed for this entry.
Comments:

Nice! I am looking forward to build 91! You guys truly deserve that July vacation time...catch up on some of those much deserved zzzzzzzs! ;)

Posted by Surya on June 27, 2006 at 12:50 AM PDT #

Isn't bug 4977607 related to bug 4615343? Will 4615343 also be fixed? This is a long standing issue that would deserve to be fixed in Mustang. Is javac catching java.lang.InternalError to recover from reading corrupted zip files? Thank you for taking the time to describe in details what has been done to fix this bug.

Posted by Olivier Thomann on June 27, 2006 at 08:13 AM PDT #

Hi Peter, could you fix the Java Compiler API JSR's draft spec license to allow people writing independent implementations to comment? With the current draft spec license, anyone writing an implementation of the APIs would have to stop writing/distributing it once the final version pf the spec if released, which does not encourage people working on those things to give you any positive or negative feedback, of by doing so they give up their freedom to develop and distribute their own implementations. Thanks in advance, dalibor topic

Posted by Dalibor Topic on June 28, 2006 at 03:11 AM PDT #

Dalibor, if you look at mustang.dev.java.net instead of the JSR you may find a more agreeable license.

Posted by Peter von der Ahe on June 30, 2006 at 03:55 AM PDT #

Oliver, we are trying to change the InternalError to a ZipError:
class ZipError extends InternalError { ... }
In the meantime, I catch InternalError :-(

Posted by Peter von der Ahe on June 30, 2006 at 03:57 AM PDT #

Peter, This is something I don't understand. I don't see why this has to be an error. I would expect it to be an exception since it is possible to recover from it. Why not adding an unchecked exception that would handle this case? Maybe I am missing something obvious. Could you please tell me if bug 4615343 will also be fixed in Mustang? Thanks for your reply. Best regards, Olivier

Posted by Olivier Thomann on July 05, 2006 at 08:19 AM PDT #

Thanks for the pointer, Peter. Afaict from http://download.java.net/jdk6/docs/legal/license.html , though, the JavaDocs on the Mustang site have the ssame issue: "The grant set forth above concerning your distribution of implementations of the specification is contingent upon your agreement to terminate development and distribution of your implementation of early draft upon final completion of the specification. ".

That's a rather weird requirement for a specification that's still in development, and could profit from feedback from other implementors.

Posted by Dalibor Topic on July 06, 2006 at 08:33 AM PDT #

Hi Peter...

Just out of interest, does javac multithread to take advantage of multi-CPU machines?

(Eg see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4229449 )

Rgds

Damon

Posted by Damon Hart-Davis on July 20, 2006 at 07:12 AM PDT #

Currently, javac does not take advantage of multiple CPUs but we are considering it.

Posted by Peter von der Ahé on July 20, 2006 at 10:56 AM PDT #

Hi Peter,

Well, most of the machines I compile on these days are multi-CPU and/or multi-core, and even when not surely there are I/O operations that can be usefully overlapped? Even scans of directory trees on a single disc platter benefit from threading IMHO.

Rgds

Damon

Posted by Damon Hart-Davis on July 20, 2006 at 01:39 PM PDT #

As I said: we are considering it :-)

Posted by Peter von der Ahé on July 20, 2006 at 04:21 PM PDT #

Hi,

Kewl! Thanks.

I guess this is an improvement on the "NO" I got when I suggested it seven years ago!

Regards,

Damon

Posted by Damon Hart-Davis on July 23, 2006 at 02:08 PM PDT #

Dalbor, I think the Mustang Beta 2 license has been fixed. Regarding JSR 199, licensing issues lie outside my area of expertise so I trusted others to provide the license. I'll try to keep an eye out for this when we post the proposed final draft.

Posted by Peter von der Ahe on July 24, 2006 at 12:42 AM PDT #

Oliver, Since the internal error has been there for so long, we are concerned with the compatibility impact of fixing it. So we are considering fixing 4615343 by throwing ZipError a new subclass of InternalError.

Posted by Peter von der Ahe on July 24, 2006 at 12:50 AM PDT #

Hi, Is grid compilation under consideration as well? Regards, Behi

Posted by Behrang on August 21, 2006 at 11:27 AM PDT #

Java is a trademark of Sun Microsystems, Inc.
Copyright © 2006,2007 Peter von der Ahé