[ 
https://issues.apache.org/jira/browse/VALIDATOR-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16589232#comment-16589232
 ] 

Alex commented on VALIDATOR-424:
--------------------------------

Thanks for the feedback. I'm happy to leave this if you feel it will be time 
sink relative to any benefits. However, if I could make some final comments...

The weightedValue method is different between the 2 classes only in the final 
line. The line used in the ISIN class uses a method made available from the 
ModulusCheckDigit Class which looks like a better implementation over using the 
ternary operator. The 2 lines are equivalent for small values ( < 18 ) which 
are all that should occur. I've now updated this to use the method that is 
available in the ModulusCheckDigit Class.

A final class is one that cannot be extended. By removing the final we allow 
the LuhnCheckDigit to extend the class. Other classes could now extend 
LuhnCheckDigit (good or bad?) and we have would have an extra level in the 
inheritence hierarchy.

 

> ISINCheckDigit could extend LuhnCheckDigit
> ------------------------------------------
>
>                 Key: VALIDATOR-424
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-424
>             Project: Commons Validator
>          Issue Type: Improvement
>    Affects Versions: 1.6
>            Reporter: Sebb
>            Priority: Major
>
> ISINCheckDigit is a version of Luhn which allows alphabetic characters.
> The class could extend the Luhn class.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to