Why is that a problem?

http://guava-libraries.googlecode.com/svn/tags/release03/javadoc/com/google/common/base/Joiner.html#on(char)

Seems to me that there is an appropriate factory method.  Can you say more
about what problem you see?

On Sat, Oct 8, 2011 at 12:14 AM, Lance Norskog <[email protected]> wrote:

> SimpleCsvExamples.java has a compile error, at least for me.
>
> As I don't believe in JIRA pollution for trivial bugs, a patch:
>
> diff --git
>
> examples/src/main/java/org/apache/mahout/classifier/sgd/SimpleCsvExamples.java
>
> examples/src/main/java/org/apache/mahout/classifier/sgd/SimpleCsvExamples.java
> index e08316c..2e71cc5 100644
> ---
>
> examples/src/main/java/org/apache/mahout/classifier/sgd/SimpleCsvExamples.java
> +++
>
> examples/src/main/java/org/apache/mahout/classifier/sgd/SimpleCsvExamples.java
> @@ -57,11 +57,12 @@ import java.util.Random;
>  * This doesn't demonstrate text encoding which is subject to somewhat
> different tricks.  The basic
>  * idea of caching hash locations and byte level parsing still very much
> applies to text, however.
>  */
>  public final class SimpleCsvExamples {
>
> -  public static final char SEPARATOR_CHAR = '\t';
> +  private static final char SEPARATOR_CHAR = '\t';
> +  private static final String SEPARATOR_STRING = "\t";
>   private static final int FIELDS = 100;
>
>   private SimpleCsvExamples() {
>   }
>
> @@ -135,11 +136,11 @@ public final class SimpleCsvExamples {
>   }
>
>
>   private static final class Line {
>     private static final Splitter ON_TABS =
> Splitter.on(SEPARATOR_CHAR).trimResults();
> -    public static final Joiner WITH_COMMAS = Joiner.on(SEPARATOR_CHAR);
> +    private static final Joiner WITH_COMMAS = Joiner.on(SEPARATOR_STRING);
>
>     public static final Random rand = RandomUtils.getRandom();
>
>     private final List<String> data;
>

Reply via email to