Skip to content

Commit 730eae9

Browse files
committed
Java: Autoformat
1 parent 3481652 commit 730eae9

21 files changed

+62
-37
lines changed

java/ql/lib/semmle/code/java/deadcode/DeadField.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ class ClassReflectivelyReadField extends ReflectivelyReadField {
138138
* Consider all `JacksonSerializableField`s as reflectively read.
139139
*/
140140
class JacksonSerializableReflectivelyReadField extends ReflectivelyReadField,
141-
JacksonSerializableField { }
141+
JacksonSerializableField
142+
{ }
142143

143144
/**
144145
* A field that is used when applying Jackson mixins.

java/ql/lib/semmle/code/java/deadcode/EntryPoints.qll

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ abstract class ReflectivelyConstructedClass extends EntryPoint, Class {
9494
/**
9595
* Classes that are deserialized by Jackson are reflectively constructed.
9696
*/
97-
library class JacksonReflectivelyConstructedClass extends ReflectivelyConstructedClass instanceof JacksonDeserializableType {
97+
library class JacksonReflectivelyConstructedClass extends ReflectivelyConstructedClass instanceof JacksonDeserializableType
98+
{
9899
override Callable getALiveCallable() {
99100
// Constructors may be called by Jackson, if they are a no-arg, they have a suitable annotation,
100101
// or inherit a suitable annotation through a mixin.
@@ -308,8 +309,8 @@ class FacesAccessibleMethodEntryPoint extends CallableEntryPoint {
308309
* A Java Server Faces custom component, that is reflectively constructed by the framework when
309310
* used in a view (JSP or facelet).
310311
*/
311-
class FacesComponentReflectivelyConstructedClass extends ReflectivelyConstructedClass instanceof FacesComponent {
312-
}
312+
class FacesComponentReflectivelyConstructedClass extends ReflectivelyConstructedClass instanceof FacesComponent
313+
{ }
313314

314315
/**
315316
* Entry point for EJB home interfaces.
@@ -459,5 +460,5 @@ class ArbitraryXmlEntryPoint extends ReflectivelyConstructedClass {
459460
deprecated class ArbitraryXMLEntryPoint = ArbitraryXmlEntryPoint;
460461

461462
/** A Selenium PageObject, created by a call to PageFactory.initElements(..). */
462-
class SeleniumPageObjectEntryPoint extends ReflectivelyConstructedClass instanceof SeleniumPageObject {
463-
}
463+
class SeleniumPageObjectEntryPoint extends ReflectivelyConstructedClass instanceof SeleniumPageObject
464+
{ }

java/ql/lib/semmle/code/java/deadcode/StrutsEntryPoints.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class Struts1ActionEntryPoint extends EntryPoint, Class {
3333
/**
3434
* A struts 2 action class that is reflectively constructed.
3535
*/
36-
class Struts2ReflectivelyConstructedAction extends ReflectivelyConstructedClass instanceof Struts2ActionClass {
37-
}
36+
class Struts2ReflectivelyConstructedAction extends ReflectivelyConstructedClass instanceof Struts2ActionClass
37+
{ }
3838

3939
/**
4040
* A method called on a struts 2 action class when the action is activated.

java/ql/lib/semmle/code/java/deadcode/TestEntryPoints.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ class JUnitCategory extends WhitelistedLiveClass {
7878
/**
7979
* A listener that will be reflectively constructed by TestNG.
8080
*/
81-
class TestNGReflectivelyConstructedListener extends ReflectivelyConstructedClass instanceof TestNGListenerImpl {
81+
class TestNGReflectivelyConstructedListener extends ReflectivelyConstructedClass instanceof TestNGListenerImpl
82+
{
8283
// Consider any class that implements a TestNG listener interface to be live. Listeners can be
8384
// specified on the command line, in `testng.xml` files and in Ant build files, so it is safest
8485
// to assume that all such listeners are live.

java/ql/lib/semmle/code/java/frameworks/android/Intent.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ class StartServiceMethod extends Method {
123123

124124
/** Specifies that if an `Intent` is tainted, then so are its synthetic fields. */
125125
private class IntentFieldsInheritTaint extends DataFlow::SyntheticFieldContent,
126-
TaintInheritingContent {
126+
TaintInheritingContent
127+
{
127128
IntentFieldsInheritTaint() { this.getField().matches("android.content.Intent.%") }
128129
}
129130

java/ql/lib/semmle/code/java/frameworks/android/Slice.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ private class SliceProviderLifecycleStep extends AdditionalValueStep {
3535
}
3636

3737
private class SliceActionsInheritTaint extends DataFlow::SyntheticFieldContent,
38-
TaintInheritingContent {
38+
TaintInheritingContent
39+
{
3940
SliceActionsInheritTaint() { this.getField() = "androidx.slice.Slice.action" }
4041
}

java/ql/lib/semmle/code/java/frameworks/google/GoogleHttpClientApi.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ private class ParseAsMethod extends Method {
1111
}
1212
}
1313

14-
private class TypeLiteralToParseAsFlowConfiguration extends DataFlowForSerializability::Configuration {
14+
private class TypeLiteralToParseAsFlowConfiguration extends DataFlowForSerializability::Configuration
15+
{
1516
TypeLiteralToParseAsFlowConfiguration() {
1617
this = "GoogleHttpClientApi::TypeLiteralToParseAsFlowConfiguration"
1718
}

java/ql/lib/semmle/code/java/frameworks/jackson/JacksonSerializability.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ private class FieldReferencedJacksonSerializableType extends JacksonSerializable
9191
/** A type whose values may be deserialized by the Jackson JSON framework. */
9292
abstract class JacksonDeserializableType extends Type { }
9393

94-
private class TypeLiteralToJacksonDatabindFlowConfiguration extends DataFlowForSerializability::Configuration {
94+
private class TypeLiteralToJacksonDatabindFlowConfiguration extends DataFlowForSerializability::Configuration
95+
{
9596
TypeLiteralToJacksonDatabindFlowConfiguration() {
9697
this = "TypeLiteralToJacksonDatabindFlowConfiguration"
9798
}

java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJBRestrictions.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ class ForbiddenSecurityConfigurationCallable extends ForbiddenCallable {
7575
}
7676

7777
/** A method or constructor involving serialization that may not be called by an EJB. */
78-
class ForbiddenSerializationCallable extends ForbiddenCallable instanceof ForbiddenSerializationMethod {
79-
}
78+
class ForbiddenSerializationCallable extends ForbiddenCallable instanceof ForbiddenSerializationMethod
79+
{ }
8080

8181
/** A method or constructor involving network factory operations that may not be called by an EJB. */
8282
class ForbiddenSetFactoryCallable extends ForbiddenCallable instanceof ForbiddenSetFactoryMethod { }

java/ql/lib/semmle/code/java/os/OSCheck.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ private class IsWindowsFromApacheCommons extends IsWindowsGuard instanceof Field
115115
IsWindowsFromApacheCommons() { isOsFromApacheCommons(this, "IS\\_OS\\_WINDOWS") }
116116
}
117117

118-
private class IsSpecificWindowsVariantFromApacheCommons extends IsSpecificWindowsVariant instanceof FieldAccess {
118+
private class IsSpecificWindowsVariantFromApacheCommons extends IsSpecificWindowsVariant instanceof FieldAccess
119+
{
119120
IsSpecificWindowsVariantFromApacheCommons() {
120121
isOsFromApacheCommons(this, "IS\\_OS\\_WINDOWS\\_%")
121122
}
@@ -125,7 +126,8 @@ private class IsUnixFromApacheCommons extends IsUnixGuard instanceof FieldAccess
125126
IsUnixFromApacheCommons() { isOsFromApacheCommons(this, "IS\\_OS\\_UNIX") }
126127
}
127128

128-
private class IsSpecificUnixVariantFromApacheCommons extends IsSpecificUnixVariant instanceof FieldAccess {
129+
private class IsSpecificUnixVariantFromApacheCommons extends IsSpecificUnixVariant instanceof FieldAccess
130+
{
129131
IsSpecificUnixVariantFromApacheCommons() {
130132
isOsFromApacheCommons(this,
131133
[

0 commit comments

Comments
 (0)