Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes issue #1241 by specifying UTF-8 encoding when reading log files instead of using platform-dependent encoding. This ensures consistent behavior across different operating systems and environments where the default platform encoding may vary.
- Replaces platform encoding (null) with explicit UTF-8 encoding specification
- Improves cross-platform compatibility for log file reading
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| logError("MavenInvocationException: " + e.getMessage(), e); | ||
|
|
||
| String invokerLogContent = JavadocUtil.readFile(invokerLogFile, null /* platform encoding */); | ||
| String invokerLogContent = JavadocUtil.readFile(invokerLogFile, "UTF-8"); |
There was a problem hiding this comment.
Consider using StandardCharsets.UTF_8 instead of the string literal "UTF-8" to avoid potential typos and improve type safety.
Suggested change
| String invokerLogContent = JavadocUtil.readFile(invokerLogFile, "UTF-8"); | |
| String invokerLogContent = JavadocUtil.readFile(invokerLogFile, StandardCharsets.UTF_8.name()); |
Member
There was a problem hiding this comment.
I tend to agree with the bot here.
olamy
requested changes
Aug 19, 2025
| logError("MavenInvocationException: " + e.getMessage(), e); | ||
|
|
||
| String invokerLogContent = JavadocUtil.readFile(invokerLogFile, null /* platform encoding */); | ||
| String invokerLogContent = JavadocUtil.readFile(invokerLogFile, "UTF-8"); |
Member
There was a problem hiding this comment.
I tend to agree with the bot here.
Contributor
Author
looks flaky |
1 task
github-merge-queue Bot
pushed a commit
to camunda/camunda
that referenced
this pull request
Oct 17, 2025
## Description Since last upgrade of `maven-javadoc-plugin` charset difinition is required. Ref: apache/maven-javadoc-plugin#1245 ## Checklist <!--- Please delete options that are not relevant. Boxes should be checked by reviewer. --> - [ ] Enable backports when necessary (fex. [for bug fixes](https://github.com/camunda/camunda/blob/main/CONTRIBUTING.md#backporting-changes) or [for CI changes](https://github.com/camunda/camunda/wiki/CI-&-Automation#when-to-backport-ci-changes)). ## Related issues closes #
github-merge-queue Bot
pushed a commit
to camunda/camunda
that referenced
this pull request
Oct 17, 2025
## Description Since last upgrade of `maven-javadoc-plugin` charset difinition is required. Ref: apache/maven-javadoc-plugin#1245 ## Checklist <!--- Please delete options that are not relevant. Boxes should be checked by reviewer. --> - [ ] Enable backports when necessary (fex. [for bug fixes](https://github.com/camunda/camunda/blob/main/CONTRIBUTING.md#backporting-changes) or [for CI changes](https://github.com/camunda/camunda/wiki/CI-&-Automation#when-to-backport-ci-changes)). ## Related issues closes #
github-merge-queue Bot
pushed a commit
to camunda/camunda
that referenced
this pull request
Oct 17, 2025
## Description Since last upgrade of `maven-javadoc-plugin` charset difinition is required. Ref: apache/maven-javadoc-plugin#1245 ## Checklist <!--- Please delete options that are not relevant. Boxes should be checked by reviewer. --> - [ ] Enable backports when necessary (fex. [for bug fixes](https://github.com/camunda/camunda/blob/main/CONTRIBUTING.md#backporting-changes) or [for CI changes](https://github.com/camunda/camunda/wiki/CI-&-Automation#when-to-backport-ci-changes)). ## Related issues closes #
liliancavalet
added a commit
to camunda/camunda
that referenced
this pull request
Oct 17, 2025
## Description Since last upgrade of `maven-javadoc-plugin` charset difinition is required. Ref: apache/maven-javadoc-plugin#1245 ## Checklist <!--- Please delete options that are not relevant. Boxes should be checked by reviewer. --> - [ ] Enable backports when necessary (fex. [for bug fixes](https://github.com/camunda/camunda/blob/main/CONTRIBUTING.md#backporting-changes) or [for CI changes](https://github.com/camunda/camunda/wiki/CI-&-Automation#when-to-backport-ci-changes)). ## Related issues closes #
1 task
github-merge-queue Bot
pushed a commit
to camunda/camunda
that referenced
this pull request
Oct 17, 2025
## Description After reading [this issue ](apache/maven-javadoc-plugin#1245) thoroughly I understood that the actual fix was provided on javadoc 3.12.0 version ## Checklist <!--- Please delete options that are not relevant. Boxes should be checked by reviewer. --> - [ ] Enable backports when necessary (fex. [for bug fixes](https://github.com/camunda/camunda/blob/main/CONTRIBUTING.md#backporting-changes) or [for CI changes](https://github.com/camunda/camunda/wiki/CI-&-Automation#when-to-backport-ci-changes)). ## Related issues closes #
liliancavalet
added a commit
to camunda/camunda
that referenced
this pull request
Oct 17, 2025
## Description After reading [this issue ](apache/maven-javadoc-plugin#1245) thoroughly I understood that the actual fix was provided on javadoc 3.12.0 version ## Checklist <!--- Please delete options that are not relevant. Boxes should be checked by reviewer. --> - [ ] Enable backports when necessary (fex. [for bug fixes](https://github.com/camunda/camunda/blob/main/CONTRIBUTING.md#backporting-changes) or [for CI changes](https://github.com/camunda/camunda/wiki/CI-&-Automation#when-to-backport-ci-changes)). ## Related issues closes #
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@wendigo fixes #1241
On inspection I realized that the existing code is working at cross-purposes to the design of Java in that it catches an exception and converts it to null. That is, it converts an exception to an error flag that has to be explicitly checked for. Instead the exception should be caught and handled. I deprecated the method and replaced all usages within this plugin. Since the method is protected inside what should be (but isn't) a static utility class, I doubt anyone else is subclassing and invoking this, but just in case I left it in.