Process for adding default method to javax.naming.Context?
Laird Nelson
ljnelson at gmail.com
Thu Aug 19 14:32:29 UTC 2021
Hello; I am new to this mailing list and its conventions; if I misstep I am
happy to be pointed in the right direction. Disclaimer in case it matters:
I work for Oracle on project Helidon.
I would like to understand how to request an enhancement to the
javax.naming.Context interface. A prior discussion on this subject from
many years ago can be found here:
https://mail.openjdk.java.net/pipermail/core-libs-dev/2016-October/044137.html
To recap in brief: being able to do:
Frob frob = someNamingContext.lookup("frob", Frob.class);
would be very convenient, e.g. via something like:
// Proposed new default method in javax.naming.Context
default <T> T lookup(Name name, Class<T> type) {
return type.cast(lookup(name)); // just delegate to the existing
lookup() method
}
Should I simply file an RFE in https://bugs.openjdk.java.net/ or should I
first further discuss the idea here?
The contribution guide (https://openjdk.java.net/contribute/) seemed to
suggest starting with a discussion on the list when an RFE doesn't already
exist, but to be honest there's not much more to the idea than this at the
moment.
Best,
Laird
More information about the core-libs-dev
mailing list