Summary: public The contravariant subtyping rule for the PerformanceCritial annotation was meant to document the code but can be very too verbose on exisiting project. It is also not necessary as we can get this annotation from the supertypes. I am disabling it for now, but keep the code in case we want to revive it at some point in the future. Reviewed By: sblackshear Differential Revision: D2750212 fb-gh-sync-id: 2424281master
parent
df97489aa1
commit
0def5c4111
@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2013 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
package codetoanalyze.java.checkers;
|
||||
|
||||
public class PerformanceCriticalSubtypingExample implements ExpensiveInterfaceExample.I {
|
||||
|
||||
public void m1() {}
|
||||
|
||||
public void m2() {}
|
||||
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
package endtoend.java.checkers;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static utils.matchers.ResultContainsExactly.containsExactly;
|
||||
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import utils.InferException;
|
||||
import utils.InferResults;
|
||||
|
||||
public class PerformanceCriticalSubtypingTest {
|
||||
|
||||
public static final String SOURCE_FILE =
|
||||
"infer/tests/codetoanalyze/java/checkers/PerformanceCriticalSubtypingExample.java";
|
||||
|
||||
public static final String UNANNOTATED_OVERRIDES_PERFOMANCE_CRITICAL =
|
||||
"CHECKERS_UNANNOTATED_OVERRIDES_PERFOMANCE_CRITICAL";
|
||||
|
||||
private static InferResults inferResults;
|
||||
|
||||
@BeforeClass
|
||||
public static void loadResults() throws InterruptedException, IOException {
|
||||
inferResults =
|
||||
InferResults.loadCheckersResults(PerformanceCriticalSubtypingTest.class, SOURCE_FILE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void matchErrors()
|
||||
throws IOException, InterruptedException, InferException {
|
||||
String[] methods = {
|
||||
"m1",
|
||||
};
|
||||
assertThat(
|
||||
"Results should contain " + UNANNOTATED_OVERRIDES_PERFOMANCE_CRITICAL,
|
||||
inferResults,
|
||||
containsExactly(
|
||||
UNANNOTATED_OVERRIDES_PERFOMANCE_CRITICAL,
|
||||
SOURCE_FILE,
|
||||
methods));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue