From: Markus S. <mar...@gm...> - 2011-02-15 00:43:47
|
Dear ICU team & users, Moving along the MessageFormat reimplementation... it looks like the hardest part of the "API" to be supported with a very different implementation is the Serializable interface. The MessageFormat class does not just read and write the message pattern string, it reads and writes whatever non-transient fields it has; trouble is, the old data structure would take a fair bit of convoluted code to turn into the new one. At the same time, there seems to be no need to serialize these *Format classes using Java Serializable, and there seems to be consensus that the Serializable mechanism was somewhat ill-conceived and applied to too many classes. I would rather not spend significant amounts of code, and developement time, on a non-trivial, questionable feature... *Proposal*: Implement readObject() and writeObject() and just have them throw java.io.*NotSerializable*Exception<http://download.oracle.com/javase/6/docs/api/java/io/NotSerializableException.html>. (Yes, there is a nice, standard, JDK 1.1 Exception class for "when an instance is required to have a Serializable interface" but we don't actually want to implement it.) Sincerely, markus |