Skip to content

Commit a21d8c7

Browse files
committed
Fixing Sonar errors.
1 parent 79651f1 commit a21d8c7

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed

all/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@
5656
<artifactId>microbule-errormap-core</artifactId>
5757
<version>0.3.0-SNAPSHOT</version>
5858
</dependency>
59+
<dependency>
60+
<groupId>org.microbule</groupId>
61+
<artifactId>microbule-errormap-mapper</artifactId>
62+
<version>0.3.0-SNAPSHOT</version>
63+
</dependency>
5964

6065
<!--
6166
GSON Service
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!--
2+
~ Copyright (c) 2017 The Microbule Authors.
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+
~ http://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+
-->
17+
18+
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_2.xsd"
21+
version="1.2" bean-discovery-mode="all">
22+
</beans>

gson/decorator/src/main/java/org/microbule/gson/decorator/GsonProxyDecorator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public GsonProxyDecorator(GsonService gsonService) {
3535

3636
@Override
3737
public void decorate(JaxrsServiceDescriptor descriptor, Config config) {
38-
descriptor.addProvider(new GsonProvider(gsonService, e -> new JsonResponseParsingException(e)));
38+
descriptor.addProvider(new GsonProvider(gsonService, JsonResponseParsingException::new));
3939
}
4040

4141
@Override

gson/decorator/src/main/java/org/microbule/gson/decorator/GsonServerDecorator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public GsonServerDecorator(GsonService gsonService) {
3737

3838
@Override
3939
public void decorate(JaxrsServiceDescriptor descriptor, Config config) {
40-
descriptor.addProvider(new GsonProvider(gsonService, e -> new JsonRequestParsingException(e)));
40+
descriptor.addProvider(new GsonProvider(gsonService, JsonRequestParsingException::new));
4141
descriptor.addProvider(new ConstantErrorMapper(JsonRequestParsingException.class, Response.Status.BAD_REQUEST));
4242
}
4343

gson/provider/src/main/java/org/microbule/gson/provider/GsonProvider.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import com.google.gson.JsonSyntaxException;
2222
import org.apache.commons.lang3.ObjectUtils;
2323
import org.microbule.gson.api.GsonService;
24-
import org.slf4j.Logger;
25-
import org.slf4j.LoggerFactory;
2624

2725
@Provider
2826
@Produces(MediaType.APPLICATION_JSON)
@@ -32,7 +30,6 @@ public class GsonProvider implements MessageBodyReader<Object>,MessageBodyWriter
3230
// Fields
3331
//----------------------------------------------------------------------------------------------------------------------
3432

35-
private static final Logger LOGGER = LoggerFactory.getLogger(GsonProvider.class);
3633
private final GsonService gsonService;
3734
private final Function<JsonSyntaxException,? extends RuntimeException> exceptionProvider;
3835

0 commit comments

Comments
 (0)