Curious about the future of data-driven systems? Join our Data Engineering roundtable and learn how to build scalable data platforms.
Data Engineering: The industry has come a long way from organizing unstructured data to adopting today's modern data pipelines. See how.
Software Developer at AIS.PL
Torun, PL
Joined Jun 2008
More than 10 years of experience in Enterprise Applications development, and Project Management (since June 2001). Specialties: Enterprise Applications, J2EE, J2SE, Spring Framework, Spring Security, Spring Webflow, JPA and JDBC, JMX, JAXB, JUnit; XML, XSLT and XSL-FO; HTML/CSS, Javascript, JSON, jQuery/jQuery UI; RDBMS (Oracle, SQL Server, MySQL), PL/SQL; UML; Mobile Applications, mostly in Objective-C targeted iPhone/iPad
Stats
| Reputation: | 76 |
| Pageviews: | 308.1K |
| Articles: | 8 |
| Comments: | 7 |
Comments
Apr 02, 2012 · ldz
Fabrizio,
I'm glad that someone has left such a valuable comment on my modest post :). You are right that, marking SuppressWarnings annotation with SOURCE retention is something unbelievable :(, and harming potential tools like FindBugs. Anyway, don't you think that using by FindBugs annotation having exactly the same short name as the one already existing in JDK is something misleading? Imagine, that one day I introduce String class in my own Java library, having different meaning than the original one (coming from JDK) ... I know that we will probably not be able to avoid all such cases, but maybe it's worth trying ;)
It's interesting that tools like PMD, can work with the original SuppressWarnings annotation, even if it has this unfortunate retention type, but PMD works probably in a little different way than FindBugs.
You are right that even RUNTIME retention doesn't require the jar itself, as long as the classes coming from it are not referenced directly, ex. if you have class A annotated with annotation B coming from some jar, and you don't include this jar in runtime classpath, using A.class.getAnnotation(B.class) will cause an error as expected (because class B is not available on classpath), while A.class.getAnnotations() will silently ignore B in this case
We do learn our whole life :) - and thanks to your comment I'm a little more experienced developer now, thank you
Regards
Apr 02, 2012 · James Sugrue
Fabrizio,
I'm glad that someone has left such a valuable comment on my modest post :). You are right that, marking SuppressWarnings annotation with SOURCE retention is something unbelievable :(, and harming potential tools like FindBugs. Anyway, don't you think that using by FindBugs annotation having exactly the same short name as the one already existing in JDK is something misleading? Imagine, that one day I introduce String class in my own Java library, having different meaning than the original one (coming from JDK) ... I know that we will probably not be able to avoid all such cases, but maybe it's worth trying ;)
It's interesting that tools like PMD, can work with the original SuppressWarnings annotation, even if it has this unfortunate retention type, but PMD works probably in a little different way than FindBugs.
You are right that even RUNTIME retention doesn't require the jar itself, as long as the classes coming from it are not referenced directly, ex. if you have class A annotated with annotation B coming from some jar, and you don't include this jar in runtime classpath, using A.class.getAnnotation(B.class) will cause an error as expected (because class B is not available on classpath), while A.class.getAnnotations() will silently ignore B in this case
We do learn our whole life :) - and thanks to your comment I'm a little more experienced developer now, thank you
Regards
Apr 02, 2012 · James Sugrue
Fabrizio,
I'm glad that someone has left such a valuable comment on my modest post :). You are right that, marking SuppressWarnings annotation with SOURCE retention is something unbelievable :(, and harming potential tools like FindBugs. Anyway, don't you think that using by FindBugs annotation having exactly the same short name as the one already existing in JDK is something misleading? Imagine, that one day I introduce String class in my own Java library, having different meaning than the original one (coming from JDK) ... I know that we will probably not be able to avoid all such cases, but maybe it's worth trying ;)
It's interesting that tools like PMD, can work with the original SuppressWarnings annotation, even if it has this unfortunate retention type, but PMD works probably in a little different way than FindBugs.
You are right that even RUNTIME retention doesn't require the jar itself, as long as the classes coming from it are not referenced directly, ex. if you have class A annotated with annotation B coming from some jar, and you don't include this jar in runtime classpath, using A.class.getAnnotation(B.class) will cause an error as expected (because class B is not available on classpath), while A.class.getAnnotations() will silently ignore B in this case
We do learn our whole life :) - and thanks to your comment I'm a little more experienced developer now, thank you
Regards
Apr 02, 2012 · ldz
Fabrizio,
I'm glad that someone has left such a valuable comment on my modest post :). You are right that, marking SuppressWarnings annotation with SOURCE retention is something unbelievable :(, and harming potential tools like FindBugs. Anyway, don't you think that using by FindBugs annotation having exactly the same short name as the one already existing in JDK is something misleading? Imagine, that one day I introduce String class in my own Java library, having different meaning than the original one (coming from JDK) ... I know that we will probably not be able to avoid all such cases, but maybe it's worth trying ;)
It's interesting that tools like PMD, can work with the original SuppressWarnings annotation, even if it has this unfortunate retention type, but PMD works probably in a little different way than FindBugs.
You are right that even RUNTIME retention doesn't require the jar itself, as long as the classes coming from it are not referenced directly, ex. if you have class A annotated with annotation B coming from some jar, and you don't include this jar in runtime classpath, using A.class.getAnnotation(B.class) will cause an error as expected (because class B is not available on classpath), while A.class.getAnnotations() will silently ignore B in this case
We do learn our whole life :) - and thanks to your comment I'm a little more experienced developer now, thank you
Regards
Mar 29, 2011 · Sahil Nim
Mar 29, 2011 · Sahil Nim
Mar 25, 2011 · Sahil Nim