Repository: ant
Updated Branches:
  refs/heads/master 476b4ef62 -> 5e0632687


accept "impossible" exceptions


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/da943ea1
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/da943ea1
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/da943ea1

Branch: refs/heads/master
Commit: da943ea14a7ff63313a480edc7e21e3324cc1894
Parents: 121043f
Author: Stefan Bodewig <[email protected]>
Authored: Thu Dec 22 06:26:28 2016 +0100
Committer: Stefan Bodewig <[email protected]>
Committed: Thu Dec 22 06:26:28 2016 +0100

----------------------------------------------------------------------
 src/main/org/apache/tools/tar/TarEntry.java                  | 7 ++++---
 src/main/org/apache/tools/tar/TarUtils.java                  | 4 ++--
 src/main/org/apache/tools/zip/AbstractUnicodeExtraField.java | 2 +-
 src/main/org/apache/tools/zip/AsiExtraField.java             | 2 +-
 src/main/org/apache/tools/zip/GeneralPurposeBit.java         | 2 +-
 src/main/org/apache/tools/zip/ZipLong.java                   | 2 +-
 src/main/org/apache/tools/zip/ZipShort.java                  | 2 +-
 7 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/da943ea1/src/main/org/apache/tools/tar/TarEntry.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/tar/TarEntry.java 
b/src/main/org/apache/tools/tar/TarEntry.java
index 6799079..86024ea 100644
--- a/src/main/org/apache/tools/tar/TarEntry.java
+++ b/src/main/org/apache/tools/tar/TarEntry.java
@@ -846,7 +846,7 @@ public class TarEntry implements TarConstants {
                 writeEntryHeader(outbuf, TarUtils.FALLBACK_ENCODING, false);
             } catch (IOException ex2) {
                 // impossible
-                throw new RuntimeException(ex2);
+                throw new RuntimeException(ex2); //NOSONAR
             }
         }
     }
@@ -932,7 +932,7 @@ public class TarEntry implements TarConstants {
                 parseTarHeader(header, TarUtils.DEFAULT_ENCODING, true);
             } catch (IOException ex2) {
                 // not really possible
-                throw new RuntimeException(ex2);
+                throw new RuntimeException(ex2); //NOSONAR
             }
         }
     }
@@ -1095,7 +1095,8 @@ public class TarEntry implements TarConstants {
         try {
             buffer1 = expected.getBytes("ASCII");
         } catch (UnsupportedEncodingException e) {
-            throw new RuntimeException(e); // Should not happen
+            // Should not happen
+            throw new RuntimeException(e); //NOSONAR
         }
         return isEqual(buffer1, 0, buffer1.length, buffer, offset, length,
                        false);

http://git-wip-us.apache.org/repos/asf/ant/blob/da943ea1/src/main/org/apache/tools/tar/TarUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/tar/TarUtils.java 
b/src/main/org/apache/tools/tar/TarUtils.java
index f86154e..5fa2e01 100644
--- a/src/main/org/apache/tools/tar/TarUtils.java
+++ b/src/main/org/apache/tools/tar/TarUtils.java
@@ -265,7 +265,7 @@ public class TarUtils {
                 return parseName(buffer, offset, length, FALLBACK_ENCODING);
             } catch (final IOException ex2) {
                 // impossible
-                throw new RuntimeException(ex2);
+                throw new RuntimeException(ex2); //NOSONAR
             }
         }
     }
@@ -324,7 +324,7 @@ public class TarUtils {
                                        FALLBACK_ENCODING);
             } catch (final IOException ex2) {
                 // impossible
-                throw new RuntimeException(ex2);
+                throw new RuntimeException(ex2); //NOSONAR
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/ant/blob/da943ea1/src/main/org/apache/tools/zip/AbstractUnicodeExtraField.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/zip/AbstractUnicodeExtraField.java 
b/src/main/org/apache/tools/zip/AbstractUnicodeExtraField.java
index 1014787..ab56f46 100644
--- a/src/main/org/apache/tools/zip/AbstractUnicodeExtraField.java
+++ b/src/main/org/apache/tools/zip/AbstractUnicodeExtraField.java
@@ -54,7 +54,7 @@ public abstract class AbstractUnicodeExtraField implements 
ZipExtraField {
         try {
             unicodeName = text.getBytes("UTF-8");
         } catch (final UnsupportedEncodingException e) {
-            throw new RuntimeException("FATAL: UTF-8 encoding not supported.",
+            throw new RuntimeException("FATAL: UTF-8 encoding not supported.", 
//NOSONAR
                                        e);
         }
     }

http://git-wip-us.apache.org/repos/asf/ant/blob/da943ea1/src/main/org/apache/tools/zip/AsiExtraField.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/zip/AsiExtraField.java 
b/src/main/org/apache/tools/zip/AsiExtraField.java
index d2ca691..fb8227d 100644
--- a/src/main/org/apache/tools/zip/AsiExtraField.java
+++ b/src/main/org/apache/tools/zip/AsiExtraField.java
@@ -346,7 +346,7 @@ public class AsiExtraField implements ZipExtraField, 
UnixStat, Cloneable {
             return cloned;
         } catch (CloneNotSupportedException cnfe) {
             // impossible
-            throw new RuntimeException(cnfe);
+            throw new RuntimeException(cnfe); //NOSONAR
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ant/blob/da943ea1/src/main/org/apache/tools/zip/GeneralPurposeBit.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/zip/GeneralPurposeBit.java 
b/src/main/org/apache/tools/zip/GeneralPurposeBit.java
index 1d2255f..a1af211 100644
--- a/src/main/org/apache/tools/zip/GeneralPurposeBit.java
+++ b/src/main/org/apache/tools/zip/GeneralPurposeBit.java
@@ -188,7 +188,7 @@ public final class GeneralPurposeBit implements Cloneable {
             return super.clone();
         } catch (CloneNotSupportedException ex) {
             // impossible
-            throw new RuntimeException("GeneralPurposeBit is not Cloneable?", 
ex);
+            throw new RuntimeException("GeneralPurposeBit is not Cloneable?", 
ex); //NOSONAR
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ant/blob/da943ea1/src/main/org/apache/tools/zip/ZipLong.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/zip/ZipLong.java 
b/src/main/org/apache/tools/zip/ZipLong.java
index 72af84d..6180823 100644
--- a/src/main/org/apache/tools/zip/ZipLong.java
+++ b/src/main/org/apache/tools/zip/ZipLong.java
@@ -190,7 +190,7 @@ public final class ZipLong implements Cloneable {
             return super.clone();
         } catch (CloneNotSupportedException cnfe) {
             // impossible
-            throw new RuntimeException(cnfe);
+            throw new RuntimeException(cnfe); //NOSONAR
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ant/blob/da943ea1/src/main/org/apache/tools/zip/ZipShort.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/zip/ZipShort.java 
b/src/main/org/apache/tools/zip/ZipShort.java
index e52c570..2f5482f 100644
--- a/src/main/org/apache/tools/zip/ZipShort.java
+++ b/src/main/org/apache/tools/zip/ZipShort.java
@@ -155,7 +155,7 @@ public final class ZipShort implements Cloneable {
             return super.clone();
         } catch (CloneNotSupportedException cnfe) {
             // impossible
-            throw new RuntimeException(cnfe);
+            throw new RuntimeException(cnfe); //NOSONAR
         }
     }
 

Reply via email to