OghamMimetypeProperties.java

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
Location : getDefaultMimetype
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1SendGridAutoConfigurationTests.oghamWithSendGridAutoConfigShouldUseSpringSendGridClient(oghamspringbootv1autoconfigure.it.OghamSpringBoot1SendGridAutoConfigurationTests)
replaced return value with "" for fr/sii/ogham/spring/common/OghamMimetypeProperties::getDefaultMimetype → KILLED

2.2
Location : getDefaultMimetype
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2FreeMarkerAutoConfigurationTests.oghamWithFreemarkerAutoConfigWithoutWebContextShouldUseSpringFreemarkerConfiguration(oghamspringbootv2autoconfigure.it.OghamSpringBoot2FreeMarkerAutoConfigurationTests)
replaced return value with "" for fr/sii/ogham/spring/common/OghamMimetypeProperties::getDefaultMimetype → KILLED

24

1.1
Location : getTika
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/common/OghamMimetypeProperties::getTika → KILLED

2.2
Location : getTika
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/common/OghamMimetypeProperties::getTika → KILLED

42

1.1
Location : isFailIfOctetStream
Killed by : none
replaced boolean return with false for fr/sii/ogham/spring/common/OghamMimetypeProperties$TikaProperties::isFailIfOctetStream → SURVIVED

2.2
Location : isFailIfOctetStream
Killed by : none
replaced boolean return with true for fr/sii/ogham/spring/common/OghamMimetypeProperties$TikaProperties::isFailIfOctetStream → SURVIVED

Active mutators

Tests examined


Report generated by PIT OGHAM