changeset 4381:80f5d1f2d4fd

Converting from list to array doesn't make sence here
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 02 Nov 2012 15:55:51 +0100
parents 19754e5227c8
children 3937c6a85db4
files flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java	Fri Nov 02 15:54:41 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java	Fri Nov 02 15:55:51 2012 +0100
@@ -94,7 +94,7 @@
     public void toLoad(ToLoad toLoad) {
         destroy();
         List<Recommendation> recs = toLoad.toRecommendations();
-        loadArtifacts(recs.toArray(new Recommendation[recs.size()]));
+        loadArtifacts(recs);
     }
 
 
@@ -102,7 +102,7 @@
     public void onDoubleClick(ToLoad toLoad) {
         destroy();
         List<Recommendation> recs = toLoad.toRecommendations();
-        loadArtifacts(recs.toArray(new Recommendation[recs.size()]));
+        loadArtifacts(recs);
     }
 
 
@@ -157,14 +157,14 @@
     }
 
 
-    protected void loadArtifacts(Recommendation[] recommendations) {
+    protected void loadArtifacts(List<Recommendation> recommendations) {
         Config cfg = Config.getInstance();
 
         final Collection collection     = view.getCollection();
         final Artifact   masterArtifact = view.getArtifact();
         final String     locale         = cfg.getLocale();
 
-        this.inProgress = recommendations.length;
+        this.inProgress = recommendations.size();
 
         for (final Recommendation recommendation: recommendations) {
             // XXX: UGLY! If no reference artifact given use uuid of

http://dive4elements.wald.intevation.org