mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
be optimistic, even complex CFG may result in fast DFA
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
public abstract class DDD {
|
||||
abstract boolean condition();
|
||||
abstract Object foo();
|
||||
abstract Object bar();
|
||||
|
||||
void test(Object o, DDD another) {
|
||||
try {
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
System.out.println(condition() && equals(o) ? another.foo() : another.bar());
|
||||
}
|
||||
catch (Exception e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+18
-1
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2000-2012 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.codeInspection;
|
||||
|
||||
import com.intellij.JavaTestUtil;
|
||||
@@ -23,7 +38,7 @@ public class DataFlowInspectionFixtureTest extends JavaCodeInsightFixtureTestCas
|
||||
final DataFlowInspection inspection = new DataFlowInspection();
|
||||
inspection.SUGGEST_NULLABLE_ANNOTATIONS = true;
|
||||
myFixture.enableInspections(inspection);
|
||||
myFixture.testHighlighting(true, false, false, getTestName(false) + ".java");
|
||||
myFixture.testHighlighting(true, false, true, getTestName(false) + ".java");
|
||||
}
|
||||
|
||||
public void testTryInAnonymous() throws Throwable { doTest(); }
|
||||
@@ -35,4 +50,6 @@ public class DataFlowInspectionFixtureTest extends JavaCodeInsightFixtureTestCas
|
||||
public void testFieldInAnonymous() throws Throwable { doTest(); }
|
||||
public void testNullableField() throws Throwable { doTest(); }
|
||||
public void testCanBeNullDoesntImplyIsNull() throws Throwable { doTest(); }
|
||||
|
||||
public void testBigMethodNotComplex() throws Throwable { doTest(); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user