Clover coverage report -
Coverage timestamp: Fri Nov 19 2004 13:41:51 PST
file stats: LOC: 40   Methods: 2
NCLOC: 35   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
LabelsEditor.java 75% 66.7% 50% 66.7%
coverage coverage
 1    package photospace.web.spring;
 2   
 3    import java.beans.*;
 4    import org.apache.commons.lang.*;
 5   
 6    public class LabelsEditor extends PropertyEditorSupport
 7    {
 8    private String split = ", ";
 9    private String join = " ";
 10   
 11  1 public void setAsText(String text) throws IllegalArgumentException
 12    {
 13  1 try
 14    {
 15  1 if (text != null || !"".equals(text.trim()))
 16    {
 17  1 String[] labels = StringUtils.split(text, split);
 18  1 for (int i = 0; i < labels.length; i++)
 19    {
 20  2 labels[i] = labels[i].toLowerCase();
 21    }
 22  1 setValue(labels);
 23    }
 24    else
 25    {
 26  0 setValue(new String[0]);
 27    }
 28    }
 29    catch (Exception e)
 30    {
 31  0 throw new IllegalArgumentException("Error converting " + text + " to String[]");
 32    }
 33    }
 34   
 35  0 public String getAsText()
 36    {
 37  0 return StringUtils.join(((String[]) getValue()), join);
 38    }
 39   
 40    }