This was changed here:
https://github.com/JodaOrg/joda-time/commit/46b817a006e768865b1f0d2896e814dfa2d3244f

It basically makes the builder behave more correctly.

Your test code is adding an optional parser to the builder and then
trying to retrieve a printer. That deosn't seem like a reasonable
thing to expect to work.

thanks
Stephen




On 27 August 2013 11:11, Jörg Schaible <joerg.schai...@scalaris.com> wrote:
> Hello,
>
> we tried to upgrade from joda-time 2.1 to 2.3, but we get now NPEs, because
> our DateTimeFormatter instance suddenly has no longer a printer:
>
> ================= %< =================
>  DateTimeFormatter FORMATTER = new DateTimeFormatterBuilder()
>    .appendMonthOfYear(2)
>    .appendOptional(
>       new DateTimeFormatterBuilder().appendLiteral('-').toParser())
>    .appendDayOfMonth(2)
>    .toFormatter();
>  assertNotNull(FORMATTER.getPrinter());
> ================= %< =================
>
> A test with version 2.2 reveals the same problem. Reverting to 2.1 let our
> unit tests pass.
>
> I could not see anything directly related to this new behavior in the
> release notes, so I assume a regression or was there an intentional change?
>
> - Jörg
>
>
> ------------------------------------------------------------------------------
> Introducing Performance Central, a new site from SourceForge and
> AppDynamics. Performance Central is your source for news, insights,
> analysis and resources for efficient Application Performance Management.
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to