Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Jul 24, 2015
1 parent d6e914b commit 42e2301
Show file tree
Hide file tree
Showing 50 changed files with 100 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
* The name of the endpoint.
* @return The name of the endpoint
*/
public String value();
String value();

/**
* Returns whether or not the endpoint is enabled by default.
* @return {@code true} if the endpoint is enabled by default, otherwise {@code false}
*/
public boolean enabledByDefault() default true;
boolean enabledByDefault() default true;

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 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 @@ -30,7 +30,6 @@
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.boot.actuate.endpoint.Endpoint;
import org.springframework.boot.actuate.endpoint.ShutdownEndpoint;
Expand Down Expand Up @@ -60,7 +59,7 @@
* @author Andy Wilkinson
*/
public class EndpointMBeanExporter extends MBeanExporter implements SmartLifecycle,
BeanFactoryAware, ApplicationContextAware {
ApplicationContextAware {

public static final String DEFAULT_DOMAIN = "org.springframework.boot";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import org.springframework.boot.actuate.endpoint.Endpoint;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.web.cors.CorsConfiguration;
Expand All @@ -49,8 +48,7 @@
* @author Christian Dupuis
* @author Dave Syer
*/
public class EndpointHandlerMapping extends RequestMappingHandlerMapping implements
ApplicationContextAware {
public class EndpointHandlerMapping extends RequestMappingHandlerMapping {

private final Set<MvcEndpoint> endpoints;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private boolean isRegex(String name) {

protected abstract Object getValue(T source, String name);

protected static interface NameCallback {
protected interface NameCallback {

void addName(String name);

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 @@ -23,7 +23,6 @@
import java.util.concurrent.ConcurrentNavigableMap;

import org.springframework.boot.actuate.metrics.Metric;
import org.springframework.boot.actuate.metrics.reader.PrefixMetricReader;
import org.springframework.boot.actuate.metrics.util.SimpleInMemoryRepository;
import org.springframework.boot.actuate.metrics.util.SimpleInMemoryRepository.Callback;
import org.springframework.boot.actuate.metrics.writer.Delta;
Expand All @@ -34,8 +33,7 @@
*
* @author Dave Syer
*/
public class InMemoryMetricRepository implements MetricRepository, MultiMetricRepository,
PrefixMetricReader {
public class InMemoryMetricRepository implements MetricRepository, MultiMetricRepository {

private final SimpleInMemoryRepository<Metric<?>> metrics = new SimpleInMemoryRepository<Metric<?>>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class SimpleInMemoryRepository<T> {

private final ConcurrentMap<String, Object> locks = new ConcurrentReferenceHashMap<String, Object>();

public static interface Callback<T> {
public interface Callback<T> {
T modify(T current);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 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 @@ -189,7 +189,7 @@ static void reset() {
/**
* Provides access to a property value.
*/
private static interface Property {
private interface Property {

String getValue(SpringApplicationEvent event);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void healthEndpointNotHidden() throws InterruptedException {
DispatcherServletAutoConfiguration.class, WebMvcAutoConfiguration.class,
JacksonAutoConfiguration.class, ErrorMvcAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class })
protected static @interface MinimalWebConfiguration {
protected @interface MinimalWebConfiguration {

}

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 @@ -94,9 +94,9 @@ public DataSource dataSource() {

}

public static interface Executor {
public interface Executor {

public void execute();
void execute();

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
* classpath.
* @return the classes that must be present
*/
public Class<?>[] value() default {};
Class<?>[] value() default {};

/**
* The classes names that must be present.
* @return the class names that must be present.
*/
public String[] name() default {};
String[] name() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.boot.autoconfigure.condition;

import java.lang.annotation.Documented;
Expand Down Expand Up @@ -57,7 +58,7 @@
/**
* Range options.
*/
public enum Range {
enum Range {

/**
* Equal to, or newer than the specified {@link JavaVersion}.
Expand All @@ -74,7 +75,7 @@ public enum Range {
/**
* Java versions.
*/
public enum JavaVersion {
enum JavaVersion {

/**
* Java 1.6.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
* The names of the classes that must not be present.
* @return the names of the classes that must not be present
*/
public String[] value() default {};
String[] value() default {};

/**
* An alias for {@link #value} specifying the names of the classes that must not be
* present.
* @return the class names that must not be present.
* @deprecated since 1.3.0 in favor of {@link #value}.
*/
public String[] name() default {};
String[] name() default {};

}
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 @@ -40,6 +40,6 @@
* The resources that must be present.
* @return the resource paths that must be present.
*/
public String[] resources() default {};
String[] resources() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public LocalContainerEntityManagerFactoryBean build() {
/**
* A callback for new entity manager factory beans created by a Builder.
*/
public static interface EntityManagerFactoryBeanCallback {
public interface EntityManagerFactoryBeanCallback {

void execute(LocalContainerEntityManagerFactoryBean factory);

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 @@ -38,7 +38,7 @@ public interface ErrorAttributes {
* @param includeStackTrace if stack trace elements should be included
* @return a map of error attributes
*/
public Map<String, Object> getErrorAttributes(RequestAttributes requestAttributes,
Map<String, Object> getErrorAttributes(RequestAttributes requestAttributes,
boolean includeStackTrace);

/**
Expand All @@ -47,6 +47,6 @@ public Map<String, Object> getErrorAttributes(RequestAttributes requestAttribute
* @param requestAttributes the source request attributes
* @return the {@link Exception} that caused the error or {@code null}
*/
public Throwable getError(RequestAttributes requestAttributes);
Throwable getError(RequestAttributes requestAttributes);

}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public interface ErrorController {
* Returns the path of the error page.
* @return the error path
*/
public String getErrorPath();
String getErrorPath();

}
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 @@ -116,7 +116,7 @@ public void before() {

public interface TestInterface {

public abstract void foo();
void foo();

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void serializerWithMixin() throws Exception {
}

@JsonSerialize(using = TomcatDataSourceSerializer.class)
protected static interface DataSourceJson {
protected interface DataSourceJson {
}

protected static class TomcatDataSourceSerializer extends JsonSerializer<DataSource> {
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 @@ -100,7 +100,7 @@ public static void main(String[] args) {
@Import({ EmbeddedServletContainerAutoConfiguration.class,
ServerPropertiesAutoConfiguration.class, JerseyAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class })
protected static @interface MinimalWebConfiguration {
protected @interface MinimalWebConfiguration {
}

}
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 @@ -99,7 +99,7 @@ public static void main(String[] args) {
@Import({ EmbeddedServletContainerAutoConfiguration.class,
ServerPropertiesAutoConfiguration.class, JerseyAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class })
protected static @interface MinimalWebConfiguration {
protected @interface MinimalWebConfiguration {
}

}
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 @@ -99,7 +99,7 @@ public static void main(String[] args) {
@Import({ EmbeddedServletContainerAutoConfiguration.class,
ServerPropertiesAutoConfiguration.class, JerseyAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class })
protected static @interface MinimalWebConfiguration {
protected @interface MinimalWebConfiguration {
}

}
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 @@ -99,7 +99,7 @@ public static void main(String[] args) {
@Import({ EmbeddedServletContainerAutoConfiguration.class,
ServerPropertiesAutoConfiguration.class, JerseyAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class })
protected static @interface MinimalWebConfiguration {
protected @interface MinimalWebConfiguration {
}

}
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 @@ -97,7 +97,7 @@ public static void main(String[] args) {
@Import({ EmbeddedServletContainerAutoConfiguration.class,
ServerPropertiesAutoConfiguration.class, JerseyAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class })
protected static @interface MinimalWebConfiguration {
protected @interface MinimalWebConfiguration {
}

}
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 @@ -97,7 +97,7 @@ public static void main(String[] args) {
@Import({ EmbeddedServletContainerAutoConfiguration.class,
ServerPropertiesAutoConfiguration.class, JerseyAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class })
protected static @interface MinimalWebConfiguration {
protected @interface MinimalWebConfiguration {
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void testPartialPage() throws Exception {
ServerPropertiesAutoConfiguration.class,
DispatcherServletAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class })
protected static @interface MinimalWebConfiguration {
protected @interface MinimalWebConfiguration {
}

@Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void testPartialPage() throws Exception {
ServerPropertiesAutoConfiguration.class,
DispatcherServletAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class })
protected static @interface MinimalWebConfiguration {
protected @interface MinimalWebConfiguration {
}

@Configuration
Expand Down
Loading

0 comments on commit 42e2301

Please sign in to comment.