Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link in javadoc causes an error #1437

Closed
lyh8577 opened this issue May 8, 2020 · 3 comments
Closed

Link in javadoc causes an error #1437

lyh8577 opened this issue May 8, 2020 · 3 comments

Comments

@lyh8577
Copy link

lyh8577 commented May 8, 2020

  1. Code comments: if {@link xxx} has error, the project cannot be started.
  2. If dependency: org.apache.tika:tika-parsers, import org.xml.sax.SAXException will cause an error.
Environment
  • Operating System: Windows 10
  • JDK version: Amazon Corretto jdk11.0.6_10
  • Visual Studio Code version: 1.45.0
  • Java extension version: 0.61.0
Steps To Reproduce
  1. [step 1]
  2. [step 2]

demo.zip

Current Result

Current Result

Expected Result
Additional Informations
@fbricon
Copy link
Collaborator

fbricon commented May 8, 2020

So those are actually 2 bugs from 2 different compilers.

1 - The "package org.xml.sax" is accessible from more than one module: this error is raised by the Eclipse ECJ compiler (https://bugs.eclipse.org/bugs/show_bug.cgi?id=536928), used within vscode-java. The fact it works with javac (and all tools using javac for compiling), is a bug! See https://bugs.openjdk.java.net/browse/JDK-8215739. So eventually, when that's fixed in javac, you'll see the same issue:

One easy fix is to exclude the xml-api dependency, since its classes are now provided by Java 11:

<dependency>
  <groupId>org.apache.tika</groupId>
  <artifactId>tika-parsers</artifactId>
  <version>1.24</version>
  <exclusions>
    <exclusion>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
    </exclusion>
  </exclusions>
</dependency>

2 - Missing code implementation in the compiler is definitely an ECJ bug. I have no workaround for that one, but to not reference this class in the Javadoc

@fbricon fbricon changed the title Code comments and import error. Link in javadoc causes an error May 8, 2020
@fbricon fbricon added this to the End May 2020 milestone May 20, 2020
@fbricon
Copy link
Collaborator

fbricon commented May 20, 2020

Upstream https://bugs.eclipse.org/bugs/show_bug.cgi?id=562960 was fixed. We should be able to pick up the JDT 2020-06 M3 bits at the end of the month, once it's released

@fbricon
Copy link
Collaborator

fbricon commented Jun 14, 2020

This is now fixed with the latest JDT bits embedded in vscode-java

@fbricon fbricon closed this as completed Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants