I am using "java.lang.reflect.Type" in web app project all working fine..but I am stuck with code review how to fix "java.lang.reflect.Type illegal package import " -checkstyle warning.. I am more intrested in explanation of this warning.
Thanks
I am using "java.lang.reflect.Type" in web app project all working fine..but I am stuck with code review how to fix "java.lang.reflect.Type illegal package import " -checkstyle warning.. I am more intrested in explanation of this warning.
Thanks
The original IllegalImport check only forbids the
sun.*
packages, so you are looking at a custom rule definition made by your client.The rule simply means that you are not supposed to use classes from certain packages. This can make sense for various reasons. If your rule forbids
java.lang.reflect.Type
, then your client does not want you to use Reflection.Since you say that you may not modify the rules, you will have to find some way to reach your goal without Reflection.