What does the arrow operator, ‘->’, do in Java?

While hunting through some code I came across the arrow operator, what exactly does it do? I thought Java did not have an arrow operator. return (Collection<Car>) CollectionUtils.select(listOfCars, (arg0) -> { return Car.SEDAN == ((Car)arg0).getStyle(); }); Details: Java 6, Apache Commons Collection, IntelliJ 12 Update/Answer: It turns out that IntelliJ 12 supports Java 8, which … Read more

Getting “NoSuchMethodError: org.hamcrest.Matcher.describeMismatch” when running test in IntelliJ 10.5

I’m using JUnit-dep 4.10 and Hamcrest 1.3.RC2. I’ve created a custom matcher that looks like the following: public static class MyMatcher extends TypeSafeMatcher<String> { @Override protected boolean matchesSafely(String s) { /* implementation */ } @Override public void describeTo(Description description) { /* implementation */ } @Override protected void describeMismatchSafely(String item, Description mismatchDescription) { /* implementation */ … Read more

Lombok annotations do not compile under Intellij idea [duplicate]

This question already has answers here: Can’t compile project when I’m using Lombok under IntelliJ IDEA (40 answers) Closed 2 years ago. I’ve installed the plugin for intellij idea(lombok-plugin-0.8.6-13). Added lombok.jar into classpath I can find getters and setters in the window of structure. And Intellij shows no error. Setting – Lombok plugin – Verified … Read more

What is the best IDE to develop Android apps in? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more

Maven plugins can not be found in IntelliJ

After updating IntelliJ from version 12 to 13, the following Maven-related plugins cannot be resolved: org.apache.maven.plugins:maven-clean-plugin:2.4.1 org.apache.maven.plugins:maven-deploy-plugin org.apache.maven.plugins:maven-install-plugin org.apache.maven.plugins:maven-site-plugin When using IntelliJ 12, these were not in the plugins list. Somehow they’ve been added after the update and now IntelliJ complains they cannot be found. Where can I remove these plugins from the list OR … Read more

Can’t compile project when I’m using Lombok under IntelliJ IDEA

I’m trying to use Lombok in my project that I’m developing using IntelliJ IDEA 11. I’ve installed 3rd-party plugin for IDEA and it seems working fine because IDEA sees all autogenerated methods/fields. So I have a class that uses Slf4j. I annotated it like this import lombok.extern.slf4j.Slf4j; @Slf4j public class TestClass { public TestClass() { … Read more