Files
codeql/java/ql/src/Metrics/Files/FSelfContainedness.qhelp
Marcono1234 e21cbe82a9 Update Java documentation links to Java 11
Where possible update Java documentation links to Java 11.
Additionally update some other links to use HTTPS.
2021-02-26 00:43:51 +01:00

71 lines
2.0 KiB
XML

<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>
This metric measures the percentage of the types on which a compilation unit
depends for which we have source code available.
</p>
<p>
The availability of source code is one of the key factors affecting how easy
or difficult it will be to build a software project in the future, especially
on platforms other than those for which it was originally developed. Projects
will a high level of self-containedness are likely to be more portable and
easier to build in ten years' time than those that depend on many binary-only,
third-party libraries. (This is one reason why many of the dependencies of
open-source projects are distributed as source code, aside from the fact that
the binaries are generally larger and more unwieldy to distribute.)
</p>
<p>
In the context of Java's platform independence, the availability of source code
is less critical than it is for platform-dependent languages.
However, note that there can be minor binary incompatibilities between
different versions of Java.
</p>
</overview>
<recommendation>
<p>
Low self-containedness may or may not be a problem, depending on the context
of your project. However, if you determine that it is an issue for you, it is
best tackled at a project level, in the following ways:
</p>
<ul>
<li>
Try to use libraries for which the source code is available.
</li>
<li>
Try to obtain the source code for binary-only libraries from the authors.
</li>
<li>
Where practical, rewrite parts of your code to reduce your dependence on
external libraries.
</li>
</ul>
</recommendation>
<references>
<li>
Wikipedia: <a href="http://en.wikipedia.org/wiki/Software_portability">Software portability</a>
</li>
<li>
Oracle Technology Network: <a href="https://www.oracle.com/java/technologies/javase/compatibility.html">Java SE 6 Compatibility</a>
</li>
<li>
Java Language Specification:
<a href="https://docs.oracle.com/javase/specs/jls/se11/html/jls-13.html">Binary Compatibility</a>
</li>
</references>
</qhelp>