[plexus-utils2] 01/01: Fixed the backward compatibility by removing the IOException on PropertyUtils.loadProperties() (Closes: #863223)

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed May 24 06:40:26 UTC 2017


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

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

commit 82a82d9044fd237b9a9abe01e684b1fb223443ca
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Wed May 24 00:29:56 2017 +0200

    Fixed the backward compatibility by removing the IOException on PropertyUtils.loadProperties() (Closes: #863223)
---
 debian/changelog                                   |  8 +++
 .../patches/02-propertyutils-compatibility.patch   | 74 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 83 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 4682b0f..527c6e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+plexus-utils2 (3.0.24-2) unstable; urgency=medium
+
+  * Team upload.
+  * Restored the backward compatibility of PropertyUtils by removing
+    the IOException on the loadProperties methods (Closes: #863223)
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Wed, 24 May 2017 00:29:20 +0200
+
 plexus-utils2 (3.0.24-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/02-propertyutils-compatibility.patch b/debian/patches/02-propertyutils-compatibility.patch
new file mode 100644
index 0000000..fc45ff3
--- /dev/null
+++ b/debian/patches/02-propertyutils-compatibility.patch
@@ -0,0 +1,74 @@
+Description: Restores the backward compatibility of PropertyUtils
+ by removing the IOException on the loadProperties methods
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/src/main/java/org/codehaus/plexus/util/PropertyUtils.java
++++ b/src/main/java/org/codehaus/plexus/util/PropertyUtils.java
+@@ -34,27 +34,45 @@
+ public class PropertyUtils
+ {
+ 
+-    public static Properties loadProperties( final URL url ) throws IOException
++    public static Properties loadProperties( final URL url )
+     {
+         if ( url == null )
+         {
+             throw new NullPointerException( "url" );
+         }
+ 
+-        return loadProperties( url.openStream() );
++        try
++        {
++            return loadProperties( url.openStream() );
++        }
++        catch ( IOException e )
++        {
++            // ignore
++        }
++
++        return null;
+     }
+ 
+-    public static Properties loadProperties( final File file ) throws IOException
++    public static Properties loadProperties( final File file )
+     {
+         if ( file == null )
+         {
+             throw new NullPointerException( "file" );
+         }
+ 
+-        return loadProperties( new FileInputStream( file ) );
++        try
++        {
++            return loadProperties( new FileInputStream( file ) );
++        }
++        catch ( IOException e )
++        {
++            // ignore
++        }
++
++        return null;
+     }
+ 
+-    public static Properties loadProperties( final InputStream is ) throws IOException
++    public static Properties loadProperties( final InputStream is )
+     {
+         InputStream in = is;
+         try
+@@ -71,10 +89,16 @@
+ 
+             return properties;
+         }
++        catch ( IOException e )
++        {
++            // ignore
++        }
+         finally
+         {
+             IOUtil.close( in );
+         }
++
++        return null;
+     }
+ 
+ }
diff --git a/debian/patches/series b/debian/patches/series
index bf071b2..99661e4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 01-add-junit-dependency.patch
+02-propertyutils-compatibility.patch

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



More information about the pkg-java-commits mailing list