polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2009 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -25,8 +25,8 @@ import org.springframework.core.NamedInheritableThreadLocal;
|
|||||||
/**
|
/**
|
||||||
* A holder for a thread-local user {@link JodaTimeContext}.
|
* A holder for a thread-local user {@link JodaTimeContext}.
|
||||||
*
|
*
|
||||||
* @since 3.0
|
|
||||||
* @author Keith Donald
|
* @author Keith Donald
|
||||||
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
public final class JodaTimeContextHolder {
|
public final class JodaTimeContextHolder {
|
||||||
|
|
||||||
@@ -51,18 +51,18 @@ public final class JodaTimeContextHolder {
|
|||||||
return jodaTimeContextHolder.get();
|
return jodaTimeContextHolder.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Formatter with the user-specific settings applied to thefrom the base <code>formatter</code>.
|
* Obtain a DateTimeFormatter with user-specific settings applied to the given base Formatter.
|
||||||
* @param formatter the base formatter that establishes default formatting rules, generally user independent
|
* @param formatter the base formatter that establishes default formatting rules
|
||||||
* @param locale the current user locale (may be null if not known)
|
* (generally user independent)
|
||||||
* @return the user's DateTimeFormatter
|
* @param locale the current user locale (may be <code>null</code> if not known)
|
||||||
|
* @return the user-specific DateTimeFormatter
|
||||||
*/
|
*/
|
||||||
public static DateTimeFormatter getFormatter(DateTimeFormatter formatter, Locale locale) {
|
public static DateTimeFormatter getFormatter(DateTimeFormatter formatter, Locale locale) {
|
||||||
if (locale != null) {
|
DateTimeFormatter formatterToUse = (locale != null ? formatter.withLocale(locale) : formatter);
|
||||||
formatter = formatter.withLocale(locale);
|
|
||||||
}
|
|
||||||
JodaTimeContext context = getJodaTimeContext();
|
JodaTimeContext context = getJodaTimeContext();
|
||||||
return (context != null ? context.getFormatter(formatter) : formatter);
|
return (context != null ? context.getFormatter(formatterToUse) : formatterToUse);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2009 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -183,7 +183,7 @@ public class MBeanServerConnectionFactoryBean
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class getTargetClass() {
|
public Class<?> getTargetClass() {
|
||||||
return JMXConnector.class;
|
return JMXConnector.class;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -200,7 +200,7 @@ public class MBeanServerConnectionFactoryBean
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class getTargetClass() {
|
public Class<?> getTargetClass() {
|
||||||
return MBeanServerConnection.class;
|
return MBeanServerConnection.class;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2008 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -49,7 +49,7 @@ public abstract class JndiObjectLocator extends JndiLocatorSupport implements In
|
|||||||
|
|
||||||
private String jndiName;
|
private String jndiName;
|
||||||
|
|
||||||
private Class expectedType;
|
private Class<?> expectedType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,7 +73,7 @@ public abstract class JndiObjectLocator extends JndiLocatorSupport implements In
|
|||||||
* Specify the type that the located JNDI object is supposed
|
* Specify the type that the located JNDI object is supposed
|
||||||
* to be assignable to, if any.
|
* to be assignable to, if any.
|
||||||
*/
|
*/
|
||||||
public void setExpectedType(Class expectedType) {
|
public void setExpectedType(Class<?> expectedType) {
|
||||||
this.expectedType = expectedType;
|
this.expectedType = expectedType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ public abstract class JndiObjectLocator extends JndiLocatorSupport implements In
|
|||||||
* Return the type that the located JNDI object is supposed
|
* Return the type that the located JNDI object is supposed
|
||||||
* to be assignable to, if any.
|
* to be assignable to, if any.
|
||||||
*/
|
*/
|
||||||
public Class getExpectedType() {
|
public Class<?> getExpectedType() {
|
||||||
return this.expectedType;
|
return this.expectedType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2007 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -105,7 +105,7 @@ public class JndiObjectTargetSource extends JndiObjectLocator implements TargetS
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Class getTargetClass() {
|
public Class<?> getTargetClass() {
|
||||||
if (this.cachedObject != null) {
|
if (this.cachedObject != null) {
|
||||||
return this.cachedObject.getClass();
|
return this.cachedObject.getClass();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user