| 1 | package fr.sii.ogham.spring.common; | |
| 2 | ||
| 3 | import org.springframework.boot.context.properties.ConfigurationProperties; | |
| 4 | import org.springframework.boot.context.properties.NestedConfigurationProperty; | |
| 5 | ||
| 6 | @ConfigurationProperties("ogham.mimetype") | |
| 7 | public class OghamMimetypeProperties { | |
| 8 | /** | |
| 9 | * Default mimetype if detection couldn't determine the mimetype | |
| 10 | */ | |
| 11 | private String defaultMimetype = "application/octet-stream"; | |
| 12 | @NestedConfigurationProperty | |
| 13 | private TikaProperties tika = new TikaProperties(); | |
| 14 | ||
| 15 | public String getDefaultMimetype() { | |
| 16 |
2
1. getDefaultMimetype : replaced return value with "" for fr/sii/ogham/spring/common/OghamMimetypeProperties::getDefaultMimetype → KILLED 2. getDefaultMimetype : replaced return value with "" for fr/sii/ogham/spring/common/OghamMimetypeProperties::getDefaultMimetype → KILLED |
return defaultMimetype; |
| 17 | } | |
| 18 | ||
| 19 | public void setDefaultMimetype(String defaultMimetype) { | |
| 20 | this.defaultMimetype = defaultMimetype; | |
| 21 | } | |
| 22 | ||
| 23 | public TikaProperties getTika() { | |
| 24 |
2
1. getTika : replaced return value with null for fr/sii/ogham/spring/common/OghamMimetypeProperties::getTika → KILLED 2. getTika : replaced return value with null for fr/sii/ogham/spring/common/OghamMimetypeProperties::getTika → KILLED |
return tika; |
| 25 | } | |
| 26 | ||
| 27 | public void setTika(TikaProperties tika) { | |
| 28 | this.tika = tika; | |
| 29 | } | |
| 30 | ||
| 31 | public static class TikaProperties { | |
| 32 | /** | |
| 33 | * If Tika detection returns an {@code application/octet-stream}, it may | |
| 34 | * means that detection was not enough accurate. In order to try other | |
| 35 | * registered implementations that are able to detect mimetypes, you can | |
| 36 | * set this to true. | |
| 37 | * | |
| 38 | */ | |
| 39 | private boolean failIfOctetStream = true; | |
| 40 | ||
| 41 | public boolean isFailIfOctetStream() { | |
| 42 |
2
1. isFailIfOctetStream : replaced boolean return with false for fr/sii/ogham/spring/common/OghamMimetypeProperties$TikaProperties::isFailIfOctetStream → SURVIVED 2. isFailIfOctetStream : replaced boolean return with true for fr/sii/ogham/spring/common/OghamMimetypeProperties$TikaProperties::isFailIfOctetStream → SURVIVED |
return failIfOctetStream; |
| 43 | } | |
| 44 | ||
| 45 | public void setFailIfOctetStream(boolean failIfOctetStream) { | |
| 46 | this.failIfOctetStream = failIfOctetStream; | |
| 47 | } | |
| 48 | } | |
| 49 | } | |
Mutations | ||
| 16 |
1.1 2.2 |
|
| 24 |
1.1 2.2 |
|
| 42 |
1.1 2.2 |