--- projects/cms/source/util/uk/org/iscream/cms/util/FormatName.java 2001/02/25 20:49:29 1.6 +++ projects/cms/source/util/uk/org/iscream/cms/util/FormatName.java 2002/05/18 18:16:03 1.13 @@ -1,5 +1,24 @@ +/* + * i-scream central monitoring system + * Copyright (C) 2000-2002 i-scream + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + //---PACKAGE DECLARATION--- -package uk.ac.ukc.iscream.util; +package uk.org.iscream.cms.server.util; //---IMPORTS--- import java.util.Date; @@ -13,7 +32,7 @@ import java.util.Locale; * a toString String to send to the logger. * * @author $Author: tdb $ - * @version $Id: FormatName.java,v 1.6 2001/02/25 20:49:29 tdb Exp $ + * @version $Id: FormatName.java,v 1.13 2002/05/18 18:16:03 tdb Exp $ */ public class FormatName { @@ -69,7 +88,7 @@ public class FormatName { } /** - * If the class name begins with uk.ac.ukc.iscream + * If the class name begins with uk.org.iscream.cms.server * this method will trim it off, otherwise it * leaves the string unchanged. * @@ -78,8 +97,9 @@ public class FormatName { * @return the tidy version of it */ private static String tidyClassName(String className) { - if (className.startsWith("uk.ac.ukc.iscream")) { - return className.substring(18); + String prefix = "uk.org.iscream.cms.server"; + if (className.startsWith(prefix)) { + return className.substring(prefix.length()+1); } return className; }