This content has been marked as final. Show 6 replies
I recreated the problem here and you're right, constant-specific methods aren't working. This isn't something we thought about, to be honest, or tested.
Just based on an initial quick look I see that for the compiler generated class, the Class.isEnum method returns false, which is why we don't recognize this as an enum and eventually why we throw the exception you're seeing. But assuming that we can identify the class as an enum (that shouldn't be too difficult) I don't know what other problems we will run into in trying to support this.
For now I think the best thing is to avoid using the constant-specific methods. I have opened a ticket (#18357) so that we'll remember to look into this in more detail and see whether it can be supported in the future.
If we are able to support it, then I'm hoping that we won't to store extra metadata for constants that have methods. In other words, I'm hoping that we won't have to add any extra storage or processing overhead.
Thanks for the information. I think I'll use a case-based workaround for now..
Is there a way I can monitor the ticket #18357 in the tracker system to get a notify if it's fixed? I was unable to find a link to the tracker system..
Hi,1 person found this helpful
No, sorry, Oracle does not made their bug tracking systems (or source control systems) public. Asking a question on this forum is the best way to find the status.
Are there any news or ETA on this issue?
It's surely not a vital problem, but when I add constants to enums I'd really like compiler to check if I implemented all the methods there, instead of trying to remember to add a case to every switch..
No, I'm sorry, there is no progress or ETA on this.
This bug will be fixed on the next JE release.
BDB JE Team