[Schmitzm-commits] r526 - branches/1.0-gt2-2.6/src/skrueger/geotools

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Nov 18 16:45:02 CET 2009


Author: alfonx
Date: 2009-11-18 16:45:01 +0100 (Wed, 18 Nov 2009)
New Revision: 526

Modified:
   branches/1.0-gt2-2.6/src/skrueger/geotools/StyledLayerUtil.java
Log:
* a debug message was able to trigger an NPE

Modified: branches/1.0-gt2-2.6/src/skrueger/geotools/StyledLayerUtil.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/geotools/StyledLayerUtil.java	2009-11-18 15:41:33 UTC (rev 525)
+++ branches/1.0-gt2-2.6/src/skrueger/geotools/StyledLayerUtil.java	2009-11-18 15:45:01 UTC (rev 526)
@@ -1145,10 +1145,10 @@
 	public static boolean isStyleable(
 			final StyledRasterInterface<?> styledRaster) {
 		final ColorModel colorModel = getColorModel(styledRaster);
+		
+//		LOGGER.info("The colormodel of " + styledRaster.getTitle() + " is "
+//				+ colorModel != null ? colorModel.getClass().getSimpleName() : "NULL");
 
-		LOGGER.info("The colormodel of " + styledRaster.getTitle() + " is "
-				+ colorModel.getClass().getSimpleName());
-
 		if (colorModel == null)
 			return true;
 		if (colorModel instanceof ComponentColorModel)
@@ -1189,7 +1189,9 @@
 			
 			return true;
 			
-		} else return false;
+		} else {
+			return false;
+		}
 	}
 
 }



More information about the Schmitzm-commits mailing list