Skip to content

Commit

Permalink
Renamed the classloaderloader to classpathloader.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbosecke committed Feb 8, 2014
1 parent 21c47e9 commit d5371f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/mitchellbosecke/pebble/PebbleEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import com.mitchellbosecke.pebble.lexer.Lexer;
import com.mitchellbosecke.pebble.lexer.LexerImpl;
import com.mitchellbosecke.pebble.lexer.TokenStream;
import com.mitchellbosecke.pebble.loader.ClassLoaderLoader;
import com.mitchellbosecke.pebble.loader.ClasspathLoader;
import com.mitchellbosecke.pebble.loader.DelegatingLoader;
import com.mitchellbosecke.pebble.loader.FileLoader;
import com.mitchellbosecke.pebble.loader.Loader;
Expand Down Expand Up @@ -125,7 +125,7 @@ public PebbleEngine(Loader loader) {
// set up a default loader if necessary
if (loader == null) {
List<Loader> defaultLoadingStrategies = new ArrayList<>();
defaultLoadingStrategies.add(new ClassLoaderLoader());
defaultLoadingStrategies.add(new ClasspathLoader());
defaultLoadingStrategies.add(new FileLoader());
loader = new DelegatingLoader(defaultLoadingStrategies);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

import com.mitchellbosecke.pebble.error.LoaderException;

public class ClassLoaderLoader implements Loader {
public class ClasspathLoader implements Loader {

private static final Logger logger = LoggerFactory.getLogger(ClassLoaderLoader.class);
private static final Logger logger = LoggerFactory.getLogger(ClasspathLoader.class);

private String prefix;

Expand Down Expand Up @@ -52,7 +52,7 @@ public Reader getReader(String templateName) throws LoaderException {
String location = path.toString() + templateName + (getSuffix() == null ? "" : getSuffix());
logger.debug("Looking for template in {}.", location);

ClassLoader rcl = ClassLoaderLoader.class.getClassLoader();
ClassLoader rcl = ClasspathLoader.class.getClassLoader();
if (is == null) {
is = rcl.getResourceAsStream(location);
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/mitchellbosecke/pebble/LoaderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.junit.Test;

import com.mitchellbosecke.pebble.error.PebbleException;
import com.mitchellbosecke.pebble.loader.ClassLoaderLoader;
import com.mitchellbosecke.pebble.loader.ClasspathLoader;
import com.mitchellbosecke.pebble.loader.FileLoader;
import com.mitchellbosecke.pebble.loader.Loader;
import com.mitchellbosecke.pebble.template.PebbleTemplate;
Expand All @@ -19,7 +19,7 @@ public class LoaderTest extends AbstractTest {

@Test
public void testClassLoaderLoader() throws PebbleException, IOException {
Loader loader = new ClassLoaderLoader();
Loader loader = new ClasspathLoader();
loader.setPrefix("templates");
PebbleEngine engine = new PebbleEngine(loader);
PebbleTemplate template1 = engine.compile("template.loaderTest.peb");
Expand All @@ -31,7 +31,7 @@ public void testClassLoaderLoader() throws PebbleException, IOException {

@Test
public void testClassLoaderLoaderWithNestedTemplate() throws PebbleException, IOException {
Loader loader = new ClassLoaderLoader();
Loader loader = new ClasspathLoader();
loader.setPrefix("templates");
PebbleEngine engine = new PebbleEngine(loader);
PebbleTemplate template1 = engine.compile("loader/template.loaderTest.peb");
Expand Down

0 comments on commit d5371f7

Please sign in to comment.