Branch: refs/heads/main
  Home:   https://github.com/pmd/pmd
  Commit: 3f697aff35cf7ddd1ce53df47d3e3e9eb5ebb87b
      https://github.com/pmd/pmd/commit/3f697aff35cf7ddd1ce53df47d3e3e9eb5ebb87b
  Author: Andreas Dangel <andreas.dan...@pmd-code.org>
  Date:   2024-10-25 (Fri, 25 Oct 2024)

  Changed paths:
    M pmd-ant/src/main/java/net/sourceforge/pmd/ant/Formatter.java
    M pmd-dist/src/test/java/net/sourceforge/pmd/dist/AntIT.java

  Log Message:
  -----------
  [ant] Formatter: avoid reflective access to determine console encoding

- 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


  Commit: 4473aa666754f888ace372ec3d5ca183f6e0af23
      https://github.com/pmd/pmd/commit/4473aa666754f888ace372ec3d5ca183f6e0af23
  Author: Juan Martín Sotuyo Dodero <juansot...@gmail.com>
  Date:   2024-10-27 (Sun, 27 Oct 2024)

  Changed paths:
    M pmd-ant/src/main/java/net/sourceforge/pmd/ant/Formatter.java
    M pmd-dist/src/test/java/net/sourceforge/pmd/dist/AntIT.java

  Log Message:
  -----------
  [ant] Formatter: avoid reflective access to determine console encoding (#5286)


Compare: https://github.com/pmd/pmd/compare/97d68e331c11...4473aa666754

To unsubscribe from these emails, change your notification settings at 
https://github.com/pmd/pmd/settings/notifications


_______________________________________________
Pmd-commits mailing list
Pmd-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmd-commits

Reply via email to