You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Robert Burrell Donkin (JIRA)" <ji...@apache.org> on 2009/06/17 15:42:07 UTC

[jira] Reopened: (MAHOUT-134) [PATCH] Cluster decode error handling

     [ https://issues.apache.org/jira/browse/MAHOUT-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Burrell Donkin reopened MAHOUT-134:
------------------------------------------


Index: core/src/main/java/org/apache/mahout/clustering/kmeans/Cluster.java
===================================================================
--- core/src/main/java/org/apache/mahout/clustering/kmeans/Cluster.java	(revision 784487)
+++ core/src/main/java/org/apache/mahout/clustering/kmeans/Cluster.java	(working copy)
@@ -84,7 +84,7 @@
    * @return a new Canopy
    */
   public static Cluster decodeCluster(String formattedString) {
-    int beginIndex = formattedString.indexOf('[');
+    int beginIndex = formattedString.indexOf('{');
     String id = formattedString.substring(0, beginIndex);
     String center = formattedString.substring(beginIndex);
     char firstChar = id.charAt(0);

in https://issues.apache.org/jira/secure/attachment/12410711/MAHOUT-65c.patch reverted a bounds check

> [PATCH] Cluster decode error handling
> -------------------------------------
>
>                 Key: MAHOUT-134
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-134
>             Project: Mahout
>          Issue Type: Improvement
>    Affects Versions: 0.2
>            Reporter: Robert Burrell Donkin
>             Fix For: 0.2
>
>         Attachments: mahout-cluster-format-error.patch, mahout-cluster-format-error.patch
>
>
> ATM the javadocs are unclear as to whether null is an acceptable return value and callers do not null check the return value. However, the implementation may return null in or throw other runtime exceptions when the format is not correct. This makes it hard to diagnose when there's a problem with the format.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.