Bill Pugh of the University of Maryland has released FindBugs 1.1.2, an automated open source tool for finding potential bugs in Java code. New checks in this release include:
Set<String>
contains a StringBuffer
).
I tested this out on XOM.
It found one serious bug in some sample code that had gone unnoticed for several years. I was casting an Element
to an Attribute
. Here's another less obvious bug it found. (Arguably it's not a bug, just redundant.) Can you spot it?
public void testEquals() {
Attribute c1 = new Attribute("test", "limit");
Attribute c2 = new Attribute("test", "limit");
Attribute c3 = new Attribute("retina", "retina test");
assertEquals(c1, c1);
assertEquals(c1.hashCode(), c1.hashCode());
assertFalse(c1.equals(c2));
assertFalse(c1.equals(c3));
assertFalse(c1.equals(null));
assertFalse(c1.equals("limit"));
assertFalse(c1.equals(new Element("test")));
}
Very importantly, FindBugs reminded me that the "equals
and hashCode
method of URL
perform domain name resolution." I know I used to know this. I even wrote about it in Java Network Programming, though perhaps I didn't emphasize it as much as I should.
However I'd managed to forget it when writing XOM. This is is why static code analyzers are so useful.
There are still definitely more false positives than true positives, though that will depend on the code base. The GUI is also quite flaky, at least on the mac, and needs some work. I was not able to view all the error messages it generated because I'd click on one category and a different category would open up. Also, the Ant task is broken in this release, so if you use it through Ant you should wait for 1.1.3 next year or try the 1.1.3 release candidate now.
Sun has released the next piece of open source Java. GPLed JVM sources from Sun. Everyone seemed to be expecting the desktop version (J2SE) but J2ME has been released first. It looks to be buildable for Linux x86, MIPS, and ARM platforms. Sun now calls it 'phoneME.' Enjoy."
The Apache XML project has released XMLGraphics Commons 1.1, "a library that consists of several reusable components used by Apache Batik and Apache FOP. Many of these components can easily be used separately outside the domains of SVG and XSL-FO. You will find components such as a PDF library, an RTF library, Graphics2D implementations that let you generate PDF and PostScript files, and much more."
This library looks reasonable, but it commits one major sin. Like a lot of open source projects, it considers the problems from the perspective of the implementers rather than the users. In particular consider the functionality: PDF, RDF, Graphics2D, PNG, TIFF, and so on. All good stuff to be sure, but all stuff that has absolutely nothing to do with XML. Why then is it called "XMLGraphics"? The reason is that the specific projects that spawned this library use it to do XMLish things like SVG and XSL-FO, which is also fine; but this library itself is not about XML and shouldn't be called XML graphics. The consequence of this is that developers who need a generic PNG, GIF, PDF etc. library but aren't themselves doing XML work are unlikely to find or consider this library, though it could be quite helpful to them.
Ericsson and BenQ have published the early draft review of JSR-281: IMS Services API to the Java Community Process (JCP). According to the draft, "JSR-281 is intended to be used by application developers who wish to build Java applications for terminals that use the IP Multimedia Subsystem (IMS), which is the standard for future mobile phone multimedia applications."
Tom Copeland has released PMD 3.9, an open source tool for automatically checking Java code for various classes of bugs. (Web site not yet updated.) Version 3.9 improves performance and adds eight new rules: BigIntegerInstantiation, AvoidUsingOctalValues, NPathComplexity, NcssTypeCount, NcssMethodCount, NcssConstructorCount, UseCollectionIsEmpty, and StringBufferInstantiationWithChar.
As is my custom, I tested these new rules out on XOM.
I found a number of violations of NPath complexity. "The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity."
It also complained about the NCSS complexity of various methods. The other suggestion it made was "Substitute calls to size() == 0 (or size() != 0) with calls to isEmpty()" in one method. OK. That's not a major issue, but it's plausible.
Atlassian has released version 3.7 of JIRA, a $1200-$4800 payware J2EE-based bug tracking and project management server application. Version 3.7 now allows you to "configure project roles (e.g. developer, tester, administrator), and assign users/groups to these roles on a per-project basis. If you have more than a few projects, this will significantly simplify administration." I've been using Jira lately with Jaxen and Apache. It's a definite improvement over Bugzilla. I'm not sure it really does anything that Bugzilla doesn't do (at least not anything I use) but the user interface is about a hundred times cleaner.
The Apache Project has released Ant 1.7, a new version of the popular XML based, open source build tool for Java.
Ant 1.7 introduces a resource framework. Some of the core ant tasks such as <copy/> are now able to process not only file system resources but also zip entries, tar entries, paths, ... Resource collections group resources, and can be further combined with operators such as union and intersection. This can be extended by custom resources and custom tasks using resources.
Ant 1.7 starts outsourcing of optional tasks to Antlibs. The .NET antlib in preparation will replace the .NET optional tasks which ship in Ant. Support for the version control system Subversion will be only provided as an antlib to be released shortly.
Ant 1.7 fixes also a large number of bugs.
Ant 1.7 has some initial support for Java6 features.
YourKit, LLC has released YourKit Java Profiler 6.0, a $499 payware tool for detecting memory leaks and memory consumption bottlenecks. It features memory leak detection, an object heap browser, JUnit integration, IntelliJ IDEA, Borland JBuilder, NetBeans, and Eclipse integration. This release adds support for Java 6. new features include SQL, JSP, and JNDI profiling; automatic memory snapshots on different conditions; and deadlock detection.
Luc Maisonobe has released Mantissa 7.0, "a collection of various mathematical tools aimed towards for simulation. It is not a complete mathematical library like GSL, NAG or IMSL, but it contains various algorithms useful for dynamics simulation and 3D geometry computation." The big change in this release is that many more objects have been made immutable. Thus this release is largely incompatible with previous versions. Its algorithms include:
The Legion of the Bouncy Castle has released version 1.35
of the Bouncy Castle Java Cryptography API, an open source,
clean-room implementation of the Java Cryptography Extension (JCE).
It supports X.509 certificates, PKCS12, S/MIME, CMS, PKCS7, and lots of other juicy acronyms. It also includes its own light-weight crypto API that works in Java 1.0 and later, and does not depend on the JCE.
According to the announcement:
This release adds a lightweight client TLS API, support for the TEA and XTEA ciphers, BZIP2 and SHA224 support to OpenPGP, and support for GOST-3410-2001 (ECGOST) in CMS, S/MIME, certificate generation and certification requests. In addition a number of bugs have been fixed in both the S/MIME and ASN.1 APIs and a corruption issue with the IESEngine in block cipher mode has been addressed.
Download it while it's still legal.
Diomidis Spinellis has released UMLGraph 4.5, an open source (BSD license) tool for declaratively specifying UML diagrams. UMLGraph uses text files that look vaguely like source code to specify how UML class and sequence diagrams are drawn. A doclet converts this into a Graphviz diagram that can be easily converted to Postscript, GIF, SVG, JPEG, etc. Version 4.5 is a bug fix release. Java 5 is required.
Nathan Fiedler has released version 3.14 of JSwat, a graphical, stand-alone Java debugger built on top of the Java Platform Debugger Architecture. Features include breakpoints, source code viewing, single-stepping, watching variables, viewing stack frames, and printing variables. Version 3.14 is a bug fix release. JSwat is now published under the Sun Public License. (It was previously published under the GPL.)
JPOX 1.1.5, an open source implementation of Java Data Objects (JDO) 2.0, has been released. that provides transparent persistence to Java objects. It supports most major SQL databases and can be queried using either JDOQL or SQL. 1.1.5 is a bug fix release. It's published under the Apache 2.0 License.
Next month, I will be teaching a one-day course on “Test driven Development with JUnit” at Polytechnic University's CATT Center in Brooklyn. This course offers attendees a solid, hands-on practical introduction to test driven development in Java with the JUnit framework. Attendees will develop a simple application using test-first techniques and learn about assertions, fixtures, test cases, code coverage, and test-driven debugging.
We'll be using the open source Eclipse Integrated Development Environment, though essentially all of the techniques covered work similarly with other IDEs, or indeed with no IDE at all. No prior experience with JUnit or Eclipse is required. Students should be comfortable with the Java programming language.
Unlike most of my Poly courses, this one is open to the general public. The cost is $595 for participant. (CATT Associate Member Firms may register up to five people for free.) The course is hands-on and takes place, Friday, January 19, 2007 from 9:00 a.m. to 5:00 p.m. Please register by fax (718-260-3074) or e-mail (tmassa@catt.poly.edu) by January 12, 2007, but please keep in mind that seating is limited and early registration usually guarantees you a seat.
Oracle has released Berkeley DB Java Edition 3.2.13. This is an open source, non-relational embedded database written in Java. The data is exposed through "a Java Collections-style interface, as well as a programmatic interface similar to the Berkeley DB API." New features in this release include:
Berkeley DB Java Edition is published under a custom, viral license that is compatible with most major open source licenses. The license is a little confusing, though. It's not clear to me whether you have to release the source code to a Java program that calls Berkeley DB JE or just the source code to Java. The FAQ says, "The Berkeley DB open source license requires that software that uses Berkeley DB be freely redistributable. In the case of Perl or Python, that software is Perl or Python, and not your scripts. Any scripts you write are your property, including scripts that make use of Berkeley DB. None of the Perl, Python or Berkeley DB licenses place any restrictions on what you may do with them." That seems to indicate that it's just Java's source you have to release, which would be possible post-GPL and impossible pre-GPL, even for another open source project. Custom licenses are a pain. You can of course buy a payware license, but in classic Oracle fashion, they won't tell you what that costs until they figure out how much money you've got. The price probably also varies with how close we are to the end of Oracle's sales quarter too.
Sun has officially released Java 6, Mustang for the usual platforms: Solaris, Windows, and Linux. This is not nearly as major a release as Java 5 is but there's a lot of cool stuff here including:
According to the "umbrella" JSR 270, the following JSRs are included:
All of these JSRs are now officially released in final form, as well. However,
The original submission of this umbrella JSR mentioned three potential component JSRs that will not, as it turns out, be part of Java SE 6.
- JSR 260, the Javadoc Tag Update, will not be included because the JSR 260 Expert Group was unable to reach consensus on a number of critical issues in time for this release.
- JSR 268, the Java Smart-Card I/O API, will not be included because the JSR 270 Expert Group concluded that it would not be of sufficiently wide interest in the Java SE 6 time frame.
- The “JAXP.next” JSR will not be included because it was never submitted. Minor changes to the JAXP 1.3 API will be handled in a maintenance review of JSR 206.
What strikes me about most of the changes this time around is that, unlike Java 5, it's almost all stuff that could easily be added as 3rd party libraries in earlier releases. The core language is pretty much the same.
I've done some Java 6 work, but mostly I try to keep to Java 1.4 (or even 1.2) for anything major. I suspect most people take their time about upgrading these days.
The first release candidate of Groovy has been posted. Groovy is a JVM hosted scripting language that combines the blazing speed of GW-Basic with the unparalleled clarity of Perl. According to Guillaume Laforge,
Groovy RC-1 contains a lot of bug fixes and improvements -- about a hundred have been worked out in this release.
Among the interesting improvements, you'll note that coercion mechanisms are improved and now customizable for your own POGOs through the asType(Class) method. You can even coerce Maps to interfaces, as well as Closures to single-method interfaces.
The 'in' keyword now becomes a fully supported boolean operator, not only in the for loop.
Last but not least in the dynamicity of the language, you can decide which method to call with GStrings, like in: foo."$methdName"(*args).
So far, the old closure notation with the vertical pipe was still allowed, and the @Property syntax was silently ignored in the latest release. Now that the transition period is over, in RC-1 both are definitely illegal.
1.0 final is due by the end of the year.
JPOX 1.1.5, an open source implementation of Java Data Objects (JDO) 2.0, has been released. that provides transparent persistence to Java objects. It supports most major SQL databases and can be queried using either JDOQL or SQL. 1.1.5 is a bug fix release. It's published under the Apache 2.0 License.
ej-technologies GmbH has released version 4.3 of
JProfiler,
a $698 payware profiler
based on the Java virtual machine profiling interface (JVMPI
that can report on CPU usage, memory size, threads, and "VM telemetry"
(whatever that is).
New features in this release include:
Upgrades from 4.x are free.
The Jakarta Apache Project has posted the third alpha HttpComponents HttpCore 4.0 (formerly known as HttpClient):
HttpCore provides a set of low level components, which can be used to build custom client and server side HTTP services.
This release represents a complete redesign of the Jakarta Commons HttpClient 3.x API, and a significant rewrite of the core HTTP components derived from the HttpClient 3.0 code base. HttpCore will form the foundation of the future releases of Jakarta HttpClient.
This release is primarily intended for API review and use in experimental projects. The HttpCore API is still deemed unstable, and it can still undergo significant changes based on the feedback from early adopters.
Alpha 3 adds
optional API extensions based
on java.nio
that can be used to build asynchronous HTTP
applications.
Bare Bones Software has released version 8.5.2 of BBEdit, my preferred text editor on the Mac, and what I'm using to type these very words. This is bug fix release. BBEdit is $199 payware. Mac OS X 10.3.9 or later is required.
Smardec has released Allatori 1.4, a $775 payware Java byte code obfuscator. This release fixes bugs and adds support for J2ME.
The Apache Project has released Jackrabbit 1.1.1, an open source implementation of the Content Repository for Java Technology API (JCR) specified in the Java Specification Request 170.
Apache Jackrabbit is a fully conforming implementation of the Content Repository for Java Technology API (JCR). A content repository is a hierarchical content store with support for structured and unstructured content, full text search, versioning, transactions, observation, and more. Typical applications that use content repositories include content management, document management, and records management systems.
This is a bug fix release.
The Apache Jakarta Project has released Commons Discovery 0.4, an open source class library that
The Discovery component is about discovering, or finding, implementations for pluggable interfaces. It provides facilities for instantiating classes in general, and for lifecycle management of singleton (factory) classes.
Fundamentally, Discovery locates classes that implement a given Java interface. The discovery pattern, though not necessarily this package, is used in many projects including JAXP (SaxParserFactory and others) and commons-logging (LogFactory). By extracting this pattern, other projects can (re)use it and take advantage of improvements to the pattern as Discovery evolves.
Discovery improves over previous implementations by establishing facilities for working within managed environments. These allow configuration and property overrides without appealing to the global System properties (which are scoped across an entire JVM).
According to Henri Yandell, "Discovery 0.4 is a long overdue release (0.3 failed at the last hurdle to actually be released). Discovery is not an actively developed component, so this release is chiefly to mark a stable point that the users of discovery can depend on. "
The Apache Jakarta Project has released Commons DbUtils 1.1, an open source class library that abstracts "out all of the cleanup tasks from your code leaving you with what you really wanted to do with JDBC in the first place: query and update data." According to Henri Yandell, "DbUtils 1.1 is a bugfix release resolving most of the issues raised over the last couple of years. "
The Apache Jakarta Project has released Commons Validator 1.3.1, an extensible open source framework for defining validation methods. Although it uses XML to define the validation rules, this component is intended for general data validation, not specifically or even primarily XML validation. This is a bug fix release. It is published under the Apache 2.0 license.
Excelsior has released JET 4.8, a Java virtual machine for Linux and Windows that uses a combination of a traditional native code compiler and just-in-time compilation from byte code. Version 4.8 restores support for Java 1.4 and "enables you to considerably reduce the disk footprint of your installed Java applications. Other major improvements are further decrease of the download size of installers created with JetPackII and higher application performance on hardware that supports parallel execution." JET costs start at $1200 and run up to $4500 depending on which version and how much support you want. Support is available by e-mail and Web site only.
Peter Klauser has released codavaj 1.2.0, an open source (Apache License) reverse engineering tool that converts JavaDoc HTML back into Java source code. This release adds support for java 5 though enums and generics constructs are not yet supported. It's based on NekoHTML and dom4j instead of TagSoup and XOM, but it's still pretty cool.