A full list of @SuppressWarnings options (per environment) are available here. In Eclipse… The list of tokens that can be used inside an SuppressWarning annotation is: all to suppress all warnings boxing to suppress warnings relative to boxing/unboxing operations cast to suppress warnings relative to cast operations dep-ann to suppress warnings relative to deprecated annotation… Continue reading @SuppressWarnings
Tag: Java
Remove Non-ASCII Chars
Quick snippet to remove non-ascii characters from a java string: String clean = dirty.replaceAll(“\\P{ASCII}+”, “”);
Mail from Java
Sometimes you gotta send mail from outside an app server, in which case, this will get you started: Sending Mail with the JavaMail API You will need the JavaMail library (mail.jar) as well as the Java Activation Framework (activation.jar) to get it running…
Java Profiler
The Java Profiler to use is apparently YourKit. It’s very reasonable at $500 per license. It’s also worth checking open source options, but you can also get a free 15 day eval of YourKit.
EJB Annotation Cheat Sheet
Philipp Meier put together an excellent EJB Annotation Cheat Sheet for version 3.0.