Browse Source

accept generic exceptions because of backwards compatibility

master
Stefan Bodewig 8 years ago
parent
commit
18877234f2
8 changed files with 11 additions and 11 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/Project.java
  2. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/XSLTLiaison.java
  3. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
  4. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java
  5. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java
  6. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  7. +1
    -1
      src/main/org/apache/tools/ant/util/FileUtils.java
  8. +1
    -1
      src/main/org/apache/tools/ant/util/StringUtils.java

+ 1
- 1
src/main/org/apache/tools/ant/Project.java View File

@@ -1430,7 +1430,7 @@ public class Project implements ResourceFactory {
"Target '" + curtarget.getName()
+ "' failed with message '"
+ thrownException.getMessage() + "'.", MSG_ERR);
thrownException.printStackTrace(System.err);
thrownException.printStackTrace(System.err); //NOSONAR
if (buildException == null) {
buildException =
new BuildException(thrownException);


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/XSLTLiaison.java View File

@@ -44,7 +44,7 @@ public interface XSLTLiaison {
* @throws Exception thrown if any problems happens.
* @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.
@@ -54,7 +54,7 @@ public interface XSLTLiaison {
* @see XSLTLiaison4#addParam(java.lang.String, java.lang.Object)
* @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.
@@ -64,6 +64,6 @@ public interface XSLTLiaison {
* @see #setStylesheet(File)
* @since Ant 1.4
*/
void transform(File infile, File outfile) throws Exception;
void transform(File infile, File outfile) throws Exception; //NOSONAR

} //-- XSLTLiaison

+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java View File

@@ -1380,7 +1380,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
* @since Ant 1.7
*/
private void setLiaisonDynamicFileParameters(
final XSLTLiaison liaison, final File inFile) throws Exception {
final XSLTLiaison liaison, final File inFile) throws Exception { //NOSONAR
if (fileNameParameter != null) {
liaison.addParam(fileNameParameter, inFile.getName());
}


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java View File

@@ -143,7 +143,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware
* Constructor for TraXLiaison.
* @throws Exception never
*/
public TraXLiaison() throws Exception {
public TraXLiaison() throws Exception { //NOSONAR
}

/**


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java View File

@@ -144,7 +144,7 @@ public class jlink {
* a rational manner to outfile.
* @throws Exception on error.
*/
public void link() throws Exception {
public void link() throws Exception { //NOSONAR
ZipOutputStream output = new ZipOutputStream(new FileOutputStream(outfile));

if (compression) {


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java View File

@@ -702,10 +702,10 @@ public class JUnitTask extends Task {
/**
* Creates a new JUnitRunner and enables fork of a new Java VM.
*
* @throws Exception under ??? circumstances
* @throws Exception never
* @since Ant 1.2
*/
public JUnitTask() throws Exception {
public JUnitTask() throws Exception { //NOSONAR
}

/**


+ 1
- 1
src/main/org/apache/tools/ant/util/FileUtils.java View File

@@ -1603,7 +1603,7 @@ public class FileUtils {
*
* @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 toPath = toFile.getCanonicalPath();



+ 1
- 1
src/main/org/apache/tools/ant/util/StringUtils.java View File

@@ -195,7 +195,7 @@ public final class StringUtils {
* @throws Exception if there is a problem.
* @since Ant 1.7
*/
public static long parseHumanSizes(String humanSize) throws Exception {
public static long parseHumanSizes(String humanSize) throws Exception { //NOSONAR
long factor = 1L;
char s = humanSize.charAt(0);
switch (s) {


Loading…
Cancel
Save