Being a software engineer often means constantly learning something new: a new framework, a new language or simply a new best practice. Learning makes our life more interesting. We at JetBrains try to not only provide the most capable and ergonomic IDE (which of course is our top priority) but also help you learn and grow as professionals. That’s why we blog about the latest news around the JVM community and do webinars on software-related topics that seem interesting to us.
Today, we’d like to invite you September 13 to a live webinar, this time about Akka and Java 8.
One of the really good abstractions Akka brings to the table is Actors, which allows you to write concurrent code but without much of the pain doing so compared to writing your code using threads and locks.
In this webinar, we will take a look at the basics of writing actors with Akka in Java 8, what actors and the core concepts around them are, how you write one, what to do and what not to do when using Akka.
Johan Andrén is a member of the Akka team at Lightbend. He has been working professionally with tech on the JVM since 2005, focused on Scala and Lightbend technologies the last five years. He is located in Stockholm, Sweden. Follow Johan on Twitter.
Every day we try to find new ways to improve developer experience with IntelliJ IDEA. It may be a bugfix, a performance improvement, or a new feature (usually in this order). Today we’d like to introduce a new plugin called JVM Debugger Memory View.
The plugin extends the built-in debugger with capabilities to explore objects in the JVM heap during a debug session. The Memory View shows you the total number of objects in the heap grouped by their class name.
When you’re stepping over the code, the Diff column shows how the number of objects changes between debugger stops. This way you can easily see how the code you’re stepping over affects the heap.
A double click on a class name, opens a dialog with instances of this class.
The dialog lets you filter instances by an evaluated expression. All debugger operations such as Inspect, Mark Object, Evaluate Expression, Add to Watches, etc can be applied to instances in this dialog.
To install the plugin, open Settings→ Plugins, click Install JetBrains plugin and search for “JVM Debugger Memory View”.
Found a bug or miss a feature? Your feedback is very welcome in the issue tracker.
Great news! IntelliJ IDEA 2016.2.2, a new bugfix update, is available. Check out the release notes for the list of fixes. Please download the new version from our website or update by installing the patch from the IDE. To install the patch, click Check for Updates, and then Download and Install.
Last week a part of the IntelliJ team including Yann Cébron and myself had the pleasure of visiting the beautiful (and somewhat crazy) Las Vegas. No, we didn’t play at the casinos. Instead, we saved ourselves from the heat (and our money from slot machines) by enjoying the SpringOne Platform conference and talking to our users. Also, with the help of Stéphane Nicoll we held a wonderful webinar around IntelliJ IDEA 2016.2 and Spring. If you missed it, make sure to watch the recording:
Here’s a list of links to jump directly to the topics you’re most interested in:
Yann Cébron (JetBrains) has been working on Spring support in IntelliJ IDEA for four years. Before joining JetBrains, he spent a decade on (web) applications for a large variety of customers and trades. When he’s not coding, you’ll probably find him in the woods walking his dog, or playing the piano.
Stéphane Nicoll (Pivotal) has a thing for code quality and robustness. He’s been spreading the word for more than ten years while developing large-scale Java enterprise applications in the geospatial, financial, and logistics sectors. An Apache Maven PMC member since 2006, he joined the core Spring Framework development team in early 2014 and has lately focused on Spring Boot.
This month’s Java Annotated Monthly is so much more than Java. Not only do we take a look at what’s happening in the community and what’s the latest on upcoming versions, we have a chance to touch on news for Scala, Clojure, JRuby, Groovy and, of course, Kotlin. And in a slight departure from our usual technical content, we take a look at some news relevant to strengthening team skills with a focus on code reviews.
Last week, we held a live webinar in which Trisha Gee gave an overview of the new features added in IntelliJ IDEA 2016.2. Thanks to those who joined us. If you couldn’t make it, don’t worry, you can watch it right now:
In case you want to jump directly to a topic you’re most interested in, here’re a few links:
Trisha has developed Java applications for a range of industries, including finance, manufacturing and non-profit, for companies of all sizes. She has expertise in Java high performance systems, is passionate about enabling developer productivity, and dabbles with Open Source development. You can follow her on Twitter – @trisha_gee
One of the new features in IntelliJ IDEA 2016.2 is support for the new JUnit 5 testing framework. Almost all Java developers will have used JUnit at some point, so it’s pretty exciting to find the newest version has evolved with the times and provides a number of new features, some of which may be familiar to those who have used other frameworks.
IntelliJ IDEA supports the ability to actually run tests written for JUnit 5 – there’s no need to use the additional libraries (like the Gradle or Maven plugins for example), all you need is to include the JUnit 5 dependency. Here we’re using Gradle to include the dependency to the M2 version:
Once you’ve done this, you can start writing tests that use the new annotations:
Running these tests will give you familiar-looking results in the IntelliJ IDEA run window:
You’ll notice JUnit Jupiter is the test engine for the new JUnit tests, and that you can run both new and old tests.
At first glance, the new JUnit 5 tests are no different to JUnit 4 ones, other than the annotations being imported from a different package, and showing two types of runner on the results.
But JUnit 5 comes with some new features, such as the ability to add a readable name or description for the test, so you no longer have to rely on a method name, using @DisplayName:
You can group assertions so that all assertions are run, regardless of whether one (or more) fails, giving you better visibility over the true state of a failure:
And you can use the @Nested annotation, so you can write BDD-style tests or group the tests in a class by some dimension:
JUnit 5 also has a new way of handling expected Exceptions, by letting you assert specific Exceptions are thrown
And you can even get the thrown Exception to check for further details:
These are just some of the features available to use in JUnit 5, and IntelliJ’s support for the new framework is also evolving.
If you’re a heavy user of Spring and IntelliJ IDEA, you’ll find the IntelliJ IDEA 2016.2 update very interesting. Besides many important bugfixes, the update adds support for Spring 4.3 and Spring Security 4.0 features and cache abstraction, improves support for Spring MVC, and further tunes performance. Before reading about this in more detail, make sure you’ve registered for our webinar dedicated to the new release and Spring framework.
OK, now back to the update. First of all, the IDE now supports generics types as qualifiers and provides navigation for them:
Also, the IDE now supports custom @EventListener annotations defined with @AliasFor and enables coding assistance for editing SpEL:
The new inspection helps replace field injection with constructor injection:
The IDE now supports Spring Cacheabstraction: CacheResolver, CacheManager, KeyGenerator, @Cachable, @PutCache, @EvictCache, etc. The support includes code completion, navigation, inspections and syntax highlighting.
The icon on the gutter (the narrow panel on the right-hand side of the editor) lets you navigate to other methods annotated with cache operations related to the same name:
A dedicated inspection checks if a cache name is provided for all cache-related operations:
If you use a @Cachable annotation on an interface or, e.g. put @Cachable and @CachePut on the same method, you’ll see a warning.
And of course, the IDE provides coding assistance for editing SpEl:
In FreeMarker and Velocity templates, you’ll get code completion and navigation for variables defined in Spring MVC controllers:
Also, the update has supported the changes introduced with Spring Security 4.0 and added code completion and navigation for SpEl in annotations and inside XML:
And last but not least, we’ve added highlighting and navigation for Spring-related messages in Console.
Found this interesting? Download the update and give it a try right away.