Calendar Builder should not assume anything about Parser imp
Brought to you by:
fortuna
CalendarBuilder should not asume nothing about underline CalendarParser implementation, and should not automatically wrap all streams into UnfoldingReader. Also this puts an end to other usefull ReaderFilter implementations that parser could use.
This patch is just a proposal for change since it breaks compatibility by removing parse(UnfoldingReader method) , witch is rarely called directly by clients I think, but real fix should leave all methods or maybe add method like
parse(Reader in, boolean unfold);
Logged In: YES
user_id=14058
Originator: NO
Ivan,
I think the best approach here is to add a method to the CalendarParser interface as follows:
boolean isUnfoldingSupported();
This would return false for the current default parser, and true for your implementation, which will determine whether CalendareBuilder wraps the inputstream/reader in an UnfoldingReader instance.
I haven't made this change yet, as I'm still assessing how it will impact the binary compatibility of the beta release.
regards,
ben