Skip to content

Finatra 20.3.0

Choose a tag to compare

@finaglehelper finaglehelper released this 08 Mar 19:32

Added

  • finatra-kafka-streams: Add method to c.t.f.kafkastreams.test.TopologyTesterTopic to write
    Kafka messages with custom headers to topics. a9fef3dc

  • finatra-http: Add toBufReader to get the underlying Reader of Buf from StreamingResponse.
    If the consumed Stream primitive is not Buf, the returned reader streams a serialized
    JSON array. 876d0ba9

  • inject-app: Add functions to c.t.inject.app.AbstractApp to provide better
    ergonomics for Java users to call and use basic App lifecycle callbacks.
    f04772df

  • inject-server: Add functions to c.t.inject.server.AbstractTwitterServer to provide
    better ergonomics for Java users to call and use basic TwitterServer lifecycle
    callbacks. f04772df

  • inject-slf4j: Add a way to retrieve the currently stored Local Context map backing the
    MDC. 12b9410e

  • finatra-jackson: Added new functionality in the CaseClassDeserializer to support more
    Jackson annotations during deserialization. See documentation for more information.
    49014890

  • finatra: Add NullKafkaProducer for unit tests to avoid network connection failures in the log.
    d8d4d5db

Changed

  • finatra-validation|jackson: Remove Jackson dependency from finatra/validation. This
    was for ErrorCode reporting but can be moved to finatra/jackson. f024f929

  • finatra-kafka-streams: (BREAKING API CHANGE) Update AsyncTransformer to preserve
    record context. be5dd08f

  • finatra-jackson: Better handling of Scala enumeration mapping errors. Currently, if mapping
    of a Scala enumeration during deserialization fails a java.util.NoSuchElementException is
    thrown which escapes deserialization error handling. Update to instead handle this failure case
    in order to correctly translate into a CaseClassFieldMappingException which will be wrapped
    into a CaseClassMappingException. 4753c6e8

  • finatra: Update Google Guice version to 4.2.0 76506c35

  • finatra: Bumped version of Joda to 2.10.2 and Joda-Convert to 1.5. 9adef421

  • finatra-jackson|finatra-http-annotations: Move http-releated Jackson "injectablevalues"
    annotations from finatra/jackson to finatra/http-annotations.

    Specifically the follow have changed packages,
    c.t.finatra.request.QueryParam --> c.t.finatra.http.annotations.QueryParam
    c.t.finatra.request.RouteParam --> c.t.finatra.http.annotations.RouteParam
    c.t.finatra.request.FormParam --> c.t.finatra.http.annotations.FormParam
    c.t.finatra.request.Header --> c.t.finatra.http.annotations.Header
    c.t.finatra.request.JsonIgnoreBody --> c.t.finatra.http.annotations.JsonIgnoreBody

    Users should update from finatra/jackson/src/main/java (finatra-jackson_2.12)
    to finatra/http-annotations/src/main/java (finatra-http-annotations_2.12).
    77469e17

  • finatra-jackson: Updated Finatra Jackson integration to introduce a new ScalaObjectMapper
    and module to simplify configuration and creation of the mapper. See documentation for more
    information. 49014890

  • finatra-jackson: (BREAKING API CHANGE) Moved the java binding annotations, CamelCaseMapper and
    SnakeCaseMapper from c.t.finatra.annotations in finatra/jackson to
    c.t.finatra.json.annotations in finatra/json-annotations. Moved
    c.t.finatra.response.JsonCamelCase to c.t.finatra.json.annotations.JsonCamelCase which is also
    now deprecated. Users are encouraged to use the standard Jackson annotations or a mapper with
    the desired property naming strategy configured.

    Many exceptions for case class deserialization were meant to be internal to the framework but are
    useful or necessary outside of the internals of JSON deserialization. As such we have cleaned up
    and made most JSON deserialization exceptions public. As a result, all the exceptions have been moved
    from c.t.finatra.json.internal.caseclass.exceptions to c.t.finatra.jackson.caseclass.exceptions.

    c.t.finatra.json.internal.caseclass.exceptions.CaseClassValidationException has been renamed to
    c.t.finatra.jackson.caseclass.exceptions.CaseClassFieldMappingException. JsonInjectException,
    JsonInjectionNotSupportedException, and RequestFieldInjectionNotSupportedException have all been
    deleted and replaced with c.t.finatra.jackson.caseclass.exceptions.InjectableValuesException
    which represents the same error cases.

    The FinatraJsonMappingException has been removed. Users are encouraged to instead use the general
    Jackson JsonMappingException (which the FinatraJsonMappingException extends).

    RepeatedCommaSeparatedQueryParameterException has been moved tom finatra/http.
    49014890

Fixed

  • finatra-jackson: Access to parameter names via Java reflection is not supported in Scala 2.11.
    Added a work around for the parsing of case class structures to support JSON deserialization in
    Scala 2.11 and forward. 59ec2c21

  • finatra-jackson: Fix for enforcing "fail on unknown properties" during deserialization. Previously,
    the CaseClassDeserializer was optimized to only read the fields in the case class constructor
    from the incoming JSON and thus ignored any unknown fields during deserialization. The fix will
    now properly fail if the DeserializationFeature is set or if the JsonProperties is configured
    accordingly. 49014890