|
27 | 27 | import org.codehaus.plexus.component.annotations.Component;
|
28 | 28 | import org.codehaus.plexus.component.annotations.Requirement;
|
29 | 29 |
|
30 |
| -import org.codehaus.plexus.logging.AbstractLogEnabled; |
31 | 30 | import org.codehaus.plexus.resource.loader.FileResourceCreationException;
|
32 | 31 | import org.codehaus.plexus.resource.loader.ResourceIOException;
|
33 | 32 | import org.codehaus.plexus.resource.loader.ResourceLoader;
|
34 | 33 | import org.codehaus.plexus.resource.loader.ResourceNotFoundException;
|
35 | 34 | import org.codehaus.plexus.util.FileUtils;
|
36 | 35 | import org.codehaus.plexus.util.IOUtil;
|
| 36 | +import org.slf4j.Logger; |
| 37 | +import org.slf4j.LoggerFactory; |
37 | 38 |
|
38 | 39 | import java.io.File;
|
39 | 40 | import java.io.FileOutputStream;
|
|
48 | 49 | * @version $Id$
|
49 | 50 | */
|
50 | 51 | @Component( role = ResourceManager.class, instantiationStrategy = "per-lookup" )
|
51 |
| -public class DefaultResourceManager |
52 |
| - extends AbstractLogEnabled |
53 |
| - implements ResourceManager |
| 52 | +public class DefaultResourceManager implements ResourceManager |
54 | 53 | {
|
| 54 | + private static final Logger LOGGER = LoggerFactory.getLogger( DefaultResourceManager.class ); |
| 55 | + |
55 | 56 | @Requirement( role = ResourceLoader.class )
|
56 | 57 | private Map<String, ResourceLoader> resourceLoaders;
|
57 | 58 |
|
@@ -156,15 +157,14 @@ public PlexusResource getResource( String name )
|
156 | 157 | {
|
157 | 158 | PlexusResource resource = resourceLoader.getResource( name );
|
158 | 159 |
|
159 |
| - getLogger().debug( "The resource " + "'" + name + "'" + " was found as " + resource.getName() + "." ); |
| 160 | + LOGGER.debug( "The resource '{}' was found as '{}'", name, resource.getName() ); |
160 | 161 |
|
161 | 162 | return resource;
|
162 | 163 | }
|
163 | 164 | catch ( ResourceNotFoundException e )
|
164 | 165 | {
|
165 |
| - getLogger().debug( |
166 |
| - "The resource " + "'" + name + "'" + " was not found with resourceLoader " |
167 |
| - + resourceLoader.getClass().getName() + "." ); |
| 166 | + LOGGER.debug( "The resource '{}' was not found with resourceLoader '{}'", |
| 167 | + name, resourceLoader.getClass().getName() ); |
168 | 168 | }
|
169 | 169 | }
|
170 | 170 |
|
|
0 commit comments