Compare dea08f3 ... +0 ... 1900819

Coverage Reach
http/src/main/scala/com/twitter/finatra/http/internal/routing/CallbackConverter.scala http/src/main/scala/com/twitter/finatra/http/internal/routing/Trie.scala http/src/main/scala/com/twitter/finatra/http/internal/routing/Route.scala http/src/main/scala/com/twitter/finatra/http/internal/routing/PathPattern.scala http/src/main/scala/com/twitter/finatra/http/internal/routing/Routes.scala http/src/main/scala/com/twitter/finatra/http/internal/routing/RoutingService.scala http/src/main/scala/com/twitter/finatra/http/internal/routing/ConstantRouteMap.scala http/src/main/scala/com/twitter/finatra/http/internal/routing/RouteParamMap.scala http/src/main/scala/com/twitter/finatra/http/internal/routing/RequestWithRouteParams.scala http/src/main/scala/com/twitter/finatra/http/internal/marshalling/MessageInjectableValues.scala http/src/main/scala/com/twitter/finatra/http/internal/marshalling/DefaultMessageBodyWriterImpl.scala http/src/main/scala/com/twitter/finatra/http/internal/marshalling/DefaultMessageBodyReaderImpl.scala http/src/main/scala/com/twitter/finatra/http/internal/marshalling/MessageInjectableTypes.scala http/src/main/scala/com/twitter/finatra/http/internal/exceptions/FailureExceptionMapper.scala http/src/main/scala/com/twitter/finatra/http/internal/exceptions/ThrowableExceptionMapper.scala http/src/main/scala/com/twitter/finatra/http/internal/exceptions/CancelledRequestExceptionMapper.scala http/src/main/scala/com/twitter/finatra/http/internal/exceptions/HttpExceptionMapper.scala http/src/main/scala/com/twitter/finatra/http/internal/exceptions/HttpNackExceptionMapper.scala http/src/main/scala/com/twitter/finatra/http/internal/exceptions/json/CaseClassExceptionMapper.scala http/src/main/scala/com/twitter/finatra/http/internal/exceptions/json/JsonParseExceptionMapper.scala http/src/main/scala/com/twitter/finatra/http/internal/exceptions/AbstractFrameworkExceptionMapper.scala http/src/main/scala/com/twitter/finatra/http/response/EnrichedResponse.scala http/src/main/scala/com/twitter/finatra/http/response/ResponseBuilder.scala http/src/main/scala/com/twitter/finatra/http/response/ResponseUtils.scala http/src/main/scala/com/twitter/finatra/http/response/StreamingResponse.scala http/src/main/scala/com/twitter/finatra/http/response/HttpResponseClassifier.scala http/src/main/scala/com/twitter/finatra/http/response/ErrorsResponse.scala http/src/main/scala/com/twitter/finatra/http/response/SimpleResponse.scala http/src/main/scala/com/twitter/finatra/http/routing/HttpRouter.scala http/src/main/scala/com/twitter/finatra/http/routing/AdminHttpRouter.scala http/src/main/scala/com/twitter/finatra/http/routing/Registrar.scala http/src/main/scala/com/twitter/finatra/http/routing/HttpWarmup.scala http/src/main/scala/com/twitter/finatra/http/routing/HttpForward.scala http/src/main/scala/com/twitter/finatra/http/filters/StatsFilter.scala http/src/main/scala/com/twitter/finatra/http/filters/HttpResponseFilter.scala http/src/main/scala/com/twitter/finatra/http/filters/TraceIdMDCFilter.scala http/src/main/scala/com/twitter/finatra/http/filters/HttpNackFilter.scala http/src/main/scala/com/twitter/finatra/http/filters/AccessLoggingFilter.scala http/src/main/scala/com/twitter/finatra/http/filters/LoggingMDCFilter.scala http/src/main/scala/com/twitter/finatra/http/filters/ExceptionMappingFilter.scala http/src/main/scala/com/twitter/finatra/http/request/MediaRange.scala http/src/main/scala/com/twitter/finatra/http/request/RequestUtils.scala http/src/main/scala/com/twitter/finatra/http/request/ForwardedRequest.scala http/src/main/scala/com/twitter/finatra/http/RouteDSL.scala http/src/main/scala/com/twitter/finatra/http/servers.scala http/src/main/scala/com/twitter/finatra/http/jsonpatch/JsonPatchOperator.scala http/src/main/scala/com/twitter/finatra/http/jsonpatch/JsonPatchUtility.scala http/src/main/scala/com/twitter/finatra/http/jsonpatch/JsonPatchMessageBodyReader.scala http/src/main/scala/com/twitter/finatra/http/jsonpatch/JsonPatchExceptionMapper.scala http/src/main/scala/com/twitter/finatra/http/exceptions/exceptions.scala http/src/main/scala/com/twitter/finatra/http/exceptions/ExceptionManager.scala http/src/main/scala/com/twitter/finatra/http/exceptions/HttpException.scala http/src/main/scala/com/twitter/finatra/http/exceptions/ExceptionMapperCollection.scala http/src/main/scala/com/twitter/finatra/http/exceptions/HttpNackException.scala http/src/main/scala/com/twitter/finatra/http/exceptions/MaxForwardsExceededException.scala http/src/main/scala/com/twitter/finatra/http/marshalling/MessageBodyManager.scala http/src/main/scala/com/twitter/finatra/http/marshalling/WriterResponse.scala http/src/main/scala/com/twitter/finatra/http/marshalling/mapper.scala http/src/main/scala/com/twitter/finatra/http/marshalling/MessageBodyReader.scala http/src/main/scala/com/twitter/finatra/http/marshalling/MessageBodyWriter.scala http/src/main/scala/com/twitter/finatra/http/marshalling/MessageBodyFlags.scala http/src/main/scala/com/twitter/finatra/http/modules/DarkTrafficFilterModule.scala http/src/main/scala/com/twitter/finatra/http/modules/ExceptionManagerModule.scala http/src/main/scala/com/twitter/finatra/http/modules/MessageBodyFlagsModule.scala http/src/main/scala/com/twitter/finatra/http/modules/MessageBodyModule.scala http/src/main/scala/com/twitter/finatra/http/modules/HttpResponseClassifierModule.scala http/src/main/scala/com/twitter/finatra/http/modules/AccessLogModule.scala http/src/main/scala/com/twitter/finatra/http/fileupload/FinagleRequestFileUpload.scala http/src/main/scala/com/twitter/finatra/http/fileupload/RequestContext.scala http/src/main/scala/com/twitter/finatra/http/streaming/StreamingResponse.scala http/src/main/scala/com/twitter/finatra/http/streaming/ToReader.scala http/src/main/scala/com/twitter/finatra/http/streaming/FromReader.scala http/src/main/scala/com/twitter/finatra/http/streaming/StreamingRequest.scala http/src/main/scala/com/twitter/finatra/http/Tls.scala http/src/main/scala/com/twitter/finatra/http/RouteBuilder.scala http/src/main/scala/com/twitter/finatra/http/conversions/futureHttp.scala http/src/main/scala/com/twitter/finatra/http/conversions/optionHttp.scala http/src/main/scala/com/twitter/finatra/http/contexts/RouteInfo.scala http/src/main/scala/com/twitter/finatra/http/Controller.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/future.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/map.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/option.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/tuple.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/seq.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/string.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/boolean.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/time.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/iterable.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/bytearray.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/asyncStream.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/bytebuffer.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/duration.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/buf.scala inject/inject-utils/src/main/scala/com/twitter/inject/conversions/pattern.scala inject/inject-utils/src/main/scala/com/twitter/inject/utils/AnnotationUtils.scala inject/inject-utils/src/main/scala/com/twitter/inject/utils/ExceptionUtils.scala inject/inject-utils/src/main/scala/com/twitter/inject/utils/FutureUtils.scala inject/inject-utils/src/main/scala/com/twitter/inject/utils/RetryUtils.scala inject/inject-utils/src/main/scala/com/twitter/inject/utils/RetryPolicyUtils.scala inject/inject-utils/src/main/scala/com/twitter/inject/utils/StringUtils.scala inject/inject-utils/src/main/scala/com/twitter/inject/exceptions/DetailedNonRetryableSourcedException.scala inject/inject-utils/src/main/scala/com/twitter/inject/domain/WrappedValue.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/filters/ThriftClientFilterChain.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/filters/DarkTrafficFilter.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/filters/ThriftClientFilterBuilder.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/modules/FilteredThriftClientModule.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/modules/ThriftClientModuleTrait.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/modules/DarkTrafficFilterModuleTrait.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/modules/ThriftMethodBuilderClientModule.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/modules/FilteredThriftClientFlagsModule.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/modules/ThriftClientModule.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/modules/ReqRepDarkTrafficFilterModule.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/modules/DarkTrafficFilterModule.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/modules/JavaDarkTrafficFilterModule.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/modules/ThriftClientIdModule.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/modules/AndThenServiceModule.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/ThriftMethodBuilder.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/internal/filters/ThriftClientExceptionFilter.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/internal/filters/IncrementCounterFilter.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/internal/DefaultAndThenServiceImpl.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/ThriftClientException.scala inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/ThriftClientExceptionSource.scala inject/inject-app/src/main/scala/com/twitter/inject/app/internal/FlagsModule.scala inject/inject-app/src/main/scala/com/twitter/inject/app/internal/Modules.scala inject/inject-app/src/main/scala/com/twitter/inject/app/internal/InstalledModules.scala inject/inject-app/src/main/scala/com/twitter/inject/app/internal/PrimitiveType.scala inject/inject-app/src/main/scala/com/twitter/inject/app/App.scala inject/inject-server/src/main/scala/com/twitter/inject/server/TwitterServer.scala inject/inject-server/src/main/scala/com/twitter/inject/server/Awaiter.scala inject/inject-server/src/main/scala/com/twitter/server/internal/FinagleBuildRevision.scala inject/inject-core/src/main/scala/com/twitter/inject/TypeUtils.scala inject/inject-core/src/main/scala/com/twitter/inject/TwitterModule.scala inject/inject-core/src/main/scala/com/twitter/inject/internal/LibraryRegistry.scala inject/inject-core/src/main/scala/com/twitter/inject/TwitterModuleFlags.scala inject/inject-core/src/main/scala/com/twitter/inject/TwitterModuleLifecycle.scala inject/inject-core/src/main/scala/com/twitter/inject/TwitterInjector.scala inject/inject-core/src/main/scala/com/twitter/inject/Flags.scala inject/inject-core/src/main/scala/com/twitter/inject/TwitterBaseModule.scala inject/inject-core/src/main/scala/com/twitter/inject/Injector.scala inject/inject-core/src/main/scala/com/twitter/inject/TwitterPrivateModule.scala inject/inject-core/src/main/scala/com/twitter/inject/InjectorModule.scala inject/inject-logback/src/main/scala/ch/qos/logback/core/LogbackAsyncAppenderBase.scala inject/inject-logback/src/main/scala/com/twitter/inject/logback/AsyncAppender.scala inject/inject-request-scope/src/main/scala/com/twitter/inject/requestscope/FinagleRequestScope.scala inject/inject-request-scope/src/main/scala/com/twitter/inject/requestscope/FinagleRequestScopeFilter.scala inject/inject-request-scope/src/main/scala/com/twitter/inject/requestscope/FinagleRequestScopeModule.scala inject/inject-request-scope/src/main/scala/com/twitter/inject/requestscope/RequestScopeBinding.scala inject/inject-request-scope/src/main/scala/com/twitter/inject/requestscope/UnseededFinagleScopeProvider.scala inject/inject-mdc/src/main/scala/com/twitter/inject/logging/FinagleMDCAdapter.scala inject/inject-mdc/src/main/scala/com/twitter/inject/logging/MDCInitializer.scala inject/inject-mdc/src/main/scala/com/twitter/inject/logging/MDCKeys.scala inject/inject-mdc/src/main/scala/org/slf4j/FinagleMDCInitializer.scala inject/inject-modules/src/main/scala/com/twitter/inject/modules/StackClientModuleTrait.scala inject/inject-modules/src/main/scala/com/twitter/inject/modules/StackTransformerModule.scala inject/inject-modules/src/main/scala/com/twitter/inject/modules/StatsReceiverModule.scala inject/inject-modules/src/main/scala/com/twitter/inject/modules/LoggerModule.scala inject/inject-modules/src/main/scala/com/twitter/inject/modules/internal/LibraryModule.scala inject/inject-thrift/src/main/scala/com/twitter/inject/exceptions/PossiblyRetryable.scala inject/inject-thrift/src/main/scala/com/twitter/inject/thrift/utils/ThriftMethodUtils.scala inject/inject-ports/src/main/scala/com/twitter/inject/server/PortUtils.scala inject/inject-ports/src/main/scala/com/twitter/inject/server/Ports.scala inject/inject-slf4j/src/main/scala/com/twitter/inject/Logging.scala inject/inject-dtab/src/main/scala/com/twitter/inject/app/DtabResolution.scala inject/inject-stack/src/main/scala/com/twitter/inject/StackTransformer.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/CaseClassDeserializer.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/CaseClassField.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/Types.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/exceptions/CaseClassFieldMappingException.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/exceptions/InjectableValuesException.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/exceptions/package.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/exceptions/CaseClassMappingException.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/package.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/DefaultInjectableValues.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/InjectableValueId.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/FieldInjection.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/CaseClassDeserializerResolver.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/CaseClassJacksonModule.scala jackson/src/main/scala/com/twitter/finatra/jackson/caseclass/InjectableTypes.scala jackson/src/main/scala/com/twitter/finatra/jackson/ScalaObjectMapper.scala jackson/src/main/scala/com/twitter/finatra/jackson/serde/TimeStringDeserializer.scala jackson/src/main/scala/com/twitter/finatra/jackson/serde/JodaDatetimeDeserializer.scala jackson/src/main/scala/com/twitter/finatra/jackson/serde/LongKeyDeserializer.scala jackson/src/main/scala/com/twitter/finatra/jackson/serde/TimeStringSerializer.scala jackson/src/main/scala/com/twitter/finatra/jackson/serde/SerDeSimpleModule.scala jackson/src/main/scala/com/twitter/finatra/jackson/serde/DurationStringDeserializer.scala jackson/src/main/scala/com/twitter/finatra/jackson/serde/WrappedValueSerializer.scala jackson/src/main/scala/com/twitter/finatra/jackson/serde/DurationStringSerializer.scala jackson/src/main/scala/com/twitter/finatra/jackson/streaming/AsyncJsonParser.scala jackson/src/main/scala/com/twitter/finatra/jackson/streaming/JsonStreamParser.scala jackson/src/main/scala/com/twitter/finatra/jackson/modules/ScalaObjectMapperModule.scala jackson/src/main/scala/com/twitter/finatra/json/utils/JsonDiffUtil.scala jackson/src/main/scala/com/twitter/finatra/json/utils/JsonDiffResult.scala jackson/src/main/scala/com/twitter/finatra/json/JsonLogging.scala jackson/src/main/scala/com/fasterxml/jackson/databind/ObjectMapperCopier.scala validation/src/main/scala/com/twitter/finatra/validation/Validator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/PatternConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/MinConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/MaxConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/RangeConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/SizeConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/OneOfConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/CountryCodeConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/NotEmptyConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/TimeGranularityConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/UUIDConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/FutureTimeConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/AssertFalseConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/PastTimeConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/constraints/AssertTrueConstraintValidator.scala validation/src/main/scala/com/twitter/finatra/validation/MessageResolver.scala validation/src/main/scala/com/twitter/finatra/validation/ValidationResult.scala validation/src/main/scala/com/twitter/finatra/validation/internal/AnnotatedClass.scala validation/src/main/scala/com/twitter/finatra/validation/CommonMethodValidations.scala validation/src/main/scala/com/twitter/finatra/validation/Path.scala validation/src/main/scala/com/twitter/finatra/validation/ValidationException.scala validation/src/main/scala/com/twitter/finatra/validation/ValidatorModule.scala validation/src/main/scala/com/twitter/finatra/validation/InvalidCaseClassException.scala thrift/src/main/scala/com/twitter/finatra/thrift/routing/routers.scala thrift/src/main/scala/com/twitter/finatra/thrift/routing/ThriftWarmup.scala thrift/src/main/scala/com/twitter/finatra/thrift/filters/StatsFilter.scala thrift/src/main/scala/com/twitter/finatra/thrift/filters/ThriftCommonLogFormatter.scala thrift/src/main/scala/com/twitter/finatra/thrift/filters/AccessLoggingFilter.scala thrift/src/main/scala/com/twitter/finatra/thrift/filters/TraceIdMDCFilter.scala thrift/src/main/scala/com/twitter/finatra/thrift/filters/ThriftMDCFilter.scala thrift/src/main/scala/com/twitter/finatra/thrift/filters/LoggingMDCFilter.scala thrift/src/main/scala/com/twitter/finatra/thrift/filters/ExceptionMappingFilter.scala thrift/src/main/scala/com/twitter/finatra/thrift/servers.scala thrift/src/main/scala/com/twitter/finatra/thrift/internal/routing/Registrar.scala thrift/src/main/scala/com/twitter/finatra/thrift/internal/ThriftMethodService.scala thrift/src/main/scala/com/twitter/finatra/thrift/internal/exceptions/AbstractFrameworkExceptionMapper.scala thrift/src/main/scala/com/twitter/finatra/thrift/internal/exceptions/ThrowableExceptionMapper.scala thrift/src/main/scala/com/twitter/finatra/thrift/Controller.scala thrift/src/main/scala/com/twitter/finatra/thrift/ThriftFilter.scala thrift/src/main/scala/com/twitter/finatra/thrift/exceptions/ExceptionManager.scala thrift/src/main/scala/com/twitter/finatra/thrift/response/ThriftResponseClassifier.scala thrift/src/main/scala/com/twitter/finatra/thrift/modules/ExceptionManagerModule.scala thrift/src/main/scala/com/twitter/finatra/thrift/modules/ThriftResponseClassifierModule.scala examples/injectable-twitter-server/scala/src/main/scala/com/twitter/finatra/example/Subscriber.scala examples/injectable-twitter-server/scala/src/main/scala/com/twitter/finatra/example/Publisher.scala examples/injectable-twitter-server/scala/src/main/scala/com/twitter/finatra/example/ExampleTwitterServer.scala examples/injectable-twitter-server/scala/src/main/scala/com/twitter/finatra/example/Queue.scala examples/injectable-twitter-server/scala/src/main/scala/com/twitter/finatra/example/QueueModule.scala examples/benchmark/src/main/scala/com/twitter/finatra/http/benchmark/FinagleBenchmarkServer.scala examples/benchmark/src/main/scala/com/twitter/finatra/http/benchmark/FinatraBenchmarkServer.scala examples/advanced/web-dashboard/src/main/scala/com/twitter/web/dashboard/controllers/DashboardController.scala examples/advanced/web-dashboard/src/main/scala/com/twitter/web/dashboard/Server.scala examples/advanced/streaming-example/src/main/scala/com/twitter/streaming/StreamingController.scala examples/advanced/streaming-example/src/main/scala/com/twitter/streaming/StreamingServer.scala examples/injectable-app/scala/src/main/scala/com/twitter/finatra/example/HelloWorldApp.scala examples/injectable-app/scala/src/main/scala/com/twitter/finatra/example/HelloService.scala httpclient/src/main/scala/com/twitter/finatra/httpclient/modules/HttpClientModule.scala httpclient/src/main/scala/com/twitter/finatra/httpclient/modules/HttpClientModuleTrait.scala httpclient/src/main/scala/com/twitter/finatra/httpclient/HttpClient.scala httpclient/src/main/scala/com/twitter/finatra/httpclient/RequestBuilder.scala httpclient/src/main/scala/com/twitter/finatra/httpclient/RichHttpClient.scala utils/src/main/scala/com/twitter/finatra/utils/FileResolver.scala utils/src/main/scala/com/twitter/finatra/utils/FuturePools.scala utils/src/main/scala/com/twitter/finatra/utils/FileResolvers.scala utils/src/main/scala/com/twitter/finatra/utils/Credentials.scala utils/src/main/scala/com/twitter/finatra/utils/AutoClosable.scala utils/src/main/scala/com/twitter/finatra/modules/CredentialsModule.scala utils/src/main/scala/com/twitter/finatra/modules/FileResolverModule.scala utils/src/main/scala/com/twitter/finatra/filters/MergedFilter.scala mustache/src/main/scala/com/twitter/finatra/mustache/marshalling/MustacheService.scala mustache/src/main/scala/com/twitter/finatra/mustache/marshalling/LocalFilesystemMustacheFactory.scala mustache/src/main/scala/com/twitter/finatra/mustache/marshalling/MustacheFactoryBuilder.scala mustache/src/main/scala/com/twitter/finatra/mustache/modules/MustacheFactoryModule.scala mustache/src/main/scala/com/twitter/finatra/mustache/modules/MustacheFlagsModule.scala http-mustache/src/main/scala/com/twitter/finatra/http/marshalling/MustacheTemplateLookup.scala http-mustache/src/main/scala/com/twitter/finatra/http/marshalling/MustacheMessageBodyWriter.scala http-mustache/src/main/scala/com/twitter/finatra/http/marshalling/response.scala http-mustache/src/main/scala/com/twitter/finatra/http/modules/MustacheModule.scala inject-thrift-client-http-mapper/src/main/scala/com/twitter/finatra/thrift/ThriftClientExceptionMapper.scala

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 28 of 83 files from the diff.
Other files ignored by Codecov
CHANGELOG.rst has changed.
build.sbt has changed.

@@ -10,15 +10,18 @@
Loading
10 10
11 11
private[validation] object CountryCodeConstraintValidator {
12 12
13 +
  /** @see [[https://www.iso.org/iso-3166-country-codes.html ISO 3166]] */
14 +
  val CountryCodes: Set[String] = Locale.getISOCountries.toSet
15 +
13 16
  def errorMessage(resolver: MessageResolver, value: Any): String =
14 -
    resolver.resolve(classOf[CountryCode], toErrorValue(value))
17 +
    resolver.resolve[CountryCode](toErrorValue(value))
15 18
16 19
  private def toErrorValue(value: Any): String =
17 20
    value match {
18 21
      case arrayValue: Array[_] =>
19 -
        arrayValue mkString (",")
20 -
      case traversableValue: Traversable[_] =>
21 -
        traversableValue mkString (",")
22 +
        arrayValue.mkString(",")
23 +
      case traversableValue: Iterable[_] =>
24 +
        traversableValue.mkString(",")
22 25
      case anyValue =>
23 26
        anyValue.toString
24 27
    }
@@ -33,35 +36,33 @@
Loading
33 36
 */
34 37
private[validation] class CountryCodeConstraintValidator(messageResolver: MessageResolver)
35 38
    extends ConstraintValidator[CountryCode, Any](messageResolver) {
36 -
37 -
  private val countryCodes = Locale.getISOCountries.toSet
39 +
  import CountryCodeConstraintValidator._
38 40
39 41
  /* Public */
40 42
  override def isValid(annotation: CountryCode, value: Any): ValidationResult =
41 43
    value match {
42 44
      case typedValue: Array[Any] =>
43 45
        validationResult(typedValue)
44 -
      case typedValue: Traversable[Any] =>
46 +
      case typedValue: Iterable[Any] =>
45 47
        validationResult(typedValue)
46 48
      case anyValue =>
47 49
        validationResult(Seq(anyValue.toString))
48 50
    }
49 51
50 -
  private[this] def validationResult(value: Traversable[Any]) = {
52 +
  private[this] def validationResult(value: Iterable[Any]) = {
51 53
    val invalidCountryCodes = findInvalidCountryCodes(value)
52 54
    ValidationResult.validate(
53 55
      invalidCountryCodes.isEmpty,
54 -
      CountryCodeConstraintValidator.errorMessage(messageResolver, value),
56 +
      errorMessage(messageResolver, value),
55 57
      ErrorCode.InvalidCountryCodes(invalidCountryCodes)
56 58
    )
57 59
  }
58 60
59 61
  /* Private */
60 62
  private[this] def findInvalidCountryCodes(values: Traversable[Any]): Set[String] = {
61 -
    val uppercaseCountryCodes = values.toSet map { value: Any =>
63 +
    val uppercaseCountryCodes = values.toSet.map { value: Any =>
62 64
      value.toString.toUpperCase
63 65
    }
64 -
65 -
    uppercaseCountryCodes.diff(countryCodes)
66 +
    uppercaseCountryCodes.diff(CountryCodes)
66 67
  }
67 68
}

@@ -6,7 +6,7 @@
Loading
6 6
7 7
object ValidatorModule extends ValidatorModule {
8 8
  // java-friendly access to singleton
9 -
  def get(): TwitterModule = this
9 +
  def get(): this.type = this
10 10
}
11 11
12 12
/**

@@ -10,15 +10,17 @@
Loading
10 10
private[validation] object NotEmptyConstraintValidator {
11 11
12 12
  def errorMessage(resolver: MessageResolver): String =
13 -
    resolver.resolve(classOf[NotEmpty])
13 +
    resolver.resolve[NotEmpty]()
14 14
}
15 15
16 16
/**
17 -
 * The validator for [[NotEmpty]] annotation.
18 -
 *
19 -
 * Validate if a given value is not empty.
17 +
 * The validator for [[NotEmpty]] annotation. Validate if a given value is not empty.
20 18
 *
21 19
 * @param messageResolver to resolve error message when validation fails.
20 +
 * @note this does not guarantee that items within a "not empty" container are themselves
21 +
 *       not null or empty. E.g., a `Seq[String]` may not be empty but some of the contained
22 +
 *       Strings may be the empty string or even null. Likewise, a "not empty" `Option`,
23 +
 *       could be a `Some(null)`, etc.
22 24
 */
23 25
private[validation] class NotEmptyConstraintValidator(messageResolver: MessageResolver)
24 26
    extends ConstraintValidator[NotEmpty, Any](messageResolver) {
@@ -31,18 +33,20 @@
Loading
31 33
    value match {
32 34
      case arrayValue: Array[_] =>
33 35
        validationResult(arrayValue)
34 -
      case traversableValue: Traversable[_] =>
36 +
      case map: Map[_, _] =>
37 +
        validationResult(map)
38 +
      case traversableValue: Iterable[_] =>
35 39
        validationResult(traversableValue)
36 40
      case stringValue: String =>
37 41
        validationResult(stringValue)
38 42
      case _ =>
39 43
        throw new IllegalArgumentException(
40 -
          s"Class [${value.getClass}}] is not supported by ${this.getClass}")
44 +
          s"Class [${value.getClass.getName}] is not supported by ${this.getClass.getName}")
41 45
    }
42 46
43 47
  /* Private */
44 48
45 -
  private[this] def validationResult(value: Traversable[_]) =
49 +
  private[this] def validationResult(value: Iterable[_]) =
46 50
    ValidationResult.validate(
47 51
      value.nonEmpty,
48 52
      errorMessage(messageResolver),

@@ -1,17 +1,41 @@
Loading
1 1
package com.twitter.finatra.validation
2 2
3 +
import scala.util.control.NoStackTrace
4 +
3 5
/**
4 6
 * Used to signal validation errors during case class validations.
5 7
 *
8 +
 * @param includeFieldNames If field names should be included in the carried per-field details
9 +
 *                          message field. In the stand alone (post-construction) Validation
10 +
 *                          Framework API case, this will be true to provide fidelity in error
11 +
 *                          reporting. In the Jackson CaseClassDeserializer case this will be
12 +
 *                          false as this information is carried in the deserializer and does not
13 +
 *                          need to be repeated in the message field.
6 14
 * @param results Per-field details (of type [[ValidationResult]]) are carried to
7 -
 *                       provide the ability to iterate over all invalid results from validating a
8 -
 *                       case class field or a case class method.
15 +
 *                provide the ability to iterate over all invalid results from validating a
16 +
 *                case class field or a case class method.
9 17
 */
10 -
class ValidationException private[validation] (results: Seq[ValidationResult]) extends Exception {
18 +
class ValidationException private[validation] (
19 +
  includeFieldNames: Boolean,
20 +
  results: Set[ValidationResult])
21 +
    extends Exception
22 +
    with NoStackTrace {
23 +
24 +
  private[validation] def this(results: Set[ValidationResult]) {
25 +
    this(false, results)
26 +
  }
11 27
12 28
  /** All errors encountered during case class validations of each annotation */
13 -
  val errors: Seq[ValidationResult.Invalid] =
14 -
    results.asInstanceOf[Seq[ValidationResult.Invalid]].sortBy(_.message)
29 +
  val errors: Seq[ValidationResult.Invalid] = {
30 +
    if (includeFieldNames) {
31 +
      results
32 +
        .asInstanceOf[Set[ValidationResult.Invalid]].toSeq
33 +
        .map(e => e.copy(message = s"${e.path.toString}: ${e.message}"))
34 +
        .sortBy(_.message)
35 +
    } else {
36 +
      results.asInstanceOf[Set[ValidationResult.Invalid]].toSeq.sortBy(_.message)
37 +
    }
38 +
  }
15 39
16 40
  override def getMessage: String = {
17 41
    "\nValidation Errors:\t\t" + errors.map(_.message).mkString(", ") + "\n\n"

@@ -13,16 +13,27 @@
Loading
13 13
private[validation] object PatternConstraintValidator {
14 14
15 15
  def errorMessage(resolver: MessageResolver, value: Any, regex: String): String =
16 -
    resolver.resolve(classOf[Pattern], value, regex)
16 +
    resolver.resolve[Pattern](toErrorValue(value), regex)
17 +
18 +
  private def toErrorValue(value: Any): String =
19 +
    value match {
20 +
      case arrayValue: Array[_] =>
21 +
        arrayValue.mkString(",")
22 +
      case traversableValue: Iterable[_] =>
23 +
        traversableValue.mkString(",")
24 +
      case anyValue =>
25 +
        anyValue.toString
26 +
    }
17 27
}
18 28
19 29
/**
20 30
 * The validator for [[Pattern]] annotation.
21 31
 *
22 32
 * Validates whether given [[CharSequence]] value matches with the specified regular expression.
23 33
 *
24 -
 * @example {{{
25 -
 *            case class ExampleRequest(@Pattern(regexp= "exampleRegex") exampleValue : String)
34 +
 * @example
35 +
 * {{{
36 +
 *   case class ExampleRequest(@Pattern(regexp= "exampleRegex") exampleValue : String)
26 37
 * }}}
27 38
 */
28 39
private[validation] class PatternConstraintValidator(messageResolver: MessageResolver)
@@ -40,31 +51,31 @@
Loading
40 51
      value match {
41 52
        case arrayValue: Array[_] =>
42 53
          validationResult(arrayValue, regexp, regex)
43 -
        case traversableValue: Traversable[_] =>
54 +
        case traversableValue: Iterable[_] =>
44 55
          validationResult(traversableValue, regexp, regex)
45 56
        case stringValue: String =>
46 57
          validationResult(stringValue, regexp, regex)
47 58
        case _ =>
48 59
          throw new IllegalArgumentException(
49 -
            s"Class [${value.getClass}}] is not supported by ${this.getClass}")
60 +
            s"Class [${value.getClass.getName}] is not supported by ${this.getClass.getName}")
50 61
      }
51 62
    } else validateRegexResult
52 63
  }
53 64
54 65
  /* Private */
55 66
56 67
  private[this] def validationResult(
57 -
    value: Traversable[_],
68 +
    value: Iterable[_],
58 69
    regexp: String,
59 70
    regex: Try[Regex]
60 71
  ): ValidationResult =
61 72
    ValidationResult.validate(
62 -
      value.forall(x => validateValue(x.toString, regex)),
63 -
      errorMessage(messageResolver, value, regexp),
73 +
      value.isEmpty || value.forall(x => validateValue(x.toString, regex)),
74 +
      errorMessage(messageResolver, value.mkString(","), regexp),
64 75
      errorCode(value, regexp)
65 76
    )
66 77
67 -
  private[this] def errorCode(value: Traversable[_], regex: String): ErrorCode =
78 +
  private[this] def errorCode(value: Iterable[_], regex: String): ErrorCode =
68 79
    ErrorCode.PatternNotMatched(value.mkString(","), regex)
69 80
70 81
  private[this] def validationResult(

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Learn more Showing 4 files with coverage changes found.

New file validation/src/main/scala/com/twitter/finatra/validation/internal/AnnotatedClass.scala
New
Loading file...
New file validation/src/main/scala/com/twitter/finatra/validation/constraints/AssertFalseConstraintValidator.scala
New
Loading file...
New file validation/src/main/scala/com/twitter/finatra/validation/Path.scala
New
Loading file...
New file validation/src/main/scala/com/twitter/finatra/validation/constraints/AssertTrueConstraintValidator.scala
New
Loading file...
Loading