Community
Participate
Working Groups
In all our Policy classes we call the static method on MessageFormat. We should be re-using a single MessageFormat instance.
Clarified intention with DJ: we could reuse a single instance per Policy class and call #applyPattern before resolving each message. I think it would be ok, except for format classes not being thread-safe (I already had weird problems with DateFormat because of that). Maybe having to enter in a synchronized block (eventually waiting for the lock) every time we create a message would be worse than creating a MessageFormat every time we need one. It seems also that #applyPattern recreates the whole object state from scratch, so we would be just avoiding the creation of MessageFormat objects (but not of their sub-objects).
McQ to investigate.
Moving to DJ to consider in new message catalog work.
Part of the new resource bundle work. *** This bug has been marked as a duplicate of 37712 ***