vaadin / vaadin/framework

Upgrade dom4j to avoid warning related to Java 9

Open
#10,500 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cannot reproduce Stale
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Building the project created by the multi-module archetype results in this warning:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.dom4j.io.SAXContentHandler (file:/Users/basilbourque/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar) to method com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser$LocatorProxy.getEncoding()
WARNING: Please consider reporting this to the maintainers of org.dom4j.io.SAXContentHandler
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Some googling leads me to believe this relates to a Java 9 problem in earlier versions of the dom4j project. According to this Issue # 499:

https://github.com/spotbugs/spotbugs/issues/499

version 2.1.0 of dom4j max resolve the issue.

⇒ Consider upgrading the spotbugs library from one using dom4j 1.6.1 to one using dom4j 2.1.0 or later.

My environment: Vaadin Framework 8.2.0, Oracle JDK for macOS version 9.0.1, macOS Sierra, IntelliJ 2017.3.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the dependency used by the multi-module archetype that brings in dom4j 1.6.1, then review how the SpotBugs library is declared. Update it to a version using dom4j 2.1.0 or later and build the generated multi-module project on Java 9 to confirm the illegal reflective access warning is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.