From 1ca1c8129e2d7f52a6db0e714c15700b87b93c7f Mon Sep 17 00:00:00 2001 From: Ricky Date: Fri, 4 Dec 2015 09:30:52 +1100 Subject: [PATCH] made the logging dependency test only --- pom.xml | 5 +++-- .../javafaker/service/FakeValuesService.java | 15 ++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 516a8e4e..8c2412d5 100644 --- a/pom.xml +++ b/pom.xml @@ -33,12 +33,12 @@ Ricky Yim - + org.sonatype.oss oss-parent 7 - + @@ -55,6 +55,7 @@ org.slf4j slf4j-api 1.7.7 + test junit diff --git a/src/main/java/com/github/javafaker/service/FakeValuesService.java b/src/main/java/com/github/javafaker/service/FakeValuesService.java index 3bc65346..b1c91c33 100644 --- a/src/main/java/com/github/javafaker/service/FakeValuesService.java +++ b/src/main/java/com/github/javafaker/service/FakeValuesService.java @@ -2,8 +2,6 @@ package com.github.javafaker.service; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.WordUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.yaml.snakeyaml.Yaml; import java.io.InputStream; @@ -13,14 +11,11 @@ import java.util.Map; public class FakeValuesService { private static final char[] METHOD_NAME_DELIMITERS = {'_'}; - private static final Logger logger = LoggerFactory.getLogger(FakeValuesService.class); private final Map fakeValuesMap; private final RandomService randomService; @SuppressWarnings({"unchecked", "rawtypes"}) public FakeValuesService(Locale locale, RandomService randomService) { - logger.info("Using locale " + locale); - String languageCode = locale.getLanguage(); final InputStream stream = findStream("/" + languageCode + ".yml"); if (stream == null) { @@ -64,8 +59,7 @@ public class FakeValuesService { /** * Return the object selected by the key from yaml file. * - * @param key - * key contains path to an object. Path segment is separated by + * @param key key contains path to an object. Path segment is separated by * dot. E.g. name.first_name * @return */ @@ -81,14 +75,13 @@ public class FakeValuesService { /** * A property that is composed of other properties. - * + *

* It firstly fetches the formatKey using {@link #fetch(String)}. It will * proceed to convert the returned properties from the {@link #fetch(String)} * method to a methodName and invoke this method against the object passed in. * Finally, concatenation occurs with the return values of the methods * using the joiner parameter as a separator. * - * * @param formatKey * @param joiner * @param objectToInvokeMethodOn @@ -118,7 +111,7 @@ public class FakeValuesService { /** * Returns a string with the '#' characters in the parameter replaced with random digits between 0-9 inclusive. - * + *

* For example, the string "ABC##EFG" could be replaced with a string like "ABC99EFG". * * @param numberString @@ -152,7 +145,7 @@ public class FakeValuesService { /** * Returns a string with the '?' characters in the parameter replaced with random alphabetic * characters. - * + *

* For example, the string "12??34" could be replaced with a string like "12AB34". * * @param letterString