mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: build broken
Date Sat, 08 Oct 2011 07:58:18 GMT
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 <goksron@gmail.com> 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;
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message