Tag Archives: Code Analysis

Java 7. @SafeVarargs

Java 7 provides a way to remove a compiler warning about generics vararg invocation. With Java 7 you can annotate your vararg method with SafeVararg annotation and your clients won’t get these nasty warnings any more. IntelliJ IDEA 10.5 will … Continue reading

Posted in New Features | Tagged , | Leave a comment

More flexible and configurable @Nullable/@NotNull annotations

For quite a while IntelliJ IDEA can detect probable NPE’s in your code. But you have to annotate it with JetBrains’ @Nullable/@NotNull. In order to leave your code free from JetBrains’ annotations you could use external annotations, but they were not so … Continue reading

Posted in New Features | Tagged | 11 Comments

Auto-infer @Nullable/@NotNull Annotations

For a long time already IntelliJ IDEA can detect probable NPE’s in your code. You need to annotate your methods/fields/variables with @Nullable/@NotNull annotations and IntelliJ IDEA will highlight possible contract violations. Good. But the annotations only begin to work when … Continue reading

Posted in New Features | Tagged , | 14 Comments

How to Run a Single Inspection in IDEA X?

To run a single inspection in previous versions of IntelliJ IDEA you had to create a dedicated inspection profile for that or use “Run inspection on…” from inspection’s quick fix list. In IntelliJ IDEA X you can find and run … Continue reading

Posted in Tips & Tricks | Tagged , | 3 Comments

No more misspellings in your VCS commit comments

How many times you wished you could edit your last VCS commit comment to correct a misspelling? Now you will notice such mistakes because IntelliJ IDEA 10 checks the spelling in the comment field. And it not just spellchecks the … Continue reading

Posted in New Features | Tagged , , | 6 Comments

Support for GWT ClientBundle and CssResource interfaces

If you use Client Bundle interface in a GWT application, you will enjoy an advanced navigation and coding assistance that IntelliJ IDEA 10 provides. ClientBundle methods will be marked with icons allowing you to quickly navigate to a corresponding resource: For … Continue reading

Posted in New Features | Tagged , , , | 3 Comments

XML improvements in IntelliJ IDEA X

There are few small, but very useful improvements in XML editing will be available in IntelliJ IDEA 10. All of them are very handy when edit XML files like schemes, JSPs, MXMLs, etc. First of these improvements is inspection detecting … Continue reading

Posted in New Features | Tagged , , | 10 Comments

Vaclav Pech Talking at JAX 2010

If you missed Vaclav Pech speech at JAX 2010, here’s your chance to hear it right now. In this presentation he’s discussing common coding pitfalls such as possible NPE, unreachable code, and explains how they can be easily avoided.

Posted in News & Events | Tagged , | 2 Comments

ThreadLocal in One Click

Most of applications initially are single threaded, and IntelliJ IDEA was no different; though luckily, now it isn’t — but we had to adapt our code to use multiple threads. In this post I’m going to tell you how. In … Continue reading

Posted in New Features | Tagged , | 4 Comments

Intelligent Copy&Paste

Do you find yourself copying and pasting parts of bodies between different methods and then facing broken code? Unfortunately, parameter names tend to differ — like in this (very simplified) example: Nothing is easier than fixing this problem with a … Continue reading

Posted in New Features | Tagged | Leave a comment