[MJAVADOC-694] Avoid empty warn message from getResolvePathResult#104
Conversation
|
@rfscholte please look, you last fix plugin fo java modules - MJAVADOC-568 |
| if ( getLog().isDebugEnabled() ) | ||
| { | ||
| cause = cause.getCause(); | ||
| getLog().debug( "resole path for: " + artifactFile + " cause error: " + e.getMessage(), e ); |
There was a problem hiding this comment.
type in resove (missing the L)
There was a problem hiding this comment.
Don't write the stacktrace, it is not useful. If the message is empty, it must be fixed in plexus-java.
There was a problem hiding this comment.
Implementation in plexus-java for jdk < 9 is:
What is your proposition for code here?
we can provide some message for UnsupportedOperationException in plexus-java ... but logging warn here is too talkative, it look like standard flow for detecting modules support
There was a problem hiding this comment.
The problem is that if there's no module descriptor nor Manifest file with an Automatic-Module-Name, you need Java 9 code to get the module name based on the filename. So you must set in JdkHome in the request if you're not running with Java 9+.
The plugin is responsible to set this up correctly.
IIRC due to a recent change this method became exposed, otherwise it would never occur. So better to improve the message of the exception.
There was a problem hiding this comment.
probably it is another issue that plugin don't set JdkHome .. all test pass so such behavior is not coverage by regression ...
There was a problem hiding this comment.
JdkHome should only be set when using ToolChain
There was a problem hiding this comment.
It seems more complicated, i don't see any test for toolchains in project, so it should be done as separate bigger issue.
e29cec1 to
2e6d343
Compare
| cause = cause.getCause(); | ||
| } | ||
|
|
||
| getLog().debug( "resolve path for: " + artifactFile + " cause error: " + e ); |
There was a problem hiding this comment.
discovered an existing bug here: e should be cause
There was a problem hiding this comment.
I don't exactly understood your comments, do you want change message of .debug("...")?
There was a problem hiding this comment.
The purpose it to log the message of the root cause, so it should be
getLog().debug( "resolve path for: " + artifactFile + " cause error: " + cause );
2e6d343 to
735f9a7
Compare
rfscholte
left a comment
There was a problem hiding this comment.
Let's give it a try; I hope that if javadoc fails, that exception is clear enough to solve the issue.
|
Thanks for approval, so please merge and process jira issue |
735f9a7 to
7ce2613
Compare
|
@rfscholte I don't think that |
|
Resolve #1070 |
Because user can't do nothing with such message, and exception don't break execution,
logging in verbose mode with stacktrace will be enough.
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[MJAVADOC-XXX] - Fixes bug in ApproximateQuantiles,where you replace
MJAVADOC-XXXwith the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean verify -Prun-itsto make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.