Fixes missing casting; fixes gh-764
This commit is contained in:
4
pom.xml
4
pom.xml
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-build</artifactId>
|
||||
<version>2.0.4.BUILD-SNAPSHOT</version>
|
||||
<version>2.0.5.BUILD-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<checkstyle.version>2.17</checkstyle.version>
|
||||
<pact.version>3.5.13</pact.version>
|
||||
<jsch-agent.version>0.0.9</jsch-agent.version>
|
||||
<spring-cloud-build.version>2.0.4.RELEASE</spring-cloud-build.version>
|
||||
<spring-cloud-build.version>2.0.5.BUILD-SNAPSHOT</spring-cloud-build.version>
|
||||
<spring-cloud-zookeeper.version>2.0.0.BUILD-SNAPSHOT</spring-cloud-zookeeper.version>
|
||||
<spring-cloud-stream.version>Elmhurst.BUILD-SNAPSHOT</spring-cloud-stream.version>
|
||||
<spring-cloud-netflix.version>2.0.0.BUILD-SNAPSHOT</spring-cloud-netflix.version>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-dependencies-parent</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>2.0.4.BUILD-SNAPSHOT</version>
|
||||
<version>2.0.5.BUILD-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-contract-dependencies</artifactId>
|
||||
|
||||
@@ -492,7 +492,7 @@ abstract class MethodBodyBuilder {
|
||||
|
||||
protected void methodForNullCheck(BodyMatcher bodyMatcher, BlockBuilder bb) {
|
||||
String quotedAndEscaptedPath = quotedAndEscaped(bodyMatcher.path())
|
||||
String method = "assertThat(parsedJson.read(${quotedAndEscaptedPath})).isNull()"
|
||||
String method = "assertThat((Object) parsedJson.read(${quotedAndEscaptedPath})).isNull()"
|
||||
bb.addLine(postProcessJsonPathCall(method))
|
||||
addColonIfRequired(bb)
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ class MockMvcMethodBodyBuilderWithMatchersSpec extends Specification implements
|
||||
test.contains('assertThat((java.lang.Iterable) parsedJson.read("' + rootElement + '.valueWithMaxEmpty", java.util.Collection.class)).as("' + rootElement + '.valueWithMaxEmpty").hasSizeLessThanOrEqualTo(0)')
|
||||
test.contains('assertThatValueIsANumber(parsedJson.read("' + rootElement + '.duck")')
|
||||
test.contains('assertThat(parsedJson.read("' + rootElement + '''.['key'].['complex.key']", String.class)).isEqualTo("foo")''')
|
||||
test.contains('assertThat(parsedJson.read("' + rootElement + '.nullValue")).isNull()')
|
||||
test.contains('assertThat((Object) parsedJson.read("' + rootElement + '.nullValue")).isNull()')
|
||||
!test.contains('cursor')
|
||||
and:
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user