DocxStamperConfiguration.java

1
package pro.verron.officestamper.core;
2
3
4
import org.springframework.expression.EvaluationContext;
5
import org.springframework.expression.spel.SpelParserConfiguration;
6
import org.springframework.expression.spel.standard.SpelExpressionParser;
7
import pro.verron.officestamper.api.*;
8
import pro.verron.officestamper.api.CustomFunction.NeedsBiFunctionImpl;
9
import pro.verron.officestamper.api.CustomFunction.NeedsFunctionImpl;
10
import pro.verron.officestamper.api.CustomFunction.NeedsTriFunctionImpl;
11
import pro.verron.officestamper.core.functions.BiFunctionBuilder;
12
import pro.verron.officestamper.core.functions.FunctionBuilder;
13
import pro.verron.officestamper.core.functions.TriFunctionBuilder;
14
import pro.verron.officestamper.preset.OfficeStamperConfigurations;
15
16
import java.util.ArrayList;
17
import java.util.HashMap;
18
import java.util.List;
19
import java.util.Map;
20
import java.util.function.Supplier;
21
22
/// The [DocxStamperConfiguration] class represents the configuration for the [DocxStamper] class.
23
///
24
/// It provides methods to customize the behavior of the stamper.
25
///
26
/// @author Joseph Verron
27
/// @author Tom Hombergs
28
/// @version ${version}
29
/// @since 1.0.3
30
public class DocxStamperConfiguration
31
        implements OfficeStamperConfiguration {
32
    private final Map<Class<?>, CommentProcessorFactory> commentProcessors;
33
    private final List<ObjectResolver> resolvers;
34
    private final Map<Class<?>, Object> expressionFunctions;
35
    private final List<PreProcessor> preprocessors;
36
    private final List<PostProcessor> postprocessors;
37
    private final List<CustomFunction> functions;
38
    private EvaluationContextFactory evaluationContextFactory;
39
    private SpelParserConfiguration parserConfiguration;
40
    private ExceptionResolver exceptionResolver;
41
    private SecurityMode svgSecurityMode = SecurityMode.RESTRICTED;
42
    private SecurityMode spelSecurityMode = SecurityMode.RESTRICTED;
43
44
    /// Constructs a new instance of the [DocxStamperConfiguration] class and initializes its default configuration
45
    /// settings.
46
    ///
47
    /// This constructor sets up internal structures and default behaviors for managing document stamping
48
    /// configurations, including:
49
    /// - Initializing collections for processors, resolvers, and functions.
50
    /// - Setting default values for expression handling and evaluation.
51
    /// - Creating and configuring a default [SpelParserConfiguration].
52
    /// - Establishing resolvers and exception handling strategies.
53
    ///
54
    /// @param evaluationContextFactory the factory used to create [EvaluationContext] instances.
55
    /// @param exceptionResolver the exception resolver to use for handling exceptions during stamping.
56
    public DocxStamperConfiguration(
57
            EvaluationContextFactory evaluationContextFactory,
58
            ExceptionResolver exceptionResolver
59
    ) {
60
        this.commentProcessors = new HashMap<>();
61
        this.resolvers = new ArrayList<>();
62
        this.expressionFunctions = new HashMap<>();
63
        this.preprocessors = new ArrayList<>();
64
        this.postprocessors = new ArrayList<>();
65
        this.functions = new ArrayList<>();
66
        this.evaluationContextFactory = evaluationContextFactory;
67
        this.parserConfiguration = new SpelParserConfiguration();
68
        this.exceptionResolver = exceptionResolver;
69
    }
70
71
    /// Exposes all methods of a given interface to the expression language.
72
    ///
73
    /// @param interfaceClass the interface holding methods to expose in the expression language.
74
    /// @param implementation the implementation to call to evaluate invocations of those methods, it must
75
    ///         implement the mentioned interface.
76
    ///
77
    /// @return a [DocxStamperConfiguration] object
78
    @Override
79
    public DocxStamperConfiguration exposeInterfaceToExpressionLanguage(
80
            Class<?> interfaceClass,
81
            Object implementation
82
    ) {
83
        this.expressionFunctions.put(interfaceClass, implementation);
84 1 1. exposeInterfaceToExpressionLanguage : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::exposeInterfaceToExpressionLanguage → KILLED
        return this;
85
    }
86
87
    /// Registers the specified [CommentProcessor] as an implementation of the specified interface.
88
    ///
89
    /// @param interfaceClass the interface, implemented by the commentProcessor.
90
    /// @param commentProcessorFactory the commentProcessor factory generating instances of the specified
91
    ///         interface.
92
    ///
93
    /// @return a [DocxStamperConfiguration] object
94
    @Override
95
    public DocxStamperConfiguration addCommentProcessor(
96
            Class<?> interfaceClass,
97
            CommentProcessorFactory commentProcessorFactory
98
    ) {
99
        this.commentProcessors.put(interfaceClass, commentProcessorFactory);
100 1 1. addCommentProcessor : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::addCommentProcessor → KILLED
        return this;
101
    }
102
103
    /// Adds a preprocessor to the configuration.
104
    ///
105
    /// @param preprocessor the preprocessor to add.
106
    @Override
107
    public void addPreprocessor(PreProcessor preprocessor) {
108
        preprocessors.add(preprocessor);
109
    }
110
111
    /// Retrieves the configured [EvaluationContextFactory] instance.
112
    ///
113
    /// @return an instance of [EvaluationContextFactory] used for creating evaluation contexts
114
    @Override
115
    public EvaluationContextFactory getEvaluationContextFactory() {
116 1 1. getEvaluationContextFactory : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::getEvaluationContextFactory → KILLED
        return evaluationContextFactory;
117
    }
118
119
    /// Sets the [EvaluationContextFactory] which creates Spring [EvaluationContext] instances used for evaluating
120
    /// expressions in comments and text.
121
    ///
122
    /// @param evaluationContextFactory the factory to use.
123
    ///
124
    /// @return the configuration object for chaining.
125
    @Override
126
    public DocxStamperConfiguration setEvaluationContextFactory(EvaluationContextFactory evaluationContextFactory) {
127
        this.evaluationContextFactory = evaluationContextFactory;
128 1 1. setEvaluationContextFactory : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::setEvaluationContextFactory → KILLED
        return this;
129
    }
130
131
    /// Retrieves the mapping of expression function classes to their corresponding function instances.
132
    ///
133
    /// @return a map where the keys are classes representing the function types, and the values are the function
134
    ///         instances.
135
    @Override
136
    public Map<Class<?>, Object> getExpressionFunctions() {
137 1 1. getExpressionFunctions : replaced return value with Collections.emptyMap for pro/verron/officestamper/core/DocxStamperConfiguration::getExpressionFunctions → KILLED
        return expressionFunctions;
138
    }
139
140
    /// Retrieves the map of comment processors associated with specific classes.
141
    ///
142
    /// @return a map where the key is the class associated with a specific type of placeholder, and the value is a
143
    ///         function that creates a [CommentProcessor] for that placeholder.
144
    @Override
145
    public Map<Class<?>, CommentProcessorFactory> getCommentProcessors() {
146 1 1. getCommentProcessors : replaced return value with Collections.emptyMap for pro/verron/officestamper/core/DocxStamperConfiguration::getCommentProcessors → KILLED
        return commentProcessors;
147
    }
148
149
    /// Retrieves the list of preprocessors.
150
    ///
151
    /// @return a list of [PreProcessor] objects.
152
    @Override
153
    public List<PreProcessor> getPreprocessors() {
154 1 1. getPreprocessors : replaced return value with Collections.emptyList for pro/verron/officestamper/core/DocxStamperConfiguration::getPreprocessors → KILLED
        return preprocessors;
155
    }
156
157
    /// Retrieves the list of object resolvers.
158
    ///
159
    /// @return a list of [ObjectResolver] instances.
160
    @Override
161
    public List<ObjectResolver> getResolvers() {
162 1 1. getResolvers : replaced return value with Collections.emptyList for pro/verron/officestamper/core/DocxStamperConfiguration::getResolvers → KILLED
        return resolvers;
163
    }
164
165
    /// Sets resolvers for resolving objects in the [DocxStamperConfiguration].
166
    ///
167
    /// This method is the evolution of the method [#addResolver(ObjectResolver)], and the order in which the resolvers
168
    /// are ordered is determinant; the first resolvers in the list will be tried first.
169
    ///
170
    ///  If a fallback resolver is desired, it should be placed last in the list.
171
    ///
172
    /// @param resolvers The list of [ObjectResolver] to be set.
173
    ///
174
    /// @return the configuration object for chaining.
175
    @Override
176
    public DocxStamperConfiguration setResolvers(List<ObjectResolver> resolvers) {
177 1 1. setResolvers : removed call to java/util/List::clear → KILLED
        this.resolvers.clear();
178
        this.resolvers.addAll(resolvers);
179 1 1. setResolvers : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::setResolvers → SURVIVED
        return this;
180
    }
181
182
    /// Adds a resolver to the list of resolvers in the [DocxStamperConfiguration] object.
183
    ///
184
    ///  Resolvers are used to resolve objects during the stamping process.
185
    ///
186
    /// @param resolver The resolver to be added.
187
    ///
188
    /// @return The modified [DocxStamperConfiguration] object, with the resolver added to the beginning of the resolver
189
    ///         list.
190
    @Override
191
    public DocxStamperConfiguration addResolver(ObjectResolver resolver) {
192 1 1. addResolver : removed call to java/util/List::addFirst → KILLED
        resolvers.addFirst(resolver);
193 1 1. addResolver : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::addResolver → KILLED
        return this;
194
    }
195
196
    /// Retrieves the exception resolver.
197
    ///
198
    /// @return the current instance of [ExceptionResolver].
199
    @Override
200
    public ExceptionResolver getExceptionResolver() {
201 1 1. getExceptionResolver : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::getExceptionResolver → KILLED
        return exceptionResolver;
202
    }
203
204
    /// Configures the exception resolver for the [DocxStamperConfiguration].
205
    ///
206
    /// @param exceptionResolver the [ExceptionResolver] to handle exceptions during processing
207
    ///
208
    /// @return the current instance of [DocxStamperConfiguration]
209
    @Override
210
    public DocxStamperConfiguration setExceptionResolver(ExceptionResolver exceptionResolver) {
211
        this.exceptionResolver = exceptionResolver;
212 1 1. setExceptionResolver : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::setExceptionResolver → KILLED
        return this;
213
    }
214
215
    /// Retrieves a list of custom functions.
216
    ///
217
    /// @return a List containing [CustomFunction] objects.
218
    @Override
219
    public List<CustomFunction> customFunctions() {
220 1 1. customFunctions : replaced return value with Collections.emptyList for pro/verron/officestamper/core/DocxStamperConfiguration::customFunctions → KILLED
        return functions;
221
    }
222
223
    /// Adds a custom function to the system, allowing integration of user-defined functionality.
224
    ///
225
    /// @param name The name of the custom function being added. This is used as the identifier for the function
226
    ///         and must be unique across all defined functions.
227
    /// @param implementation A [Supplier] functional interface that provides the implementation of the custom
228
    ///         function. When the function is called, the supplier's get method will be executed to return the result
229
    ///         of the function.
230
    @Override
231
    public void addCustomFunction(String name, Supplier<?> implementation) {
232 2 1. lambda$addCustomFunction$0 : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::lambda$addCustomFunction$0 → KILLED
2. addCustomFunction : removed call to pro/verron/officestamper/core/DocxStamperConfiguration::addCustomFunction → KILLED
        this.addCustomFunction(new CustomFunction(name, List.of(), _ -> implementation.get()));
233
    }
234
235
    /// Adds a custom function to the list of functions.
236
    ///
237
    /// @param function the [CustomFunction] object to be added
238
    public void addCustomFunction(CustomFunction function) {
239
        this.functions.add(function);
240
    }
241
242
    /// Adds a custom function to the context with the specified name and type.
243
    ///
244
    /// @param name the name of the custom function
245
    /// @param class0 the class type of the custom function
246
    /// @param <T> the type of the input parameter
247
    ///
248
    /// @return an instance of [NeedsFunctionImpl] configured with the custom function
249
    @Override
250
    public <T> NeedsFunctionImpl<T> addCustomFunction(String name, Class<T> class0) {
251 1 1. addCustomFunction : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::addCustomFunction → KILLED
        return new FunctionBuilder<>(this, name, class0);
252
    }
253
254
    /// Adds a custom function with the specified name and input types.
255
    ///
256
    /// @param name the name of the custom function to be added
257
    /// @param class0 the class type of the first input parameter of the custom function.
258
    /// @param class1 the class type of the second input parameter of the custom function.
259
    /// @param <T> the type of the first input parameter
260
    /// @param <U> the type of the second input parameter
261
    ///
262
    /// @return an instance of [NeedsBiFunctionImpl] for further configuration or usage of the custom function.
263
    @Override
264
    public <T, U> NeedsBiFunctionImpl<T, U> addCustomFunction(String name, Class<T> class0, Class<U> class1) {
265 1 1. addCustomFunction : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::addCustomFunction → KILLED
        return new BiFunctionBuilder<>(this, name, class0, class1);
266
    }
267
268
    /// Adds a custom function to the current context by defining its name, and the classes associated with its argument
269
    /// types.
270
    ///
271
    /// @param name the name to assign to the custom function
272
    /// @param class0 the class of the first argument type
273
    /// @param class1 the class of the second argument type
274
    /// @param class2 the class of the third argument type
275
    /// @param <T> the type of the first argument
276
    /// @param <U> the type of the second argument
277
    /// @param <V> the type of the third argument
278
    ///
279
    /// @return an instance of [NeedsTriFunctionImpl] indicating the custom function implementation and usage context.
280
    @Override
281
    public <T, U, V> NeedsTriFunctionImpl<T, U, V> addCustomFunction(
282
            String name,
283
            Class<T> class0,
284
            Class<U> class1,
285
            Class<V> class2
286
    ) {
287 1 1. addCustomFunction : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::addCustomFunction → KILLED
        return new TriFunctionBuilder<>(this, name, class0, class1, class2);
288
    }
289
290
    /// Retrieves the list of postprocessors.
291
    ///
292
    /// @return a List of [PostProcessor] objects.
293
    @Override
294
    public List<PostProcessor> getPostprocessors() {
295 1 1. getPostprocessors : replaced return value with Collections.emptyList for pro/verron/officestamper/core/DocxStamperConfiguration::getPostprocessors → KILLED
        return postprocessors;
296
    }
297
298
    /// Adds a given postprocessor to the list of postprocessors.
299
    ///
300
    /// @param postprocessor the [PostProcessor] instance to be added
301
    @Override
302
    public void addPostprocessor(PostProcessor postprocessor) {
303
        postprocessors.add(postprocessor);
304
    }
305
306
    @Override
307
    public SpelParserConfiguration getParserConfiguration() {
308 1 1. getParserConfiguration : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::getParserConfiguration → KILLED
        return parserConfiguration;
309
    }
310
311
    /// Sets the parser configuration used for expression evaluation.
312
    ///
313
    /// Note that the provided parser configuration will be used for all expressions in the document, including
314
    /// expressions in comments. If you use SpEL, construct a [SpelExpressionParser] (optionally with a
315
    ///  [SpelParserConfiguration]) and
316
    /// pass it here.
317
    ///
318
    /// @param parserConfiguration the parser to use.
319
    ///
320
    /// @return the configuration object for chaining.
321
    @Override
322
    public DocxStamperConfiguration setParserConfiguration(SpelParserConfiguration parserConfiguration) {
323
        this.parserConfiguration = parserConfiguration;
324 1 1. setParserConfiguration : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::setParserConfiguration → KILLED
        return this;
325
    }
326
327
    /// Gets the current SpEL security mode.
328
    @Override
329
    public SecurityMode getSpelSecurityMode() {
330 1 1. getSpelSecurityMode : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::getSpelSecurityMode → NO_COVERAGE
        return spelSecurityMode;
331
    }
332
333
    /// Sets the SpEL security mode.
334
    ///
335
    /// Note: The actual [EvaluationContextFactory] selection is handled by presets
336
    /// (e.g., in [OfficeStamperConfigurations]). This setter only stores the mode on the
337
    /// configuration to be honored by the stamping engine.
338
    @Override
339
    public DocxStamperConfiguration setSpelSecurityMode(SecurityMode mode) {
340
        this.spelSecurityMode = mode;
341
        // Adjust the EvaluationContextFactory here directly to honor the selected mode.
342
        this.evaluationContextFactory = switch (this.spelSecurityMode) {
343
            case RESTRICTED -> EvaluationContextFactories.restrictedFactory();
344
            case PERMISSIVE -> EvaluationContextFactories.permissiveFactory();
345
        };
346 1 1. setSpelSecurityMode : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::setSpelSecurityMode → KILLED
        return this;
347
    }
348
349
    /// Indicates whether SVG safe mode is enabled.
350
    ///
351
    /// When enabled (default), SVG parsing is performed with hardened XML parser settings to mitigate XXE/DTD and
352
    /// related risks. When disabled, a more permissive parser is used.
353
    ///
354
    /// @return the current SVG security mode
355
    @Override
356
    public SecurityMode getSvgSecurityMode() {
357 1 1. getSvgSecurityMode : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::getSvgSecurityMode → SURVIVED
        return svgSecurityMode;
358
    }
359
360
    /// Enables or disables SVG safe mode.
361
    ///
362
    /// Safe mode is enabled by default to ensure secure SVG parsing. Disable only if you fully trust the SVG inputs
363
    /// and need permissive behavior.
364
    ///
365
    /// @param mode the SVG security mode to set
366
    ///
367
    /// @return the current instance of [DocxStamperConfiguration]
368
    @Override
369
    public DocxStamperConfiguration setSvgSecurityMode(SecurityMode mode) {
370
        this.svgSecurityMode = mode;
371 1 1. setSvgSecurityMode : replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::setSvgSecurityMode → SURVIVED
        return this;
372
    }
373
}

Mutations

84

1.1
Location : exposeInterfaceToExpressionLanguage
Killed by : pro.verron.officestamper.test.CustomFunctionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomFunctionTests]/[test-template:interfaces(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#2]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::exposeInterfaceToExpressionLanguage → KILLED

100

1.1
Location : addCommentProcessor
Killed by : pro.verron.officestamper.test.CustomProcessorTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomProcessorTests]/[test-template:should_allow_custom_processors_injection(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#1]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::addCommentProcessor → KILLED

116

1.1
Location : getEvaluationContextFactory
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[test-template:fails(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#2]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::getEvaluationContextFactory → KILLED

128

1.1
Location : setEvaluationContextFactory
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, org.docx4j.openpackaging.packages.WordprocessingMLPackage, java.lang.String)]/[test-template-invocation:#5]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::setEvaluationContextFactory → KILLED

137

1.1
Location : getExpressionFunctions
Killed by : pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[method:test64()]
replaced return value with Collections.emptyMap for pro/verron/officestamper/core/DocxStamperConfiguration::getExpressionFunctions → KILLED

146

1.1
Location : getCommentProcessors
Killed by : pro.verron.officestamper.test.CustomProcessorTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomProcessorTests]/[test-template:should_allow_custom_processors_injection(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#1]
replaced return value with Collections.emptyMap for pro/verron/officestamper/core/DocxStamperConfiguration::getCommentProcessors → KILLED

154

1.1
Location : getPreprocessors
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[test-template:fails(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#2]
replaced return value with Collections.emptyList for pro/verron/officestamper/core/DocxStamperConfiguration::getPreprocessors → KILLED

162

1.1
Location : getResolvers
Killed by : pro.verron.officestamper.test.CustomFunctionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomFunctionTests]/[test-template:trifunctions(pro.verron.officestamper.test.utils.ContextFactory, java.lang.String, java.lang.String)]/[test-template-invocation:#12]
replaced return value with Collections.emptyList for pro/verron/officestamper/core/DocxStamperConfiguration::getResolvers → KILLED

177

1.1
Location : setResolvers
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, org.docx4j.openpackaging.packages.WordprocessingMLPackage, java.lang.String)]/[test-template-invocation:#26]
removed call to java/util/List::clear → KILLED

179

1.1
Location : setResolvers
Killed by : none
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::setResolvers → SURVIVED
Covering tests

192

1.1
Location : addResolver
Killed by : pro.verron.officestamper.test.CustomFunctionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomFunctionTests]/[test-template:trifunctions(pro.verron.officestamper.test.utils.ContextFactory, java.lang.String, java.lang.String)]/[test-template-invocation:#12]
removed call to java/util/List::addFirst → KILLED

193

1.1
Location : addResolver
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, org.docx4j.openpackaging.packages.WordprocessingMLPackage, java.lang.String)]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::addResolver → KILLED

201

1.1
Location : getExceptionResolver
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[test-template:fails(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#2]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::getExceptionResolver → KILLED

212

1.1
Location : setExceptionResolver
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[test-template:fails(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#2]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::setExceptionResolver → KILLED

220

1.1
Location : customFunctions
Killed by : pro.verron.officestamper.test.CustomFunctionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomFunctionTests]/[test-template:trifunctions(pro.verron.officestamper.test.utils.ContextFactory, java.lang.String, java.lang.String)]/[test-template-invocation:#12]
replaced return value with Collections.emptyList for pro/verron/officestamper/core/DocxStamperConfiguration::customFunctions → KILLED

232

1.1
Location : lambda$addCustomFunction$0
Killed by : pro.verron.officestamper.test.CustomFunctionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomFunctionTests]/[test-template:suppliers(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#2]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::lambda$addCustomFunction$0 → KILLED

2.2
Location : addCustomFunction
Killed by : pro.verron.officestamper.test.CustomFunctionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomFunctionTests]/[test-template:suppliers(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#2]
removed call to pro/verron/officestamper/core/DocxStamperConfiguration::addCustomFunction → KILLED

251

1.1
Location : addCustomFunction
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[test-template:fails(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#2]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::addCustomFunction → KILLED

265

1.1
Location : addCustomFunction
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[test-template:fails(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#2]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::addCustomFunction → KILLED

287

1.1
Location : addCustomFunction
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[test-template:fails(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#2]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::addCustomFunction → KILLED

295

1.1
Location : getPostprocessors
Killed by : pro.verron.officestamper.test.CustomFunctionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomFunctionTests]/[test-template:trifunctions(pro.verron.officestamper.test.utils.ContextFactory, java.lang.String, java.lang.String)]/[test-template-invocation:#12]
replaced return value with Collections.emptyList for pro/verron/officestamper/core/DocxStamperConfiguration::getPostprocessors → KILLED

308

1.1
Location : getParserConfiguration
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[test-template:fails(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#2]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::getParserConfiguration → KILLED

324

1.1
Location : setParserConfiguration
Killed by : pro.verron.officestamper.test.NullPointerResolutionTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.NullPointerResolutionTest]/[test-template:nullPointerResolutionTest_testWithCustomSpel()]/[test-template-invocation:#2]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::setParserConfiguration → KILLED

330

1.1
Location : getSpelSecurityMode
Killed by : none
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::getSpelSecurityMode → NO_COVERAGE

346

1.1
Location : setSpelSecurityMode
Killed by : pro.verron.officestamper.test.SpelPermissiveModeTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.SpelPermissiveModeTest]/[test-template:permissiveMode_allowsTypeAndConstructorFeatures(pro.verron.officestamper.test.utils.ContextFactory)]/[test-template-invocation:#1]
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::setSpelSecurityMode → KILLED

357

1.1
Location : getSvgSecurityMode
Killed by : none
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::getSvgSecurityMode → SURVIVED
Covering tests

371

1.1
Location : setSvgSecurityMode
Killed by : none
replaced return value with null for pro/verron/officestamper/core/DocxStamperConfiguration::setSvgSecurityMode → SURVIVED
Covering tests

Active mutators

Tests examined


Report generated by PIT 1.23.1 support