Require Java 7.

This commit is contained in:
Michael Pope 2014-11-26 10:29:41 +10:30 committed by Mike Pope
parent fd6cfcd330
commit 52dad7a471
6 changed files with 10 additions and 14 deletions

View File

@ -9,7 +9,7 @@
the metaserver, distribution packages, running tests
and creating documentation.
</description>
<property name="java.target.version" value="1.6"/>
<property name="java.target.version" value="1.7"/>
<property name="freecol.name" value="freecol"/>
<property environment="env"/>
<property name="freecol.data.dir" value="${basedir}/data"/>
@ -331,7 +331,7 @@
<authors>
<author name="The FreeCol Team" email="developers@freecol.org" />
</authors>
<javaversion>1.6</javaversion>
<javaversion>1.7</javaversion>
</info>
<guiprefs width="640" height="480" resizable="no">
<laf name="looks">
@ -468,7 +468,7 @@
mainclass="net.sf.freecol.FreeCol"
version="${freecol.version}"
vmoptions="-Xmx256M -Dapple.awt.fakefullscreen=true"
jvmversion="1.6+"
jvmversion="1.7+"
arguments="--windowed --freecol-data FreeCol.app/Contents/Resources/"
stubfile="${freecol.build.dir}/skeletons/FreeCol"
icon="${freecol.packaging.dir}/icons/FreeCol.icns">
@ -608,8 +608,6 @@
<delete dir="${freecol.build.dir}/report" />
<mkdir dir="${freecol.build.dir}/report"/>
<mkdir dir="${freecol.build.dir}/report/xml"/>
<echo message="if the next task fails then please read the build script" />
<!-- if the next fails then here is the long answer:
http://ant.apache.org/faq.html#delegating-classloader
the short answer depends.
@ -842,7 +840,6 @@
<mkdir dir="${freecol.build.dir}/report"/>
<mkdir dir="${freecol.build.dir}/report/xml"/>
<echo message="if the next task fails then please read the build script" />
<junit printsummary="on" errorproperty="error.junit"
fork="yes" maxmemory="48m">
<classpath location="build/instrumented-classes"/>

View File

@ -106,13 +106,12 @@ public final class FreeCol {
private static String FREECOL_REVISION;
// Cli defaults.
private static final Advantages ADVANTAGES_DEFAULT = Advantages.SELECTABLE;
private static final String DIFFICULTY_DEFAULT = "model.difficulty.medium";
private static final int EUROPEANS_DEFAULT = 4;
private static final int EUROPEANS_MIN = 1;
private static final Level LOGLEVEL_DEFAULT = Level.INFO;
private static final String JAVA_VERSION_MIN = "1.6";
private static final String JAVA_VERSION_MIN = "1.7";
private static final int MEMORY_MIN = 128; // Mbytes
private static final int PORT_DEFAULT = 3541;
private static final String SPLASH_FILE_DEFAULT = "splash.jpg";
@ -123,7 +122,6 @@ public final class FreeCol {
// Cli values. Often set to null so the default can be applied in
// the accessor function.
private static boolean checkIntegrity = false,
consoleLogging = false,
debugStart = false,

View File

@ -173,7 +173,7 @@ public final class ListOptionUI<T> extends OptionUI<ListOption<T>>
initialize();
}
@SuppressWarnings("unchecked") // Fix in Java7
@SuppressWarnings("unchecked")
private void setCellRenderer(GUI gui, AbstractOption<T> o,
boolean editable) {
OptionUI ui = OptionUI.getOptionUI(gui, o, editable);

View File

@ -63,7 +63,6 @@ public final class UnitTypeOptionUI extends OptionUI<UnitTypeOption> {
* interface for.
* @param editable boolean whether user can modify the setting
*/
@SuppressWarnings("unchecked") // FIXME in Java7
public UnitTypeOptionUI(GUI gui, final UnitTypeOption option,
boolean editable) {
super(gui, option, editable);

View File

@ -430,7 +430,7 @@ public class FreeColDirectories {
/**
* Copy files/directories from one path to another.
*
* Yes this is easier in Java7, but we are not there yet.
* FIXME: Use Java7 copyFile and copyDirectory routines
*
* @param src The source directory.
* @param dst The destination directory.

View File

@ -38,7 +38,8 @@ public class CollectionUtils {
*
* @param members The set members.
* @return An unmodifiable set containing the members.
*/
*/
@SafeVarargs
public static <T> Set<T> makeUnmodifiableSet(T... members) {
Set<T> tmp = new HashSet<T>();
for (T t : members) tmp.add(t);
@ -50,7 +51,8 @@ public class CollectionUtils {
*
* @param members The list members.
* @return An unmodifiable list containing the members.
*/
*/
@SafeVarargs
public static <T> List<T> makeUnmodifiableList(T... members) {
List<T> tmp = new ArrayList<T>();
for (T t : members) tmp.add(t);