Author Archives: anet

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

Smarter and Faster Introduce Parameter in Java

As a logical next step after inplace introduce variable refactoring we did in IntelliJ IDEA 10, version 10.5 will offer inplace introduce parameter. Here is a brief overview of what we’re working on. Once called, it will gently ask you to … Continue reading

Posted in New Features | Tagged , , | 19 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

Smarter and Faster Introduce Variable in Java

Introduce variable is one of those refactorings used many times a day. So, how can we make it work faster? Get rid of modal dialogs! So, in order to introduce a variable from an expression press Ctrl+Alt+V. Remember modal dialog? … Continue reading

Posted in New Features | Tagged , | 22 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

Create a Class Really Quickly

To quickly create a new class I press Alt+Home and then Alt+Ins. And you?

Posted in Tips & Tricks | Tagged , | 7 Comments

No More Missing TestNG Tests

I often forget to add newly created tests to the testng.xml, which is used in our TeamCity build, and by the time I realize that they don’t run something is surely went wrong. What a bummer! Not any more, fortunately … Continue reading

Posted in New Features | Tagged , , | 2 Comments

Quick Code Cleanup

With IntelliJ IDEA you can quickly clean up your legacy code. If a problem occurs multiple times in a file, you do not need to manually apply a quick-fix every time — use the Fix all intention to repair them … Continue reading

Posted in Tips & Tricks | Tagged | 2 Comments