This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git


The following commit(s) were added to refs/heads/master by this push:
     new 858f5cf23 More specific catch clause in FileUtils.decodeUrl() (#575)
858f5cf23 is described below

commit 858f5cf238259e50923482d11fd17b315233fa23
Author: Elliotte Rusty Harold <elh...@users.noreply.github.com>
AuthorDate: Wed Jan 31 15:10:56 2024 -0500

    More specific catch clause in FileUtils.decodeUrl() (#575)
---
 src/main/java/org/apache/commons/io/FileUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/io/FileUtils.java 
b/src/main/java/org/apache/commons/io/FileUtils.java
index 8101a228e..623af97a5 100644
--- a/src/main/java/org/apache/commons/io/FileUtils.java
+++ b/src/main/java/org/apache/commons/io/FileUtils.java
@@ -1184,7 +1184,7 @@ public class FileUtils {
                             i += 3;
                         } while (i < n && url.charAt(i) == '%');
                         continue;
-                    } catch (final RuntimeException ignored) {
+                    } catch (final IndexOutOfBoundsException | 
NumberFormatException ignored) {
                         // malformed percent-encoded octet, fall through and
                         // append characters literally
                     } finally {

Reply via email to