Skip to content

Commit

Permalink
Fix Java 8 Javadoc compatibility
Browse files Browse the repository at this point in the history
Update Javadocs to fix errors caused by Java 8 aggressive linting.

Fixes spring-projectsgh-2233
  • Loading branch information
philwebb committed Feb 3, 2015
1 parent 93d533d commit ccdbfd2
Show file tree
Hide file tree
Showing 64 changed files with 489 additions and 88 deletions.
4 changes: 2 additions & 2 deletions eclipse/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=default
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -103,27 +103,31 @@ private static Map<String, Object> convert(String[] data) {

/**
* Returns the date/time that the even was logged.
* @return the time stamp
*/
public Date getTimestamp() {
return this.timestamp;
}

/**
* Returns the user principal responsible for the event or {@code null}.
* @return the principal or {@code null}
*/
public String getPrincipal() {
return this.principal;
}

/**
* Returns the type of event.
* @return the event type
*/
public String getType() {
return this.type;
}

/**
* Returns the event data.
* @return the event data
*/
public Map<String, Object> getData() {
return this.data;
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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) {
Expand All @@ -44,6 +47,9 @@ public AuditApplicationEvent(String principal, String type, Map<String, Object>
/**
* 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) {
Expand All @@ -53,6 +59,10 @@ public AuditApplicationEvent(String principal, String type, String... data) {
/**
* 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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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() {
Expand All @@ -88,6 +89,7 @@ public Integer getPort() {
/**
* 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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -53,35 +53,31 @@
/**
* {@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
* data needs to be stored and analysed remotely, it is recommended to use an in-memory
* 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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -153,6 +153,7 @@ public Telnet getTelnet() {
/**
* 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();
Expand Down Expand Up @@ -185,6 +186,7 @@ public Properties asCrshShellConfig() {

/**
* Basic validation of applied CRaSH shell configuration.
* @param properties the properties to validate
*/
protected void validateCrshShellConfig(Properties properties) {
String finalAuth = properties.getProperty("crash.auth");
Expand All @@ -205,6 +207,7 @@ public static abstract class CrshShellProperties {

/**
* Apply the properties to a CRaSH configuration.
* @param config the CRaSH configuration properties
*/
protected abstract void applyToCrshShellConfig(Properties config);

Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -25,6 +25,7 @@
/**
* Abstract base for {@link Endpoint} implementations.
*
* @param <T> the endpoint data type
* @author Phillip Webb
* @author Christian Dupuis
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -102,7 +102,6 @@ public void setKeysToSanitize(String... keysToSanitize) {

/**
* Location path for JSON metadata about config properties.
*
* @param metadataLocations the metadataLocations to set
*/
public void setMetadataLocations(String metadataLocations) {
Expand All @@ -117,6 +116,8 @@ public Map<String, Object> invoke() {
/**
* 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
Expand Down Expand Up @@ -191,6 +192,7 @@ private Map<String, Object> safeSerialize(ObjectMapper mapper, Object bean,
/**
* 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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -21,6 +21,7 @@
* 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
Expand All @@ -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();

Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -64,6 +64,7 @@ public Collection<Metric<?>> metrics() {

/**
* Add basic system metrics.
* @param result the result
*/
protected void addBasicMetrics(Collection<Metric<?>> result) {
result.add(new Metric<Long>("mem", Runtime.getRuntime().totalMemory() / 1024));
Expand All @@ -81,6 +82,7 @@ protected void addBasicMetrics(Collection<Metric<?>> result) {

/**
* Add JVM heap metrics.
* @param result the result
*/
protected void addHeapMetrics(Collection<Metric<?>> result) {
MemoryUsage memoryUsage = ManagementFactory.getMemoryMXBean()
Expand All @@ -93,6 +95,7 @@ protected void addHeapMetrics(Collection<Metric<?>> result) {

/**
* Add thread metrics.
* @param result the result
*/
protected void addThreadMetrics(Collection<Metric<?>> result) {
ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean();
Expand All @@ -105,6 +108,7 @@ protected void addThreadMetrics(Collection<Metric<?>> result) {

/**
* Add class loading metrics.
* @param result the result
*/
protected void addClassLoadingMetrics(Collection<Metric<?>> result) {
ClassLoadingMXBean classLoadingMxBean = ManagementFactory.getClassLoadingMXBean();
Expand All @@ -118,6 +122,7 @@ protected void addClassLoadingMetrics(Collection<Metric<?>> result) {

/**
* Add garbage collection metrics.
* @param result the result
*/
protected void addGarbageCollectionMetrics(Collection<Metric<?>> result) {
List<GarbageCollectorMXBean> garbageCollectorMxBeans = ManagementFactory
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -148,6 +148,7 @@ public String getPrefix() {
}

/**
* @param endpoint the endpoint
* @return the path used in mappings
*/
public String getPath(String endpoint) {
Expand All @@ -156,20 +157,23 @@ public String getPath(String endpoint) {

/**
* Sets if this mapping is disabled.
* @param disabled if the mapping is disabled
*/
public void setDisabled(boolean disabled) {
this.disabled = disabled;
}

/**
* Returns if this mapping is disabled.
* @return if the mapping is disabled
*/
public boolean isDisabled() {
return this.disabled;
}

/**
* Return the endpoints
* @return the endpoints
*/
public Set<? extends MvcEndpoint> getEndpoints() {
return new HashSet<MvcEndpoint>(this.endpoints);
Expand Down
Loading

0 comments on commit ccdbfd2

Please sign in to comment.