diff --git a/spring-cloud-contract-spec/src/main/groovy/org/springframework/cloud/contract/spec/internal/FromFileProperty.groovy b/spring-cloud-contract-spec/src/main/groovy/org/springframework/cloud/contract/spec/internal/FromFileProperty.groovy index 593dd19f1a..b3416238cc 100644 --- a/spring-cloud-contract-spec/src/main/groovy/org/springframework/cloud/contract/spec/internal/FromFileProperty.groovy +++ b/spring-cloud-contract-spec/src/main/groovy/org/springframework/cloud/contract/spec/internal/FromFileProperty.groovy @@ -66,14 +66,4 @@ class FromFileProperty implements Serializable { return this.file.bytes } - public T asType(T type) { - switch (type) { - case String: - return (T) asString() - case byte[]: - return (T) asBytes() - } - throw new UnsupportedOperationException("Can't cast to type [${type}]") - } - }