Skip to content

gunnarmorling/bridge-methods-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages