Skip to content

Conversation

@winfriedgerlach
Copy link

@winfriedgerlach winfriedgerlach commented Nov 12, 2025

  • both new BigInteger() and Long.parseLong() accept strings with + prefix, there is no need to remove anything (maybe the confusion came from an error in the JavaDoc, I noticed that in Java 11 the JavaDoc for BigInteger(String) doesn't mention the + sign while the JavaDoc for BigInteger(String, int) is correct; the JavaDoc was fixed in later Java versions)
  • the extra checks for . or non-digits also make no sense, because they will lead to a NumberFormatException anyway
  • there should be a slight performance benefit as well, but microbenchmarking showed that this is insignificant --> correct semantics are more important here

Copy link
Contributor

@laurentschoelens laurentschoelens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be happy to see every use case handled in the removed function in order to check if nothing is broken.

Also please update copyrights header regarding Oracle or Eclipse situation you're in

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