Skip to content

Commit 65e1337

Browse files
committed
Polishing
1 parent a4c2f29 commit 65e1337

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

spring-aspects/src/test/java/org/springframework/beans/factory/aspectj/SpringConfiguredWithAutoProxyingTests.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@
2020

2121
import org.springframework.context.support.ClassPathXmlApplicationContext;
2222

23-
public class SpringConfiguredWithAutoProxyingTests {
23+
/**
24+
* @author Ramnivas Laddad
25+
* @author Juergen Hoeller
26+
*/
27+
class SpringConfiguredWithAutoProxyingTests {
2428

2529
@Test
2630
void springConfiguredAndAutoProxyUsedTogether() {
27-
// instantiation is sufficient to trigger failure if this is going to fail...
2831
new ClassPathXmlApplicationContext("org/springframework/beans/factory/aspectj/springConfigured.xml");
2932
}
3033

spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitReader.java

+8-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -154,7 +154,7 @@ public SpringPersistenceUnitInfo[] readPersistenceUnitInfos(String[] persistence
154154
/**
155155
* Validate the given stream and return a valid DOM document for parsing.
156156
*/
157-
protected Document buildDocument(ErrorHandler handler, InputStream stream)
157+
Document buildDocument(ErrorHandler handler, InputStream stream)
158158
throws ParserConfigurationException, SAXException, IOException {
159159

160160
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
@@ -168,9 +168,7 @@ protected Document buildDocument(ErrorHandler handler, InputStream stream)
168168
/**
169169
* Parse the validated document and add entries to the given unit info list.
170170
*/
171-
protected List<SpringPersistenceUnitInfo> parseDocument(
172-
Resource resource, Document document, List<SpringPersistenceUnitInfo> infos) throws IOException {
173-
171+
void parseDocument(Resource resource, Document document, List<SpringPersistenceUnitInfo> infos) throws IOException {
174172
Element persistence = document.getDocumentElement();
175173
String version = persistence.getAttribute(PERSISTENCE_VERSION);
176174
URL rootUrl = determinePersistenceUnitRootUrl(resource);
@@ -179,14 +177,12 @@ protected List<SpringPersistenceUnitInfo> parseDocument(
179177
for (Element unit : units) {
180178
infos.add(parsePersistenceUnitInfo(unit, version, rootUrl));
181179
}
182-
183-
return infos;
184180
}
185181

186182
/**
187183
* Parse the unit info DOM element.
188184
*/
189-
protected SpringPersistenceUnitInfo parsePersistenceUnitInfo(
185+
SpringPersistenceUnitInfo parsePersistenceUnitInfo(
190186
Element persistenceUnit, String version, @Nullable URL rootUrl) throws IOException {
191187

192188
SpringPersistenceUnitInfo unitInfo = new SpringPersistenceUnitInfo();
@@ -253,7 +249,7 @@ protected SpringPersistenceUnitInfo parsePersistenceUnitInfo(
253249
/**
254250
* Parse the {@code property} XML elements.
255251
*/
256-
protected void parseProperties(Element persistenceUnit, SpringPersistenceUnitInfo unitInfo) {
252+
void parseProperties(Element persistenceUnit, SpringPersistenceUnitInfo unitInfo) {
257253
Element propRoot = DomUtils.getChildElementByTagName(persistenceUnit, PROPERTIES);
258254
if (propRoot == null) {
259255
return;
@@ -269,7 +265,7 @@ protected void parseProperties(Element persistenceUnit, SpringPersistenceUnitInf
269265
/**
270266
* Parse the {@code class} XML elements.
271267
*/
272-
protected void parseManagedClasses(Element persistenceUnit, SpringPersistenceUnitInfo unitInfo) {
268+
void parseManagedClasses(Element persistenceUnit, SpringPersistenceUnitInfo unitInfo) {
273269
List<Element> classes = DomUtils.getChildElementsByTagName(persistenceUnit, MANAGED_CLASS_NAME);
274270
for (Element element : classes) {
275271
String value = DomUtils.getTextValue(element).trim();
@@ -282,7 +278,7 @@ protected void parseManagedClasses(Element persistenceUnit, SpringPersistenceUni
282278
/**
283279
* Parse the {@code mapping-file} XML elements.
284280
*/
285-
protected void parseMappingFiles(Element persistenceUnit, SpringPersistenceUnitInfo unitInfo) {
281+
void parseMappingFiles(Element persistenceUnit, SpringPersistenceUnitInfo unitInfo) {
286282
List<Element> files = DomUtils.getChildElementsByTagName(persistenceUnit, MAPPING_FILE_NAME);
287283
for (Element element : files) {
288284
String value = DomUtils.getTextValue(element).trim();
@@ -295,7 +291,7 @@ protected void parseMappingFiles(Element persistenceUnit, SpringPersistenceUnitI
295291
/**
296292
* Parse the {@code jar-file} XML elements.
297293
*/
298-
protected void parseJarFiles(Element persistenceUnit, SpringPersistenceUnitInfo unitInfo) throws IOException {
294+
void parseJarFiles(Element persistenceUnit, SpringPersistenceUnitInfo unitInfo) throws IOException {
299295
List<Element> jars = DomUtils.getChildElementsByTagName(persistenceUnit, JAR_FILE_URL);
300296
for (Element element : jars) {
301297
String value = DomUtils.getTextValue(element).trim();

0 commit comments

Comments
 (0)