Skip to content

Commit 473dc33

Browse files
Update javadoc links
1 parent 15a46ce commit 473dc33

49 files changed

Lines changed: 153 additions & 129 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/AttributeSupport.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public final class AttributeSupport {
3030
*
3131
* <p>This key is <b>not used in {@code ProblemContext}</b>; it is used exclusively as a request
3232
* attribute (WebFlux or WebMVC) and is assigned by framework-specific filters.
33+
*
34+
* @see io.github.problem4j.core.ProblemContext
3335
*/
3436
public static final String TRACE_ID_ATTRIBUTE = "io.github.problem4j.spring.web.traceId";
3537

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/DefaultProblemFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class DefaultProblemFormat implements ProblemFormat {
4242
private final String detailFormat;
4343

4444
/**
45-
* Constructs a new {@code DefaultProblemFormat}.
45+
* Constructs a new {@link DefaultProblemFormat}.
4646
*
4747
* @param detailFormat the detail format string to use
4848
*/

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/DefaultProblemPostProcessor.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public class DefaultProblemPostProcessor implements ProblemPostProcessor {
6868
private final PostProcessorSettings settings;
6969

7070
/**
71-
* Constructs a new {@code DefaultProblemPostProcessor}.
71+
* Constructs a new {@link DefaultProblemPostProcessor}.
7272
*
7373
* @param settings the post-processor settings to use
7474
*/
@@ -79,7 +79,7 @@ public DefaultProblemPostProcessor(PostProcessorSettings settings) {
7979
/**
8080
* Applies configured overrides to {@code type} and/or {@code instance}.
8181
*
82-
* <p>About {@code about:blank}: when the original type is {@code null} or {@code
82+
* <p>About {@code about:blank}: when the original type is {@code null} or {@link
8383
* Problem#BLANK_TYPE}, the placeholder {@code {problem.type}} resolves to an empty string
8484
* (templates naturally collapse). If the template is exactly {@code {problem.type}}, the original
8585
* {@code about:blank} value is preserved instead of becoming empty.
@@ -143,13 +143,14 @@ protected boolean canOverride(boolean requiresProblemType, boolean hasProblemTyp
143143

144144
/**
145145
* Because this implementation does not try to resolve dynamic fields, it does not reuse the code
146-
* from {@code DefaultProblemMappingProcessor}. Instead, we rely on simple substring replacement
147-
* in form of {@link String#replace(CharSequence, CharSequence)}, and then removing all remaining
148-
* unknown variables.
146+
* from {@code ProblemPostProcessor}. Instead, we rely on simple substring replacement in form of
147+
* {@link String#replace(CharSequence, CharSequence)}, and then removing all remaining unknown
148+
* variables.
149149
*
150150
* @param context the problem context
151151
* @param problem the original problem
152152
* @return an optional containing the new type if override is possible
153+
* @see io.github.problem4j.spring.web.ProblemPostProcessor
153154
*/
154155
protected Optional<String> overrideType(ProblemContext context, Problem problem) {
155156
if (!problem.isTypeNonBlank() || !StringUtils.hasLength(settings.getTypeOverride())) {
@@ -219,16 +220,17 @@ protected boolean canOverride(
219220

220221
/**
221222
* Because this implementation does not try to resolve dynamic fields, it does not reuse the code
222-
* from {@code DefaultProblemMappingProcessor}. Instead, we rely on simple substring replacement
223-
* in form of {@link String#replace(CharSequence, CharSequence)}, and then removing all remaining
224-
* unknown variables.
223+
* from {@code ProblemPostProcessor}. Instead, we rely on simple substring replacement in form of
224+
* {@link String#replace(CharSequence, CharSequence)}, and then removing all remaining unknown
225+
* variables.
225226
*
226227
* <p>If the algorithm discovers remaining placeholders that are unresolved, overriding is aborted
227228
* and original value is restored.
228229
*
229230
* @param context the problem context
230231
* @param problem the original problem
231232
* @return the new instance string
233+
* @see io.github.problem4j.spring.web.ProblemPostProcessor
232234
*/
233235
protected String overrideInstance(ProblemContext context, Problem problem) {
234236
if (!StringUtils.hasLength(settings.getInstanceOverride())) {
@@ -266,6 +268,7 @@ protected String stringOrEmpty(Object value) {
266268
*
267269
* @param value the string to check
268270
* @return true if unresolved placeholders remain
271+
* @see io.github.problem4j.core.ProblemMapper
269272
*/
270273
protected boolean hasRemainingUnknownPlaceholders(String value) {
271274
return PLACEHOLDER.matcher(value).find();

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/ProblemFormat.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
*
2727
* <p>Implementations can customize how details and property names are presented - for example, by
2828
* applying localization, case formatting, or message templating.
29+
*
30+
* @see io.github.problem4j.core.Problem
2931
*/
3032
public interface ProblemFormat {
3133

@@ -34,6 +36,7 @@ public interface ProblemFormat {
3436
*
3537
* @param detail the detail string to format
3638
* @return the formatted detail string
39+
* @see io.github.problem4j.core.Problem
3740
*/
3841
String formatDetail(String detail);
3942
}

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/ProblemPostProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* Defines a contract for post-processing {@link Problem} instances before they are returned in an
2828
* HTTP response.
2929
*
30-
* <p>Implementations of this interface can modify, enrich, or normalize {@code Problem} objects
30+
* <p>Implementations of this interface can modify, enrich, or normalize {@link Problem} objects
3131
* generated by the framework or application code. Typical use cases include:
3232
*
3333
* <ul>

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/ProblemResolverStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/**
2727
* Registry that provides access to {@link ProblemResolver} instances based on exception types.
2828
*
29-
* <p>Implementations are responsible for locating the most specific resolver for a given {@code
29+
* <p>Implementations are responsible for locating the most specific resolver for a given {@link
3030
* Exception} class, typically by checking class assignability and caching results to improve
3131
* performance.
3232
*/

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/ProblemSupport.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public final class ProblemSupport {
146146
/**
147147
* Resolves a {@link Problem} to a corresponding {@link HttpStatus}.
148148
*
149-
* <p>If the problem's status value is not a valid HTTP status code, {@code
149+
* <p>If the problem's status value is not a valid HTTP status code, {@link
150150
* HttpStatus#INTERNAL_SERVER_ERROR} is returned as a fallback.
151151
*
152152
* @param problem the {@link Problem} instance containing the status code
@@ -165,8 +165,8 @@ public static HttpStatus resolveStatus(Problem problem) {
165165
/**
166166
* Resolves an {@link HttpStatusCode} to a corresponding {@link ProblemStatus}.
167167
*
168-
* <p>If the status code is {@code null} or not recognized, {@code INTERNAL_SERVER_ERROR} is
169-
* returned as a fallback.
168+
* <p>If the status code is {@code null} or not recognized, {@link
169+
* ProblemStatus#INTERNAL_SERVER_ERROR} is returned as a fallback.
170170
*
171171
* @param status the {@link HttpStatusCode} to resolve
172172
* @return the corresponding {@link ProblemStatus}, or {@link ProblemStatus#INTERNAL_SERVER_ERROR}

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/autoconfigure/ProblemAutoConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
* <li>{@link ConditionalOnMissingBean} ensures user-defined beans override defaults.
5555
* <li>{@link ConditionalOnClass} ensures compatibility with optional framework classes.
5656
* </ul>
57+
*
58+
* @see io.github.problem4j.core.Problem
5759
*/
5860
@AutoConfiguration
5961
@EnableConfigurationProperties({ProblemProperties.class})

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/autoconfigure/ProblemParameterConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ MethodValidationResultSupport problemMethodValidationResultSupport(
7878
static class ProblemBeanParamAwareBindingConfiguration {
7979

8080
/**
81-
* Provides a {@link BindingResultSupport} bean that handles {@code BindParam}-annotations.
81+
* Provides a {@link BindingResultSupport} bean that handles {@link BindParam}-annotations.
8282
*
8383
* @return a new {@link BindParamAwareResultSupport}
8484
*/

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/autoconfigure/ProblemProperties.java

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,19 @@ public class ProblemProperties implements ProblemContextSettings, PostProcessorS
4242
private final ResolverCaching resolverCaching;
4343

4444
/**
45-
* Constructs a new {@code ProblemProperties}.
45+
* Constructs a new {@link ProblemProperties}.
4646
*
4747
* @param enabled whether problem handling is enabled
48-
* @param detailFormat format for the "detail" field (one of {@link DetailFormat#LOWERCASE},
48+
* @param detailFormat format for the {@code detail} field (one of {@link DetailFormat#LOWERCASE},
4949
* {@link DetailFormat#CAPITALIZED}, {@link DetailFormat#UPPERCASE})
5050
* @param tracingHeaderName name of the HTTP header carrying a trace ID (nullable)
51-
* @param typeOverride template for overriding the "type" field; may contain "{context.traceId}"
52-
* placeholder (nullable)
53-
* @param instanceOverride template for overriding the "instance" field; may contain
54-
* "{context.traceId}" placeholder (nullable)
51+
* @param typeOverride template for overriding the {@code type} field; may contain {@code
52+
* {context.traceId}} placeholder (nullable)
53+
* @param instanceOverride template for overriding the {@code instance} field; may contain {@code
54+
* {context.traceId}} placeholder (nullable)
5555
* @param resolverCaching caching for resolver lookups ({@code CachingProblemResolverStore});
5656
* defaults to {@link ResolverCaching#createDefault()}
57+
* @see io.github.problem4j.spring.web.CachingProblemResolverStore
5758
*/
5859
public ProblemProperties(
5960
@DefaultValue("true") boolean enabled,
@@ -99,6 +100,7 @@ public String getDetailFormat() {
99100
* <p>If no header name is configured, this method may return {@code null}.
100101
*
101102
* @return the tracing header name, or {@code null} if not set
103+
* @see io.github.problem4j.core.Problem
102104
*/
103105
@Override
104106
public String getTracingHeaderName() {
@@ -123,6 +125,7 @@ public String getTracingHeaderName() {
123125
* original problem type will be preserved.
124126
*
125127
* @return the configured type override string, or {@code null} if not set
128+
* @see io.github.problem4j.core.ProblemContext
126129
*/
127130
@Override
128131
public String getTypeOverride() {
@@ -146,6 +149,8 @@ public String getTypeOverride() {
146149
* configuration, along with {@link #tracingHeaderName}, enables this feature.
147150
*
148151
* @return the configured instance override string, or {@code null} if not set
152+
* @see io.github.problem4j.core.ProblemContext
153+
* @see io.github.problem4j.core.ProblemException
149154
*/
150155
@Override
151156
public String getInstanceOverride() {
@@ -165,6 +170,8 @@ public ResolverCaching getResolverCaching() {
165170
* Caching configuration for ({@code CachingProblemResolverStore}).
166171
*
167172
* <p>Controls whether resolver lookup caching is enabled and its maximum size.
173+
*
174+
* @see io.github.problem4j.spring.web.CachingProblemResolverStore
168175
*/
169176
public static class ResolverCaching {
170177

0 commit comments

Comments
 (0)