Skip to content

Commit 704c63d

Browse files
committed
build: fix javadoc error
- fix typos - added missing javadoc comment - fix links
1 parent 6a806bd commit 704c63d

File tree

37 files changed

+312
-79
lines changed

37 files changed

+312
-79
lines changed

etc/javadoc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
DIR=$(cd "$(dirname "$0")"; pwd)
44

5-
mvn javadoc:javadoc -P source -Dmaven.plugin.validation=VERBOSE -Dmaven.javadoc.failOnError=true -Dmaven.javadoc.failOnWarnings=true
5+
mvn javadoc:javadoc -P source -Dmaven.plugin.validation=VERBOSE -Dmaven.javadoc.failOnError=true -Dmaven.javadoc.failOnWarnings=false

jooby/src/main/java/io/jooby/problem/HttpProblem.java

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,39 @@ public class HttpProblem extends RuntimeException {
2727

2828
private static final URI DEFAULT_TYPE = URI.create("about:blank");
2929

30+
/** A problem occurrence timestamp in ISO-8601 representation. */
3031
private final String timestamp;
32+
33+
/**
34+
* A URI reference that identifies the problem type. Consumers MUST use the "type" URI (after
35+
* resolution, if necessary) as the problem type's primary identifier. When this member is not
36+
* present, its value is assumed to be "about:blank". If the type URI is a locator (e.g., those
37+
* with a "http" or "https" scheme), de-referencing it SHOULD provide human-readable documentation
38+
* for the problem type (e.g., using HTML). However, consumers SHOULD NOT automatically
39+
* dereference the type URI, unless they do so when providing information to developers (e.g.,
40+
* when a debugging tool is in use)
41+
*/
3142
private final URI type;
43+
44+
/** Human-readable summary of this problem. */
3245
private final String title;
46+
47+
/** The HTTP status code generated by the origin server for this occurrence of the problem. */
3348
private final int status;
49+
50+
/** A human-readable explanation of this problem. */
3451
private final String detail;
52+
53+
/** An absolute URI that identifies this specific problem. */
3554
private final URI instance;
55+
56+
/** List of errors. */
3657
private final List<Error> errors;
58+
59+
/** Additional attributes of the problem. */
3760
private final Map<String, Object> parameters;
61+
62+
/** Optional headers. */
3863
private final Map<String, Object> headers;
3964

4065
protected HttpProblem(Builder builder) {
@@ -334,9 +359,9 @@ public static class Builder {
334359
Builder() {}
335360

336361
/**
337-
* URI type.
362+
* a URI that identifies this problem's type
338363
*
339-
* @param type URI type.
364+
* @param type a URI that identifies this problem's type
340365
* @return This builder.
341366
*/
342367
public Builder type(@Nullable final URI type) {
@@ -345,9 +370,9 @@ public Builder type(@Nullable final URI type) {
345370
}
346371

347372
/**
348-
* Error's title.
373+
* Human-readable summary of this problem.
349374
*
350-
* @param title Error's title.
375+
* @param title Human-readable summary of this problem.
351376
* @return This builder.
352377
*/
353378
public Builder title(final String title) {

modules/jooby-apt/src/main/java/io/jooby/apt/JoobyProcessor.java

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import io.jooby.internal.apt.*;
3131

32+
/** Process jooby/jakarta annotation and generate source code from MVC controllers. */
3233
@SupportedOptions({
3334
DEBUG,
3435
INCREMENTAL,
@@ -39,26 +40,61 @@
3940
})
4041
@SupportedSourceVersion(SourceVersion.RELEASE_17)
4142
public class JoobyProcessor extends AbstractProcessor {
43+
/** Available options. */
4244
public interface Options {
45+
/** Run code generator in debug mode. */
4346
String DEBUG = "jooby.debug";
47+
48+
/** Add custom prefix to generated class. Default: none/empty */
4449
String ROUTER_PREFIX = "jooby.routerPrefix";
50+
51+
/** Add custom suffix to generated class. Default: _ */
4552
String ROUTER_SUFFIX = "jooby.routerSuffix";
53+
54+
/** Gradle options to run in incremental mode. */
4655
String INCREMENTAL = "jooby.incremental";
56+
57+
/** Turn on/off generation of method metadata. */
4758
String MVC_METHOD = "jooby.mvcMethod";
59+
60+
/** Control which annotations are translated to route attributes. */
4861
String SKIP_ATTRIBUTE_ANNOTATIONS = "jooby.skipAttributeAnnotations";
4962

63+
/**
64+
* Read a boolean option.
65+
*
66+
* @param environment Annotation processing environment.
67+
* @param option Option's name.
68+
* @param defaultValue Default value.
69+
* @return Option's value.
70+
*/
5071
static boolean boolOpt(ProcessingEnvironment environment, String option, boolean defaultValue) {
5172
return Boolean.parseBoolean(
5273
environment.getOptions().getOrDefault(option, String.valueOf(defaultValue)));
5374
}
5475

76+
/**
77+
* Read a string list option.
78+
*
79+
* @param environment Annotation processing environment.
80+
* @param option Option's name.
81+
* @return Option's value.
82+
*/
5583
static List<String> stringListOpt(ProcessingEnvironment environment, String option) {
5684
String value = string(environment, option, null);
5785
return value == null || value.isEmpty()
5886
? List.of()
5987
: Stream.of(value.split(",")).filter(it -> !it.isBlank()).map(String::trim).toList();
6088
}
6189

90+
/**
91+
* Read a string option.
92+
*
93+
* @param environment Annotation processing environment.
94+
* @param option Option's name.
95+
* @param defaultValue Default value.
96+
* @return Option's value.
97+
*/
6298
static String string(ProcessingEnvironment environment, String option, String defaultValue) {
6399
String value = environment.getOptions().getOrDefault(option, defaultValue);
64100
return value == null || value.isEmpty() ? defaultValue : value;
@@ -68,10 +104,11 @@ static String string(ProcessingEnvironment environment, String option, String de
68104
protected MvcContext context;
69105
private BiConsumer<Diagnostic.Kind, String> output;
70106

71-
public JoobyProcessor(BiConsumer<Diagnostic.Kind, String> output) {
107+
JoobyProcessor(BiConsumer<Diagnostic.Kind, String> output) {
72108
this.output = output;
73109
}
74110

111+
/** Default constructor. */
75112
public JoobyProcessor() {}
76113

77114
@Override

modules/jooby-conscrypt/src/main/java/io/jooby/conscrypt/ConscryptSslProvider.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
public class ConscryptSslProvider implements SslProvider {
2121
private static final String NAME = "Conscrypt";
2222

23+
/** Default constructor. */
24+
public ConscryptSslProvider() {}
25+
2326
@Override
2427
public String getName() {
2528
return NAME;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
/** SSL support with conscrypt. */
12
@edu.umd.cs.findbugs.annotations.ReturnValuesAreNonnullByDefault
23
package io.jooby.conscrypt;

modules/jooby-conscrypt/src/main/java/module-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import io.jooby.SslProvider;
77
import io.jooby.conscrypt.ConscryptSslProvider;
88

9-
/** Conscrypt module. */
9+
/** SSL Conscrypt module. */
1010
module io.jooby.conscrypt {
1111
requires io.jooby;
1212
requires static com.github.spotbugs.annotations;

modules/jooby-db-scheduler/src/main/java/io/jooby/dbscheduler/BeanTasks.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
import io.jooby.Registry;
1919
import io.jooby.SneakyThrows;
2020

21-
public class BeanTasks {
21+
/** Factory method for creating tasks from Java beans. */
22+
public final class BeanTasks {
23+
24+
private BeanTasks() {}
25+
2226
/**
2327
* Scan for {@link Scheduled} annotated method and creates {@link Tasks#recurring(String,
2428
* Schedule)} tasks for each of them.

modules/jooby-db-scheduler/src/main/java/io/jooby/dbscheduler/DbScheduleParser.java

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,21 @@
1313
import com.typesafe.config.ConfigException;
1414

1515
/**
16-
* Parse {@link Schedule} from string expression. Supported values: - 0 0 1 * * ? (cron expression)
17-
* - 1m (fixed schedule) - 1h (fixed schedule) - 15s (fixed schedule) - DAILY|12:30,15:30 -
18-
* FIXED_DELAY|120s (must be expressed in seconds)
16+
* Parse {@link Schedule} from string expression. Supported values:
17+
*
18+
* <ul>
19+
* <li>0 0 1 * * ? (cron expression)
20+
* <li>1m (fixed schedule)
21+
* <li>1h (fixed schedule)
22+
* <li>15s (fixed schedule)
23+
* <li>DAILY|12:30,15:30
24+
* <li>FIXED_DELAY|120s (must be expressed in seconds)
25+
* </ul>
1926
*/
20-
public class DbScheduleParser {
27+
public final class DbScheduleParser {
28+
29+
private DbScheduleParser() {}
30+
2131
/**
2232
* Parse {@link Schedule} from string expression. Supported values: - 0 0 1 * * ? (cron
2333
* expression) - 1m (fixed schedule) - 1h (fixed schedule) - 15s (fixed schedule) -

modules/jooby-db-scheduler/src/main/java/io/jooby/dbscheduler/DbSchedulerApp.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
import io.jooby.Jooby;
1919
import io.jooby.exception.NotFoundException;
2020

21+
/** Minimal app that exposes {@link Scheduler} operations as API endpoints. */
2122
public class DbSchedulerApp extends Jooby {
22-
{
23+
/** Default constructor. */
24+
public DbSchedulerApp() {
2325
get(
2426
"/",
2527
ctx -> {

modules/jooby-db-scheduler/src/main/java/io/jooby/dbscheduler/DbSchedulerModule.java

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,50 +74,109 @@ public class DbSchedulerModule implements Extension {
7474
private ScheduledExecutorService housekeeperExecutor;
7575
private JdbcCustomization jdbcCustomization;
7676

77+
/**
78+
* Creates a new module.
79+
*
80+
* @param tasks Task to schedule.
81+
*/
7782
public DbSchedulerModule(@NonNull List<Task<?>> tasks) {
7883
this.tasks.addAll(tasks);
7984
}
8085

86+
/**
87+
* Creates a new module.
88+
*
89+
* @param task Task to schedule.
90+
* @param tail Tasks to schedule.
91+
*/
8192
public DbSchedulerModule(@NonNull Task<?> task, Task<?>... tail) {
8293
this(Stream.concat(Stream.of(task), Stream.of(tail)).toList());
8394
}
8495

96+
/**
97+
* Add more task to schedule.
98+
*
99+
* @param tasks Tasks to schedule.
100+
* @return This module.
101+
*/
85102
public DbSchedulerModule withTasks(@NonNull List<Task<?>> tasks) {
86103
this.tasks.addAll(tasks);
87104
return this;
88105
}
89106

107+
/**
108+
* Set a stats registry.
109+
*
110+
* @param statsRegistry Stats registry.
111+
* @return This module.
112+
*/
90113
public DbSchedulerModule withStatsRegistry(@NonNull StatsRegistry statsRegistry) {
91114
this.statsRegistry = statsRegistry;
92115
return this;
93116
}
94117

118+
/**
119+
* Scheduler name.
120+
*
121+
* @param schedulerName Scheduler name.
122+
* @return This module.
123+
*/
95124
public DbSchedulerModule withSchedulerName(@NonNull SchedulerName schedulerName) {
96125
this.schedulerName = schedulerName;
97126
return this;
98127
}
99128

129+
/**
130+
* Set Task serializer.
131+
*
132+
* @param serializer Task serializer.
133+
* @return This module.
134+
*/
100135
public DbSchedulerModule withSerializer(@NonNull Serializer serializer) {
101136
this.serializer = serializer;
102137
return this;
103138
}
104139

140+
/**
141+
* Set task executor service.
142+
*
143+
* @param executorService Task executor service.
144+
* @return This module.
145+
*/
105146
public DbSchedulerModule withExecutorService(@NonNull ExecutorService executorService) {
106147
this.executorService = executorService;
107148
return this;
108149
}
109150

151+
/**
152+
* Set due executor service.
153+
*
154+
* @param dueExecutor Executor service.
155+
* @return This module.
156+
*/
110157
public DbSchedulerModule withDueExecutor(@NonNull ExecutorService dueExecutor) {
111158
this.dueExecutor = dueExecutor;
112159
return this;
113160
}
114161

162+
/**
163+
* Set cleanup executor service.
164+
*
165+
* @param housekeeperExecutor Executor service.
166+
* @return This module.
167+
*/
115168
public DbSchedulerModule withHousekeeperExecutor(
116169
@NonNull ScheduledExecutorService housekeeperExecutor) {
117170
this.housekeeperExecutor = housekeeperExecutor;
118171
return this;
119172
}
120173

174+
/**
175+
* Customize/configure jdbc calls.
176+
*
177+
* @param jdbcCustomization Customize/configure jdbc calls.
178+
* @return This module.
179+
*/
121180
public DbSchedulerModule withJdbcCustomization(@NonNull JdbcCustomization jdbcCustomization) {
122181
this.jdbcCustomization = jdbcCustomization;
123182
return this;

0 commit comments

Comments
 (0)