[Schmitzm-commits] r1348 - trunk/src/schmitzm/geotools/styling
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Dec 17 01:20:29 CET 2010
Author: alfonx
Date: 2010-12-17 01:20:28 +0100 (Fri, 17 Dec 2010)
New Revision: 1348
Modified:
trunk/src/schmitzm/geotools/styling/StylingUtil.java
Log:
avoids NPE
public static Graphic clone(Graphic graphic) {
if (graphic == null)
return null;
Modified: trunk/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/styling/StylingUtil.java 2010-12-15 21:10:18 UTC (rev 1347)
+++ trunk/src/schmitzm/geotools/styling/StylingUtil.java 2010-12-17 00:20:28 UTC (rev 1348)
@@ -307,14 +307,17 @@
}
/**
- * Clons a {@link Graphic} element
+ * Clones a {@link Graphic} element
*
- * @param graphicFill
- * @return
+ * @param graphic
+ * if <code>null</code> returns <code>null</code>;
+ *
* @author <a href="mailto:tzeggai at wikisquare.de">Stefan Alfons Tzeggai</a>
*/
public static Graphic clone(Graphic graphic) {
DuplicatingStyleVisitor duplicatingStyleVisitor = new DuplicatingStyleVisitor();
+ if (graphic == null)
+ return null;
graphic.accept(duplicatingStyleVisitor);
return (Graphic) duplicatingStyleVisitor.getCopy();
}
@@ -3118,7 +3121,7 @@
/**
* Converts a {@link StyledLayerDescriptor} or any of it's subcomponents to
- * XML.
+ * XML.
*
* @throws TransformerException
*/
More information about the Schmitzm-commits
mailing list