@@ -54,7 +54,7 @@ private static String name(SmartContextLoader loader) {
5454
5555 private static void delegateProcessing (SmartContextLoader loader , ContextConfigurationAttributes configAttributes ) {
5656 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 ),
5858 configAttributes ));
5959 }
6060 loader .processContextConfiguration (configAttributes );
@@ -77,7 +77,7 @@ public void processContextConfiguration(final ContextConfigurationAttributes con
7777 if (configAttributes .hasLocations () && configAttributes .hasClasses ()) {
7878 throw new IllegalStateException (String .format (
7979 "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 ));
8181 }
8282
8383 // If the original locations or classes were not empty, there's no
@@ -98,14 +98,14 @@ else if (configAttributes.hasClasses()) {
9898
9999 if (xmlLoaderDetectedDefaults ) {
100100 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 ." ,
102102 name (xmlLoader ), configAttributes ));
103103 }
104104 }
105105
106106 if (configAttributes .hasClasses ()) {
107107 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 ." ,
109109 name (xmlLoader ), configAttributes ));
110110 }
111111
@@ -115,28 +115,28 @@ else if (configAttributes.hasClasses()) {
115115 if (configAttributes .hasClasses ()) {
116116 if (logger .isInfoEnabled ()) {
117117 logger .info (String .format (
118- "%s detected default configuration classes for context configuration [%s] ." ,
118+ "%s detected default configuration classes for context configuration %s ." ,
119119 name (annotationLoader ), configAttributes ));
120120 }
121121 }
122122
123123 if (!xmlLoaderDetectedDefaults && configAttributes .hasLocations ()) {
124124 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 ." ,
126126 name (annotationLoader ), configAttributes ));
127127 }
128128
129129 // If neither loader detected defaults, throw an exception.
130130 if (!configAttributes .hasResources ()) {
131131 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 ),
133133 name (annotationLoader ), configAttributes ));
134134 }
135135
136136 if (configAttributes .hasLocations () && configAttributes .hasClasses ()) {
137137 String message = String .format (
138138 "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." ,
140140 configAttributes );
141141 logger .error (message );
142142 throw new IllegalStateException (message );
@@ -157,15 +157,14 @@ public ApplicationContext loadContext(MergedContextConfiguration mergedConfig) t
157157 for (SmartContextLoader loader : candidates ) {
158158 if (supports (loader , mergedConfig )) {
159159 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 ));
162161 }
163162 return loader .loadContext (mergedConfig );
164163 }
165164 }
166165
167166 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 ),
169168 name (annotationLoader ), mergedConfig ));
170169 }
171170
0 commit comments