Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
holomekc committed Nov 27, 2023
1 parent df2d41d commit 94517ca
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 18 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ dependencies {
}
api platform("com.fasterxml.jackson:jackson-bom:$versions.jackson")
api "com.fasterxml.jackson.core:jackson-core",
"com.fasterxml.jackson.core:jackson-annotations",
"com.fasterxml.jackson.core:jackson-databind",
"com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
"com.fasterxml.jackson.core:jackson-annotations",
"com.fasterxml.jackson.core:jackson-databind",
"com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
api "org.apache.httpcomponents.client5:httpclient5:5.2.1"
api "org.xmlunit:xmlunit-core:$versions.xmlUnit"
api "org.xmlunit:xmlunit-legacy:$versions.xmlUnit", {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
/*
* Copyright (C) 2023 Thomas Akehurst
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.tomakehurst.wiremock.common;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;

import java.io.IOException;

public class JsonPrettyPrinter extends DefaultPrettyPrinter {

@Override
public DefaultPrettyPrinter createInstance() {
return new JsonPrettyPrinter();
}
@Override
public DefaultPrettyPrinter createInstance() {
return new JsonPrettyPrinter();
}

@Override
public void writeObjectFieldValueSeparator(final JsonGenerator jg) throws IOException {
jg.writeRaw(": ");
}
@Override
public void writeObjectFieldValueSeparator(final JsonGenerator jg) throws IOException {
jg.writeRaw(": ");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,11 @@ public StubRequestHandler buildStubRequestHandler() {
Map<String, PostServeAction> postServeActions = extensions.ofType(PostServeAction.class);

Map<String, ServeEventListener> concatenatedMap =
new HashMap<>(extensions.ofType(ServeEventListener.class));
new HashMap<>(extensions.ofType(ServeEventListener.class));
concatenatedMap.put("wiremock-gui", new GuiServeEventListener());

Map<String, ServeEventListener> serveEventListeners =
Collections.unmodifiableMap(concatenatedMap);

Collections.unmodifiableMap(concatenatedMap);

BrowserProxySettings browserProxySettings = options.browserProxySettings();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import com.github.tomakehurst.wiremock.stubbing.StubMappingCollection;
import com.github.tomakehurst.wiremock.stubbing.StubMappings;
import java.util.HashMap;
import java.util.List;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
Expand Down Expand Up @@ -151,8 +151,8 @@ private boolean hasFolderDefinition(final StubMapping mapping) {
}

return metadata.containsKey(WIREMOCK_GUI_KEY)
&& metadata.getMap(WIREMOCK_GUI_KEY).get(DIR_KEY) != null
&& metadata.getMap(WIREMOCK_GUI_KEY).get(DIR_KEY) instanceof String;
&& metadata.getMap(WIREMOCK_GUI_KEY).get(DIR_KEY) != null
&& metadata.getMap(WIREMOCK_GUI_KEY).get(DIR_KEY) instanceof String;
}

private String getFolderDefinition(final StubMapping mapping) {
Expand Down

0 comments on commit 94517ca

Please sign in to comment.