Java 7 Bugs: Should the Release Have Been Delayed?

The Java community continues to debate the HotSpot compiler shipped with Java 7.

Java 7 may have brought with it some useful (and long-awaited)
updates for the Java community, but it has also sparked controversy
as the release shipped with some
bugs in the Java 7 HotSpot compiler. These bugs affect all
currently released versions of Apache Lucene Core and Apache Solr,
but the problem could also affect Java 6 users, if they use one of
the JVM options that are not enabled by default:

-XX:+OptimizeStringConcat or
-XX:+AggressiveOpts

These bugs were discovered five days before Java 7 was
published, which has caused some to question whether the release
should have been delayed. At his blog, Uwe Schindler, who first
posted about the bug, has drawn attention to the fact that the
final release of Java 7, is the same as the preview release, and
has questioned the point of the preview release. “It was for sure
not intended for public review and bug hunting!” he says. Others,
such as Markus Eisele, have defended Oracle, stressing that: “these
problems were detected only 5 days before the official Java 7
release, so Oracle had no time to fix those bugs.”

Andrew Binstock, Executive Editor of Dr. Dobb’s, has posted his
thoughts on the controversy, referring to the HotSpot compiler
problems as “showstopper bugs” and stating that Oracle should have
delayed the release. He goes on to claim that there is a “feeling
in the Java community that Oracle does not understand Java.”
Furthermore, he questions why this bug went undetected for as long
as it did as, in his opinion, compilers are one of the easiest
products to test:

“The easy generation of input and the simple validation of
output make it possible to create literally tens of thousands of
regression tests that can explore every detail of the generated
code in an automated fashion.”

But, Binstock argues that even if there was a problem with
Oracle’s testing process, the company should have been testing the
code on some of the large open source codebases – he gives Apache
Solr as an example.

“I have to hope that this event will be a sharp lesson to Oracle
to begin using the large codebases at its disposal as a fruitful
proving ground for its tools.”

Binstock does point out that the reason the bug has appeared
now, is that the optimization switch is off by default in Java 6,
but it is on in Java 7. In his opinion, this means that Sun’s
testing process is also to blame for the bugs. However, in
Binstock’s article he highlights one important point:

“The crucial difference is that Oracle knew about the bugs prior
to release and went ahead with the release anyway, while there is
no evidence Sun was aware of the problems.”

This bug was only discovered five days before the release date.
In Neward’s opinion, this was simply too late to delay the
release.

Would the community have still complained if Oracle had delayed
the release? Neward believes so, stating that: “If Oracle slipped
the date, the howls would still be echoing across the hills and
valleys, and Andrew would be writing, “If Oracle commits to a date,
they really should stick with this date…”

Does Oracle really not understand Java? He argues that Oracle
just play the game differently to Sun.

It is not Oracle’s responsibility to test Java 7 against the
different open source software packages (particularly since open
source codebases typically change so rapidly). In Neward’s opinion,
this is the responsibility of the individuals working on those
projects – or, as the Java code is publicly available – the wider
open source community.

When it comes to the accusations that Oracle does not ‘get’
Java, or engage with the community, Neward points to one piece of
evidence: according to the Solr mailing list, Oracle acknowledged
the bug, and discussed with the Solr community when this fix would
be released.

However, this point has sparked further debate, with Cay
Horstmann writing that, although Oracle did engage with the Solr
community at the mailing list, the company did not release a
statement regarding the bug, to the wider Java community:

“If Oracle had said “Whoa, we just found out this issue, and
we’ll fix it immediately, but it’ll take ten days to re-run all the
acceptance tests”, nobody would have batted an eye. Or if they had
said “Look, we’ve got this problem, but you’ve got to ship
sometime, and here is how you work around this vexing issue”,
people would have been ok. Their problem was to say nothing at
all.”

Indeed, Oracle have in the past been accused of mishandling
communication with the Java community. However, them engaging with
the Solr community seems to be a step in the right direction, and
the multitude of blogposts and tweets that have centred around this
issue over the past weeks, proves that there is still a large
community out there who are passionate about Java. Far from showing
a disregard for the language, the critical response to Java 7 from
some members of the community, proves that there is still a strong
desire to continue moving Java forward.