Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ language: java

# Configure the build to use Oracle JDK 9
jdk:
- openjdk11
- openjdk21

# Install the Ant JUnit package, which is missing from the Travis CI environment. See the Travis documentation: https://docs.travis-ci.com/user/installing-dependencies/#Adding-APT-Packages
addons:
Expand Down
4 changes: 2 additions & 2 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ javac.modulepath=
javac.processormodulepath=
javac.processorpath=\
${javac.classpath}
javac.source=11
javac.target=11
javac.source=21
javac.target=21
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
Expand Down
2 changes: 1 addition & 1 deletion release-build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ worldwind.classes.dir=${worldwind.build.dir}/classes
worldwind.doc.dir=${worldwind.build.dir}/doc
worldwind.jar.dir=${worldwind.build.dir}/jar
worldwind.test.results.dir=${worldwind.build.dir}/test-results
worldwind.jdk=11
worldwind.jdk=21
#worldwind.exclude.jackson=true

# MIL-STD-2525 package build properties
Expand Down
2 changes: 1 addition & 1 deletion release-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<pathelement location="gluegen-rt.jar"/>
<pathelement location="gdal.jar"/>
</classpath>
<link href="http://download.oracle.com/javase/8/docs/api/"/>
<link href="https://docs.oracle.com/en/java/javase/21/docs/api/"/>
<link href="https://jogamp.org/deployment/v2.4.0-rc-20200307/javadoc/"/>
</javadoc>
</target>
Expand Down
20 changes: 10 additions & 10 deletions src/gov/nasa/worldwind/data/ImageIORasterReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ private void readWorldFiles(Object source, AVList params) throws java.io.IOExcep
// WORLD_FILE_IMAGE_SIZE parameter.
Object width = params.getValue(AVKey.WIDTH);
Object height = params.getValue(AVKey.HEIGHT);
if (width != null && height != null && width instanceof Integer && height instanceof Integer)
if (width instanceof Integer imageWidth && height instanceof Integer imageHeight)
{
int[] size = new int[]{(Integer) width, (Integer) height};
int[] size = new int[]{imageWidth, imageHeight};
params.setValue(WorldFile.WORLD_FILE_IMAGE_SIZE, size);
}
}
Expand All @@ -275,13 +275,13 @@ private static javax.imageio.stream.ImageInputStream createInputStream(Object so

Object input = source;

if (source instanceof java.net.URL)
if (source instanceof java.net.URL url)
{
input = ((java.net.URL) source).openStream();
input = url.openStream();
}
else if (source instanceof CharSequence)
else if (source instanceof CharSequence charSequence)
{
input = openInputStream(source.toString());
input = openInputStream(charSequence.toString());
}

return javax.imageio.ImageIO.createImageInputStream(input);
Expand All @@ -294,14 +294,14 @@ private static java.io.InputStream openInputStream(String path) throws java.io.I
{
return null;
}
else if (streamOrException instanceof java.io.IOException)
else if (streamOrException instanceof java.io.IOException ioException)
{
throw (java.io.IOException) streamOrException;
throw ioException;
}
else if (streamOrException instanceof Exception)
else if (streamOrException instanceof Exception exception)
{
String message = Logging.getMessage("generic.ExceptionAttemptingToReadImageFile", path);
Logging.logger().log(java.util.logging.Level.SEVERE, message, streamOrException);
Logging.logger().log(java.util.logging.Level.SEVERE, message, exception);
throw new java.io.IOException(message);
}

Expand Down
6 changes: 2 additions & 4 deletions src/gov/nasa/worldwind/data/TiledElevationProducer.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ protected DataRaster createDataRaster(int width, int height, Sector sector, AVLi
// This code expects the string "gov.nasa.worldwind.avkey.MissingDataValue", which now corresponds to the key
// MISSING_DATA_REPLACEMENT.
Object o = params.getValue(AVKey.MISSING_DATA_REPLACEMENT);
if (o != null && o instanceof Double)
if (o instanceof Double missingDataValue)
{
Double missingDataValue = (Double) o;
bufferRaster.fill(missingDataValue);
bufferRaster.setTransparentValue(missingDataValue);
}
Expand Down Expand Up @@ -139,9 +138,8 @@ protected String validateDataSource(Object source, AVList params)

// TiledElevationProducer accepts BufferWrapperRaster as a data source. If the data source is a DataRaster, then
// check that it's a BufferWrapperRaster.
if (source instanceof DataRaster)
if (source instanceof DataRaster raster)
{
DataRaster raster = (DataRaster) source;

if (!(raster instanceof BufferWrapperRaster))
{
Expand Down