Skip to content

Commit 55b0c2f

Browse files
committed
Polishing
1 parent 1c256a1 commit 55b0c2f

File tree

4 files changed

+34
-41
lines changed

4 files changed

+34
-41
lines changed

spring-core/src/main/java/org/springframework/core/convert/support/AbstractConditionalEnumConverter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 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.
@@ -39,7 +39,7 @@ protected AbstractConditionalEnumConverter(ConversionService conversionService)
3939

4040
@Override
4141
public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) {
42-
for (Class<?> interfaceType : ClassUtils.getAllInterfacesForClass(sourceType.getType())) {
42+
for (Class<?> interfaceType : ClassUtils.getAllInterfacesForClassAsSet(sourceType.getType())) {
4343
if (this.conversionService.canConvert(TypeDescriptor.valueOf(interfaceType), targetType)) {
4444
return false;
4545
}

spring-expression/src/main/java/org/springframework/expression/spel/ast/Projection.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ private Class<?> determineCommonType(@Nullable Class<?> oldType, Class<?> newTyp
153153
}
154154
nextType = nextType.getSuperclass();
155155
}
156-
Class<?>[] interfaces = ClassUtils.getAllInterfacesForClass(newType);
157-
for (Class<?> nextInterface : interfaces) {
156+
for (Class<?> nextInterface : ClassUtils.getAllInterfacesForClassAsSet(newType)) {
158157
if (nextInterface.isAssignableFrom(oldType)) {
159158
return nextInterface;
160159
}

src/docs/asciidoc/data-access.adoc

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,7 +2034,7 @@ treats them as errors.
20342034

20352035

20362036
[[transaction-resources]]
2037-
=== Further Resources
2037+
=== Further resources
20382038

20392039
For more information about the Spring Framework's transaction support:
20402040

@@ -2457,7 +2457,7 @@ last code snippet as follows:
24572457
----
24582458

24592459
[[jdbc-JdbcTemplate-examples-update]]
2460-
====== Updating (INSERT/UPDATE/DELETE) with jdbcTemplate
2460+
====== Updating (INSERT/UPDATE/DELETE) with JdbcTemplate
24612461

24622462
You use the `update(..)` method to perform insert, update and delete operations.
24632463
Parameter values are usually provided as var args or alternatively as an object array.
@@ -2487,7 +2487,7 @@ Parameter values are usually provided as var args or alternatively as an object
24872487
----
24882488

24892489
[[jdbc-JdbcTemplate-examples-other]]
2490-
====== Other jdbcTemplate operations
2490+
====== Other JdbcTemplate operations
24912491

24922492
You can use the `execute(..)` method to execute any arbitrary SQL, and as such the
24932493
method is often used for DDL statements. It is heavily overloaded with variants taking
@@ -3348,7 +3348,6 @@ The same example using classic JDBC "?" placeholders:
33483348
}
33493349
33503350
// ... additional methods
3351-
33523351
}
33533352
----
33543353

@@ -3398,7 +3397,6 @@ This example shows a batch update using a batch size of 100:
33983397
}
33993398
34003399
// ... additional methods
3401-
34023400
}
34033401
----
34043402

@@ -3540,7 +3538,6 @@ You can limit the columns for an insert by specifying a list of column names wit
35403538
}
35413539
35423540
// ... additional methods
3543-
35443541
}
35453542
----
35463543

@@ -3580,7 +3577,6 @@ values. Here is an example:
35803577
}
35813578
35823579
// ... additional methods
3583-
35843580
}
35853581
----
35863582

@@ -3611,7 +3607,6 @@ convenient `addValue` method that can be chained.
36113607
}
36123608
36133609
// ... additional methods
3614-
36153610
}
36163611
----
36173612

@@ -3683,7 +3678,6 @@ of the stored procedure.
36833678
}
36843679
36853680
// ... additional methods
3686-
36873681
}
36883682
----
36893683

@@ -3724,7 +3718,6 @@ the constructor of your `SimpleJdbcCall`. Here is an example of this configurati
37243718
}
37253719
37263720
// ... additional methods
3727-
37283721
}
37293722
----
37303723

@@ -3883,7 +3876,6 @@ To call this function we again create a `SimpleJdbcCall` in the initialization m
38833876
}
38843877
38853878
// ... additional methods
3886-
38873879
}
38883880
----
38893881

@@ -3943,7 +3935,6 @@ created by passing in the required class to map to in the `newInstance` method.
39433935
}
39443936
39453937
// ... additional methods
3946-
39473938
}
39483939
----
39493940

@@ -5759,6 +5750,7 @@ thus are isolated from each other.
57595750

57605751
[[orm-jpa-multiple]]
57615752
===== Dealing with multiple persistence units
5753+
57625754
For applications that rely on multiple persistence units locations, stored in various
57635755
JARS in the classpath, for example, Spring offers the `PersistenceUnitManager` to act as
57645756
a central repository and to avoid the persistence units discovery process, which can be
@@ -6038,6 +6030,7 @@ less portable, but will be set up for the server's JTA environment out of the bo
60386030

60396031
[[oxm-introduction]]
60406032
=== Introduction
6033+
60416034
In this chapter, we will describe Spring's Object/XML Mapping support. Object/XML
60426035
Mapping, or O/X mapping for short, is the act of converting an XML document to and from
60436036
an object. This conversion process is also known as XML Marshalling, or XML
@@ -6055,12 +6048,12 @@ Some of the benefits of using Spring for your O/X mapping needs are:
60556048

60566049
Spring's bean factory makes it easy to configure marshallers, without needing to
60576050
construct JAXB context, JiBX binding factories, etc. The marshallers can be configured
6058-
as any other bean in your application context. Additionally, XML Schema-based
6051+
as any other bean in your application context. Additionally, XML namespace-based
60596052
configuration is available for a number of marshallers, making the configuration even
60606053
simpler.
60616054

60626055

6063-
==== Consistent Interfaces
6056+
==== Consistent interfaces
60646057

60656058
Spring's O/X mapping operates through two global interfaces: the `Marshaller` and
60666059
`Unmarshaller` interface. These abstractions allow you to switch O/X mapping frameworks
@@ -6071,7 +6064,7 @@ other using Castor) in a non-intrusive fashion, leveraging the strength of each
60716064
technology.
60726065

60736066

6074-
==== Consistent Exception Hierarchy
6067+
==== Consistent exception hierarchy
60756068

60766069
Spring provides a conversion from exceptions from the underlying O/X mapping tool to its
60776070
own exception hierarchy with the `XmlMappingException` as the root exception. As can be
@@ -6322,7 +6315,7 @@ This sample application produces the following `settings.xml` file:
63226315

63236316

63246317
[[oxm-schema-based-config]]
6325-
=== XML Schema-based Configuration
6318+
=== XML configuration namespace
63266319

63276320
Marshallers could be configured more concisely using tags from the OXM namespace. To
63286321
make these tags available, the appropriate schema has to be referenced first in the
@@ -6397,7 +6390,7 @@ validation is performed by specifying one or more schema resource to the bean, l
63976390
----
63986391

63996392
[[oxm-jaxb2-xsd]]
6400-
===== XML Schema-based Configuration
6393+
===== XML configuration namespace
64016394

64026395
The `jaxb2-marshaller` tag configures a `org.springframework.oxm.jaxb.Jaxb2Marshaller`.
64036396
Here is an example:
@@ -6488,7 +6481,7 @@ with a classpath resource.
64886481
----
64896482

64906483
[[oxm-castor-xsd]]
6491-
===== XML Schema-based Configuration
6484+
===== XML configuration namespace
64926485

64936486
The `castor-marshaller` tag configures a
64946487
`org.springframework.oxm.castor.CastorMarshaller`. Here is an example:
@@ -6574,7 +6567,7 @@ classes, you have to configure multiple ``JibxMarshaller``s with different `targ
65746567
property values.
65756568

65766569
[[oxm-jibx-xsd]]
6577-
===== XML Schema-based Configuration
6570+
===== XML configuration namespace
65786571

65796572
The `jibx-marshaller` tag configures a `org.springframework.oxm.jibx.JibxMarshaller`.
65806573
Here is an example:

src/docs/asciidoc/integration.adoc

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,7 @@ to serialize only a subset of the object properties. For example:
12311231

12321232

12331233
[[rest-message-conversion]]
1234-
==== HTTP Message Conversion
1234+
==== HTTP message conversion
12351235

12361236
Objects passed to and returned from the methods `getForObject()`, `postForLocation()`,
12371237
and `put()` are converted to HTTP requests and from HTTP responses by
@@ -1354,6 +1354,7 @@ Please use the <<web-reactive.adoc#webflux-client,WebClient>> instead.
13541354

13551355
[[ejb-introduction]]
13561356
=== Introduction
1357+
13571358
As a lightweight container, Spring is often considered an EJB replacement. We do believe
13581359
that for many if not most applications and use cases, Spring as a container, combined
13591360
with its rich supporting functionality in the area of transactions, ORM and JDBC access,
@@ -2031,7 +2032,7 @@ these callback methods.
20312032

20322033

20332034
[[jms-receiving-sync]]
2034-
==== Synchronous Reception
2035+
==== Synchronous reception
20352036

20362037
While JMS is typically associated with asynchronous processing, it is possible to
20372038
consume messages synchronously. The overloaded `receive(..)` methods provide this
@@ -2042,7 +2043,7 @@ the receiver should wait before giving up waiting for a message.
20422043

20432044

20442045
[[jms-asynchronousMessageReception]]
2045-
==== Asynchronous Reception - Message-Driven POJOs
2046+
==== Asynchronous reception: Message-Driven POJOs
20462047

20472048
[NOTE]
20482049
====
@@ -2113,7 +2114,7 @@ description of the features supported by each implementation.
21132114

21142115

21152116
[[jms-receiving-async-session-aware-message-listener]]
2116-
==== the SessionAwareMessageListener interface
2117+
==== SessionAwareMessageListener interface
21172118

21182119
The `SessionAwareMessageListener` interface is a Spring-specific interface that provides
21192120
a similar contract to the JMS `MessageListener` interface, but also provides the message
@@ -2148,7 +2149,7 @@ responsibility of the client code to handle any exceptions thrown.
21482149

21492150

21502151
[[jms-receiving-async-message-listener-adapter]]
2151-
==== the MessageListenerAdapter
2152+
==== MessageListenerAdapter
21522153

21532154
The `MessageListenerAdapter` class is the final component in Spring's asynchronous
21542155
messaging support: in a nutshell, it allows you to expose almost __any__ class as a MDP
@@ -3369,7 +3370,7 @@ for controlling the management interfaces of your beans.
33693370

33703371

33713372
[[jmx-interface-assembler]]
3372-
==== the MBeanInfoAssembler Interface
3373+
==== MBeanInfoAssembler interface
33733374

33743375
Behind the scenes, the `MBeanExporter` delegates to an implementation of the
33753376
`org.springframework.jmx.export.assembler.MBeanInfoAssembler` interface which is
@@ -3383,7 +3384,7 @@ interface using either source-level metadata or any arbitrary interface.
33833384

33843385

33853386
[[jmx-interface-metadata]]
3386-
==== Using Source-Level Metadata (Java annotations)
3387+
==== Using source-level metadata: Java annotations
33873388

33883389
Using the `MetadataMBeanInfoAssembler` you can define the management interfaces for your
33893390
beans using source level metadata. The reading of metadata is encapsulated by the
@@ -3526,12 +3527,12 @@ metadata-driven management interfaces for your Spring-exposed MBeans.
35263527

35273528

35283529
[[jmx-interface-metadata-types]]
3529-
==== Source-Level Metadata Types
3530+
==== Source-level metadata types
35303531

35313532
The following source level metadata types are available for use in Spring JMX:
35323533

35333534
[[jmx-metadata-types]]
3534-
.Source-Level Metadata Types
3535+
.Source-level metadata types
35353536
|===
35363537
| Purpose| Annotation| Annotation Type
35373538

@@ -3556,7 +3557,7 @@ The following configuration parameters are available for use on these source-lev
35563557
metadata types:
35573558

35583559
[[jmx-metadata-parameters]]
3559-
.Source-Level Metadata Parameters
3560+
.Source-level metadata parameters
35603561
[cols="1,3,1"]
35613562
|===
35623563
| Parameter| Description| Applies to
@@ -3612,7 +3613,7 @@ metadata types:
36123613

36133614

36143615
[[jmx-interface-autodetect]]
3615-
==== the AutodetectCapableMBeanInfoAssembler interface
3616+
==== AutodetectCapableMBeanInfoAssembler interface
36163617

36173618
To simplify configuration even further, Spring introduces the
36183619
`AutodetectCapableMBeanInfoAssembler` interface which extends the `MBeanInfoAssembler`
@@ -3971,7 +3972,7 @@ connectors.
39713972

39723973

39733974
[[jmx-jsr160-server]]
3974-
==== Server-side Connectors
3975+
==== Server-side connectors
39753976

39763977
To have Spring JMX create, start and expose a JSR-160 `JMXConnectorServer` use the
39773978
following configuration:
@@ -4042,7 +4043,7 @@ snippet of configuration:
40424043

40434044

40444045
[[jmx-jsr160-client]]
4045-
==== Client-side Connectors
4046+
==== Client-side connectors
40464047

40474048
To create an `MBeanServerConnection` to a remote JSR-160 enabled `MBeanServer` use the
40484049
`MBeanServerConnectionFactoryBean` as shown below:
@@ -4080,7 +4081,7 @@ documentation for more information.
40804081

40814082

40824083
[[jmx-proxy]]
4083-
=== Accessing MBeans via Proxies
4084+
=== Accessing MBeans via proxies
40844085

40854086
Spring JMX allows you to create proxies that re-route calls to MBeans registered in a
40864087
local or remote `MBeanServer`. These proxies provide you with a standard Java interface
@@ -4137,7 +4138,7 @@ Spring's JMX offering includes comprehensive support for JMX notifications.
41374138

41384139

41394140
[[jmx-notifications-listeners]]
4140-
==== Registering Listeners for Notifications
4141+
==== Registering listeners for notifications
41414142

41424143
Spring's JMX support makes it very easy to register any number of
41434144
`NotificationListeners` with any number of MBeans (this includes MBeans exported by
@@ -4442,7 +4443,7 @@ you can accept the coupling to both Spring and JMX, then do so.
44424443

44434444

44444445
[[jmx-resources]]
4445-
=== Further Resources
4446+
=== Further resources
44464447

44474448
This section contains links to further resources about JMX.
44484449

@@ -6123,7 +6124,7 @@ much more flexible.
61236124

61246125

61256126
[[scheduling-trigger-interface]]
6126-
==== the Trigger interface
6127+
==== Trigger interface
61276128

61286129
The `Trigger` interface is essentially inspired by JSR-236, which, as of Spring 3.0, has
61296130
not yet been officially implemented. The basic idea of the `Trigger` is that execution
@@ -6850,7 +6851,7 @@ javadocs] for more information.
68506851
=== Introduction
68516852

68526853
Since version 3.1, Spring Framework provides support for transparently adding caching
6853-
into an existing Spring application. Similar to the <<data-acess.adoc#transaction,transaction>>
6854+
into an existing Spring application. Similar to the <<data-access.adoc#transaction,transaction>>
68546855
support, the caching abstraction allows consistent use of various caching solutions with minimal
68556856
impact on the code.
68566857

0 commit comments

Comments
 (0)