Planet JDKNews and views from the Java SE Development-Kit CommunityVariousDavid Dice: Pitfalls of Lazy SubscriptionDavid Dice

Pitfalls of Lazy Subscription appears in WTTM 2014 (PODC).

Dave 2014-07-03T14:28:52Z
Mark Reinhold: Project Jigsaw: Phase TwoMark Reinhold
Here we go …
Mark Reinhold2014-07-02T16:47:29Z
Jeroen Frijters: New Development SnapshotJeroen Frijters

I fixed a whole bunch of weird edge case behaviors and finally did the first part of the lambda performance work.

I fixed a whole bunch of weird edge case behaviors and finally did the first part of the lambda performance work.

Here are some rough performance results (times in milliseconds) for this crude microbenchmark:

iteration IKVM 8.0.5274 IKVM 8.0.5296 JDK 1.8.0_05                     ikvmc ngen
1 1040.2 87.6 71.8   1.3 0.4
2 0.9 0.3 0.3   0.3 0.4
3 0.9 0.3 0.3   0.3 0.4

Only LambdaMetafactory.metafactory() is supported at the moment. LambdaMetafactory.altMetafactory() will follow in a future snapshot.


Binaries available here:

Stephen Colebourne: ThreeTen-Backport vs Joda-TimeStephen,

So which project should you choose? ThreeTen-Backport or Joda-Time?

0 Colebourne2014-07-01T06:24:00Z
Stephen Colebourne: Java 8 - Iterable woesStephen,

In the last few weeks I've finally had the chance to use lambdas and streams in Java SE 8 in anger. In doing so, I've found much to like, but some rough edges.

12 Colebourne2014-06-26T22:51:00Z
Andrew Hughes: IcedTea 2.5.0 for OpenJDK 7 Released: POWER to the People!Andrew Hughes
We are pleased to announce the release of IcedTea 2.5.0, “POWER to the People”! The IcedTea project provides a harness to build the source code from OpenJDK using Free Software build tools, along with additional features such as the ability to build against system libraries and support for alternative virtual machines and architectures beyond those […]
Marcus Hirt: Moving to Switzerland – will be down!Marcus Hirt
Hi friends! Sorry for the radio silence lately. I’ve been spending a lot of time preparing for my family’s relocation to Switzerland. Since I will be bringing my computers, and since traveling from Sweden to Switzerland is far from instantaneous, this means that will be down for a couple of days. Minimum. Murphy’s law […]
Jeroen Frijters: Malformed UTF-16Jeroen Frijters

While scanning the Java 8 version of the JVM spec for changes, I noticed this new text:

While scanning the Java 8 version of the JVM spec for changes, I noticed this new text:

Names of methods, fields, local variables, and formal parameters are stored as unqualified names. An unqualified name must contain at least one Unicode code point and must not contain any of the ASCII characters . ; [ / (that is, period or semicolon or left square bracket or forward slash).

As per usual, the spec and HotSpot implementation don't agree on the details. In particular the text says that a name must contain at least one Unicode code point. At this point it becomes important what a Unicode code point actually is. Suffice it to say that a single UTF-16 code unit in the surrogate range is not a valid Unicode code point and that such names are accepted by HotSpot without any complaint.

The spec, of course, is also incomplete as it does not address what should happen in case of malformed UTF-16 in general. Or maybe it should just be changed to say "... UTF-16 code unit ..." to match the current behavior and not worry about surrogates at all.

On the .NET side, the strings that aren't string literals in the code are stored as UTF-8 and the ECMA CLI spec requires valid UTF-8, but this is only partially enforced which poses its own set of problems.

After discovering all this, I felt compelled to fix IKVM.NET to behave similarly to HotSpot in this regard and added support for escaping malformed UTF-16 strings when writing metadata and unescaping them when reading it back in.

Finally, let's end with a C# example that shows some of the weirdness on the .NET side:

using System;
using System.ComponentModel;

class Surrogate {
  static void Main() {
    var attr = (DisplayNameAttribute)typeof(Surrogate)
    Console.WriteLine(attr.DisplayName == "\uD800");