Martin Desruisseaux created SIS-348: ---------------------------------------
Summary: CompoundFormat.parse(CharSequence text, ParsePosition pos) javadoc is inconsistent with implementation Key: SIS-348 URL: https://issues.apache.org/jira/browse/SIS-348 Project: Spatial Information Systems Issue Type: Bug Components: Utilities Affects Versions: 0.7, 0.6, 0.5, 0.4, 0.3 Reporter: Martin Desruisseaux Assignee: Martin Desruisseaux Fix For: 0.8 In the {{CompoundFormat}} class, the Javadoc of following method give a description of {{ParseException.getErrorOffset()}} value which is inconsistent with what most Apache SIS implementations actually do: {code:java} public abstract T parse(CharSequence text, ParsePosition pos) throws ParseException; {code} The current specification of above method is more convolved than what we usually expect from a method throwing {{ParseException}}. It said that the error offset of the exception is relative to the error index of the {{ParsePosition}}. But the {{TreeTableFormat}} subclass is the only one to follow that specification; all other subclasses apply the more usual and straightforward interpretation where {{ParseException.getErrorOffset()}} gives directly the index where parsing error occurred. Instead than modifying {{WKTFormat}} - which is a much more sensitive subclass than {{TreeTableFormat}}, we should rather modify the {{CompoundFormat.parse(CharSequence, ParsePosition)}} specification for making it less surprising and adapt {{TreeTableFormat}} accordingly. -- This message was sent by Atlassian JIRA (v6.3.15#6346)