| @@ -978,10 +978,6 @@ public class Main implements AntMain { | |||||
| project.setInputHandler(handler); | project.setInputHandler(handler); | ||||
| } | } | ||||
| // TODO: (Jon Skeet) Any reason for writing a message and then using a bare | |||||
| // RuntimeException rather than just using a BuildException here? Is it | |||||
| // in case the message could end up being written to no loggers (as the | |||||
| // loggers could have failed to be created due to this failure)? | |||||
| /** | /** | ||||
| * Creates the default build logger for sending build events to the ant | * Creates the default build logger for sending build events to the ant | ||||
| * log. | * log. | ||||
| @@ -1003,7 +999,7 @@ public class Main implements AntMain { | |||||
| System.err.println("The specified logger class " | System.err.println("The specified logger class " | ||||
| + loggerClassname | + loggerClassname | ||||
| + " could not be used because " + e.getMessage()); | + " could not be used because " + e.getMessage()); | ||||
| throw new RuntimeException(); | |||||
| throw e; | |||||
| } | } | ||||
| } else { | } else { | ||||
| logger = new DefaultLogger(); | logger = new DefaultLogger(); | ||||
| @@ -1430,7 +1430,7 @@ public class Project implements ResourceFactory { | |||||
| "Target '" + curtarget.getName() | "Target '" + curtarget.getName() | ||||
| + "' failed with message '" | + "' failed with message '" | ||||
| + thrownException.getMessage() + "'.", MSG_ERR); | + thrownException.getMessage() + "'.", MSG_ERR); | ||||
| thrownException.printStackTrace(System.err); | |||||
| thrownException.printStackTrace(System.err); //NOSONAR | |||||
| if (buildException == null) { | if (buildException == null) { | ||||
| buildException = | buildException = | ||||
| new BuildException(thrownException); | new BuildException(thrownException); | ||||
| @@ -1836,7 +1836,7 @@ public class Project implements ResourceFactory { | |||||
| if (st == null) { | if (st == null) { | ||||
| tsort(root[i], targetTable, state, visiting, ret); | tsort(root[i], targetTable, state, visiting, ret); | ||||
| } else if (st == VISITING) { | } else if (st == VISITING) { | ||||
| throw new RuntimeException("Unexpected node in visiting state: " | |||||
| throw new BuildException("Unexpected node in visiting state: " | |||||
| + root[i]); | + root[i]); | ||||
| } | } | ||||
| } | } | ||||
| @@ -1855,7 +1855,7 @@ public class Project implements ResourceFactory { | |||||
| if (st == null) { | if (st == null) { | ||||
| tsort(curTarget, targetTable, state, visiting, complete); | tsort(curTarget, targetTable, state, visiting, complete); | ||||
| } else if (st == VISITING) { | } else if (st == VISITING) { | ||||
| throw new RuntimeException("Unexpected node in visiting state: " | |||||
| throw new BuildException("Unexpected node in visiting state: " | |||||
| + curTarget); | + curTarget); | ||||
| } | } | ||||
| } | } | ||||
| @@ -1941,7 +1941,7 @@ public class Project implements ResourceFactory { | |||||
| } | } | ||||
| final String p = visiting.pop(); | final String p = visiting.pop(); | ||||
| if (root != p) { | if (root != p) { | ||||
| throw new RuntimeException("Unexpected internal error: expected to " | |||||
| throw new BuildException("Unexpected internal error: expected to " | |||||
| + "pop " + root + " but got " + p); | + "pop " + root + " but got " + p); | ||||
| } | } | ||||
| state.put(root, VISITED); | state.put(root, VISITED); | ||||
| @@ -62,7 +62,7 @@ public class ProjectHelperRepository { | |||||
| PROJECTHELPER2_CONSTRUCTOR = ProjectHelper2.class.getConstructor(); | PROJECTHELPER2_CONSTRUCTOR = ProjectHelper2.class.getConstructor(); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| // ProjectHelper2 must be available | // ProjectHelper2 must be available | ||||
| throw new RuntimeException(e); | |||||
| throw new BuildException(e); | |||||
| } | } | ||||
| } | } | ||||
| @@ -263,7 +263,7 @@ public class ProjectHelperRepository { | |||||
| return helper; | return helper; | ||||
| } | } | ||||
| } | } | ||||
| throw new RuntimeException("BUG: at least the ProjectHelper2 should " | |||||
| throw new BuildException("BUG: at least the ProjectHelper2 should " | |||||
| + "have supported the file " + buildFile); | + "have supported the file " + buildFile); | ||||
| } | } | ||||
| @@ -286,7 +286,7 @@ public class ProjectHelperRepository { | |||||
| return helper; | return helper; | ||||
| } | } | ||||
| } | } | ||||
| throw new RuntimeException("BUG: at least the ProjectHelper2 should " | |||||
| throw new BuildException("BUG: at least the ProjectHelper2 should " | |||||
| + "have supported the file " + antlib); | + "have supported the file " + antlib); | ||||
| } | } | ||||
| @@ -264,7 +264,7 @@ public class XmlLogger implements BuildLogger { | |||||
| if (!threadStack.empty()) { | if (!threadStack.empty()) { | ||||
| TimedElement poppedStack = threadStack.pop(); | TimedElement poppedStack = threadStack.pop(); | ||||
| if (poppedStack != targetElement) { | if (poppedStack != targetElement) { | ||||
| throw new RuntimeException("Mismatch - popped element = " + poppedStack | |||||
| throw new RuntimeException("Mismatch - popped element = " + poppedStack //NOSONAR | |||||
| + " finished target element = " + targetElement); | + " finished target element = " + targetElement); | ||||
| } | } | ||||
| if (!threadStack.empty()) { | if (!threadStack.empty()) { | ||||
| @@ -316,7 +316,7 @@ public class XmlLogger implements BuildLogger { | |||||
| Task task = event.getTask(); | Task task = event.getTask(); | ||||
| TimedElement taskElement = tasks.get(task); | TimedElement taskElement = tasks.get(task); | ||||
| if (taskElement == null) { | if (taskElement == null) { | ||||
| throw new RuntimeException("Unknown task " + task + " not in " + tasks); | |||||
| throw new RuntimeException("Unknown task " + task + " not in " + tasks); //NOSONAR | |||||
| } | } | ||||
| long totalTime = System.currentTimeMillis() - taskElement.startTime; | long totalTime = System.currentTimeMillis() - taskElement.startTime; | ||||
| taskElement.element.setAttribute(TIME_ATTR, DefaultLogger.formatTime(totalTime)); | taskElement.element.setAttribute(TIME_ATTR, DefaultLogger.formatTime(totalTime)); | ||||
| @@ -334,7 +334,7 @@ public class XmlLogger implements BuildLogger { | |||||
| if (!threadStack.empty()) { | if (!threadStack.empty()) { | ||||
| TimedElement poppedStack = threadStack.pop(); | TimedElement poppedStack = threadStack.pop(); | ||||
| if (poppedStack != taskElement) { | if (poppedStack != taskElement) { | ||||
| throw new RuntimeException("Mismatch - popped element = " + poppedStack | |||||
| throw new RuntimeException("Mismatch - popped element = " + poppedStack //NOSONAR | |||||
| + " finished task element = " + taskElement); | + " finished task element = " + taskElement); | ||||
| } | } | ||||
| } | } | ||||
| @@ -327,7 +327,7 @@ public class MailLogger extends DefaultLogger { | |||||
| * property is not present in properties. | * property is not present in properties. | ||||
| */ | */ | ||||
| private String getValue(Hashtable<String, Object> properties, String name, | private String getValue(Hashtable<String, Object> properties, String name, | ||||
| String defaultValue) throws Exception { | |||||
| String defaultValue) { | |||||
| String propertyName = "MailLogger." + name; | String propertyName = "MailLogger." + name; | ||||
| String value = (String) properties.get(propertyName); | String value = (String) properties.get(propertyName); | ||||
| @@ -336,7 +336,7 @@ public class MailLogger extends DefaultLogger { | |||||
| } | } | ||||
| if (value == null) { | if (value == null) { | ||||
| throw new Exception("Missing required parameter: " + propertyName); | |||||
| throw new RuntimeException("Missing required parameter: " + propertyName); //NOSONAR | |||||
| } | } | ||||
| return value; | return value; | ||||
| @@ -77,7 +77,7 @@ public class LogOutputStream extends LineOrientedOutputStream { | |||||
| super.processBuffer(); | super.processBuffer(); | ||||
| } catch (IOException e) { | } catch (IOException e) { | ||||
| // impossible since *our* processLine doesn't throw an IOException | // impossible since *our* processLine doesn't throw an IOException | ||||
| throw new RuntimeException("Impossible IOException caught: " + e); | |||||
| throw new RuntimeException("Impossible IOException caught: " + e); //NOSONAR | |||||
| } | } | ||||
| } | } | ||||
| @@ -44,7 +44,7 @@ public interface XSLTLiaison { | |||||
| * @throws Exception thrown if any problems happens. | * @throws Exception thrown if any problems happens. | ||||
| * @since Ant 1.4 | * @since Ant 1.4 | ||||
| */ | */ | ||||
| void setStylesheet(File stylesheet) throws Exception; | |||||
| void setStylesheet(File stylesheet) throws Exception; //NOSONAR | |||||
| /** | /** | ||||
| * Add a parameter to be set during the XSL transformation. | * Add a parameter to be set during the XSL transformation. | ||||
| @@ -54,7 +54,7 @@ public interface XSLTLiaison { | |||||
| * @see XSLTLiaison4#addParam(java.lang.String, java.lang.Object) | * @see XSLTLiaison4#addParam(java.lang.String, java.lang.Object) | ||||
| * @since Ant 1.3 | * @since Ant 1.3 | ||||
| */ | */ | ||||
| void addParam(String name, String expression) throws Exception; | |||||
| void addParam(String name, String expression) throws Exception; //NOSONAR | |||||
| /** | /** | ||||
| * Perform the transformation of a file into another. | * Perform the transformation of a file into another. | ||||
| @@ -64,6 +64,6 @@ public interface XSLTLiaison { | |||||
| * @see #setStylesheet(File) | * @see #setStylesheet(File) | ||||
| * @since Ant 1.4 | * @since Ant 1.4 | ||||
| */ | */ | ||||
| void transform(File infile, File outfile) throws Exception; | |||||
| void transform(File infile, File outfile) throws Exception; //NOSONAR | |||||
| } //-- XSLTLiaison | } //-- XSLTLiaison | ||||
| @@ -721,7 +721,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||||
| * @return the requested class. | * @return the requested class. | ||||
| * @exception Exception if the class could not be loaded. | * @exception Exception if the class could not be loaded. | ||||
| */ | */ | ||||
| private Class loadClass(final String classname) throws Exception { | |||||
| private Class loadClass(final String classname) throws ClassNotFoundException { | |||||
| setupLoader(); | setupLoader(); | ||||
| if (loader == null) { | if (loader == null) { | ||||
| return Class.forName(classname); | return Class.forName(classname); | ||||
| @@ -1380,7 +1380,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||||
| * @since Ant 1.7 | * @since Ant 1.7 | ||||
| */ | */ | ||||
| private void setLiaisonDynamicFileParameters( | private void setLiaisonDynamicFileParameters( | ||||
| final XSLTLiaison liaison, final File inFile) throws Exception { | |||||
| final XSLTLiaison liaison, final File inFile) throws Exception { //NOSONAR | |||||
| if (fileNameParameter != null) { | if (fileNameParameter != null) { | ||||
| liaison.addParam(fileNameParameter, inFile.getName()); | liaison.addParam(fileNameParameter, inFile.getName()); | ||||
| } | } | ||||
| @@ -143,7 +143,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware | |||||
| * Constructor for TraXLiaison. | * Constructor for TraXLiaison. | ||||
| * @throws Exception never | * @throws Exception never | ||||
| */ | */ | ||||
| public TraXLiaison() throws Exception { | |||||
| public TraXLiaison() throws Exception { //NOSONAR | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -316,7 +316,8 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware | |||||
| * @see #addParam(java.lang.String, java.lang.String) | * @see #addParam(java.lang.String, java.lang.String) | ||||
| * @see #setOutputProperty(java.lang.String, java.lang.String) | * @see #setOutputProperty(java.lang.String, java.lang.String) | ||||
| */ | */ | ||||
| private void createTransformer() throws Exception { | |||||
| private void createTransformer() | |||||
| throws IOException, ParserConfigurationException, SAXException, TransformerException { | |||||
| if (templates == null) { | if (templates == null) { | ||||
| readTemplates(); | readTemplates(); | ||||
| } | } | ||||
| @@ -22,6 +22,8 @@ import java.io.InputStream; | |||||
| import java.util.zip.ZipEntry; | import java.util.zip.ZipEntry; | ||||
| import java.util.zip.ZipInputStream; | import java.util.zip.ZipInputStream; | ||||
| import org.apache.tools.ant.BuildException; | |||||
| /** | /** | ||||
| * A class file iterator which iterates through the contents of a Java jar | * A class file iterator which iterates through the contents of a Java jar | ||||
| * file. | * file. | ||||
| @@ -79,7 +81,7 @@ public class JarFileIterator implements ClassFileIterator { | |||||
| text += ": " + message; | text += ": " + message; | ||||
| } | } | ||||
| throw new RuntimeException("Problem reading JAR file: " + text); | |||||
| throw new BuildException("Problem reading JAR file: " + text); | |||||
| } | } | ||||
| return nextElement; | return nextElement; | ||||
| @@ -144,7 +144,7 @@ public class jlink { | |||||
| * a rational manner to outfile. | * a rational manner to outfile. | ||||
| * @throws Exception on error. | * @throws Exception on error. | ||||
| */ | */ | ||||
| public void link() throws Exception { | |||||
| public void link() throws Exception { //NOSONAR | |||||
| ZipOutputStream output = new ZipOutputStream(new FileOutputStream(outfile)); | ZipOutputStream output = new ZipOutputStream(new FileOutputStream(outfile)); | ||||
| if (compression) { | if (compression) { | ||||
| @@ -701,10 +701,10 @@ public class JUnitTask extends Task { | |||||
| /** | /** | ||||
| * Creates a new JUnitRunner and enables fork of a new Java VM. | * Creates a new JUnitRunner and enables fork of a new Java VM. | ||||
| * | * | ||||
| * @throws Exception under ??? circumstances | |||||
| * @throws Exception never | |||||
| * @since Ant 1.2 | * @since Ant 1.2 | ||||
| */ | */ | ||||
| public JUnitTask() throws Exception { | |||||
| public JUnitTask() throws Exception { //NOSONAR | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -494,7 +494,7 @@ public class DOMElementWriter { | |||||
| try { | try { | ||||
| encodedata(out, value); | encodedata(out, value); | ||||
| } catch (IOException ex) { | } catch (IOException ex) { | ||||
| throw new RuntimeException(ex); | |||||
| throw new RuntimeException(ex); //NOSONAR | |||||
| } | } | ||||
| return out.toString(); | return out.toString(); | ||||
| } | } | ||||
| @@ -1591,7 +1591,7 @@ public class FileUtils { | |||||
| * | * | ||||
| * @since Ant 1.7 | * @since Ant 1.7 | ||||
| */ | */ | ||||
| public static String getRelativePath(File fromFile, File toFile) throws Exception { | |||||
| public static String getRelativePath(File fromFile, File toFile) throws Exception { //NOSONAR | |||||
| String fromPath = fromFile.getCanonicalPath(); | String fromPath = fromFile.getCanonicalPath(); | ||||
| String toPath = toFile.getCanonicalPath(); | String toPath = toFile.getCanonicalPath(); | ||||
| @@ -148,7 +148,7 @@ public class ReaderInputStream extends InputStream { | |||||
| try { | try { | ||||
| in.mark(limit); | in.mark(limit); | ||||
| } catch (IOException ioe) { | } catch (IOException ioe) { | ||||
| throw new RuntimeException(ioe.getMessage()); | |||||
| throw new RuntimeException(ioe.getMessage()); //NOSONAR | |||||
| } | } | ||||
| } | } | ||||
| @@ -199,7 +199,7 @@ public final class StringUtils { | |||||
| * @throws Exception if there is a problem. | * @throws Exception if there is a problem. | ||||
| * @since Ant 1.7 | * @since Ant 1.7 | ||||
| */ | */ | ||||
| public static long parseHumanSizes(String humanSize) throws Exception { | |||||
| public static long parseHumanSizes(String humanSize) throws Exception { //NOSONAR | |||||
| long factor = 1L; | long factor = 1L; | ||||
| char s = humanSize.charAt(0); | char s = humanSize.charAt(0); | ||||
| switch (s) { | switch (s) { | ||||
| @@ -22,6 +22,7 @@ import java.util.Enumeration; | |||||
| import java.util.Vector; | import java.util.Vector; | ||||
| import java.util.zip.ZipFile; | import java.util.zip.ZipFile; | ||||
| import org.apache.tools.ant.BuildException; | |||||
| import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
| import org.apache.tools.ant.util.VectorSet; | import org.apache.tools.ant.util.VectorSet; | ||||
| @@ -80,7 +81,7 @@ public abstract class AbstractAnalyzer implements DependencyAnalyzer { | |||||
| */ | */ | ||||
| public Enumeration<File> getFileDependencies() { | public Enumeration<File> getFileDependencies() { | ||||
| if (!supportsFileDependencies()) { | if (!supportsFileDependencies()) { | ||||
| throw new RuntimeException("File dependencies are not supported " | |||||
| throw new BuildException("File dependencies are not supported " | |||||
| + "by this analyzer"); | + "by this analyzer"); | ||||
| } | } | ||||
| if (!determined) { | if (!determined) { | ||||
| @@ -126,7 +126,7 @@ public class JavaxScriptRunner extends ScriptRunnerBase { | |||||
| } | } | ||||
| } | } | ||||
| private ReflectWrapper createEngine() throws Exception { | |||||
| private ReflectWrapper createEngine() { | |||||
| if (engine != null) { | if (engine != null) { | ||||
| return engine; | return engine; | ||||
| } | } | ||||
| @@ -846,7 +846,7 @@ public class TarEntry implements TarConstants { | |||||
| writeEntryHeader(outbuf, TarUtils.FALLBACK_ENCODING, false); | writeEntryHeader(outbuf, TarUtils.FALLBACK_ENCODING, false); | ||||
| } catch (IOException ex2) { | } catch (IOException ex2) { | ||||
| // impossible | // 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); | parseTarHeader(header, TarUtils.DEFAULT_ENCODING, true); | ||||
| } catch (IOException ex2) { | } catch (IOException ex2) { | ||||
| // not really possible | // not really possible | ||||
| throw new RuntimeException(ex2); | |||||
| throw new RuntimeException(ex2); //NOSONAR | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -1095,7 +1095,8 @@ public class TarEntry implements TarConstants { | |||||
| try { | try { | ||||
| buffer1 = expected.getBytes("ASCII"); | buffer1 = expected.getBytes("ASCII"); | ||||
| } catch (UnsupportedEncodingException e) { | } 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, | return isEqual(buffer1, 0, buffer1.length, buffer, offset, length, | ||||
| false); | false); | ||||
| @@ -276,7 +276,7 @@ public class TarInputStream extends FilterInputStream { | |||||
| while (numToSkip > 0) { | while (numToSkip > 0) { | ||||
| long skipped = skip(numToSkip); | long skipped = skip(numToSkip); | ||||
| if (skipped <= 0) { | if (skipped <= 0) { | ||||
| throw new RuntimeException("failed to skip current tar" | |||||
| throw new IOException("failed to skip current tar" | |||||
| + " entry"); | + " entry"); | ||||
| } | } | ||||
| numToSkip -= skipped; | numToSkip -= skipped; | ||||
| @@ -586,7 +586,7 @@ public class TarOutputStream extends FilterOutputStream { | |||||
| private void failForBigNumber(String field, long value, long maxValue, String additionalMsg) { | private void failForBigNumber(String field, long value, long maxValue, String additionalMsg) { | ||||
| if (value < 0 || value > maxValue) { | if (value < 0 || value > maxValue) { | ||||
| throw new RuntimeException(field + " '" + value | |||||
| throw new RuntimeException(field + " '" + value //NOSONAR | |||||
| + "' is too big ( > " | + "' is too big ( > " | ||||
| + maxValue + " )"); | + maxValue + " )"); | ||||
| } | } | ||||
| @@ -638,7 +638,7 @@ public class TarOutputStream extends FilterOutputStream { | |||||
| write(0); // NUL terminator | write(0); // NUL terminator | ||||
| closeEntry(); | closeEntry(); | ||||
| } else if (longFileMode != LONGFILE_TRUNCATE) { | } else if (longFileMode != LONGFILE_TRUNCATE) { | ||||
| throw new RuntimeException(fieldName + " '" + name | |||||
| throw new RuntimeException(fieldName + " '" + name //NOSONAR | |||||
| + "' is too long ( > " | + "' is too long ( > " | ||||
| + TarConstants.NAMELEN + " bytes)"); | + TarConstants.NAMELEN + " bytes)"); | ||||
| } | } | ||||
| @@ -265,7 +265,7 @@ public class TarUtils { | |||||
| return parseName(buffer, offset, length, FALLBACK_ENCODING); | return parseName(buffer, offset, length, FALLBACK_ENCODING); | ||||
| } catch (final IOException ex2) { | } catch (final IOException ex2) { | ||||
| // impossible | // impossible | ||||
| throw new RuntimeException(ex2); | |||||
| throw new RuntimeException(ex2); //NOSONAR | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -324,7 +324,7 @@ public class TarUtils { | |||||
| FALLBACK_ENCODING); | FALLBACK_ENCODING); | ||||
| } catch (final IOException ex2) { | } catch (final IOException ex2) { | ||||
| // impossible | // impossible | ||||
| throw new RuntimeException(ex2); | |||||
| throw new RuntimeException(ex2); //NOSONAR | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -54,7 +54,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField { | |||||
| try { | try { | ||||
| unicodeName = text.getBytes("UTF-8"); | unicodeName = text.getBytes("UTF-8"); | ||||
| } catch (final UnsupportedEncodingException e) { | } catch (final UnsupportedEncodingException e) { | ||||
| throw new RuntimeException("FATAL: UTF-8 encoding not supported.", | |||||
| throw new RuntimeException("FATAL: UTF-8 encoding not supported.", //NOSONAR | |||||
| e); | e); | ||||
| } | } | ||||
| } | } | ||||
| @@ -346,7 +346,7 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable { | |||||
| return cloned; | return cloned; | ||||
| } catch (CloneNotSupportedException cnfe) { | } catch (CloneNotSupportedException cnfe) { | ||||
| // impossible | // impossible | ||||
| throw new RuntimeException(cnfe); | |||||
| throw new RuntimeException(cnfe); //NOSONAR | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -63,11 +63,11 @@ public class ExtraFieldUtils { | |||||
| ZipExtraField ze = (ZipExtraField) c.newInstance(); | ZipExtraField ze = (ZipExtraField) c.newInstance(); | ||||
| implementations.put(ze.getHeaderId(), c); | implementations.put(ze.getHeaderId(), c); | ||||
| } catch (ClassCastException cc) { | } catch (ClassCastException cc) { | ||||
| throw new RuntimeException(c + " doesn\'t implement ZipExtraField"); | |||||
| throw new RuntimeException(c + " doesn\'t implement ZipExtraField"); //NOSONAR | |||||
| } catch (InstantiationException ie) { | } catch (InstantiationException ie) { | ||||
| throw new RuntimeException(c + " is not a concrete class"); | |||||
| throw new RuntimeException(c + " is not a concrete class"); //NOSONAR | |||||
| } catch (IllegalAccessException ie) { | } catch (IllegalAccessException ie) { | ||||
| throw new RuntimeException(c + "\'s no-arg constructor is not public"); | |||||
| throw new RuntimeException(c + "\'s no-arg constructor is not public"); //NOSONAR | |||||
| } | } | ||||
| } | } | ||||
| @@ -188,7 +188,7 @@ public final class GeneralPurposeBit implements Cloneable { | |||||
| return super.clone(); | return super.clone(); | ||||
| } catch (CloneNotSupportedException ex) { | } catch (CloneNotSupportedException ex) { | ||||
| // impossible | // impossible | ||||
| throw new RuntimeException("GeneralPurposeBit is not Cloneable?", ex); | |||||
| throw new RuntimeException("GeneralPurposeBit is not Cloneable?", ex); //NOSONAR | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -517,7 +517,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { | |||||
| mergeExtraFields(local, true); | mergeExtraFields(local, true); | ||||
| } catch (final ZipException e) { | } catch (final ZipException e) { | ||||
| // actually this is not be possible as of Ant 1.8.1 | // actually this is not be possible as of Ant 1.8.1 | ||||
| throw new RuntimeException("Error parsing extra fields for entry: " | |||||
| throw new RuntimeException("Error parsing extra fields for entry: " //NOSONAR | |||||
| + getName() + " - " + e.getMessage(), e); | + getName() + " - " + e.getMessage(), e); | ||||
| } | } | ||||
| } | } | ||||
| @@ -544,7 +544,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable { | |||||
| ExtraFieldUtils.UnparseableExtraField.READ); | ExtraFieldUtils.UnparseableExtraField.READ); | ||||
| mergeExtraFields(central, false); | mergeExtraFields(central, false); | ||||
| } catch (final ZipException e) { | } catch (final ZipException e) { | ||||
| throw new RuntimeException(e.getMessage(), e); | |||||
| throw new RuntimeException(e.getMessage(), e); //NOSONAR | |||||
| } | } | ||||
| } | } | ||||
| @@ -190,7 +190,7 @@ public final class ZipLong implements Cloneable { | |||||
| return super.clone(); | return super.clone(); | ||||
| } catch (CloneNotSupportedException cnfe) { | } catch (CloneNotSupportedException cnfe) { | ||||
| // impossible | // impossible | ||||
| throw new RuntimeException(cnfe); | |||||
| throw new RuntimeException(cnfe); //NOSONAR | |||||
| } | } | ||||
| } | } | ||||
| @@ -155,7 +155,7 @@ public final class ZipShort implements Cloneable { | |||||
| return super.clone(); | return super.clone(); | ||||
| } catch (CloneNotSupportedException cnfe) { | } catch (CloneNotSupportedException cnfe) { | ||||
| // impossible | // impossible | ||||
| throw new RuntimeException(cnfe); | |||||
| throw new RuntimeException(cnfe); //NOSONAR | |||||
| } | } | ||||
| } | } | ||||