Skip to content

Commit 9673594

Browse files
committed
Enforce the JavadocMethod checkstyle rule
1 parent 51e16c8 commit 9673594

13 files changed

Lines changed: 23 additions & 20 deletions

configs/checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
<!-- Checks for Javadoc comments. -->
8181
<!-- See https://checkstyle.org/config_javadoc.html -->
8282
<module name="InvalidJavadocPosition" />
83-
<!-- <module name="JavadocMethod"/> -->
83+
<module name="JavadocMethod"/>
8484
<module name="JavadocType"/>
8585
<module name="JavadocStyle"/>
8686

src/sqlancer/DatabaseProvider.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ public interface DatabaseProvider<G extends GlobalState<O, ?>, O extends DBMSSpe
88

99
/**
1010
* Gets the the {@link GlobalState} class.
11+
*
12+
* @return the class extending {@link GlobalState}
1113
*/
1214
Class<G> getGlobalStateClass();
1315

1416
/**
1517
* Gets the JCommander option class.
18+
*
19+
* @return the class representing the DBMS-specific options.
1620
*/
1721
Class<O> getOptionClass();
1822

@@ -29,6 +33,8 @@ public interface DatabaseProvider<G extends GlobalState<O, ?>, O extends DBMSSpe
2933

3034
/**
3135
* The DBMS name is used to name the log directory and command to test the respective DBMS.
36+
*
37+
* @return the DBMS' name
3238
*/
3339
String getDBMSName();
3440

src/sqlancer/StateToReproduce.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public long getSeedValue() {
9595
* Returns a local state in which a test oracle can save useful information about a single run. If the local state
9696
* is closed without indicating access to it, the local statements will be added to the global state.
9797
*
98-
* @return
98+
* @return the local state for logging
9999
*/
100100
public OracleRunReproductionState getLocalState() {
101101
return localState;

src/sqlancer/clickhouse/ast/ClickHouseCast.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static ClickHouseConstant castToNumericFromNumOperand(ClickHouseConstant
109109
return convertInternal(value, false, false, false);
110110
}
111111

112-
/**
112+
/*
113113
* Applies numeric affinity to a value.
114114
*/
115115
public static ClickHouseConstant castToNumeric(ClickHouseConstant value) {

src/sqlancer/common/query/Query.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,10 @@ public abstract class Query {
1111
/**
1212
* Whether the query could affect the schema (i.e., by add/deleting columns or tables).
1313
*
14-
* @return
14+
* @return true if the query can affect the database's schema, false otherwise
1515
*/
1616
public abstract boolean couldAffectSchema();
1717

18-
/**
19-
*
20-
* @param con
21-
*
22-
* @return true if the query was successful, false otherwise
23-
*
24-
* @throws SQLException
25-
*/
2618
public abstract boolean execute(GlobalState<?, ?> globalState, String... fills) throws SQLException;
2719

2820
public abstract ExpectedErrors getExpectedErrors();

src/sqlancer/mysql/ast/MySQLComputableFunction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ private static MySQLConstant aggregate(MySQLConstant[] evaluatedArgs, BinaryOper
177177
/**
178178
* Gets the number of arguments if the function is non-variadic. If the function is variadic, the minimum number
179179
* of arguments is returned.
180+
*
181+
* @return the number of arguments
180182
*/
181183
public int getNrArgs() {
182184
return nrArgs;

src/sqlancer/mysql/gen/MySQLSetGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ private enum Action {
128128
this.scopes = scopes.clone();
129129
}
130130

131-
/**
131+
/*
132132
* @see https://dev.mysql.com/doc/refman/8.0/en/switchable-optimizations.html
133133
*/
134134
private static String getOptimizerSwitchConfiguration(Randomly r) {

src/sqlancer/postgres/ast/PostgresFunction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ public PostgresDataType[] getType(int nr, PostgresDataType type) {
248248
/**
249249
* Gets the number of arguments if the function is non-variadic. If the function is variadic, the minimum number
250250
* of arguments is returned.
251+
*
252+
* @return the number of arguments
251253
*/
252254
public int getNrArgs() {
253255
return nrArgs;

src/sqlancer/sqlite3/ast/SQLite3Cast.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public static SQLite3Constant castToNumericFromNumOperand(SQLite3Constant value)
114114
return convertInternal(value, false, false, false);
115115
}
116116

117-
/**
117+
/*
118118
* Applies numeric affinity to a value.
119119
*/
120120
public static SQLite3Constant castToNumeric(SQLite3Constant value) {

src/sqlancer/sqlite3/ast/SQLite3Function.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ public SQLite3Constant apply(SQLite3Constant... args) {
275275
/**
276276
* Gets the number of arguments if the function is non-variadic. If the function is variadic, the minimum number
277277
* of arguments is returned.
278+
*
279+
* @return the number of arguments
278280
*/
279281
public int getNrArgs() {
280282
return nrArgs;

0 commit comments

Comments
 (0)