Community
Participate
Working Groups
FIRST ------------------------------ The eclipse JDT is frequently giving bogus errors in two portions of my code. In test.parc.augustus.FooTest the snippet public class FooTest extends TestCase { ... public static class MyCategorizableReportable extends CategorizableReportable { private static final ColumnTemplate[] COLUMN_TEMPLATES = { ColumnTemplate.staticColumn("pop"), }; ... eclipse complains about staticColumn. But in com.parc.augustus.ColumnTemplate, there is no compilation error for public class ColumnTemplate { ... public static ColumnTemplate staticTemplate(String columnName) { return new ColumnTemplate() { public void addColumnNames(List columns) { } }; } ... } Is it worth mentioning that when this error first appeared, that ColumnTemplate was abstract, but was de-abstracted in a failed attempt to understand what eclipse was complaining about? SECOND ----------------------------------------- public interface Splitter { String getCategory(Sighting sighting); Collection/*String*/ allCategories(); Splitter BY_THROWABLE = new Splitter() { private final Set USES_FOO = new HashSet(Arrays.asList(new String[] { "ge", "ck", "st"})); private final Set USES_BAR = new HashSet(Arrays.asList(new String[] { "or", "er", "ue", })); private final Set USES_NOTHING = new HashSet(Arrays.asList(new String[] { "id", "an", })); This will compile just fine for a while. Then (without any edits to that file), it will decide that "The blank final field 'USES_NOTHING' may not have been initialized." What??? Sometimes, I can make this second error go away by reordering USES_FOO, USES_BAR, and USES_NOTHING. Sometimes I can't. Sometimes I can make it disappear by deleting Splitter.class from the file structure and doing a rebuild. A rebuild by itself doesn't help. Overall, these two errors are hampering my day-to-day work significantly, and changing my impression of eclipse 3.0.2 as a stable, usable platform for work. I apologize in advance that I cannot post anything but sanitized versions these files, and that I do not have time to try to produce minimal, failing examples.
First time we hear about these issues. Do you reproduce these issues in a recent 3.1 build ? (try M6 or better).
Please ignore the FIRST part. It was a typo, driven by a lack of sleep. Please accept my apologies on that score. The SECOND, however, is real, and does persist into 3.1M6. However, it may be de-escalated from "blocker" because the workaround (which would have occurred to me had I had enough sleep) is to remove the keyword "final".
Cannot reproduce in 3.1m7 with following testcase. It only complains about missing abstract method implementations. import java.util.*; interface Splitter { String getCategory(Sighting sighting); Collection/*String*/ allCategories(); Splitter BY_THROWABLE = new Splitter() { private final Set USES_FOO = new HashSet(Arrays.asList(new String[] { "ge", "ck", "st"})); private final Set USES_BAR = new HashSet(Arrays.asList(new String[] { "or", "er", "ue", })); private final Set USES_NOTHING = new HashSet(Arrays.asList(new String[] { "id", "an", })); }; } class Sighting {}
Please reopen if you can provide reproduceable steps
Sorry. Cannot provide reproduceable steps at the present time, due to time constraints. Problem persists in my workspace, but workaround continues to work as well. Will re-open if current workload lightens, and I can strip to minimal problem, and sanitize for public consumption.
reopening to close properly
Not reproduced in a long time. Also many changes occurred in this area since then.
oops, did mean to close as worksforme
worksforme