You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ve...@apache.org on 2010/01/23 21:48:50 UTC
svn commit: r902489 -
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
Author: veithen
Date: Sat Jan 23 20:48:49 2010
New Revision: 902489
URL: http://svn.apache.org/viewvc?rev=902489&view=rev
Log:
Replaced tabs by spaces.
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?rev=902489&r1=902488&r2=902489&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java Sat Jan 23 20:48:49 2010
@@ -1960,39 +1960,39 @@
* @return the class name
*/
public static String getClassNameFromResourceName(String resourceName) {
- if (!resourceName.endsWith(".class")) {
- throw new IllegalArgumentException("The resource name doesn't refer to a class file");
- }
- return resourceName.substring(0, resourceName.length()-6).replace('/', '.');
+ if (!resourceName.endsWith(".class")) {
+ throw new IllegalArgumentException("The resource name doesn't refer to a class file");
+ }
+ return resourceName.substring(0, resourceName.length()-6).replace('/', '.');
}
- /**
- * Scan a JAR file and return the list of classes contained in the JAR.
- *
- * @param deploymentFileData
- * the JAR to scan
- * @return a list of Java class names
- * @throws DeploymentException
- * if an error occurs while scanning the file
- */
+ /**
+ * Scan a JAR file and return the list of classes contained in the JAR.
+ *
+ * @param deploymentFileData
+ * the JAR to scan
+ * @return a list of Java class names
+ * @throws DeploymentException
+ * if an error occurs while scanning the file
+ */
public static List<String> getListOfClasses(DeploymentFileData deploymentFileData) throws DeploymentException {
try {
- FileInputStream fin = new FileInputStream(deploymentFileData.getAbsolutePath());
+ FileInputStream fin = new FileInputStream(deploymentFileData.getAbsolutePath());
try {
- ZipInputStream zin = new ZipInputStream(fin);
- try {
- ZipEntry entry;
- List<String> classList = new ArrayList<String>();
- while ((entry = zin.getNextEntry()) != null) {
- String name = entry.getName();
- if (name.endsWith(".class")) {
- classList.add(getClassNameFromResourceName(name));
- }
- }
- return classList;
- } finally {
- zin.close();
- }
+ ZipInputStream zin = new ZipInputStream(fin);
+ try {
+ ZipEntry entry;
+ List<String> classList = new ArrayList<String>();
+ while ((entry = zin.getNextEntry()) != null) {
+ String name = entry.getName();
+ if (name.endsWith(".class")) {
+ classList.add(getClassNameFromResourceName(name));
+ }
+ }
+ return classList;
+ } finally {
+ zin.close();
+ }
} finally {
fin.close();
}