Re: enhanced enums - back from the dead?

2018-12-05 Thread Remi Forax
Hi Maurizio, i think you have overlook the fact that raw types and inference also doesn't play well together. accessibility: Widening the type is usually a big No because of the security implication. The fact that the same code code has no security bug with version n but a security hole with ve

Re: enhanced enums - back from the dead?

2018-12-05 Thread Maurizio Cimadamore
Yes, the compiler special cases raw types warnings for j.l.Class type arguments and also when doing instanceof. That is, in this program: import java.util.List; class Test {    void test(List ls) { ls = (List)null; boolean b = (ls instanceof List); Class cl = List.class;    } }

Re: enhanced enums - back from the dead?

2018-12-05 Thread Kevin Bourrillion
On Wed, Dec 5, 2018 at 8:19 AM Maurizio Cimadamore < maurizio.cimadam...@oracle.com> wrote: * Our proposed treatment for generic enums raises an additional, more > philosophical, question: what are raw types *for* and how happy are we > in seeing more of them (in the form of raw enum types)? > I

enhanced enums - back from the dead?

2018-12-05 Thread Maurizio Cimadamore
Hi, as mentioned in [1], the work on enhanced enum stopped while ago as we have found some interoperability issues between generic enums and standard enum APIs such as EnumSet/EnumMap. Recently, we have discussed a possible approach that might get us out of the woods, which is described in gr