Skip to content
Jody Garnett edited this page Nov 2, 2022 · 5 revisions

Description

The Java 8 LTS runtime environment is, thanks to some heroic efforts, managing to hold onto life much longer than anticipated (2026) – However the Java community is moving on and it is time for GeoTools project to do the same.

It is our goal to track LTS releases (checking Temurin support):

  • Java 11 (LTS) - 2018 … at least Oct 2024
  • Java 17 (LTS) - 2021 … at least Oct 2027
  • Java 21 (LTS) - 2023 …

The GeoTools project is taking this action as many of the dependencies we wish to work with are setting Java 11 LTS as a minimum; and we also wish to plan for downstream web applications migrating to Jakarta (which set’s Java 11 LTS at a minimum).

Removing Java 8 also significantly lowers our testing footprint as the Java 2 plugin system (used by native jai and imageio extensions) was superseded by Java 9 module system.

Things to keep in mind:

  • String isBlank() can replace .trim().isEmpty() (PMD check InefficientEmptyStringCheck)
  • File writeString(), readString(), isSameFile()

References:

Status

Choose one of:

  • Under Discussion
  • In Progress
  • Completed
  • Rejected,
  • Deferred

Voting:

  • Andrea Aime:
  • Ian Turton:
  • Jody Garnett:
  • Nuno Oliveira (+1, for 29.0):
  • Simone Giannecchini:
  • Torben Barsballe:

Tasks

  1. Update documentation removing Java 8 instructions, including native jai and imageio install instructions
  2. Update Jenkins build jobs to use Java 11
  3. Remove Java 8 from build pom.xml files (for example errorprone8)
  4. Look at updating PMD rules to sensible Java 11 minimum

API Change

File

String methods

Methods isBlank(), lines(), repeat(n), stripLeading(), strip() may be added to our PMD checks:

Before:

if (outputAttribute == null || outputAttribute.trim().isEmpty()) {

After:

if (outputAttribute == null || outputAttribute.isBlank()) {

var keyword available

Before:

List<MapLayer> layers=new ArrayList<>();

After:

var layers=new ArrayList<MapLayer>();
Clone this wiki locally