The best thing I can think of for now that would be backwards compatible is:

1. Keep Payload a subinterface of InputSupplier for now
2. Add an `asByteSource` method to Payload that would return a view of a 
Payload as a ByteSource
3. Deprecate `Payload.getInput` with a warning to switch to ByteSource use 
(since ByteSource.getInput() also looks like it's on its way out)
4. For 1.8.0, make Payload a subclass of ByteSource. If ByteSource.getInput() 
still exists, users will just have to change their sig, but they shouldn't be 
using it anyway. Anyone using Payload.asByteSource() will just need to delete 
the "asByteSource()" part, or we give them more time by returning "this" from 
that method and deprecating asByteSource(). But if we're going to make breaking 
changes, better perhaps to just get it over with.

Not hugely satisfying, but would allow us to use ByteSource idioms now without 
introducing breaking changes..?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/233#issuecomment-30640454

Reply via email to