Fix Java 8 Javadoc compatibility

Update Javadocs to fix errors caused by Java 8 aggressive linting.

Fixes gh-2233
This commit is contained in:
Phillip Webb
2015-02-02 12:02:36 -08:00
parent 93d533dfa6
commit ccdbfd274f
64 changed files with 489 additions and 88 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -103,6 +103,7 @@ public class AuditEvent implements Serializable {
/**
* Returns the date/time that the even was logged.
* @return the time stamp
*/
public Date getTimestamp() {
return this.timestamp;
@@ -110,6 +111,7 @@ public class AuditEvent implements Serializable {
/**
* Returns the user principal responsible for the event or {@code null}.
* @return the principal or {@code null}
*/
public String getPrincipal() {
return this.principal;
@@ -117,6 +119,7 @@ public class AuditEvent implements Serializable {
/**
* Returns the type of event.
* @return the event type
*/
public String getType() {
return this.type;
@@ -124,6 +127,7 @@ public class AuditEvent implements Serializable {
/**
* Returns the event data.
* @return the event data
*/
public Map<String, Object> getData() {
return this.data;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,6 +35,9 @@ public class AuditApplicationEvent extends ApplicationEvent {
/**
* Create a new {@link AuditApplicationEvent} that wraps a newly created
* {@link AuditEvent}.
* @param principal the principal
* @param type the event type
* @param data the event data
* @see AuditEvent#AuditEvent(String, String, Map)
*/
public AuditApplicationEvent(String principal, String type, Map<String, Object> data) {
@@ -44,6 +47,9 @@ public class AuditApplicationEvent extends ApplicationEvent {
/**
* Create a new {@link AuditApplicationEvent} that wraps a newly created
* {@link AuditEvent}.
* @param principal the principal
* @param type the event type
* @param data the event data
* @see AuditEvent#AuditEvent(String, String, String...)
*/
public AuditApplicationEvent(String principal, String type, String... data) {
@@ -53,6 +59,10 @@ public class AuditApplicationEvent extends ApplicationEvent {
/**
* Create a new {@link AuditApplicationEvent} that wraps a newly created
* {@link AuditEvent}.
* @param timestamp the time stamp
* @param principal the principal
* @param type the event type
* @param data the event data
* @see AuditEvent#AuditEvent(Date, String, String, Map)
*/
public AuditApplicationEvent(Date timestamp, String principal, String type,

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -79,6 +79,7 @@ public class ManagementServerProperties implements SecurityPrerequisite {
/**
* Returns the management port or {@code null} if the
* {@link ServerProperties#getPort() server port} should be used.
* @return the port
* @see #setPort(Integer)
*/
public Integer getPort() {
@@ -88,6 +89,7 @@ public class ManagementServerProperties implements SecurityPrerequisite {
/**
* Sets the port of the management server, use {@code null} if the
* {@link ServerProperties#getPort() server port} should be used. To disable use 0.
* @param port the port
*/
public void setPort(Integer port) {
this.port = port;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,7 +53,7 @@ import com.codahale.metrics.MetricRegistry;
/**
* {@link EnableAutoConfiguration Auto-configuration} for metrics services. Creates
* user-facing {@link GaugeService} and {@link CounterService} instances, and also back
* end repositories to catch the data pumped into them. </p>
* end repositories to catch the data pumped into them.
* <p>
* An {@link InMemoryMetricRepository} is always created unless another
* {@link MetricRepository} is already provided by the user. In general, even if metric
@@ -61,27 +61,23 @@ import com.codahale.metrics.MetricRegistry;
* repository to buffer metric updates locally. The values can be exported (e.g. on a
* periodic basis) using an {@link Exporter}, most implementations of which have
* optimizations for sending data to remote repositories.
* </p>
* <p>
* If Spring Messaging is on the classpath a {@link MessageChannel} called
* "metricsChannel" is also created (unless one already exists) and all metric update
* events are published additionally as messages on that channel. Additional analysis or
* actions can be taken by clients subscribing to that channel.
* </p>
* <p>
* In addition if Codahale's metrics library is on the classpath a {@link MetricRegistry}
* will be created and wired up to the counter and gauge services in addition to the basic
* repository. Users can create Codahale metrics by prefixing their metric names with the
* appropriate type (e.g. "histogram.*", "meter.*") and sending them to the standard
* <code>GaugeService</code> or <code>CounterService</code>.
* </p>
* <p>
* By default all metric updates go to all {@link MetricWriter} instances in the
* application context. To change this behaviour define your own metric writer bean called
* "primaryMetricWriter", mark it <code>@Primary</code>, and this one will receive all
* updates from the default counter and gauge services. Alternatively you can provide your
* own counter and gauge services and wire them to whichever writer you choose.
* </p>
*
* @see GaugeService
* @see CounterService

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -153,6 +153,7 @@ public class ShellProperties {
/**
* Return a properties file configured from these settings that can be applied to a
* CRaSH shell instance.
* @return the CRaSH properties
*/
public Properties asCrshShellConfig() {
Properties properties = new Properties();
@@ -185,6 +186,7 @@ public class ShellProperties {
/**
* Basic validation of applied CRaSH shell configuration.
* @param properties the properties to validate
*/
protected void validateCrshShellConfig(Properties properties) {
String finalAuth = properties.getProperty("crash.auth");
@@ -205,6 +207,7 @@ public class ShellProperties {
/**
* Apply the properties to a CRaSH configuration.
* @param config the CRaSH configuration properties
*/
protected abstract void applyToCrshShellConfig(Properties config);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ import org.springframework.core.env.Environment;
/**
* Abstract base for {@link Endpoint} implementations.
*
* @param <T> the endpoint data type
* @author Phillip Webb
* @author Christian Dupuis
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -102,7 +102,6 @@ public class ConfigurationPropertiesReportEndpoint extends
/**
* Location path for JSON metadata about config properties.
*
* @param metadataLocations the metadataLocations to set
*/
public void setMetadataLocations(String metadataLocations) {
@@ -117,6 +116,8 @@ public class ConfigurationPropertiesReportEndpoint extends
/**
* Extract beans annotated {@link ConfigurationProperties} and serialize into
* {@link Map}.
* @param context the application context
* @return the beans
*/
protected Map<String, Object> extract(ApplicationContext context) {
// Serialize beans into map structure and sanitize values
@@ -191,6 +192,7 @@ public class ConfigurationPropertiesReportEndpoint extends
/**
* Configure Jackson's {@link ObjectMapper} to be used to serialize the
* {@link ConfigurationProperties} objects into a {@link Map} structure.
* @param mapper the object mapper
*/
protected void configureObjectMapper(ObjectMapper mapper) {
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ package org.springframework.boot.actuate.endpoint;
* exposed via Spring MVC but could also be exposed using some other technique. Consider
* extending {@link AbstractEndpoint} if you are developing your own endpoint.
*
* @param <T> the endpoint data type
* @author Phillip Webb
* @author Dave Syer
* @author Christian Dupuis
@@ -31,17 +32,20 @@ public interface Endpoint<T> {
/**
* The logical ID of the endpoint. Must only contain simple letters, numbers and '_'
* characters (ie a {@literal "\w"} regex).
* @return the endpoint ID
*/
String getId();
/**
* Return if the endpoint is enabled.
* @return if the endpoint is enabled
*/
boolean isEnabled();
/**
* Return if the endpoint is sensitive, i.e. may return data that the average user
* should not see. Mappings can use this as a security hint.
* @return if the endpoint is sensitive
*/
boolean isSensitive();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,6 +44,8 @@ public class HealthEndpoint extends AbstractEndpoint<Health> {
/**
* Create a new {@link HealthIndicator} instance.
* @param healthAggregator the health aggregator
* @param healthIndicators the health indicators
*/
public HealthEndpoint(HealthAggregator healthAggregator,
Map<String, HealthIndicator> healthIndicators) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -64,6 +64,7 @@ public class SystemPublicMetrics implements PublicMetrics, Ordered {
/**
* Add basic system metrics.
* @param result the result
*/
protected void addBasicMetrics(Collection<Metric<?>> result) {
result.add(new Metric<Long>("mem", Runtime.getRuntime().totalMemory() / 1024));
@@ -81,6 +82,7 @@ public class SystemPublicMetrics implements PublicMetrics, Ordered {
/**
* Add JVM heap metrics.
* @param result the result
*/
protected void addHeapMetrics(Collection<Metric<?>> result) {
MemoryUsage memoryUsage = ManagementFactory.getMemoryMXBean()
@@ -93,6 +95,7 @@ public class SystemPublicMetrics implements PublicMetrics, Ordered {
/**
* Add thread metrics.
* @param result the result
*/
protected void addThreadMetrics(Collection<Metric<?>> result) {
ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean();
@@ -105,6 +108,7 @@ public class SystemPublicMetrics implements PublicMetrics, Ordered {
/**
* Add class loading metrics.
* @param result the result
*/
protected void addClassLoadingMetrics(Collection<Metric<?>> result) {
ClassLoadingMXBean classLoadingMxBean = ManagementFactory.getClassLoadingMXBean();
@@ -118,6 +122,7 @@ public class SystemPublicMetrics implements PublicMetrics, Ordered {
/**
* Add garbage collection metrics.
* @param result the result
*/
protected void addGarbageCollectionMetrics(Collection<Metric<?>> result) {
List<GarbageCollectorMXBean> garbageCollectorMxBeans = ManagementFactory

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,7 +60,7 @@ public class EndpointHandlerMapping extends RequestMappingHandlerMapping impleme
/**
* Create a new {@link EndpointHandlerMapping} instance. All {@link Endpoint}s will be
* detected from the {@link ApplicationContext}.
* @param endpoints
* @param endpoints the endpoints
*/
public EndpointHandlerMapping(Collection<? extends MvcEndpoint> endpoints) {
this.endpoints = new HashSet<MvcEndpoint>(endpoints);
@@ -148,6 +148,7 @@ public class EndpointHandlerMapping extends RequestMappingHandlerMapping impleme
}
/**
* @param endpoint the endpoint
* @return the path used in mappings
*/
public String getPath(String endpoint) {
@@ -156,6 +157,7 @@ public class EndpointHandlerMapping extends RequestMappingHandlerMapping impleme
/**
* Sets if this mapping is disabled.
* @param disabled if the mapping is disabled
*/
public void setDisabled(boolean disabled) {
this.disabled = disabled;
@@ -163,6 +165,7 @@ public class EndpointHandlerMapping extends RequestMappingHandlerMapping impleme
/**
* Returns if this mapping is disabled.
* @return if the mapping is disabled
*/
public boolean isDisabled() {
return this.disabled;
@@ -170,6 +173,7 @@ public class EndpointHandlerMapping extends RequestMappingHandlerMapping impleme
/**
* Return the endpoints
* @return the endpoints
*/
public Set<? extends MvcEndpoint> getEndpoints() {
return new HashSet<MvcEndpoint>(this.endpoints);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,11 +31,13 @@ public interface MvcEndpoint {
/**
* Return the MVC path of the endpoint.
* @return the endpoint path
*/
String getPath();
/**
* Return if the endpoint exposes sensitive information.
* @return if the endpoint is sensitive
*/
boolean isSensitive();
@@ -43,6 +45,7 @@ public interface MvcEndpoint {
* Return the type of {@link Endpoint} exposed, or {@code null} if this
* {@link MvcEndpoint} exposes information that cannot be represented as a traditional
* {@link Endpoint}.
* @return the endpoint type
*/
@SuppressWarnings("rawtypes")
Class<? extends Endpoint> getEndpointType();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,7 +44,7 @@ public abstract class AbstractHealthAggregator implements HealthAggregator {
/**
* Return the single 'aggregate' status that should be used from the specified
* candidates.
* @param candidates
* @param candidates the candidates
* @return a single status
*/
protected abstract Status aggregateStatus(List<Status> candidates);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@ public class CompositeHealthIndicator implements HealthIndicator {
/**
* Create a new {@link CompositeHealthIndicator}.
* @param healthAggregator the health aggregator
*/
public CompositeHealthIndicator(HealthAggregator healthAggregator) {
this(healthAggregator, new LinkedHashMap<String, HealthIndicator>());
@@ -44,6 +45,7 @@ public class CompositeHealthIndicator implements HealthIndicator {
/**
* Create a new {@link CompositeHealthIndicator} from the specified indicators.
* @param healthAggregator the health aggregator
* @param indicators a map of {@link HealthIndicator}s with the key being used as an
* indicator name.
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -153,6 +153,7 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator implement
/**
* Set the {@link DataSource} to use.
* @param dataSource the data source
*/
public void setDataSource(DataSource dataSource) {
this.dataSource = dataSource;
@@ -162,6 +163,7 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator implement
/**
* Set a specific validation query to use to validate a connection. If none is set, a
* default validation query is used.
* @param query the query
*/
public void setQuery(String query) {
this.query = query;
@@ -169,6 +171,7 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator implement
/**
* Return the validation query or {@code null}.
* @return the query
*/
public String getQuery() {
return this.query;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@ public class DiskSpaceHealthIndicator extends AbstractHealthIndicator {
/**
* Create a new {@code DiskSpaceHealthIndicator}
* @param properties the disk space properties
*/
@Autowired
public DiskSpaceHealthIndicator(DiskSpaceHealthIndicatorProperties properties) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -150,6 +150,7 @@ public final class Health {
/**
* Create a new {@link Builder} instance with a specific status code.
* @param statusCode the status code
* @return a new {@link Builder} instance
*/
public static Builder status(String statusCode) {
@@ -158,6 +159,7 @@ public final class Health {
/**
* Create a new {@link Builder} instance with a specific {@link Status}.
* @param status the status
* @return a new {@link Builder} instance
*/
public static Builder status(Status status) {
@@ -270,6 +272,7 @@ public final class Health {
/**
* Set status to given <code>statusCode</code>.
* @param statusCode the status code
* @return this {@link Builder} instance
*/
public Builder status(String statusCode) {
@@ -278,7 +281,7 @@ public final class Health {
/**
* Set status to given {@link Status} instance
* @param status
* @param status the status
* @return this {@link Builder} instance
*/
public Builder status(Status status) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,6 +38,8 @@ public interface HealthAggregator {
/**
* Aggregate several given {@link Health} instances into one.
* @param healths the health instances to aggregate
* @return the aggregated health
*/
Health aggregate(Map<String, Health> healths);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@ import org.springframework.util.ObjectUtils;
* named numeric value with a timestamp). For example a metric might record the number of
* active connections to a server, or the temperature of a meeting room.
*
* @param <T> the value type
* @author Dave Syer
*/
public class Metric<T extends Number> {
@@ -60,6 +61,7 @@ public class Metric<T extends Number> {
/**
* Returns the name of the metric.
* @return the name
*/
public String getName() {
return this.name;
@@ -67,6 +69,7 @@ public class Metric<T extends Number> {
/**
* Returns the value of the metric.
* @return the value
*/
public T getValue() {
return this.value;
@@ -94,6 +97,7 @@ public class Metric<T extends Number> {
/**
* Create a new {@link Metric} with a different value.
* @param <S> the metric value type
* @param value the value of the new metric
* @return a new {@link Metric} instance
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ import org.springframework.util.ConcurrentReferenceHashMap;
/**
* Repository utility that stores stuff in memory with period-separated String keys.
*
* @param <T> the type to store
* @author Dave Syer
*/
public class SimpleInMemoryRepository<T> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ import org.springframework.boot.actuate.metrics.Metric;
/**
* A value object representing an increment in a metric value (usually a counter).
*
* @param <T> the value type
* @author Dave Syer
*/
public class Delta<T extends Number> extends Metric<T> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ public interface MetricWriter {
/**
* Set the value of a metric.
* @param value
* @param value the value
*/
void set(Metric<?> value);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,6 +39,7 @@ public interface PrefixMetricWriter {
/**
* Increment the value of a metric (or decrement if the delta is negative). The name
* of the metric to increment is <code>group + "." + delta.name</code>.
* @param group the name of the group
* @param delta the amount to increment by
*/
void increment(String group, Delta<?> delta);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2014 the original author or authors.
* Copyright 2010-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -92,6 +92,7 @@ public class ApplicationPidFileWriter implements
* Defaults to {@link ApplicationPreparedEvent}. NOTE: If you use the
* {@link ApplicationPreparedEvent} to trigger the write, you will not be able to
* specify the PID filename in the Spring {@link Environment}.
* @param triggerEventType the event trigger type
*/
public void setTriggerEventType(
Class<? extends SpringApplicationEvent> triggerEventType) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@ public interface TraceRepository {
/**
* Find all {@link Trace} objects contained in the repository.
* @return the results
*/
List<Trace> findAll();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,7 +57,8 @@ public class WebRequestTraceFilter extends OncePerRequestFilter implements Order
private ErrorAttributes errorAttributes;
/**
* @param traceRepository
* Create a new {@link WebRequestTraceFilter} instance.
* @param traceRepository the trace repository
*/
public WebRequestTraceFilter(TraceRepository traceRepository) {
this.traceRepository = traceRepository;
@@ -66,6 +67,7 @@ public class WebRequestTraceFilter extends OncePerRequestFilter implements Order
/**
* Debugging feature. If enabled, and trace logging is enabled then web request
* headers will be logged.
* @param dumpRequests if requests should be logged
*/
public void setDumpRequests(boolean dumpRequests) {
this.dumpRequests = dumpRequests;