Index: lutinutil/src/java/org/codelutin/util/StringUtil.java diff -u lutinutil/src/java/org/codelutin/util/StringUtil.java:1.7 lutinutil/src/java/org/codelutin/util/StringUtil.java:1.8 --- lutinutil/src/java/org/codelutin/util/StringUtil.java:1.7 Mon Dec 13 14:03:50 2004 +++ lutinutil/src/java/org/codelutin/util/StringUtil.java Fri Jan 14 16:09:10 2005 @@ -22,10 +22,10 @@ * * @author POUSSIN Benjamin * Copyright Code Lutin -* @version $Revision: 1.7 $ +* @version $Revision: 1.8 $ * -* Mise a jour: $Date: 2004/12/13 14:03:50 $ -* par : $Author: pineau $ +* Mise a jour: $Date: 2005/01/14 16:09:10 $ +* par : $Author: bpoussin $ */ package org.codelutin.util; @@ -122,7 +122,7 @@ * @throws IllegalArgumentException */ public static Color toColor(String s) throws StringUtilException { - try { + try { if(s.startsWith("#")){ // récuperation des valeurs hexa String hr = s.substring(1, 3); @@ -144,20 +144,20 @@ } }else{ Field f; - f = Color.class.getField(s); - return (Color)f.get(Color.class); + f = Color.class.getField(s); + return (Color)f.get(Color.class); } - } catch (NumberFormatException e) { + } catch (NumberFormatException e) { throw new StringUtilException("Error during conversion from string to color", e); - } catch (SecurityException e) { + } catch (SecurityException e) { throw new StringUtilException("Error during conversion from string to color", e); - } catch (NoSuchFieldException e) { + } catch (NoSuchFieldException e) { throw new StringUtilException("Error during conversion from string to color", e); - } catch (IllegalArgumentException e) { + } catch (IllegalArgumentException e) { throw new StringUtilException("Error during conversion from string to color", e); - } catch (IllegalAccessException e) { + } catch (IllegalAccessException e) { throw new StringUtilException("Error during conversion from string to color", e); - } + } } public static Date toDate(String s) throws ParseException{