arturmkrtchyan / iban4j

A Java library for generation and validation of the International Bank Account Numbers (IBAN ISO_13616) and Business Identifier Codes (BIC ISO_9362).
http://iban4j.org
Apache License 2.0
270 stars 124 forks source link

Minor: CountryCode.getAlpha2() returns name instead of code #115

Closed salmov-e-n closed 1 year ago

salmov-e-n commented 1 year ago

https://github.com/arturmkrtchyan/iban4j/blob/master/src/main/java/org/iban4j/CountryCode.java#L791

hajk1 commented 1 year ago

This is a bit confusing, "name()" method is an internal method of Enum and the return value is correct(Alpha2). However, it is very hard to distinguish between "name" and "name()". I might refactor the "name" variable to something more meaningful like "Description" to avoid this confusion.

salmov-e-n commented 1 year ago

Thanks, agree! It was just a confusion. I'm not sure variable needs to be refactored.