FernetTokenFeature.java

1
/**
2
   Copyright 2018 Carlos Macasaet
3
4
   Licensed under the Apache License, Version 2.0 (the "License");
5
   you may not use this file except in compliance with the License.
6
   You may obtain a copy of the License at
7
8
       https://www.apache.org/licenses/LICENSE-2.0
9
10
   Unless required by applicable law or agreed to in writing, software
11
   distributed under the License is distributed on an "AS IS" BASIS,
12
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
   See the License for the specific language governing permissions and
14
   limitations under the License.
15
 */
16
package com.macasaet.fernet.jersey;
17
18
import javax.ws.rs.core.Feature;
19
import javax.ws.rs.core.FeatureContext;
20
21
import com.macasaet.fernet.jaxrs.exception.IllegalTokenExceptionMapper;
22
23
/**
24
 * {@link Feature} that enables Fernet token injection into Resource method parameters.
25
 *
26
 * <p>Copyright &copy; 2018 Carlos Macasaet.</p>
27
 *
28
 * @author Carlos Macasaet
29
 * @see com.macasaet.fernet.jaxrs.FernetToken
30
 * @see com.macasaet.fernet.Token
31
 */
32
public class FernetTokenFeature implements Feature {
33
34
    public boolean configure(final FeatureContext context) {
35
        context.register(new FernetTokenBinder());
36
        context.register(IllegalTokenExceptionMapper.class);
37 1 1. configure : replaced return of integer sized value with (x == 0 ? 1 : 0) → SURVIVED
        return true;
38
    }
39
40
}

Mutations

37

1.1
Location : configure
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → SURVIVED

Active mutators

Tests examined


Report generated by PIT 1.4.10