Skip to content

Commit

Permalink
make d1249d8 spotless (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
kortemik authored May 1, 2024
1 parent d1249d8 commit 1bff209
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/main/java/com/teragrep/lsh_01/Payload.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
See the License for the specific language governing permissions and
limitations under the License.
*/

package com.teragrep.lsh_01;

import com.teragrep.lsh_01.config.PayloadConfig;
Expand All @@ -43,8 +42,9 @@ public Payload(PayloadConfig payloadConfig, String body) {
}

/**
* Splits the payload into multiple payloads if there is a defined split regex in the body.
* Only works if the payload.splitEnabled is set to true.
* Splits the payload into multiple payloads if there is a defined split regex in the body. Only works if the
* payload.splitEnabled is set to true.
*
* @return list of Payloads
*/
public List<Payload> split() {
Expand All @@ -58,10 +58,11 @@ public List<Payload> split() {
try {
String[] messages = body.split(payloadConfig.splitRegex);

for (String message: messages) {
for (String message : messages) {
payloads.add(new Payload(payloadConfig, message));
}
} catch (PatternSyntaxException e) {
}
catch (PatternSyntaxException e) {
LOGGER.error("Invalid splitRegex in configuration: <{}>", payloadConfig.splitRegex);
payloads.add(this);
}
Expand All @@ -71,6 +72,7 @@ public List<Payload> split() {

/**
* Takes the message from the payload.
*
* @return message body
*/
public String take() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
See the License for the specific language governing permissions and
limitations under the License.
*/

package com.teragrep.lsh_01.config;

public class PayloadConfig implements Validateable {
Expand Down
1 change: 0 additions & 1 deletion src/test/java/PayloadTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
See the License for the specific language governing permissions and
limitations under the License.
*/

import com.teragrep.lsh_01.Payload;
import com.teragrep.lsh_01.config.PayloadConfig;
import org.junit.jupiter.api.AfterEach;
Expand Down

0 comments on commit 1bff209

Please sign in to comment.