# HG changeset patch # User Sascha L. Teichmann # Date 1343117501 0 # Node ID 0de61fc9d2815b6848e65e516fa932eafc1f09f4 # Parent c8193b600d9b5c741d0d2212344c6951cb32e65e Removed some superfluous casts. flys-client/trunk@5116 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r c8193b600d9b -r 0de61fc9d281 flys-client/ChangeLog --- 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 + + * 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 * src/main/webapp/WEB-INF/stylesheets/fixoverview2html.xsl: diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleInputPanel.java --- 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()]); } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java --- 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()]); } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/client/ui/MultiPeriodPanel.java --- 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()]); } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/client/ui/PeriodPanel.java --- 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()]); } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixEventSelect.java --- 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()]); } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixGaugeSelectPanel.java --- 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()]); } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixLocationPanel.java --- 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()]); } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixMultiPeriodPanel.java --- 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()]); } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixPeriodPanel.java --- 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()]); } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixQSelectPanel.java --- 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 = new ArrayList(); - - return (Data[]) data.toArray(new Data[data.size()]); + return new Data[0]; } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/client/ui/map/WMSLayersTree.java --- 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()]); } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java --- 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]); } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/server/ChartInfoServiceImpl.java --- 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]); } diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java --- 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); diff -r c8193b600d9b -r 0de61fc9d281 flys-client/src/main/java/de/intevation/flys/client/server/UserCollectionsServiceImpl.java --- 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);