From 166357063480dc600d32bae019a0f8258d6b23b7 Mon Sep 17 00:00:00 2001 From: Lyn Goltz Date: Mon, 30 Mar 2015 14:43:09 +0200 Subject: [PATCH] fixed sld parsing (style/filter/layer maps was not filled) --- .../java/org/deegree/protocol/wms/ops/RequestBase.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/deegree-core/deegree-core-protocol/deegree-protocol-wms/src/main/java/org/deegree/protocol/wms/ops/RequestBase.java b/deegree-core/deegree-core-protocol/deegree-protocol-wms/src/main/java/org/deegree/protocol/wms/ops/RequestBase.java index 5b471ec814..7394ace55c 100644 --- a/deegree-core/deegree-core-protocol/deegree-protocol-wms/src/main/java/org/deegree/protocol/wms/ops/RequestBase.java +++ b/deegree-core/deegree-core-protocol/deegree-protocol-wms/src/main/java/org/deegree/protocol/wms/ops/RequestBase.java @@ -149,11 +149,11 @@ protected void handleSLD( String sld, String sldBody ) } } - this.layers.clear(); this.styles.clear(); - this.filters = new LinkedList(); + LinkedList tmpLayers = new LinkedList(); + // to get the order right, in case it's different from the SLD order for ( LayerRef lRef : layers ) { LinkedList> l = lays.get( lRef.getName() ); @@ -163,10 +163,12 @@ protected void handleSLD( String sld, String sldBody ) } Triple, ArrayList, ArrayList> t = unzip( l ); - this.layers.addAll( t.first ); + tmpLayers.addAll( t.first ); this.styles.addAll( t.second ); this.filters.addAll( t.third ); } + this.layers.clear(); + this.layers.addAll( tmpLayers ); } else { if ( triple != null ) { this.layers = triple.first;