![]() |
|
|
|
#11 |
|
> For instance the following compiles without complaint:
> > Object o = new A("hello") > B b = (B) o; The misuse/warning of a parameterised type can be roughly interpreted as: "You opted to use generic type-safety, but circumvented it with a cast - as a result, I (the compiler) will issue you with a warning". In your above case, it doesn't hold that you "opted to use generic type-safety", therefore, you receive no warning. Of course, you may choose to argue that the premise that I provided above is somewhat contrived in that it doesn't meet a majority of use cases (or whatever you might choose), in which case, I offer you the postulation that you are just "scratching the surface" with respect to the defectiveness of JSR-14. -- Tony Morris http://tmorris.net/ Tony Morris |
|
|