From bfc445c50c0d35c24162e1f62f9145de72138614 Mon Sep 17 00:00:00 2001 From: Haroon Sheikh Date: Wed, 15 May 2024 14:36:37 +0100 Subject: [PATCH] Updates to latest version of pmd@v7 (#104) --- .github/dependabot.yml | 4 ---- CHANGELOG.md | 6 ++++++ pom.xml | 4 ++-- .../java/com/github/sitture/unirestcurl/CurlBuilder.java | 2 +- src/main/resources/config/pmd/rulesets.xml | 4 +--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 62deb53..4481137 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,10 +9,6 @@ updates: directory: "/" # Location of package manifests schedule: interval: "weekly" - groups: - maven-dependencies: - patterns: - - "*" # Maintain dependencies for GitHub Actions - package-ecosystem: "github-actions" directory: "/" diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ecefcf..0379547 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 0.6.0 + +### Updated + +- Updates to latest version of pmd@v7 + ## 0.5.0 ### Updated diff --git a/pom.xml b/pom.xml index 32d9152..bbed3da 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ unirest-curl ${project.artifactId} jar - 0.5.0 + 0.6.0 An interceptor to log Unirest requests as curl requests. https://github.com/sitture/unirest-curl @@ -89,7 +89,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.21.2 + 3.22.0 true true diff --git a/src/main/java/com/github/sitture/unirestcurl/CurlBuilder.java b/src/main/java/com/github/sitture/unirestcurl/CurlBuilder.java index b878055..31b1bd0 100644 --- a/src/main/java/com/github/sitture/unirestcurl/CurlBuilder.java +++ b/src/main/java/com/github/sitture/unirestcurl/CurlBuilder.java @@ -64,7 +64,7 @@ private String getHeaders() { private String getBody() { String processedBody = ""; if (request.getBody().isPresent()) { - if (request.getBody().get().multiParts().size() == 0 && null != request.getBody().get().uniPart()) { + if (request.getBody().get().multiParts().isEmpty() && null != request.getBody().get().uniPart()) { processedBody = String.format(REQUEST_BODY, request.getBody().get().uniPart().getValue()); } else { processedBody = request.getBody().get().multiParts().stream() diff --git a/src/main/resources/config/pmd/rulesets.xml b/src/main/resources/config/pmd/rulesets.xml index 56d42c9..7aab273 100644 --- a/src/main/resources/config/pmd/rulesets.xml +++ b/src/main/resources/config/pmd/rulesets.xml @@ -16,9 +16,7 @@ - - - +