1 | package fr.sii.ogham.sms.message.addressing.translator; | |
2 | ||
3 | import fr.sii.ogham.sms.message.PhoneNumber; | |
4 | import fr.sii.ogham.sms.message.addressing.NumberingPlanIndicator; | |
5 | import fr.sii.ogham.sms.message.addressing.TypeOfNumber; | |
6 | ||
7 | /** | |
8 | * Phone number handler for short codes. If the sender address is a short code, | |
9 | * TON is set to 3, and NPI is set to 0. A number is considered to be a short | |
10 | * code if the length of the number is 5 digits or less. | |
11 | * | |
12 | * @author cdejonghe | |
13 | * | |
14 | */ | |
15 | public class ShortCodeNumberFormatHandler extends AbstractFixedPhoneNumberHandler { | |
16 | ||
17 | private static final int SHORTCODE_LENGTH = 5; | |
18 | ||
19 | public ShortCodeNumberFormatHandler() { | |
20 | super(TypeOfNumber.NETWORK_SPECIFIC, NumberingPlanIndicator.UNKNOWN); | |
21 | } | |
22 | ||
23 | @Override | |
24 | public boolean supports(PhoneNumber phoneNumber) { | |
25 |
20
1. supports : replaced boolean return with true for fr/sii/ogham/sms/message/addressing/translator/ShortCodeNumberFormatHandler::supports → NO_COVERAGE 2. supports : replaced boolean return with true for fr/sii/ogham/sms/message/addressing/translator/ShortCodeNumberFormatHandler::supports → SURVIVED 3. supports : changed conditional boundary → SURVIVED 4. supports : changed conditional boundary → NO_COVERAGE 5. supports : negated conditional → NO_COVERAGE 6. supports : negated conditional → SURVIVED 7. supports : negated conditional → NO_COVERAGE 8. supports : negated conditional → SURVIVED 9. supports : negated conditional → SURVIVED 10. supports : negated conditional → NO_COVERAGE 11. supports : replaced boolean return with true for fr/sii/ogham/sms/message/addressing/translator/ShortCodeNumberFormatHandler::supports → TIMED_OUT 12. supports : changed conditional boundary → TIMED_OUT 13. supports : negated conditional → TIMED_OUT 14. supports : negated conditional → TIMED_OUT 15. supports : negated conditional → TIMED_OUT 16. supports : replaced boolean return with true for fr/sii/ogham/sms/message/addressing/translator/ShortCodeNumberFormatHandler::supports → KILLED 17. supports : changed conditional boundary → KILLED 18. supports : negated conditional → KILLED 19. supports : negated conditional → KILLED 20. supports : negated conditional → KILLED |
return phoneNumber != null && phoneNumber.getNumber() != null && phoneNumber.getNumber().length() <= SHORTCODE_LENGTH; |
26 | } | |
27 | } | |
Mutations | ||
25 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 9.9 10.10 11.11 12.12 13.13 14.14 15.15 16.16 17.17 18.18 19.19 20.20 |