diff --git a/build.gradle b/build.gradle index 92e51524ac6..0296e306aff 100644 --- a/build.gradle +++ b/build.gradle @@ -300,7 +300,7 @@ allprojects { googleJavaFormat().aosp() importOrder('com', 'jdk', 'lib', 'lombok', 'org', 'java', 'javax') - formatAnnotations().addTypeAnnotation("PolyInitialized") + formatAnnotations().addTypeAnnotation("PolyInitialized").addTypeAnnotation("PolyVP").addTypeAnnotation("ReceiverDependentQual") } groovyGradle { diff --git a/framework/tests/viewpointtest/PolyConstructor.java b/framework/tests/viewpointtest/PolyConstructor.java index 766a874b014..66ab42c48d9 100644 --- a/framework/tests/viewpointtest/PolyConstructor.java +++ b/framework/tests/viewpointtest/PolyConstructor.java @@ -4,8 +4,7 @@ public class PolyConstructor { static class MyClass { @SuppressWarnings({"inconsistent.constructor.type", "super.invocation.invalid"}) - @PolyVP - MyClass(@PolyVP Object o) { + @PolyVP MyClass(@PolyVP Object o) { throw new RuntimeException(" * You are filled with DETERMINATION."); // stub } } diff --git a/framework/tests/viewpointtest/PolyWithVPA.java b/framework/tests/viewpointtest/PolyWithVPA.java index 95c88cc6ea2..7b61dd50005 100644 --- a/framework/tests/viewpointtest/PolyWithVPA.java +++ b/framework/tests/viewpointtest/PolyWithVPA.java @@ -2,8 +2,7 @@ public class PolyWithVPA { static class PolyClass { - @ReceiverDependentQual - Object foo(@PolyVP Object o) { + @ReceiverDependentQual Object foo(@PolyVP Object o) { return null; } } diff --git a/framework/tests/viewpointtest/TestGetAnnotatedLhs.java b/framework/tests/viewpointtest/TestGetAnnotatedLhs.java index 71641a91a71..12e3d79d862 100644 --- a/framework/tests/viewpointtest/TestGetAnnotatedLhs.java +++ b/framework/tests/viewpointtest/TestGetAnnotatedLhs.java @@ -3,8 +3,7 @@ import viewpointtest.quals.ReceiverDependentQual; import viewpointtest.quals.Top; -@ReceiverDependentQual -class TestGetAnnotatedLhs { +@ReceiverDependentQual class TestGetAnnotatedLhs { @ReceiverDependentQual Object f; @SuppressWarnings({ @@ -12,8 +11,7 @@ class TestGetAnnotatedLhs { "super.invocation.invalid", "cast.unsafe.constructor.invocation" }) - @ReceiverDependentQual - TestGetAnnotatedLhs() { + @ReceiverDependentQual TestGetAnnotatedLhs() { this.f = new @ReceiverDependentQual Object(); } diff --git a/framework/tests/viewpointtest/VPAExamples.java b/framework/tests/viewpointtest/VPAExamples.java index 65312090d7d..fbaa2b62b08 100644 --- a/framework/tests/viewpointtest/VPAExamples.java +++ b/framework/tests/viewpointtest/VPAExamples.java @@ -3,8 +3,7 @@ public class VPAExamples { static class RDContainer { - @ReceiverDependentQual - Object get() { + @ReceiverDependentQual Object get() { return null; } diff --git a/framework/tests/viewpointtest/VarargsConstructor.java b/framework/tests/viewpointtest/VarargsConstructor.java index acf2380d741..962fdc1bfc9 100644 --- a/framework/tests/viewpointtest/VarargsConstructor.java +++ b/framework/tests/viewpointtest/VarargsConstructor.java @@ -7,8 +7,7 @@ public class VarargsConstructor { VarargsConstructor(String str, Object... args) {} @SuppressWarnings({"inconsistent.constructor.type", "super.invocation.invalid"}) - @ReceiverDependentQual - VarargsConstructor(@ReceiverDependentQual Object... args) {} + @ReceiverDependentQual VarargsConstructor(@ReceiverDependentQual Object... args) {} void foo() { VarargsConstructor a = new VarargsConstructor("testStr", new Object()); @@ -26,8 +25,7 @@ void invokeConstructor(@A Object aObj, @B Object bObj, @Top Object topObj) { class Inner { @SuppressWarnings({"inconsistent.constructor.type", "super.invocation.invalid"}) - @ReceiverDependentQual - Inner(@ReceiverDependentQual Object... args) {} + @ReceiverDependentQual Inner(@ReceiverDependentQual Object... args) {} void foo() { Inner a = new Inner();