Polish static finals
Closes gh-12083
This commit is contained in:
committed by
Phillip Webb
parent
752a42710c
commit
fe023817c7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -52,7 +52,7 @@ import org.springframework.util.StringUtils;
|
||||
public class JndiConnectionFactoryAutoConfiguration {
|
||||
|
||||
// Keep these in sync with the condition below
|
||||
private static String[] JNDI_LOCATIONS = { "java:/JmsXA",
|
||||
private static final String[] JNDI_LOCATIONS = { "java:/JmsXA",
|
||||
"java:/XAConnectionFactory" };
|
||||
|
||||
private final JmsProperties properties;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -59,7 +59,7 @@ public class HibernateJpaAutoConfiguration {
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE + 20)
|
||||
static class HibernateEntityManagerCondition extends SpringBootCondition {
|
||||
|
||||
private static String[] CLASS_NAMES = {
|
||||
private static final String[] CLASS_NAMES = {
|
||||
"org.hibernate.ejb.HibernateEntityManager",
|
||||
"org.hibernate.jpa.HibernateEntityManager" };
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -46,10 +46,10 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
public class WebConversionService extends DefaultFormattingConversionService {
|
||||
|
||||
private static final boolean jsr354Present = ClassUtils.isPresent(
|
||||
private static final boolean JSR_354_PRESENT = ClassUtils.isPresent(
|
||||
"javax.money.MonetaryAmount", WebConversionService.class.getClassLoader());
|
||||
|
||||
private static final boolean jodaTimePresent = ClassUtils.isPresent(
|
||||
private static final boolean JODA_TIME_PRESENT = ClassUtils.isPresent(
|
||||
"org.joda.time.LocalDate", WebConversionService.class.getClassLoader());
|
||||
|
||||
private final String dateFormat;
|
||||
@@ -72,14 +72,14 @@ public class WebConversionService extends DefaultFormattingConversionService {
|
||||
|
||||
private void addFormatters() {
|
||||
addFormatterForFieldAnnotation(new NumberFormatAnnotationFormatterFactory());
|
||||
if (jsr354Present) {
|
||||
if (JSR_354_PRESENT) {
|
||||
addFormatter(new CurrencyUnitFormatter());
|
||||
addFormatter(new MonetaryAmountFormatter());
|
||||
addFormatterForFieldAnnotation(
|
||||
new Jsr354NumberFormatAnnotationFormatterFactory());
|
||||
}
|
||||
registerJsr310();
|
||||
if (jodaTimePresent) {
|
||||
if (JODA_TIME_PRESENT) {
|
||||
registerJodaTime();
|
||||
}
|
||||
registerJavaDate();
|
||||
|
||||
Reference in New Issue
Block a user