[jersey1] 01/04: Fixed the build failure with istack-commons 3.0.x

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Thu Mar 29 15:36:44 BST 2018


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository jersey1.

commit 35db2f1a0a26f3330795600f32794633562a5577
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Thu Mar 29 16:35:11 2018 +0200

    Fixed the build failure with istack-commons 3.0.x
---
 debian/changelog                                   |  6 ++
 .../patches/01-maven-istack-commons-plugin.patch   | 99 ++++++++++++++++++++++
 2 files changed, 105 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 6ef6296..f9e2ff1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+jersey1 (1.19.3-3) UNRELEASED; urgency=medium
+
+  * Fixed the build failure with istack-commons 3.0.x
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Thu, 29 Mar 2018 16:34:31 +0200
+
 jersey1 (1.19.3-2) unstable; urgency=medium
 
   * Depend on libgeronimo-jpa-2.0-spec-java instead of glassfish-javaee
diff --git a/debian/patches/01-maven-istack-commons-plugin.patch b/debian/patches/01-maven-istack-commons-plugin.patch
index 661d5a5..6e3daf6 100644
--- a/debian/patches/01-maven-istack-commons-plugin.patch
+++ b/debian/patches/01-maven-istack-commons-plugin.patch
@@ -31,3 +31,102 @@ Forwarded: not-needed
                  <executions>
                      <execution>
                          <phase>generate-sources</phase>
+--- a/jersey-core/src/main/java/com/sun/jersey/localization/LocalizableMessageFactory.java
++++ b/jersey-core/src/main/java/com/sun/jersey/localization/LocalizableMessageFactory.java
+@@ -46,13 +46,30 @@
+ public class LocalizableMessageFactory {
+ 
+     private final String _bundlename;
++    private final ResourceBundleSupplier _rbSupplier;
+ 
++    @Deprecated
+     public LocalizableMessageFactory(String bundlename) {
+         _bundlename = bundlename;
++        _rbSupplier = null;
++    }
++
++    public LocalizableMessageFactory(String bundlename, ResourceBundleSupplier rbSupplier) {
++        _bundlename = bundlename;
++        _rbSupplier = rbSupplier;
+     }
+ 
+     public Localizable getMessage(String key, Object... args) {
+-        return new LocalizableMessage(_bundlename, key, args);
++        return new LocalizableMessage(_bundlename, _rbSupplier, key, args);
++    }
++
++    public interface ResourceBundleSupplier {
++        /**
++         * Gets the ResourceBundle.
++         * @param locale the requested bundle's locale
++         * @return ResourceBundle
++         */
++        java.util.ResourceBundle getResourceBundle(java.util.Locale locale);
+     }
+ 
+ }
+--- a/jersey-core/src/main/java/com/sun/jersey/localization/LocalizableMessage.java
++++ b/jersey-core/src/main/java/com/sun/jersey/localization/LocalizableMessage.java
+@@ -40,32 +40,52 @@
+ 
+ package com.sun.jersey.localization;
+ 
++import com.sun.jersey.localization.LocalizableMessageFactory.ResourceBundleSupplier;
++
+ /**
+  * @author WS Development Team
+  */
+ public final class LocalizableMessage implements Localizable {
+ 
+     private final String _bundlename;
++    private final ResourceBundleSupplier _rbSupplier;
+     private final String _key;
+     private final Object[] _args;
+ 
+     public LocalizableMessage(String bundlename, String key, Object... args) {
++        this(bundlename, null, key, args);
++    }
++
++    public LocalizableMessage(String bundlename, ResourceBundleSupplier rbSupplier,
++                              String key, Object... args) {
+         _bundlename = bundlename;
++        _rbSupplier = rbSupplier;
+         _key = key;
+         if(args==null)
+             args = new Object[0];
+         _args = args;
+     }
+ 
++    @Override
+     public String getKey() {
+         return _key;
+     }
+ 
++    @Override
+     public Object[] getArguments() {
+         return _args;
+     }
+ 
++    @Override
+     public String getResourceBundleName() {
+         return _bundlename;
+     }
++
++    @Override
++    public java.util.ResourceBundle getResourceBundle(java.util.Locale locale) {
++        if (_rbSupplier == null)
++            return null;
++
++        return _rbSupplier.getResourceBundle(locale);
++    }
+ }
+--- a/jersey-core/src/main/java/com/sun/jersey/localization/Localizable.java
++++ b/jersey-core/src/main/java/com/sun/jersey/localization/Localizable.java
+@@ -66,6 +66,7 @@
+     public Object[] getArguments();
+     public String getResourceBundleName();
+ 
++    public java.util.ResourceBundle getResourceBundle(java.util.Locale locale);
+ 
+     /**
+      * Special constant that represents a message that

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jersey1.git



More information about the pkg-java-commits mailing list