1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-10-18 12:15:58 +02:00
Commit graph

6 commits

Author SHA1 Message Date
Florian Schmaus
1e5d34eacf 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
2024-09-25 12:08:50 +02:00
Florian Schmaus
201152ef42 Migrate from Ant to Gradle (SMACK-265) 2014-02-14 18:46:33 +01:00
Florian Schmaus
577fda6e62 Makefile: added javadoc target
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13473 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-14 00:00:02 +00:00
Florian Schmaus
55893400c7 Makefile: Added integration-est target and JAVA_TOOL_OPTIONS to set the correct file encoding
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13439 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-04 21:36:32 +00:00
Florian Schmaus
2afd3bdfa3 Remove .settings from the 'all' target in Makefile
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13422 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-01 17:20:38 +00:00
Florian Schmaus
054656c771 Add eclipse configuration and Makefile. The eclipse configuration can be activated with the 'eclipse' make target ('make eclipse').
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13414 b35dd754-fafc-0310-a699-88a17e54d16e
2013-01-29 22:04:09 +00:00