@@ -54,7 +54,7 @@ private static String name(SmartContextLoader loader) {
54
54
55
55
private static void delegateProcessing (SmartContextLoader loader , ContextConfigurationAttributes configAttributes ) {
56
56
if (logger .isDebugEnabled ()) {
57
- logger .debug (String .format ("Delegating to %s to process context configuration [%s] ." , name (loader ),
57
+ logger .debug (String .format ("Delegating to %s to process context configuration %s ." , name (loader ),
58
58
configAttributes ));
59
59
}
60
60
loader .processContextConfiguration (configAttributes );
@@ -77,7 +77,7 @@ public void processContextConfiguration(final ContextConfigurationAttributes con
77
77
if (configAttributes .hasLocations () && configAttributes .hasClasses ()) {
78
78
throw new IllegalStateException (String .format (
79
79
"Cannot process locations AND configuration classes for context "
80
- + "configuration [%s] ; configure one or the other, but not both." , configAttributes ));
80
+ + "configuration %s ; configure one or the other, but not both." , configAttributes ));
81
81
}
82
82
83
83
// If the original locations or classes were not empty, there's no
@@ -98,14 +98,14 @@ else if (configAttributes.hasClasses()) {
98
98
99
99
if (xmlLoaderDetectedDefaults ) {
100
100
if (logger .isInfoEnabled ()) {
101
- logger .info (String .format ("%s detected default locations for context configuration [%s] ." ,
101
+ logger .info (String .format ("%s detected default locations for context configuration %s ." ,
102
102
name (xmlLoader ), configAttributes ));
103
103
}
104
104
}
105
105
106
106
if (configAttributes .hasClasses ()) {
107
107
throw new IllegalStateException (String .format (
108
- "%s should NOT have detected default configuration classes for context configuration [%s] ." ,
108
+ "%s should NOT have detected default configuration classes for context configuration %s ." ,
109
109
name (xmlLoader ), configAttributes ));
110
110
}
111
111
@@ -115,28 +115,28 @@ else if (configAttributes.hasClasses()) {
115
115
if (configAttributes .hasClasses ()) {
116
116
if (logger .isInfoEnabled ()) {
117
117
logger .info (String .format (
118
- "%s detected default configuration classes for context configuration [%s] ." ,
118
+ "%s detected default configuration classes for context configuration %s ." ,
119
119
name (annotationLoader ), configAttributes ));
120
120
}
121
121
}
122
122
123
123
if (!xmlLoaderDetectedDefaults && configAttributes .hasLocations ()) {
124
124
throw new IllegalStateException (String .format (
125
- "%s should NOT have detected default locations for context configuration [%s] ." ,
125
+ "%s should NOT have detected default locations for context configuration %s ." ,
126
126
name (annotationLoader ), configAttributes ));
127
127
}
128
128
129
129
// If neither loader detected defaults, throw an exception.
130
130
if (!configAttributes .hasResources ()) {
131
131
throw new IllegalStateException (String .format (
132
- "Neither %s nor %s was able to detect defaults for context configuration [%s] ." , name (xmlLoader ),
132
+ "Neither %s nor %s was able to detect defaults for context configuration %s ." , name (xmlLoader ),
133
133
name (annotationLoader ), configAttributes ));
134
134
}
135
135
136
136
if (configAttributes .hasLocations () && configAttributes .hasClasses ()) {
137
137
String message = String .format (
138
138
"Configuration error: both default locations AND default configuration classes "
139
- + "were detected for context configuration [%s] ; configure one or the other, but not both." ,
139
+ + "were detected for context configuration %s ; configure one or the other, but not both." ,
140
140
configAttributes );
141
141
logger .error (message );
142
142
throw new IllegalStateException (message );
@@ -157,15 +157,14 @@ public ApplicationContext loadContext(MergedContextConfiguration mergedConfig) t
157
157
for (SmartContextLoader loader : candidates ) {
158
158
if (supports (loader , mergedConfig )) {
159
159
if (logger .isDebugEnabled ()) {
160
- logger .debug (String .format ("Delegating to %s to load context from [%s]." , name (loader ),
161
- mergedConfig ));
160
+ logger .debug (String .format ("Delegating to %s to load context from %s." , name (loader ), mergedConfig ));
162
161
}
163
162
return loader .loadContext (mergedConfig );
164
163
}
165
164
}
166
165
167
166
throw new IllegalStateException (String .format (
168
- "Neither %s nor %s was able to load an ApplicationContext from [%s] ." , name (xmlLoader ),
167
+ "Neither %s nor %s was able to load an ApplicationContext from %s ." , name (xmlLoader ),
169
168
name (annotationLoader ), mergedConfig ));
170
169
}
171
170
0 commit comments