Skip to content

Heavily reviewed CountryCode/BIC code (but not IBAN code)#38

Open
dtonhofer wants to merge 10 commits intoarturmkrtchyan:masterfrom
dtonhofer:master
Open

Heavily reviewed CountryCode/BIC code (but not IBAN code)#38
dtonhofer wants to merge 10 commits intoarturmkrtchyan:masterfrom
dtonhofer:master

Conversation

@dtonhofer
Copy link

  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.

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.
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.5%) to 97.52% when pulling 39244b4 on dtonhofer:master into ce1ca12 on arturmkrtchyan:master.

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