Heavily reviewed CountryCode/BIC code (but not IBAN code)#38
Open
dtonhofer wants to merge 10 commits intoarturmkrtchyan:masterfrom
Open
Heavily reviewed CountryCode/BIC code (but not IBAN code)#38dtonhofer wants to merge 10 commits intoarturmkrtchyan:masterfrom
dtonhofer wants to merge 10 commits intoarturmkrtchyan:masterfrom
Conversation
1) Code cleaned up here and there, javadoc extended. 2) Handling for "transitional" Country Codes added. These are country codes that are "sunsetting" and should not be used anymore. However, the JDK may know about them still. 3) Added "sets" of CountryCode for enumeration. - Sets including the "transitional" CountryCode. - Sets not including the "transitional" CountryCode. 4) Added facilities to generate random BIC for tests. 5) Added a check on the BIC location field which was missing (specific case on first and on the second letter) 6) Reviewed test code somewhat, as it seemed overly complex. 7) Reviewed BicUtil (BIC validation) somewhat, as it seemed overly complex. 8) Some methods have been depracated to enforce clarity in naming. 9) "Bic.valueOf(bic)" has been deprecated in favor of "new Bic(bic)" 10) Added test to compare CountryCodes of JDK to the ones of iban4j. 11) Added BIC validation by Regex (must be called explicitly). Backward compatibility: Attention has been paid to keep method behaviour as it was! However the addition of "transitional" CountryCodes may cause some program iterating over CountryCodes.values to now find CountryCodes that are no longer "live". In that case, check using CountryCode.isTransitional() or use the "only live" sets provided by CountryCodeSets to iterate over.
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.
These are country codes that are "sunsetting" and
should not be used anymore. However, the JDK may
know about them still.
(specific case on first and on the second letter)
complex.
naming.
Backward compatibility:
Attention has been paid to keep method behaviour as it was!
However the addition of "transitional" CountryCodes may
cause some program iterating over CountryCodes.values to
now find CountryCodes that are no longer "live". In that
case, check using CountryCode.isTransitional() or use the
"only live" sets provided by CountryCodeSets to iterate over.