| 1 | package fr.sii.ogham.sms.builder.cloudhopper; | |
| 2 | ||
| 3 | import java.util.function.Supplier; | |
| 4 | ||
| 5 | import com.cloudhopper.commons.charset.Charset; | |
| 6 | import com.cloudhopper.commons.charset.CharsetUtil; | |
| 7 | import com.cloudhopper.commons.gsm.DataCoding; | |
| 8 | import com.cloudhopper.smpp.SmppConstants; | |
| 9 | ||
| 10 | import fr.sii.ogham.core.builder.Builder; | |
| 11 | import fr.sii.ogham.core.builder.configuration.ConfigurationValueBuilder; | |
| 12 | import fr.sii.ogham.core.builder.configuration.ConfigurationValueBuilderHelper; | |
| 13 | import fr.sii.ogham.core.builder.configurer.Configurer; | |
| 14 | import fr.sii.ogham.core.builder.context.BuildContext; | |
| 15 | import fr.sii.ogham.core.builder.env.EnvironmentBuilder; | |
| 16 | import fr.sii.ogham.core.fluent.AbstractParent; | |
| 17 | import fr.sii.ogham.sms.sender.impl.cloudhopper.preparator.CharsetMapToCharacterEncodingGroupDataCodingProvider; | |
| 18 | import fr.sii.ogham.sms.sender.impl.cloudhopper.preparator.CharsetMapToGeneralGroupDataCodingProvider; | |
| 19 | import fr.sii.ogham.sms.sender.impl.cloudhopper.preparator.DataCodingProvider; | |
| 20 | import fr.sii.ogham.sms.sender.impl.cloudhopper.preparator.FirstSupportingDataCodingProvider; | |
| 21 | import fr.sii.ogham.sms.sender.impl.cloudhopper.preparator.FixedByteValueDataCodingProvider; | |
| 22 | ||
| 23 | /** | |
| 24 | * Data Coding Scheme is a one-octet field in Short Messages (SM) and Cell | |
| 25 | * Broadcast Messages (CB) which carries a basic information how the recipient | |
| 26 | * handset should process the received message. The information includes: | |
| 27 | * <ul> | |
| 28 | * <li>the character set or message coding which determines the encoding of the | |
| 29 | * message user data</li> | |
| 30 | * <li>the message class which determines to which component of the Mobile | |
| 31 | * Station (MS) or User Equipment (UE) should be the message delivered</li> | |
| 32 | * <li>the request to automatically delete the message after reading</li> | |
| 33 | * <li>the state of flags indicating presence of unread voicemail, fax, e-mail | |
| 34 | * or other messages</li> | |
| 35 | * <li>the indication that the message content is compressed</li> | |
| 36 | * <li>the language of the cell broadcast message</li> | |
| 37 | * </ul> | |
| 38 | * The field is described in 3GPP 23.040 and 3GPP 23.038 under the name TP-DCS | |
| 39 | * (see <a href= | |
| 40 | * "https://en.wikipedia.org/wiki/Data_Coding_Scheme#SMS_Data_Coding_Scheme">SMS | |
| 41 | * Data Coding Scheme</a>). | |
| 42 | * | |
| 43 | * <p> | |
| 44 | * Configures how Cloudhopper determines the Data Coding Scheme to use: | |
| 45 | * <ul> | |
| 46 | * <li>Automatic mode: | |
| 47 | * <ul> | |
| 48 | * <li>If SMPP v3.3 is used then | |
| 49 | * {@link CharsetMapToGeneralGroupDataCodingProvider} generates a | |
| 50 | * {@link DataCoding} with | |
| 51 | * {@link DataCoding#createGeneralGroup(byte, Byte, boolean)}</li> | |
| 52 | * <li>If SMPP v3.4+ is used then | |
| 53 | * {@link CharsetMapToCharacterEncodingGroupDataCodingProvider} generates a | |
| 54 | * {@link DataCoding} with | |
| 55 | * {@link DataCoding#createCharacterEncodingGroup(byte)}</li> | |
| 56 | * </ul> | |
| 57 | * </li> | |
| 58 | * <li>Allow registration of custom {@link DataCodingProvider}</li> | |
| 59 | * </ul> | |
| 60 | * | |
| 61 | * @author Aurélien Baudet | |
| 62 | */ | |
| 63 | public class DataCodingSchemeBuilder extends AbstractParent<CloudhopperBuilder> implements Builder<DataCodingProvider> { | |
| 64 | private final BuildContext buildContext; | |
| 65 | private final Supplier<Byte> interfaceVersionProvider; | |
| 66 | private final ConfigurationValueBuilderHelper<DataCodingSchemeBuilder, Boolean> autoValueBuilder; | |
| 67 | private final ConfigurationValueBuilderHelper<DataCodingSchemeBuilder, Byte> dcsValueBuilder; | |
| 68 | private DataCodingProvider custom; | |
| 69 | ||
| 70 | /** | |
| 71 | * Initializes the builder with a parent builder. The parent builder is used | |
| 72 | * when calling {@link #and()} method. The {@link EnvironmentBuilder} is | |
| 73 | * used to evaluate properties when {@link #build()} method is called. | |
| 74 | * | |
| 75 | * @param parent | |
| 76 | * the parent builder | |
| 77 | * @param buildContext | |
| 78 | * for registering instances and property evaluation | |
| 79 | * @param interfaceVersionProvider | |
| 80 | * A function used to retrieve the value of the interface | |
| 81 | * version. This is needed when {@link #auto(Boolean)} mode is | |
| 82 | * enabled. | |
| 83 | */ | |
| 84 | public DataCodingSchemeBuilder(CloudhopperBuilder parent, BuildContext buildContext, Supplier<Byte> interfaceVersionProvider) { | |
| 85 | super(parent); | |
| 86 | this.buildContext = buildContext; | |
| 87 | this.interfaceVersionProvider = interfaceVersionProvider; | |
| 88 | this.autoValueBuilder = buildContext.newConfigurationValueBuilder(this, Boolean.class); | |
| 89 | this.dcsValueBuilder = buildContext.newConfigurationValueBuilder(this, Byte.class); | |
| 90 | } | |
| 91 | ||
| 92 | /** | |
| 93 | * * Enable/disable automatic mode based on SMPP interface version. | |
| 94 | * | |
| 95 | * <p> | |
| 96 | * {@link DataCodingProvider} implementation is selected based on SMPP | |
| 97 | * interface version. SMPP v3.3 Data Coding Scheme values are defined in | |
| 98 | * <a href= | |
| 99 | * "https://en.wikipedia.org/wiki/Data_Coding_Scheme#SMS_Data_Coding_Scheme">SMS | |
| 100 | * Data Coding Scheme</a>. SMPP 3.4 introduced a new list of data_coding | |
| 101 | * values (<a href= | |
| 102 | * "https://en.wikipedia.org/wiki/Short_Message_Peer-to-Peer#PDU_body">PDU | |
| 103 | * body</a>). | |
| 104 | * </p> | |
| 105 | * | |
| 106 | * <strong>SMPP v3.3</strong> | |
| 107 | * <p> | |
| 108 | * The text message is encoded using {@link Charset}. According to that | |
| 109 | * charset, the Data Coding Scheme is determined using the <strong>General | |
| 110 | * Data Coding group</strong> table. Therefore, a simple mapping is applied: | |
| 111 | * <ul> | |
| 112 | * <li>{@link CharsetUtil#NAME_GSM7} {@literal ->} | |
| 113 | * {@link DataCoding#CHAR_ENC_DEFAULT}</li> | |
| 114 | * <li>{@link CharsetUtil#NAME_PACKED_GSM} {@literal ->} | |
| 115 | * {@link DataCoding#CHAR_ENC_DEFAULT}</li> | |
| 116 | * <li>{@link CharsetUtil#NAME_GSM} {@literal ->} | |
| 117 | * {@link DataCoding#CHAR_ENC_8BIT}</li> | |
| 118 | * <li>{@link CharsetUtil#NAME_GSM8} {@literal ->} | |
| 119 | * {@link DataCoding#CHAR_ENC_8BIT}</li> | |
| 120 | * <li>{@link CharsetUtil#NAME_UCS_2} {@literal ->} | |
| 121 | * {@link DataCoding#CHAR_ENC_UCS2}</li> | |
| 122 | * </ul> | |
| 123 | * | |
| 124 | * | |
| 125 | * <strong>SMPP v3.4+</strong> | |
| 126 | * <p> | |
| 127 | * The text message is encoded using {@link Charset}. According to that | |
| 128 | * charset, the Data Coding Scheme is determined using only the | |
| 129 | * <strong>Alphabet</strong> table. Therefore, a simple mapping is applied: | |
| 130 | * <ul> | |
| 131 | * <li>{@link CharsetUtil#NAME_GSM7} {@literal ->} | |
| 132 | * {@link DataCoding#CHAR_ENC_DEFAULT}</li> | |
| 133 | * <li>{@link CharsetUtil#NAME_PACKED_GSM} {@literal ->} | |
| 134 | * {@link DataCoding#CHAR_ENC_DEFAULT}</li> | |
| 135 | * <li>{@link CharsetUtil#NAME_GSM} {@literal ->} | |
| 136 | * {@link DataCoding#CHAR_ENC_8BIT}</li> | |
| 137 | * <li>{@link CharsetUtil#NAME_GSM8} {@literal ->} | |
| 138 | * {@link DataCoding#CHAR_ENC_8BIT}</li> | |
| 139 | * <li>{@link CharsetUtil#NAME_ISO_8859_1} {@literal ->} | |
| 140 | * {@link DataCoding#CHAR_ENC_LATIN1}</li> | |
| 141 | * <li>{@link CharsetUtil#NAME_UCS_2} {@literal ->} | |
| 142 | * {@link DataCoding#CHAR_ENC_UCS2}</li> | |
| 143 | * </ul> | |
| 144 | * | |
| 145 | * | |
| 146 | * <p> | |
| 147 | * The value set using this method takes precedence over any property and | |
| 148 | * default value configured using {@link #auto()}. | |
| 149 | * | |
| 150 | * <pre> | |
| 151 | * .auto(false) | |
| 152 | * .auto() | |
| 153 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 154 | * .defaultValue(true) | |
| 155 | * </pre> | |
| 156 | * | |
| 157 | * <pre> | |
| 158 | * .auto(false) | |
| 159 | * .auto() | |
| 160 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 161 | * .defaultValue(true) | |
| 162 | * </pre> | |
| 163 | * | |
| 164 | * In both cases, {@code auto(false)} is used. | |
| 165 | * | |
| 166 | * <p> | |
| 167 | * If this method is called several times, only the last value is used. | |
| 168 | * | |
| 169 | * <p> | |
| 170 | * If {@code null} value is set, it is like not setting a value at all. The | |
| 171 | * property/default value configuration is applied. | |
| 172 | * | |
| 173 | * @param enable | |
| 174 | * enable or disable automatic Data Coding Scheme detection | |
| 175 | * @return this instance for fluent chaining | |
| 176 | */ | |
| 177 | public DataCodingSchemeBuilder auto(Boolean enable) { | |
| 178 |
1
1. auto : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → NO_COVERAGE |
autoValueBuilder.setValue(enable); |
| 179 |
1
1. auto : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::auto → NO_COVERAGE |
return this; |
| 180 | } | |
| 181 | ||
| 182 | /** | |
| 183 | * Enable/disable automatic mode based on SMPP interface version. | |
| 184 | * | |
| 185 | * <p> | |
| 186 | * {@link DataCodingProvider} implementation is selected based on SMPP | |
| 187 | * interface version. SMPP v3.3 Data Coding Scheme values are defined in | |
| 188 | * <a href= | |
| 189 | * "https://en.wikipedia.org/wiki/Data_Coding_Scheme#SMS_Data_Coding_Scheme">SMS | |
| 190 | * Data Coding Scheme</a>. SMPP 3.4 introduced a new list of data_coding | |
| 191 | * values (<a href= | |
| 192 | * "https://en.wikipedia.org/wiki/Short_Message_Peer-to-Peer#PDU_body">PDU | |
| 193 | * body</a>). | |
| 194 | * </p> | |
| 195 | * | |
| 196 | * <strong>SMPP v3.3</strong> | |
| 197 | * <p> | |
| 198 | * The text message is encoded using {@link Charset}. According to that | |
| 199 | * charset, the Data Coding Scheme is determined using the <strong>General | |
| 200 | * Data Coding group</strong> table. Therefore, a simple mapping is applied: | |
| 201 | * <ul> | |
| 202 | * <li>{@link CharsetUtil#NAME_GSM7} {@literal ->} | |
| 203 | * {@link DataCoding#CHAR_ENC_DEFAULT}</li> | |
| 204 | * <li>{@link CharsetUtil#NAME_PACKED_GSM} {@literal ->} | |
| 205 | * {@link DataCoding#CHAR_ENC_DEFAULT}</li> | |
| 206 | * <li>{@link CharsetUtil#NAME_GSM} {@literal ->} | |
| 207 | * {@link DataCoding#CHAR_ENC_8BIT}</li> | |
| 208 | * <li>{@link CharsetUtil#NAME_GSM8} {@literal ->} | |
| 209 | * {@link DataCoding#CHAR_ENC_8BIT}</li> | |
| 210 | * <li>{@link CharsetUtil#NAME_UCS_2} {@literal ->} | |
| 211 | * {@link DataCoding#CHAR_ENC_UCS2}</li> | |
| 212 | * </ul> | |
| 213 | * | |
| 214 | * | |
| 215 | * <strong>SMPP v3.4+</strong> | |
| 216 | * <p> | |
| 217 | * The text message is encoded using {@link Charset}. According to that | |
| 218 | * charset, the Data Coding Scheme is determined using only the | |
| 219 | * <strong>Alphabet</strong> table. Therefore, a simple mapping is applied: | |
| 220 | * <ul> | |
| 221 | * <li>{@link CharsetUtil#NAME_GSM7} {@literal ->} | |
| 222 | * {@link DataCoding#CHAR_ENC_DEFAULT}</li> | |
| 223 | * <li>{@link CharsetUtil#NAME_PACKED_GSM} {@literal ->} | |
| 224 | * {@link DataCoding#CHAR_ENC_DEFAULT}</li> | |
| 225 | * <li>{@link CharsetUtil#NAME_GSM} {@literal ->} | |
| 226 | * {@link DataCoding#CHAR_ENC_8BIT}</li> | |
| 227 | * <li>{@link CharsetUtil#NAME_GSM8} {@literal ->} | |
| 228 | * {@link DataCoding#CHAR_ENC_8BIT}</li> | |
| 229 | * <li>{@link CharsetUtil#NAME_ISO_8859_1} {@literal ->} | |
| 230 | * {@link DataCoding#CHAR_ENC_LATIN1}</li> | |
| 231 | * <li>{@link CharsetUtil#NAME_UCS_2} {@literal ->} | |
| 232 | * {@link DataCoding#CHAR_ENC_UCS2}</li> | |
| 233 | * </ul> | |
| 234 | * | |
| 235 | * | |
| 236 | * <strong>Custom {@link DataCodingProvider} also configured</strong> | |
| 237 | * <p> | |
| 238 | * If a custom {@link DataCodingProvider} instance is registered, this | |
| 239 | * instance is tried first (see {@link #custom(DataCodingProvider)} for more | |
| 240 | * information). The automatic behavior is applied after if returned value | |
| 241 | * of custom {@link DataCodingProvider} is {@code null}. | |
| 242 | * | |
| 243 | * <strong>Fixed value also configured</strong> | |
| 244 | * <p> | |
| 245 | * If a fixed value is configured then it preempts any other configuration ( | |
| 246 | * {@link #auto(Boolean)} and {@link #custom(DataCodingProvider)} are not | |
| 247 | * used at all). | |
| 248 | * | |
| 249 | * | |
| 250 | * <p> | |
| 251 | * This method is mainly used by {@link Configurer}s to register some | |
| 252 | * property keys and/or a default value. The aim is to let developer be able | |
| 253 | * to externalize its configuration (using system properties, configuration | |
| 254 | * file or anything else). If the developer doesn't configure any value for | |
| 255 | * the registered properties, the default value is used (if set). | |
| 256 | * | |
| 257 | * <pre> | |
| 258 | * .auto() | |
| 259 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 260 | * .defaultValue(true) | |
| 261 | * </pre> | |
| 262 | * | |
| 263 | * <p> | |
| 264 | * Non-null value set using {@link #auto(Boolean)} takes precedence over | |
| 265 | * property values and default value. | |
| 266 | * | |
| 267 | * <pre> | |
| 268 | * .auto(false) | |
| 269 | * .auto() | |
| 270 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 271 | * .defaultValue(true) | |
| 272 | * </pre> | |
| 273 | * | |
| 274 | * The value {@code false} is used regardless of the value of the properties | |
| 275 | * and default value. | |
| 276 | * | |
| 277 | * <p> | |
| 278 | * See {@link ConfigurationValueBuilder} for more information. | |
| 279 | * | |
| 280 | * | |
| 281 | * @return the builder to configure property keys/default value | |
| 282 | */ | |
| 283 | public ConfigurationValueBuilder<DataCodingSchemeBuilder, Boolean> auto() { | |
| 284 |
5
1. auto : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::auto → KILLED 2. auto : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::auto → KILLED 3. auto : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::auto → KILLED 4. auto : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::auto → KILLED 5. auto : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::auto → KILLED |
return autoValueBuilder; |
| 285 | } | |
| 286 | ||
| 287 | /** | |
| 288 | * Use the same Data Coding Scheme value for all messages. | |
| 289 | * | |
| 290 | * <p> | |
| 291 | * The value set using this method takes precedence over any property and | |
| 292 | * default value configured using {@link #value()}. | |
| 293 | * | |
| 294 | * <pre> | |
| 295 | * .value((byte) 0x10) | |
| 296 | * .value() | |
| 297 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 298 | * .defaultValue((byte) 0) | |
| 299 | * </pre> | |
| 300 | * | |
| 301 | * <pre> | |
| 302 | * .value((byte) 0x10) | |
| 303 | * .value() | |
| 304 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 305 | * .defaultValue((byte) 0) | |
| 306 | * </pre> | |
| 307 | * | |
| 308 | * In both cases, {@code value((byte) 0x10)} is used. | |
| 309 | * | |
| 310 | * <p> | |
| 311 | * If this method is called several times, only the last value is used. | |
| 312 | * | |
| 313 | * <p> | |
| 314 | * If {@code null} value is set, it is like not setting a value at all. The | |
| 315 | * property/default value configuration is applied. | |
| 316 | * | |
| 317 | * @param value | |
| 318 | * the Data Coding Scheme value for all messages | |
| 319 | * @return this instance for fluent chaining | |
| 320 | */ | |
| 321 | public DataCodingSchemeBuilder value(Byte value) { | |
| 322 |
1
1. value : removed call to fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderHelper::setValue → NO_COVERAGE |
this.dcsValueBuilder.setValue(value); |
| 323 |
1
1. value : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::value → NO_COVERAGE |
return this; |
| 324 | } | |
| 325 | ||
| 326 | /** | |
| 327 | * Use the same Data Coding Scheme value for all messages. | |
| 328 | * | |
| 329 | * <p> | |
| 330 | * This method is mainly used by {@link Configurer}s to register some | |
| 331 | * property keys and/or a default value. The aim is to let developer be able | |
| 332 | * to externalize its configuration (using system properties, configuration | |
| 333 | * file or anything else). If the developer doesn't configure any value for | |
| 334 | * the registered properties, the default value is used (if set). | |
| 335 | * | |
| 336 | * <pre> | |
| 337 | * .value() | |
| 338 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 339 | * .defaultValue((byte) 0) | |
| 340 | * </pre> | |
| 341 | * | |
| 342 | * <p> | |
| 343 | * Non-null value set using {@link #value(Byte)} takes precedence over | |
| 344 | * property values and default value. | |
| 345 | * | |
| 346 | * <pre> | |
| 347 | * .value((byte) 0x10) | |
| 348 | * .value() | |
| 349 | * .properties("${custom.property.high-priority}", "${custom.property.low-priority}") | |
| 350 | * .defaultValue((byte) 0) | |
| 351 | * </pre> | |
| 352 | * | |
| 353 | * The value {@code (byte) 0x10} is used regardless of the value of the | |
| 354 | * properties and default value. | |
| 355 | * | |
| 356 | * <p> | |
| 357 | * See {@link ConfigurationValueBuilder} for more information. | |
| 358 | * | |
| 359 | * | |
| 360 | * @return the builder to configure property keys/default value | |
| 361 | */ | |
| 362 | public ConfigurationValueBuilder<DataCodingSchemeBuilder, Byte> value() { | |
| 363 |
5
1. value : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::value → KILLED 2. value : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::value → KILLED 3. value : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::value → KILLED 4. value : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::value → KILLED 5. value : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::value → KILLED |
return dcsValueBuilder; |
| 364 | } | |
| 365 | ||
| 366 | /** | |
| 367 | * Register a custom strategy to determine Data Coding Scheme value. | |
| 368 | * | |
| 369 | * <p> | |
| 370 | * Automatic behavior (see {@link #auto(Boolean)} is still active but custom | |
| 371 | * strategy is executed first. As the custom {@link DataCodingProvider} can | |
| 372 | * return {@code null}, the automatic behavior is executed in that case. | |
| 373 | * | |
| 374 | * <p> | |
| 375 | * If {@code null} value is provided, custom strategy is disabled. | |
| 376 | * | |
| 377 | * @param custom | |
| 378 | * the Strategy to determine Data Coding Scheme value. | |
| 379 | * @return this instance for fluent chaining | |
| 380 | */ | |
| 381 | public DataCodingSchemeBuilder custom(DataCodingProvider custom) { | |
| 382 | this.custom = custom; | |
| 383 |
2
1. custom : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::custom → NO_COVERAGE 2. custom : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::custom → KILLED |
return this; |
| 384 | } | |
| 385 | ||
| 386 | @Override | |
| 387 | @SuppressWarnings("squid:S5411") | |
| 388 | public DataCodingProvider build() { | |
| 389 | Byte dataCodingValue = dcsValueBuilder.getValue(); | |
| 390 |
5
1. build : negated conditional → KILLED 2. build : negated conditional → KILLED 3. build : negated conditional → KILLED 4. build : negated conditional → KILLED 5. build : negated conditional → KILLED |
if (dataCodingValue != null) { |
| 391 |
1
1. build : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::build → NO_COVERAGE |
return buildContext.register(new FixedByteValueDataCodingProvider(dataCodingValue)); |
| 392 | } | |
| 393 | FirstSupportingDataCodingProvider firstSupporting = buildContext.register(new FirstSupportingDataCodingProvider()); | |
| 394 |
5
1. build : negated conditional → SURVIVED 2. build : negated conditional → KILLED 3. build : negated conditional → KILLED 4. build : negated conditional → KILLED 5. build : negated conditional → KILLED |
if (custom != null) { |
| 395 |
2
1. build : removed call to fr/sii/ogham/sms/sender/impl/cloudhopper/preparator/FirstSupportingDataCodingProvider::register → SURVIVED 2. build : removed call to fr/sii/ogham/sms/sender/impl/cloudhopper/preparator/FirstSupportingDataCodingProvider::register → NO_COVERAGE |
firstSupporting.register(custom); |
| 396 | } | |
| 397 |
5
1. build : negated conditional → SURVIVED 2. build : negated conditional → KILLED 3. build : negated conditional → KILLED 4. build : negated conditional → KILLED 5. build : negated conditional → KILLED |
if (autoValueBuilder.getValue(false)) { |
| 398 |
5
1. build : removed call to fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::registerAuto → SURVIVED 2. build : removed call to fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::registerAuto → KILLED 3. build : removed call to fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::registerAuto → KILLED 4. build : removed call to fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::registerAuto → KILLED 5. build : removed call to fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::registerAuto → KILLED |
registerAuto(firstSupporting); |
| 399 | } | |
| 400 |
5
1. build : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::build → SURVIVED 2. build : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::build → KILLED 3. build : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::build → KILLED 4. build : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::build → KILLED 5. build : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/DataCodingSchemeBuilder::build → KILLED |
return firstSupporting; |
| 401 | } | |
| 402 | ||
| 403 | private void registerAuto(FirstSupportingDataCodingProvider firstSupporting) { | |
| 404 | Byte interfaceVersion = interfaceVersionProvider.get(); | |
| 405 |
1
1. registerAuto : negated conditional → SURVIVED |
if (interfaceVersion == SmppConstants.VERSION_3_3) { |
| 406 |
1
1. registerAuto : removed call to fr/sii/ogham/sms/sender/impl/cloudhopper/preparator/FirstSupportingDataCodingProvider::register → NO_COVERAGE |
firstSupporting.register(buildContext.register(new CharsetMapToGeneralGroupDataCodingProvider(false))); |
| 407 | return; | |
| 408 | } | |
| 409 | // 3.4+ | |
| 410 |
5
1. registerAuto : removed call to fr/sii/ogham/sms/sender/impl/cloudhopper/preparator/FirstSupportingDataCodingProvider::register → SURVIVED 2. registerAuto : removed call to fr/sii/ogham/sms/sender/impl/cloudhopper/preparator/FirstSupportingDataCodingProvider::register → KILLED 3. registerAuto : removed call to fr/sii/ogham/sms/sender/impl/cloudhopper/preparator/FirstSupportingDataCodingProvider::register → KILLED 4. registerAuto : removed call to fr/sii/ogham/sms/sender/impl/cloudhopper/preparator/FirstSupportingDataCodingProvider::register → KILLED 5. registerAuto : removed call to fr/sii/ogham/sms/sender/impl/cloudhopper/preparator/FirstSupportingDataCodingProvider::register → KILLED |
firstSupporting.register(buildContext.register(new CharsetMapToCharacterEncodingGroupDataCodingProvider(false))); |
| 411 | } | |
| 412 | ||
| 413 | } | |
Mutations | ||
| 178 |
1.1 |
|
| 179 |
1.1 |
|
| 284 |
1.1 2.2 3.3 4.4 5.5 |
|
| 322 |
1.1 |
|
| 323 |
1.1 |
|
| 363 |
1.1 2.2 3.3 4.4 5.5 |
|
| 383 |
1.1 2.2 |
|
| 390 |
1.1 2.2 3.3 4.4 5.5 |
|
| 391 |
1.1 |
|
| 394 |
1.1 2.2 3.3 4.4 5.5 |
|
| 395 |
1.1 2.2 |
|
| 397 |
1.1 2.2 3.3 4.4 5.5 |
|
| 398 |
1.1 2.2 3.3 4.4 5.5 |
|
| 400 |
1.1 2.2 3.3 4.4 5.5 |
|
| 405 |
1.1 |
|
| 406 |
1.1 |
|
| 410 |
1.1 2.2 3.3 4.4 5.5 |