Bug 1516 : Local inner class variable with generic parameter fails compile
Last modified: 2010-03-17 12:47




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
heuermh
Assigned To:
MrFeinberg

Attachment Type Created Size Actions

Description:   Opened: 2010-03-16 12:43
version:

processing-0180

error:

Syntax error on token(s), misplaced construct(s)

source:

import java.util.ArrayList;
import java.util.List;
import java.util.Collections;
import java.util.Comparator;

void setup()
{
List<String> list = new ArrayList<String>();
list.add("foo");
list.add("bar");
list.add("baz");

Comparator<String> comparator = new Comparator<String>()
{
public int compare(final String value0, final String value1)
{
return value0.compareTo(value1);
}
};

Collections.sort(list, comparator);
}
Additional Comment #1 From MrFeinberg 2010-03-16 12:50
Fixed; please verify.