gunnarmorling / bridge-methods-demo

Example for injecting bridge methods using Bridger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bridge Methods Demo

An example which demonstrates how to narrow down the return type of a Java method in a new version of a Java library, using Bridger to keep backwards compatibility.

In service-1.0, there's a method Number SomeService::getSomeNumber(). In service-2.0, this return type is narrowed down to Long. Consequently, the integration test in integration-test fail, as it uses client, as built against service-1.0, together with service-2.0. Switch to version 3.0.0 to make the test pass. This works as service-3.0 injects a bridge method which returns Number.

Build

Run the following command to build this project:

mvn clean verify

License

This code base is available under the Apache License, version 2.

About

Example for injecting bridge methods using Bridger


Languages

Language:Java 100.0%