File tree Expand file tree Collapse file tree
src/main/java/com/github/tomakehurst/wiremock/servlet Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/*
2- * Copyright (C) 2017-2021 Thomas Akehurst
2+ * Copyright (C) 2017-2022 Thomas Akehurst
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1515 */
1616package com .github .tomakehurst .wiremock .servlet ;
1717
18- import com .github .tomakehurst .wiremock .common .Notifier ;
19- import com . github . tomakehurst . wiremock . common . Slf4jNotifier ;
18+ import static com .github .tomakehurst .wiremock .common .LocalNotifier . notifier ;
19+
2020import java .util .Arrays ;
2121
2222public class BodyChunker {
2323
24- private static final Notifier notifier = new Slf4jNotifier (false );
25-
2624 public static byte [][] chunkBody (byte [] body , int numberOfChunks ) {
2725
2826 if (numberOfChunks < 1 ) {
29- notifier .error ("Number of chunks set to value less than 1: " + numberOfChunks );
27+ notifier () .error ("Number of chunks set to value less than 1: " + numberOfChunks );
3028 numberOfChunks = 1 ;
3129 }
3230
3331 if (body .length < numberOfChunks ) {
34- notifier .error (
35- "Number of chunks set to value greater then body length. Number of chunks: "
36- + numberOfChunks
37- + ". Body length: "
38- + body .length
39- + ". Overriding number of chunks to body length." );
32+ notifier ()
33+ .error (
34+ "Number of chunks set to value greater then body length. Number of chunks: "
35+ + numberOfChunks
36+ + ". Body length: "
37+ + body .length
38+ + ". Overriding number of chunks to body length." );
4039 numberOfChunks = body .length ;
4140 }
4241
You can’t perform that action at this time.
0 commit comments