typetools icon indicating copy to clipboard operation
typetools copied to clipboard

Release under dual license

Open ChristianSchwarz opened this issue 8 years ago • 1 comments

Is it possible to release type-tools under MIT-license too? The mockito project (MIT-license) wan't to use typetools to resolve typeparamters from lambda expressions. Actually it is not desired to depend on an additional libs, so the only solution seems to be a releaase under dual license so mockito can copy/paste the required class into the mockito code base. Maybe know an other solution?

ChristianSchwarz avatar Feb 01 '17 12:02 ChristianSchwarz

@ChristianSchwarz I don't mind switching to an MIT license if Mockito decides to use TypeTools. We do have an outstanding issue around resolving lambdas in Java 9, but there seems to be a good workaround.

As for including TypeTools in Mockito, if not as a library, you may just want to use something like the Maven shade plugin to repackage the TypeTools source (just one class) into Mockito as part of its build. I have other libraries that do this sort of thing - example here. It's worth noting though that lambda resolution depends on sun.reflect.ConstantPool, so it will only work on runtimes where that is present, such as OpenJDK, Oracle, etc.

jhalterman avatar Feb 01 '17 15:02 jhalterman