]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
intl-java: Fix a deprecation warning.
authorBruno Haible <bruno@clisp.org>
Thu, 12 Dec 2024 10:52:59 +0000 (11:52 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 12 Dec 2024 12:32:59 +0000 (13:32 +0100)
* gettext-runtime/intl-java/gnu/gettext/GettextResource.java (ngettextnull): Use
Long.valueOf(n) instead of new Long(n).

gettext-runtime/intl-java/gnu/gettext/GettextResource.java

index 8a75923f021e8b910030d356091aa47e0da005ec..7c86d26e527ebc02fdb89e5276bb12b4003e08ed 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext for Java
- * Copyright (C) 2001, 2007 Free Software Foundation, Inc.
+ * Copyright (C) 2001-2024 Free Software Foundation, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -148,7 +148,7 @@ public abstract class GettextResource extends ResourceBundle {
               String[] pluralforms = (String[])localValue;
               long i = 0;
               try {
-                i = ((Long) pluralEvalMethod.invoke(catalog, new Object[] { new Long(n) })).longValue();
+                i = ((Long) pluralEvalMethod.invoke(catalog, new Object[] { Long.valueOf(n) })).longValue();
                 if (!(i >= 0 && i < pluralforms.length))
                   i = 0;
               } catch (IllegalAccessException e) {