changeset 3379:0de61fc9d281

Removed some superfluous casts. flys-client/trunk@5116 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 24 Jul 2012 08:11:41 +0000
parents c8193b600d9b
children f6519c699fca
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleInputPanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/MultiPeriodPanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/PeriodPanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixEventSelect.java flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixGaugeSelectPanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixLocationPanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixMultiPeriodPanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixPeriodPanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixQSelectPanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/map/WMSLayersTree.java flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java flys-client/src/main/java/de/intevation/flys/client/server/ChartInfoServiceImpl.java flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java flys-client/src/main/java/de/intevation/flys/client/server/UserCollectionsServiceImpl.java
diffstat 16 files changed, 35 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/ChangeLog	Tue Jul 24 08:11:41 2012 +0000
@@ -1,3 +1,22 @@
+2012-07-21	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/server/UserCollectionsServiceImpl.java,
+	  src/main/java/de/intevation/flys/client/server/ChartInfoServiceImpl.java,
+	  src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java,
+	  src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java,
+	  src/main/java/de/intevation/flys/client/client/ui/fixation/FixGaugeSelectPanel.java,
+	  src/main/java/de/intevation/flys/client/client/ui/fixation/FixLocationPanel.java,
+	  src/main/java/de/intevation/flys/client/client/ui/fixation/FixMultiPeriodPanel.java,
+	  src/main/java/de/intevation/flys/client/client/ui/fixation/FixQSelectPanel.java,
+	  src/main/java/de/intevation/flys/client/client/ui/fixation/FixEventSelect.java,
+	  src/main/java/de/intevation/flys/client/client/ui/fixation/FixPeriodPanel.java,
+	  src/main/java/de/intevation/flys/client/client/ui/PeriodPanel.java,
+	  src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java,
+	  src/main/java/de/intevation/flys/client/client/ui/map/WMSLayersTree.java,
+	  src/main/java/de/intevation/flys/client/client/ui/DoubleInputPanel.java,
+	  src/main/java/de/intevation/flys/client/client/ui/MultiPeriodPanel.java:
+	  Removed some superfluous casts.
+
 2012-07-21	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/webapp/WEB-INF/stylesheets/fixoverview2html.xsl:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleInputPanel.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleInputPanel.java	Tue Jul 24 08:11:41 2012 +0000
@@ -131,7 +131,7 @@
                 new DataItem[] { item }));
         }
 
-        return (Data[]) data.toArray(new Data[data.size()]);
+        return data.toArray(new Data[data.size()]);
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java	Tue Jul 24 08:11:41 2012 +0000
@@ -1013,7 +1013,7 @@
             data.add(dMode);
         }
 
-        return (Data[]) data.toArray(new Data[data.size()]);
+        return data.toArray(new Data[data.size()]);
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/MultiPeriodPanel.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/MultiPeriodPanel.java	Tue Jul 24 08:11:41 2012 +0000
@@ -178,7 +178,7 @@
                         null,
                         new DataItem[] { item }));
         }
-        return (Data[]) data.toArray(new Data[data.size()]);
+        return data.toArray(new Data[data.size()]);
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/PeriodPanel.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/PeriodPanel.java	Tue Jul 24 08:11:41 2012 +0000
@@ -173,7 +173,7 @@
                 new DataItem[] { endItem }));
         }
 
-        return (Data[]) data.toArray(new Data[data.size()]);
+        return data.toArray(new Data[data.size()]);
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixEventSelect.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixEventSelect.java	Tue Jul 24 08:11:41 2012 +0000
@@ -122,7 +122,7 @@
                     arr[i] = new IntDataItem("id", "id", v.intValue());
                 }
                 catch (NumberFormatException nfe) {
-                    return  (Data[]) data.toArray(new Data[data.size()]);
+                    return  data.toArray(new Data[data.size()]);
                 }
             }
 
@@ -132,7 +132,7 @@
             data.add(iad);
         }
 
-        return (Data[]) data.toArray(new Data[data.size()]);
+        return data.toArray(new Data[data.size()]);
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixGaugeSelectPanel.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixGaugeSelectPanel.java	Tue Jul 24 08:11:41 2012 +0000
@@ -140,7 +140,7 @@
                 null,
                 new DataItem[] { secItem }));
         }
-        return (Data[]) data.toArray(new Data[data.size()]);
+        return data.toArray(new Data[data.size()]);
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixLocationPanel.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixLocationPanel.java	Tue Jul 24 08:11:41 2012 +0000
@@ -133,7 +133,7 @@
             data.add(new DefaultData("step", null, null, new DataItem[]{ si }));
         }
         // what else?
-        return (Data[]) data.toArray(new Data[data.size()]);
+        return data.toArray(new Data[data.size()]);
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixMultiPeriodPanel.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixMultiPeriodPanel.java	Tue Jul 24 08:11:41 2012 +0000
@@ -181,7 +181,7 @@
                         null,
                         new DataItem[] { item }));
         }
-        return (Data[]) data.toArray(new Data[data.size()]);
+        return data.toArray(new Data[data.size()]);
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixPeriodPanel.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixPeriodPanel.java	Tue Jul 24 08:11:41 2012 +0000
@@ -154,7 +154,7 @@
                 new DataItem[] { endItem }));
         }
 
-        return (Data[]) data.toArray(new Data[data.size()]);
+        return data.toArray(new Data[data.size()]);
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixQSelectPanel.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixQSelectPanel.java	Tue Jul 24 08:11:41 2012 +0000
@@ -45,9 +45,7 @@
      * @return the selected/inserted data.
      */
     public Data[] getData() {
-        List<Data> data = new ArrayList<Data>();
-
-        return (Data[]) data.toArray(new Data[data.size()]);
+        return new Data[0];
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/WMSLayersTree.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/WMSLayersTree.java	Tue Jul 24 08:11:41 2012 +0000
@@ -106,7 +106,7 @@
             }
         }
 
-        return (TreeNode[]) layerNodes.toArray(new TreeNode[layerNodes.size()]);
+        return layerNodes.toArray(new TreeNode[layerNodes.size()]);
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java	Tue Jul 24 08:11:41 2012 +0000
@@ -278,7 +278,7 @@
             }
         }
 
-        return (DataItem[]) dataItems.toArray(new DataItem[count]);
+        return dataItems.toArray(new DataItem[count]);
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/server/ChartInfoServiceImpl.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/ChartInfoServiceImpl.java	Tue Jul 24 08:11:41 2012 +0000
@@ -238,7 +238,7 @@
             transformer.add(t);
         }
 
-        return (Transform2D[]) transformer.toArray(new Transform2D[num]);
+        return transformer.toArray(new Transform2D[num]);
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java	Tue Jul 24 08:11:41 2012 +0000
@@ -91,7 +91,7 @@
                 theRivers.add(new DefaultRiver(name));
             }
 
-            return (River[]) theRivers.toArray(new River[count]);
+            return theRivers.toArray(new River[count]);
         }
         catch (ConnectionException ce) {
             logger.error(ce, ce);
--- a/flys-client/src/main/java/de/intevation/flys/client/server/UserCollectionsServiceImpl.java	Sat Jul 21 19:54:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/UserCollectionsServiceImpl.java	Tue Jul 24 08:11:41 2012 +0000
@@ -76,7 +76,7 @@
 
             logger.debug("User has " + all.size() + " collections.");
 
-            return (Collection[]) all.toArray(new Collection[all.size()]);
+            return all.toArray(new Collection[all.size()]);
         }
         catch (ConnectionException ce) {
             logger.error(ce, ce);

http://dive4elements.wald.intevation.org