Skip to content

Commit

Permalink
chore: fix code narc
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Aug 3, 2023
1 parent d872f7a commit 1afb410
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import au.com.dius.pact.core.model.matchingrules.RegexMatcher
import au.com.dius.pact.core.support.Json
import au.com.dius.pact.provider.ConsumerInfo
import au.com.dius.pact.provider.ProviderInfo
import au.com.dius.pact.provider.VerificationResult
import groovy.json.JsonSlurper
import io.cucumber.datatable.DataTable
import io.cucumber.java.After
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ class SharedSteps {
def contentType = fixture.contentType.toString()
request.headers['content-type'] = [contentType]
if (fixture.contents.@encoding == 'base64') {
request.body = OptionalBody.body(Base64.decoder.decode(fixture.contents.text().trim()), new ContentType(contentType))
def decoded = Base64.decoder.decode(fixture.contents.text().trim())
request.body = OptionalBody.body(decoded, new ContentType(contentType))
} else {
request.body = OptionalBody.body(fixture.contents.text(), new ContentType(contentType))
}
Expand Down
2 changes: 1 addition & 1 deletion config/codenarc/rulesetTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ ruleset {
ThrowError
ThrowException
ThrowNullPointerException
ThrowRuntimeException
// ThrowRuntimeException
ThrowThrowable

// rulesets/formatting.xml
Expand Down

0 comments on commit 1afb410

Please sign in to comment.