japi-compliance-checker | checking backward API/ABI compatibility | Code Analyzer library
kandi X-RAY | japi-compliance-checker Summary
kandi X-RAY | japi-compliance-checker Summary
The tool checks classes declarations of old and new versions and analyzes changes that may break compatibility: removed methods, removed class fields, added abstract methods, etc. The tool is intended for developers of software libraries and Linux maintainers who are interested in ensuring backward compatibility. The Scala language is supported since 1.7 version of the tool. Java 9 is supported since 2.4 version of the tool. The tool is a core of the Java API Tracker project:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of japi-compliance-checker
japi-compliance-checker Key Features
japi-compliance-checker Examples and Code Snippets
Community Discussions
Trending Discussions on japi-compliance-checker
QUESTION
I have the following class:
...ANSWER
Answered 2017-Feb-13 at 12:04Well yes your code does not seem to break binary compatibility.
I found these after some crawling/reading
http://docs.oracle.com/javase/specs/jls/se8/html/jls-13.html#jls-13.4.5
which says:-
Adding or removing a type parameter of a class does not, in itself, have any implications for binary compatibility.
...
Changing the first bound of a type parameter of a class may change the erasure (§4.6) of any member that uses that type parameter in its own type, and this may affect binary compatibility. The change of such a bound is analogous to the change of the first bound of a type parameter of a method or constructor (§13.4.13).
And this http://wiki.eclipse.org/Evolving_Java-based_APIs_2#Turning_non-generic_types_and_methods_into_generic_ones further clarifies:-
According to the special compatibility story, the Java compiler treats a raw type as a reference to the type's erasure. An existing type can be evolved into a generic type by adding type parameters to the type declaration and judiciously introducing uses of the type variables into the signatures of its existing methods and fields. As long as the erasure looks like the corresponding declaration prior to generification, the change is binary compatible with existing code.
So you have no problems as of now since it is the first time you are generifying that class.
But please keep in mind as the above doc also says :-
But, also bear in mind that there are severe constraints on how a type or method that already is generic can be compatibly evolved with respect to its type parameters (see the tables above). So if you plan to generify an API, remember that you only get one chance (release), to get it right. In particular, if you change a type in an API signature from the raw type "List" to "List" or "List", you will be locked into that decision. The moral is that generifying an existing API is something that should be considered from the perspective of the API as a whole rather than piecemeal on a method-by-method or class-by-class basis.
So I think, its alright to make this change for the very first time but you have one chance only so make full use of it!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install japi-compliance-checker
JDK or OpenJDK - development files
Perl 5
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page