samskivert: “Duplicate field expected”

24 January 2010

In my recent programming adventures, I separately encountered two perplexing error messages:

Inspection of the underlying code brought clarity:

The former was reporting a problem with a variable declared as InputStream is, the latter a problem with JUnit’s @Test annotation which defines a parameter java.lang.Class<? extends java.lang.Throwable> expected.

Tip from the pros: always wrap identifiers in quotes when including them in error messages.

©1999–2022 Michael Bayne