Mercurial > dive4elements > river
changeset 3158:0e8929d5e9e3
Use generics more correctly
flys-artifacts/trunk@4770 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 24 Jun 2012 16:01:35 +0000 |
parents | 003940a7d6c9 |
children | a6a3f9894fe0 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/utils/KMIndex.java |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Sun Jun 24 10:55:00 2012 +0000 +++ b/flys-artifacts/ChangeLog Sun Jun 24 16:01:35 2012 +0000 @@ -1,3 +1,9 @@ +2012-06-23 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/utils/KMIndex.java: + OpenJDK javac 1.6.0_24 seems to be more picky about + correct usage of generics. + 2012-06-23 Sascha L. Teichmann <sascha.teichmann@intevation.de> * contrib/add-i18n-numbers.py: New. Script to prefix
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/KMIndex.java Sun Jun 24 10:55:00 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/KMIndex.java Sun Jun 24 16:01:35 2012 +0000 @@ -64,7 +64,7 @@ } public void add(double km, A value) { - entries.add(new Entry(km, value)); + entries.add(new Entry<A>(km, value)); } public void sort() { @@ -81,7 +81,7 @@ } public Entry<A> binarySearch(double km) { - int index = Collections.binarySearch(entries, new Entry(km)); + int index = Collections.binarySearch(entries, new Entry<A>(km)); return index >= 0 ? entries.get(index) : null; }