Skip to content

Commit 5a66a33

Browse files
committed
Polishing (typo fixes etc, aligned with 5.0.x)
1 parent 45598ca commit 5a66a33

File tree

34 files changed

+158
-155
lines changed

34 files changed

+158
-155
lines changed

spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Convenient superclass when we want to force subclasses to
2525
* implement MethodMatcher interface, but subclasses
2626
* will want to be pointcuts. The getClassFilter() method can
27-
* be overriden to customize ClassFilter behaviour as well.
27+
* be overridden to customize ClassFilter behaviour as well.
2828
*
2929
* @author Rod Johnson
3030
*/

spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* @author Ramnivas Laddad
4545
* @since 2.0
4646
*/
47-
public final class MethodInvocationProceedingJoinPointTests {
47+
public class MethodInvocationProceedingJoinPointTests {
4848

4949
@Test
5050
public void testingBindingWithJoinPoint() {
@@ -217,7 +217,7 @@ public void before(Method method, Object[] args, Object target) throws Throwable
217217
itb.unreliableFileOperation();
218218
}
219219
catch (IOException ex) {
220-
// we don't realy care...
220+
// we don't really care...
221221
}
222222
}
223223

spring-beans/src/main/java/org/springframework/beans/factory/parsing/ComponentDefinition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
* all {@link BeanReference BeanReferences} that are required to validate the configuration of the
5353
* overall logical entity as well as those required to provide full user visualisation of the configuration.
5454
* It is expected that certain {@link BeanReference BeanReferences} will not be important to
55-
* validation or to the user view of the configuration and as such these may be ommitted. A tool may wish to
55+
* validation or to the user view of the configuration and as such these may be omitted. A tool may wish to
5656
* display any additional {@link BeanReference BeanReferences} sourced through the supplied
5757
* {@link BeanDefinition BeanDefinitions} but this is not considered to be a typical case.
5858
*

spring-beans/src/main/java/org/springframework/beans/support/PagedListHolder.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
2727
* PagedListHolder is a simple state holder for handling lists of objects,
2828
* separating them into pages. Page numbering starts with 0.
2929
*
30-
* <p>This is mainly targetted at usage in web UIs. Typically, an instance will be
30+
* <p>This is mainly targeted at usage in web UIs. Typically, an instance will be
3131
* instantiated with a list of beans, put into the session, and exported as model.
3232
* The properties can all be set/get programmatically, but the most common way will
3333
* be data binding, i.e. populating the bean from request parameters. The getters
@@ -50,8 +50,14 @@
5050
@SuppressWarnings("serial")
5151
public class PagedListHolder<E> implements Serializable {
5252

53+
/**
54+
* The default page size.
55+
*/
5356
public static final int DEFAULT_PAGE_SIZE = 10;
5457

58+
/**
59+
* The default maximum number of page links.
60+
*/
5561
public static final int DEFAULT_MAX_LINKED_PAGES = 10;
5662

5763

spring-context-support/src/main/java/org/springframework/scheduling/commonj/ScheduledTimerListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -173,7 +173,7 @@ public long getDelay() {
173173
* Set the period between repeated task executions, in milliseconds.
174174
* <p>Default is -1, leading to one-time execution. In case of zero or a
175175
* positive value, the task will be executed repeatedly, with the given
176-
* interval inbetween executions.
176+
* interval in-between executions.
177177
* <p>Note that the semantics of the period value vary between fixed-rate
178178
* and fixed-delay execution.
179179
* <p><b>Note:</b> A period of 0 (for example as fixed delay) <i>is</i>

spring-context-support/src/test/resources/org/springframework/scheduling/quartz/quartz-hsql.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- In your Quartz properties file, you'll need to set
33
-- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.HSQLDBDelegate
44
--
5-
-- Column lenghts are only suggestions. For names, groups, use at least 40 chars.
5+
-- Column lengths are only suggestions. For names, groups, use at least 40 chars.
66
-- for blobs (VARBINARY) use a size that is sure to meet the needs of the amount of data
77
-- you place in job data maps, etc..
88
--
Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,39 +23,38 @@
2323

2424
/**
2525
* Strategy interface for parsing known caching annotation types.
26-
* {@link AnnotationCacheOperationSource} delegates to such
27-
* parsers for supporting specific annotation types such as Spring's own
28-
* {@link Cacheable}, {@link CachePut} or {@link CacheEvict}.
26+
* {@link AnnotationCacheOperationSource} delegates to such parsers
27+
* for supporting specific annotation types such as Spring's own
28+
* {@link Cacheable}, {@link CachePut} and{@link CacheEvict}.
2929
*
3030
* @author Costin Leau
3131
* @author Stephane Nicoll
3232
* @since 3.1
33+
* @see AnnotationCacheOperationSource
34+
* @see SpringCacheAnnotationParser
3335
*/
3436
public interface CacheAnnotationParser {
3537

3638
/**
37-
* Parses the cache definition for the given class,
38-
* based on a known annotation type.
39-
* <p>This essentially parses a known cache annotation into Spring's
40-
* metadata attribute class. Returns {@code null} if the class
41-
* is not cacheable.
39+
* Parse the cache definition for the given class,
40+
* based on an annotation type understood by this parser.
41+
* <p>This essentially parses a known cache annotation into Spring's metadata
42+
* attribute class. Returns {@code null} if the class is not cacheable.
4243
* @param type the annotated class
43-
* @return CacheOperation the configured caching operation,
44-
* or {@code null} if none was found
44+
* @return the configured caching operation, or {@code null} if none found
4545
* @see AnnotationCacheOperationSource#findCacheOperations(Class)
4646
*/
4747
Collection<CacheOperation> parseCacheAnnotations(Class<?> type);
4848

4949
/**
50-
* Parses the cache definition for the given method,
51-
* based on a known annotation type.
52-
* <p>This essentially parses a known cache annotation into Spring's
53-
* metadata attribute class. Returns {@code null} if the method
54-
* is not cacheable.
50+
* Parse the cache definition for the given method,
51+
* based on an annotation type understood by this parser.
52+
* <p>This essentially parses a known cache annotation into Spring's metadata
53+
* attribute class. Returns {@code null} if the method is not cacheable.
5554
* @param method the annotated method
56-
* @return CacheOperation the configured caching operation,
57-
* or {@code null} if none was found
55+
* @return the configured caching operation, or {@code null} if none found
5856
* @see AnnotationCacheOperationSource#findCacheOperations(Method)
5957
*/
6058
Collection<CacheOperation> parseCacheAnnotations(Method method);
59+
6160
}

spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -55,7 +55,7 @@ public abstract class AbstractFallbackCacheOperationSource implements CacheOpera
5555
* Canonical value held in cache to indicate no caching attribute was
5656
* found for this method and we don't need to look again.
5757
*/
58-
private final static Collection<CacheOperation> NULL_CACHING_ATTRIBUTE = Collections.emptyList();
58+
private static final Collection<CacheOperation> NULL_CACHING_ATTRIBUTE = Collections.emptyList();
5959

6060

6161
/**
@@ -163,22 +163,20 @@ private Collection<CacheOperation> computeCacheOperations(Method method, Class<?
163163

164164

165165
/**
166-
* Subclasses need to implement this to return the caching attribute
167-
* for the given method, if any.
168-
* @param method the method to retrieve the attribute for
169-
* @return all caching attribute associated with this method
170-
* (or {@code null} if none)
166+
* Subclasses need to implement this to return the caching attribute for the
167+
* given class, if any.
168+
* @param clazz the class to retrieve the attribute for
169+
* @return all caching attribute associated with this class, or {@code null} if none
171170
*/
172-
protected abstract Collection<CacheOperation> findCacheOperations(Method method);
171+
protected abstract Collection<CacheOperation> findCacheOperations(Class<?> clazz);
173172

174173
/**
175-
* Subclasses need to implement this to return the caching attribute
176-
* for the given class, if any.
177-
* @param clazz the class to retrieve the attribute for
178-
* @return all caching attribute associated with this class
179-
* (or {@code null} if none)
174+
* Subclasses need to implement this to return the caching attribute for the
175+
* given method, if any.
176+
* @param method the method to retrieve the attribute for
177+
* @return all caching attribute associated with this method, or {@code null} if none
180178
*/
181-
protected abstract Collection<CacheOperation> findCacheOperations(Class<?> clazz);
179+
protected abstract Collection<CacheOperation> findCacheOperations(Method method);
182180

183181
/**
184182
* Should only public methods be allowed to have caching semantics?

spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -53,8 +53,8 @@ public interface ConfigurableApplicationContext extends ApplicationContext, Life
5353
/**
5454
* Name of the ConversionService bean in the factory.
5555
* If none is supplied, default conversion rules apply.
56-
* @see org.springframework.core.convert.ConversionService
5756
* @since 3.0
57+
* @see org.springframework.core.convert.ConversionService
5858
*/
5959
String CONVERSION_SERVICE_BEAN_NAME = "conversionService";
6060

@@ -196,7 +196,7 @@ public interface ConfigurableApplicationContext extends ApplicationContext, Life
196196
* will already have been instantiated before. Use a BeanFactoryPostProcessor
197197
* to intercept the BeanFactory setup process before beans get touched.
198198
* <p>Generally, this internal factory will only be accessible while the context
199-
* is active, that is, inbetween {@link #refresh()} and {@link #close()}.
199+
* is active, that is, in-between {@link #refresh()} and {@link #close()}.
200200
* The {@link #isActive()} flag can be used to check whether the context
201201
* is in an appropriate state.
202202
* @return the underlying bean factory

spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -334,7 +334,7 @@ protected ModelMBeanAttributeInfo[] getAttributeInfo(Object managedBean, String
334334
/**
335335
* Iterate through all methods on the MBean class and gives subclasses the chance
336336
* to vote on their inclusion. If a particular method corresponds to the accessor
337-
* or mutator of an attribute that is inclued in the managment interface, then
337+
* or mutator of an attribute that is included in the management interface, then
338338
* the corresponding operation is exposed with the &quot;role&quot; descriptor
339339
* field set to the appropriate value.
340340
* @param managedBean the bean instance (might be an AOP proxy)
@@ -358,25 +358,23 @@ protected ModelMBeanOperationInfo[] getOperationInfo(Object managedBean, String
358358

359359
ModelMBeanOperationInfo info = null;
360360
PropertyDescriptor pd = BeanUtils.findPropertyForMethod(method);
361-
if (pd != null) {
362-
if ((method.equals(pd.getReadMethod()) && includeReadAttribute(method, beanKey)) ||
363-
(method.equals(pd.getWriteMethod()) && includeWriteAttribute(method, beanKey))) {
364-
// Attributes need to have their methods exposed as
365-
// operations to the JMX server as well.
366-
info = createModelMBeanOperationInfo(method, pd.getName(), beanKey);
367-
Descriptor desc = info.getDescriptor();
368-
if (method.equals(pd.getReadMethod())) {
369-
desc.setField(FIELD_ROLE, ROLE_GETTER);
370-
}
371-
else {
372-
desc.setField(FIELD_ROLE, ROLE_SETTER);
373-
}
374-
desc.setField(FIELD_VISIBILITY, ATTRIBUTE_OPERATION_VISIBILITY);
375-
if (isExposeClassDescriptor()) {
376-
desc.setField(FIELD_CLASS, getClassForDescriptor(managedBean).getName());
377-
}
378-
info.setDescriptor(desc);
361+
if (pd != null && ((method.equals(pd.getReadMethod()) && includeReadAttribute(method, beanKey)) ||
362+
(method.equals(pd.getWriteMethod()) && includeWriteAttribute(method, beanKey)))) {
363+
// Attributes need to have their methods exposed as
364+
// operations to the JMX server as well.
365+
info = createModelMBeanOperationInfo(method, pd.getName(), beanKey);
366+
Descriptor desc = info.getDescriptor();
367+
if (method.equals(pd.getReadMethod())) {
368+
desc.setField(FIELD_ROLE, ROLE_GETTER);
369+
}
370+
else {
371+
desc.setField(FIELD_ROLE, ROLE_SETTER);
372+
}
373+
desc.setField(FIELD_VISIBILITY, ATTRIBUTE_OPERATION_VISIBILITY);
374+
if (isExposeClassDescriptor()) {
375+
desc.setField(FIELD_CLASS, getClassForDescriptor(managedBean).getName());
379376
}
377+
info.setDescriptor(desc);
380378
}
381379

382380
// allow getters and setters to be marked as operations directly

0 commit comments

Comments
 (0)