1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 00:59:39 +02:00

Bump to Gradle 8.10.2, require Java 11

Bump Gradle from 6.8.3 to 8.10.2 and increase the minimum required
Java version from 8 to 11 (SMACK-953).

The switch from Java 8 to 11 caused some Bytecode portability issues
regarding NIO Buffers. Java changed with version 9 the return type of
some subclasses of Buffer to return the specific Buffer type instead
of the Buffer superclass [JDK-4774077]. For example, ByteBuffer.filp()
previously returned Buffer, while it does return ByteBuffer now.

This sensible change was not reflected by the Android API [1], which
means that AnimalSniffer rightfully started to complain that there is
no method "ByteBuffer ByteBuffer.flip()" in Android, there is only
"Buffer ByteBuffer.flip()", and those are incompatible methods on
Java's Bytecode layer.

As workaround, this changes

    return charBuffer.flip().toString();

to

    ((java.nio.Buffer) charBuffer).flip();
    return charBuffer.toString();

to restore the Bytecode portability between Android and Java.

Errorprone also got new checks, of which JavaUtilDate and JdkObsolete
are wroth mentioning.

JavaUtilData basically strongly recommends to use Java's newer time
API over java.util.Date. But since Smack was Java 8 until now,
j.u.Date is widely used.

Similar JdkObsolete mentions obsolete JDK APIs, like data structures
like Vector and Stack. But mostly LinkedList, which should usually be
replaced by ArrayList. And this is what this commit largely does.

JDK-4774077: https://bugs.openjdk.org/browse/JDK-4774077
1: https://issuetracker.google.com/issues/369219141
This commit is contained in:
Florian Schmaus 2024-09-25 11:43:47 +02:00
parent d8d066b831
commit 1e5d34eacf
136 changed files with 1161 additions and 1220 deletions

View file

@ -1,221 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Smack Readme</title>
<style type="text/css">
/* global font and body settings */
body {
font-size : 100%;
background-color : #d3d6d9;
padding: 0;
margin: 0 0 30px 0;
}
body, td, th {
font-family : arial, helvetica, sans-serif;
font-size : 10pt;
}
pre, tt, code {
font-family : courier new, monospace;
font-size : 9pt;
}
#pageContainer {
display: block;
position: relative;
clear: both;
background-color: #fff;
border: 1px solid #999;
padding: 40px;
margin: 30px;
-moz-border-radius: 6px;
}
#pageHeader {
display: block;
position: relative;
height: 80px;
background-color: #e7eaee;
border: 1px solid #cccccc;
border-bottom: none;
-moz-border-radius: 5px 5px 0 0;
margin: 10px 0 0 0;
}
#pageBody {
margin: 0 18px 0 20px;
}
/* anchors */
a:link {
color: #11568c;
}
a:visited {
color: #571c8d;
}
a:hover {
color: #7a1d42;
text-decoration : underline;
}
a:active {
color: #7a1d42;
}
/* page header elements (logo and navigation) */
.navigation {
display: block;
position: relative;
height: 20px;
background-color: #335588;
border: 1px solid #cccccc;
border-top: none;
color: #ffffff;
font-size: 11px;
line-height: 18px;
padding: 0 0 0 0;
margin: 0 0 25px 0;
overflow: hidden;
}
.navigation a {
margin: 0 20px 0 20px;
}
.navigation a:link { color: #ffffff; }
.navigation a:visited { color: #ffffff; }
.navigation a:hover { color: #ffffff; }
.navigation a:active { color: #ffffff; }
/* headings */
h1 {
display: block;
position: relative;
font-size : 1.7em;
font-weight : bold;
color: #670e15;
padding: 0;
margin: 30px 0 0 20px;
}
h2 {
font-size : 1.3em;
font-weight : bold;
margin: 40px 0 6px 0;
padding: 0;
color: #335588;
}
h3 {
font-size : 1.0em;
font-weight : bold;
margin: 25px 0 3px 0;
padding: 0;
color: #334466;
}
/* general elements */
p {
margin: 0 0 15px 0;
}
ul {
margin: 5px 0 15px 15px;
}
li {
padding-bottom : 4px;
}
tt {
font-family : courier new, monospace;
font-weight : bold;
color : #060;
}
hr {
display: block;
height: 1px;
background-color: #999999;
border: none;
margin: 40px 0 20px 0;
}
</style>
</head>
<body>
<div id="pageContainer">
<div id="pageHeader">
<h1>Smack Readme</h1>
</div>
<div class="navigation">
<a href="README.html">Readme</a>|<a href="changelog.html"><strong>Changelog</strong></a>
</div>
<div id="pageBody">
<p>
<table border=0>
<tr>
<td align="right">version:</td>
<td><b>@version@</b></td>
</tr>
<tr>
<td align="right">released:</td>
<td><b>@releasedate@</b></td>
</tr>
</table>
<p>
Thank you for downloading Smack! This version of Smack is compatible
with JVMs @targetCompatibility@ or higher. Using a build system which
is able to consume Maven artifacts, like gradle or Maven, is highly
recommended when using Smack.
</p>
<p>
<b>This is not the real README.</b> Please visit
<center>
<a href="https://www.igniterealtime.org/projects/smack/readme">https://www.igniterealtime.org/projects/smack/readme</a>
</center>
for the README of the current stable Smack version.
</p>
<p>
Smack tries to depend on as few as possible libraries. The only
requirement is <a href="http://jxmpp.org">jXMPP</a>. For DNS
resolution we recommend to
use <a href="http://minidns.org">MiniDNS</a>.
</p>
<p>
Start off by viewing the <a href="documentation/index.html">documentation</a>
that can be found in the "documentation" directory included with this distribution.
</p>
Further information can be found on the <a href="http://www.igniterealtime.org/projects/smack">
Smack website</a>. If you need help using or would like to make contributions or
fixes to the code, please visit the
<a href="https://community.igniterealtime.org">online forum</a>.
</p>
<p><b>Changelog and Upgrading</b><p>
View the <a href="changelog.html">changelog</a> for a list of changes since the
last release.
<p><b>License Agreements</b><p>
<ul>
<li>Use of the Smack source code is governed by the Apache License Version 2.0:
<pre>
Copyright 2002-2008 Jive Software.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</pre></li>
<li>Smack contains icons and images licensed from INCORS GmbH. You are not licensed
to use these icons outside of Smack.</li>
<li>Third-party source code is licensed as noted in their source files.
</ul>
</div>
</div>
</body>
</html>