Skip to content

RequestForComments/Feedback - RAT-273: Due to JDK changes test expectations had to be changed when building against newer JDKs#57

Closed
ottlinger wants to merge 6 commits intomasterfrom
fix/RAT-273
Closed

RequestForComments/Feedback - RAT-273: Due to JDK changes test expectations had to be changed when building against newer JDKs#57
ottlinger wants to merge 6 commits intomasterfrom
fix/RAT-273

Conversation

@ottlinger
Copy link
Copy Markdown
Contributor

@ottlinger ottlinger commented Mar 28, 2022

LineNumberReader behaves differently in newer JDKs, thus test expectations read more lines as a line ending is treated differently than in JDK8.

see details in https://issues.apache.org/jira/browse/RAT-273

  • RFC/ wait for feedback
  • adapt changelog after merge to get these changes into the release log
  • fix Javadoc errors happening with JDK17
  • fix error in RatCheckMojoTest
Caused by: java.lang.reflect.InaccessibleObjectException: 
Unable to make field private static volatile java.nio.charset.Charset java.nio.charset.Charset.defaultCharset accessible: 
module java.base does not "opens java.nio.charset" to unnamed module @2a098129

@ottlinger ottlinger changed the title RAT-273: Due to JDK changes test expectations had to be changed RAT-273: Due to JDK changes test expectations had to be changed when building against newer JDKs Mar 28, 2022
@ottlinger ottlinger changed the title RAT-273: Due to JDK changes test expectations had to be changed when building against newer JDKs RequestForComments/Feedback - RAT-273: Due to JDK changes test expectations had to be changed when building against newer JDKs Mar 28, 2022
@ottlinger
Copy link
Copy Markdown
Contributor Author

@jochenw can you help out with the problems in RatCheckMojoTest? I experimented with adding argLine arguments to maven-surefire/failsafe plugin but am unable to get it running locally with JDK18. Maybe you know a workaround. Thanks
patchForRatCheckMojoTest.txt

@jochenw
Copy link
Copy Markdown
Contributor

jochenw commented Mar 28, 2022

@ottlinger Glad to help, if you let me know, how to reproduce the issue. For now, I'll assume that I only need to use Java 17.

@ottlinger
Copy link
Copy Markdown
Contributor Author

@jochenw if you apply the attached patch to the branch you'll see the RatCheckMojoTest failures ..... with JDK17 and 18. Apart from that there seems to be a javadoc issue, but any help is greatly appreciated :
patchShowingErrorWithJDK18or17.txt
)

In the patch I tried to add argument parameters that should fix the error, but maybe you have a solution that is within the code itself.

@ottlinger
Copy link
Copy Markdown
Contributor Author

Will create new tickets once the problems arise.

@ottlinger ottlinger closed this May 9, 2022
@ottlinger ottlinger deleted the fix/RAT-273 branch November 12, 2023 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants