3f697aff35
- for java 17+, there is public API to get the console encoding -> no problem - for older java versions, try to use system property sun.jnu.encoding if it exists - only then use the fall-backs with illegal reflective access to private fields/methods on java.io.Console - Also avoid using reflection utils from apache commons, instead use reflection directly. The illegal access warnings are then properly reported against our class net.sourceforge.pmd.ant.Formatter. Fixes #1860