Hi Mandy,
I added an additional selector parameter to the find methods.
This made it possible to return Optional<Level> instead of
KnownLevel - and it does simply the parse() method.
http://cr.openjdk.java.net/~dfuchs/webrev_6543126/webrev.02
best regards,
-- daniel
On 11/08/16 20:12, Mandy Chung wrote:
On Aug 11, 2016, at 2:29 AM, Daniel Fuchs <daniel.fu...@oracle.com> wrote:
On 10/08/16 17:21, Mandy Chung wrote:
On Jul 29, 2016, at 4:54 AM, Daniel Fuchs <daniel.fu...@oracle.com> wrote:
http://cr.openjdk.java.net/~dfuchs/webrev_6543126/webrev.01/
This looks pretty good.
Since KnownLevel is now a Reference, I suggest to change KnownLevel::findByName,
findByValue and findByLocalizedLevelName to return Optional<Level> instead such
that the parse method implementaiton could be simplified.
We need to return KnownLevel because sometimes we need the
level object and sometimes the mirror.
So either findByName(String name, boolean mirror) or two methods:
findLevelByName and findMirroredLevelByName??
Or seriously consider to remove KnownLevel class by introducing a new Level
subclass with final Level.getName, Level.getLocalizedName,
Level.getResourceBundleName methods??
Mandy