File: 02-avoid-this-escape.patch

package info (click to toggle)
libjxmpp-java 1.0.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 904 kB
  • sloc: java: 5,826; xml: 687; sh: 21; python: 11; makefile: 9
file content (29 lines) | stat: -rw-r--r-- 1,438 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: workaround this-escape warnings for Java 21
 Workaround this-escape warning for Java 21 (declare final or
 suppress the warning where inheritance is present).
Author: Vladimir Petko <vladimir.petko@canonical.com>
Bug: https://github.com/igniterealtime/jxmpp/pull/43
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057520
Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/libjxmpp-java/+bug/2054240
Last-Update: 2024-01-30
--- a/jxmpp-util-cache/src/main/java/org/jxmpp/util/cache/ExpirationCache.java
+++ b/jxmpp-util-cache/src/main/java/org/jxmpp/util/cache/ExpirationCache.java
@@ -43,7 +43,7 @@
 	 *
 	 * @param defaultExpirationTime the default expiration time.
 	 */
-	public void setDefaultExpirationTime(long defaultExpirationTime) {
+	public final void setDefaultExpirationTime(long defaultExpirationTime) {
 		if (defaultExpirationTime <= 0) {
 			throw new IllegalArgumentException();
 		}
--- a/jxmpp-core/src/main/java/org/jxmpp/stringprep/XmppStringprepException.java
+++ b/jxmpp-core/src/main/java/org/jxmpp/stringprep/XmppStringprepException.java
@@ -36,6 +36,7 @@
 	 * @param causingString the String causing the exception.
 	 * @param exception the exception.
 	 */
+	@SuppressWarnings("this-escape")
 	public XmppStringprepException(String causingString, Exception exception) {
 		super("XmppStringprepException caused by '" + causingString + "': " + exception);
 		initCause(exception);