StreamApiMigrationInspection: suggest to use takeWhile() in Java-9

This commit is contained in:
Tagir Valeev
2017-02-01 19:46:04 +03:00
parent 8c1e3a6103
commit 9246190c9c
6 changed files with 83 additions and 2 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@ package com.intellij.codeInsight.daemon.quickFix;
import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection;
import com.intellij.pom.java.LanguageLevel;
import org.jetbrains.annotations.NotNull;
@@ -31,6 +32,11 @@ public class StreamApiMigrationInspectionTest extends LightQuickFixParameterized
};
}
@Override
protected LanguageLevel getLanguageLevel() {
return getTestName(false).contains("Java9") ? LanguageLevel.JDK_1_9 : LanguageLevel.JDK_1_8;
}
public void test() throws Exception { doAllTests(); }
@Override