Browse Source

Removed unecessary cast,

Removed caught Throwable while Exception was expected
Documented empty blocks


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277770 13f79535-47bb-0310-9956-ffa450edef68
master
Jacobus Martinus Kruithof 20 years ago
parent
commit
6005d26265
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      src/main/org/apache/tools/ant/AntClassLoader.java

+ 9
- 2
src/main/org/apache/tools/ant/AntClassLoader.java View File

@@ -518,10 +518,10 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
if (cons.length > 0 && cons[0] != null) {
final String[] strs = new String[NUMBER_OF_STRINGS];
try {
cons[0].newInstance((Object[]) strs);
cons[0].newInstance(strs);
// Expecting an exception to be thrown by this call:
// IllegalArgumentException: wrong number of Arguments
} catch (Throwable t) {
} catch (Exception e) {
// Ignore - we are interested only in the side
// effect - that of getting the static initializers
// invoked. As we do not want to call a valid
@@ -1225,6 +1225,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @param event the buildStarted event
*/
public void buildStarted(BuildEvent event) {
// Not significant for the class loader.
}

/**
@@ -1260,6 +1261,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @since Ant 1.6.2
*/
public void subBuildStarted(BuildEvent event) {
// Not significant for the class loader.
}

/**
@@ -1268,6 +1270,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @param event the targetStarted event
*/
public void targetStarted(BuildEvent event) {
// Not significant for the class loader.
}

/**
@@ -1276,6 +1279,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @param event the targetFinished event
*/
public void targetFinished(BuildEvent event) {
// Not significant for the class loader.
}

/**
@@ -1284,6 +1288,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @param event the taskStarted event
*/
public void taskStarted(BuildEvent event) {
// Not significant for the class loader.
}

/**
@@ -1292,6 +1297,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @param event the taskFinished event
*/
public void taskFinished(BuildEvent event) {
// Not significant for the class loader.
}

/**
@@ -1300,6 +1306,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @param event the messageLogged event
*/
public void messageLogged(BuildEvent event) {
// Not significant for the class loader.
}

/**


Loading…
Cancel
Save