# HG changeset patch # User Felix Wolfsteller # Date 1346514278 0 # Node ID 001e35349203539f53a04ed66d58a2740493624f # Parent ebfce31c7eecc669f702a7a0d9c8fd11113de142 Fix issue829, wst col indices start with 0. flys-artifacts/trunk@5342 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r ebfce31c7eec -r 001e35349203 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Sat Sep 01 08:44:39 2012 +0000 +++ b/flys-artifacts/ChangeLog Sat Sep 01 15:44:38 2012 +0000 @@ -1,3 +1,10 @@ +2012-09-01 Felix Wolfsteller + + Fix issue829 (wrong fixation names). + + * src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java: + Fix check, column indices start with 0. + 2012-09-01 Sascha L. Teichmann * src/main/java/de/intevation/flys/artifacts/model/minfo/BedHeight.java, diff -r ebfce31c7eec -r 001e35349203 flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java Sat Sep 01 08:44:39 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java Sat Sep 01 15:44:38 2012 +0000 @@ -43,9 +43,11 @@ private static Logger logger = Logger.getLogger(WQKmsInterpolArtifact.class); + /** State name. */ public static final String STATIC_STATE_NAME = "state.additional_wqkms.interpol.static"; + /** Artifact name. */ private static final String NAME = "staticwqkmsinterpol"; static { @@ -66,6 +68,7 @@ } + /** Return fixed artifact (types) name. */ @Override public String getName() { return NAME; @@ -95,6 +98,8 @@ if (code != null) { String [] parts = code.split("-"); + logger.debug("WQKmsInterpolArtifact.setup: code " + code); + if (parts.length >= 4) { int wst = Integer.parseInt(parts[3]); int col = -1; @@ -108,7 +113,7 @@ addStringData("col_pos", parts[2]); } addStringData("wst_id", parts[3]); - String wkmsName = (col > 0) + String wkmsName = (col >= 0) ? WKmsFactory.getWKmsName(col, wst) : WKmsFactory.getWKmsName(wst); String name; @@ -131,6 +136,9 @@ facets.put(state.getID(), fs); } } + else { + logger.warn("WQKmsInterpolArtifact: no code"); + } spawnState(); super.setup(identifier, factory, context, callMeta, data);