-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix modernizer #9824
Fix modernizer #9824
Conversation
@@ -42,7 +44,7 @@ void fieldAcceptsUTF8() { | |||
@Test | |||
void fieldDoesNotAcceptUmlauts() throws UnsupportedEncodingException { | |||
UTF8Checker checker = new UTF8Checker(Charset.forName("GBK")); | |||
String NonUTF8 = new String("你好,这条语句使用GBK字符集".getBytes(), "GBK"); | |||
String NonUTF8 = new String("你好,这条语句使用GBK字符集".getBytes(StandardCharsets.UTF_8), GBK); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure that this is intended here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test goes through. JavaDoc on getBytes
says that default Charset is used. Maybe be platform dependend. Java switched to UTF8 recently.
See the last parameter GBK
which recodes the bytes to GKB leading to non-utf. Therefore, I think, it works.
do not fail on changes
If modernizer does not fail, does any one look at it? Should we factor it out to a separate gradle task - similar to checkstyle? |
I would say we leave it as is. Most often the IDE already tells you that you can improve it |
Similar to checkstyle 🤣🤣🤣 |
* upstream/main: (88 commits) Minimal config for openRewrite Fix missing # Fix modernizer (JabRef#9824) CHANGELOG.md Removed unused code Refined ui Dissolved FileTab and moved contents to EntryTab Renamed CustomEditorFieldsTab to EntryEditorTabsTab Fixed antipattern, fixed radiobutton with checkbox Renamed ImportExportPreferences to ExportPreferences Improve search history by attaching change listener (JabRef#9794) Separated WebSearchPrefs and ExportPrefs Separated WebSearchTab and ExportTab Renamed ImportExportTab to WebSearchTab Fix split multiline localization (JabRef#9814) New Crowdin updates (JabRef#9834) change versin to 0.8.10 remove jacoco version config Bump org.junit.platform:junit-platform-launcher from 1.9.2 to 1.9.3 Bump org.jsoup:jsoup from 1.15.4 to 1.16.1 ...
…biblatex-date-formats * upstream/main: (132 commits) Add four rules not having any effect Apply BooleanChecksNotInverted Remove unused RadioButtonCell Minimal config for openRewrite Fix missing # Fix modernizer (JabRef#9824) CHANGELOG.md Removed unused code Refined ui Dissolved FileTab and moved contents to EntryTab Renamed CustomEditorFieldsTab to EntryEditorTabsTab Fixed antipattern, fixed radiobutton with checkbox Renamed ImportExportPreferences to ExportPreferences Improve search history by attaching change listener (JabRef#9794) Separated WebSearchPrefs and ExportPrefs Separated WebSearchTab and ExportTab Renamed ImportExportTab to WebSearchTab Fix split multiline localization (JabRef#9814) New Crowdin updates (JabRef#9834) change versin to 0.8.10 ...
* upstream/main: (110 commits) remove extra hack rather add a todo Enable CompareEnumsWithEqualityOperator cleanup checkstyle checkstyle Prefer u over y, remove some patterns that have not a test yet make parameterized test Enable ChainStringBuilderAppendCalls Add four rules not having any effect Apply BooleanChecksNotInverted Remove unused RadioButtonCell move exception handling upwards Minimal config for openRewrite Fix missing # Update CHANGELOG.md exchange locations between library mode and library encoding added to Changelog exchange locations between library mode and library encoding in general tab Fix modernizer (JabRef#9824) CHANGELOG.md Removed unused code Refined ui ... # Conflicts: # src/main/java/org/jabref/logic/exporter/ModsExporter.java
Modernizer starts to complain a lot in our source code.
Many times:
I disabled that check.
The other checks were fine. All fixed. This is a hotfix and blocks merge of #9811.
Compulsory checks