[Schmitzm-commits] r678 - branches/2.0-RC2/src/skrueger

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Feb 5 16:21:35 CET 2010


Author: alfonx
Date: 2010-02-05 16:21:33 +0100 (Fri, 05 Feb 2010)
New Revision: 678

Modified:
   branches/2.0-RC2/src/skrueger/AttributeMetadata.java
Log:
BugFix: A new instance of HashSet<NODATA> has wrongly been created in ATMd.copyTo()

Modified: branches/2.0-RC2/src/skrueger/AttributeMetadata.java
===================================================================
--- branches/2.0-RC2/src/skrueger/AttributeMetadata.java	2010-02-05 15:03:17 UTC (rev 677)
+++ branches/2.0-RC2/src/skrueger/AttributeMetadata.java	2010-02-05 15:21:33 UTC (rev 678)
@@ -77,7 +77,7 @@
 	 * be set and will always be interpreted as NULL internally and will usually
 	 * be ignored. This overcomes the problem, that 
 	 **/
-	protected final HashSet<Object> nodataValues = new HashSet<Object>();
+	protected HashSet<Object> nodataValues = new HashSet<Object>();
 
 	/** Translation of the attribute's title **/
 	protected Translation title = new Translation();
@@ -242,13 +242,16 @@
 		amd.setFunctionX(getFunctionX());
 		amd.setFunctionA(getFunctionA());
 
-		for (final Object nodataValue : getNodataValues()) {
-			amd.getNodataValues().add(nodataValue);
-		}
+		amd.setNodataValues(getNodataValues());
 
 		return amd;
 	}
 
+	// only to be used by copyTo()
+	private void setNodataValues(HashSet<Object> nodataValues2) {
+		nodataValues = nodataValues2;
+	}
+
 	public Translation getDesc() {
 		return desc;
 	}



More information about the Schmitzm-commits mailing list