From: <svn...@os...> - 2011-11-27 14:36:56
|
Author: jive Date: 2011-11-27 06:36:50 -0800 (Sun, 27 Nov 2011) New Revision: 38384 Modified: trunk/modules/library/main/src/main/java/org/geotools/util/UuidConverterFactory.java Log: fix up header so the file is not from the future Modified: trunk/modules/library/main/src/main/java/org/geotools/util/UuidConverterFactory.java =================================================================== --- trunk/modules/library/main/src/main/java/org/geotools/util/UuidConverterFactory.java 2011-11-27 14:36:34 UTC (rev 38383) +++ trunk/modules/library/main/src/main/java/org/geotools/util/UuidConverterFactory.java 2011-11-27 14:36:50 UTC (rev 38384) @@ -2,7 +2,7 @@ * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * - * (C) 2002-20010, Open Source Geospatial Foundation (OSGeo) + * (C) 2010, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,42 +24,43 @@ * <p> * Supported conversions: * <ul> - * <li>string -> UUID - * <li>byte[] -> UUID + * <li>string -> UUID + * <li>byte[] -> UUID * </ul> * </p> + * * @author Andrea Briganti <kb...@ci...> - * + * */ public class UuidConverterFactory implements ConverterFactory { - public Converter createConverter(Class source, Class target, Hints hints) { - if ( target.equals( UUID.class ) ) { + public Converter createConverter(Class source, Class target, Hints hints) { + if (target.equals(UUID.class)) { - //string to boolean - if ( source.equals( String.class ) ) { - return new Converter() { + // string to boolean + if (source.equals(String.class)) { + return new Converter() { - public Object convert(Object source, Class target) throws Exception { - return UUID.fromString((String)source); - } - }; - } + public Object convert(Object source, Class target) throws Exception { + return UUID.fromString((String) source); + } + }; + } - //integer to boolean - if ( source.equals( byte[].class ) ) { - return new Converter() { + // integer to boolean + if (source.equals(byte[].class)) { + return new Converter() { - public Object convert(Object source, Class target) throws Exception { - return UUID.nameUUIDFromBytes((byte[])source); - } + public Object convert(Object source, Class target) throws Exception { + return UUID.nameUUIDFromBytes((byte[]) source); + } - }; - } + }; + } - } + } - return null; - } + return null; + } } |