Use StringUtil.intValueOf instead of StringUtil.intValueOfOptional or custom code#10779
Merged
Conversation
Contributor
|
The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build. |
Siedlerchr
approved these changes
Jan 14, 2024
Member
There was a problem hiding this comment.
.We should get rid of our custom method for Int parsing in the long term. I doubt that it makes a hug difference nowadays and I guess the jdk standard implementation to be better optimized.
Measure not gues
Member
Author
|
You mean Source: https://web.archive.org/web/20160202121154/http://nadeausoftware.com/articles/2009/08/java_tip_how_parse_integers_quickly - via https://stackoverflow.com/a/2101299/873282, which we use in our code. |
calixtus
approved these changes
Jan 14, 2024
Siedlerchr
added a commit
that referenced
this pull request
Jan 15, 2024
* upstream/main: Bump org.apache.lucene:lucene-queries from 9.9.0 to 9.9.1 (#10795) Bump com.google.guava:guava from 32.1.3-jre to 33.0.0-jre (#10793) Bump com.dlsc.gemsfx:gemsfx from 1.90.0 to 1.92.0 (#10796) Bump org.mockito:mockito-core from 5.8.0 to 5.9.0 (#10794) Bump lycheeverse/lychee-action from 1.9.0 to 1.9.1 (#10791) refactor: Transform calls to `Objects.isNull(..)` and `Objects.nonNull(..)` (#10788) refactor: Prefer `String#formatted(Object...)` (#10787) refactor: Adopt `SequencedCollection` (#10786) Update CSL styles (#10785) Initial Pseudonymization (#10776) Use StringUtil.intValueOf instead of StringUtil.intValueOfOptional or custom code (#10779) Refine loading code (#10780) Add wokraround for theme detector issue (#10777) Fix enablement of Aux dialog's "Generate" button (#10775) Fix package of TypedBibEntry (#10774) Fix labeling of PRs for newcomers (#10773) Update add-greeting-to-issue.yml Update add-greeting-to-issue.yml Update add-greeting-to-issue.yml
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.

While stumbling on an OpenRewrite issue (openrewrite/rewrite#3913), I found WTF code inside JabRef. We use that code for performance reasons.
Thus, I thought, let's really use it to gain performance. Here is my (first) change. In a follow-up PR, I will rewrite all
Integer.parseInttoStringUtil.valueOf. This takes a bit time, since I don't know how to use refaster in OpenRewrite or how we can use error prone's refaster templates here.Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)