[jboss-svn-commits] JBoss Common SVN: r2941 - in common-core/tags: 2.2.10 and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Nov 18 16:27:54 EST 2008
Author: anil.saldhana at jboss.com
Date: 2008-11-18 16:27:54 -0500 (Tue, 18 Nov 2008)
New Revision: 2941
Added:
common-core/tags/2.2.10/
common-core/tags/2.2.10/pom.xml
common-core/tags/2.2.10/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java
Removed:
common-core/tags/2.2.10/pom.xml
common-core/tags/2.2.10/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java
Log:
[maven-release-plugin] copy for tag 2.2.10
Copied: common-core/tags/2.2.10 (from rev 2938, common-core/trunk)
Deleted: common-core/tags/2.2.10/pom.xml
===================================================================
--- common-core/trunk/pom.xml 2008-11-03 13:03:37 UTC (rev 2938)
+++ common-core/tags/2.2.10/pom.xml 2008-11-18 21:27:54 UTC (rev 2941)
@@ -1,95 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-parent</artifactId>
- <version>4.0.CR1</version>
- </parent>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- <packaging>jar</packaging>
- <version>2.2.10-SNAPSHOT</version>
- <name>JBoss Common Classes</name>
- <url>http://www.jboss.org</url>
- <description>JBoss Common Core Utility classes</description>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/common/common-core/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/common/common-core/trunk/</developerConnection>
- </scm>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.3</version>
- <configuration>
- <printSummary>true</printSummary>
- <disableXmlReport>false</disableXmlReport>
- <redirectTestOutputToFile>true</redirectTestOutputToFile>
- <includes>
- <include>**/*TestCase.java</include>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <!--
- Eclipse settings have been removed from parent. This needs to be
- done via an eclipse profile.
- http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085896#4085896
- -->
- <profiles>
- <profile>
- <id>eclipse</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <configuration>
- <downloadSources>true</downloadSources>
- <buildOutputDirectory>target/eclipse-classes</buildOutputDirectory>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
- <dependencies>
-
- <dependency>
- <groupId>apache-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>2.0.2</version>
- <scope>compile</scope>
- <optional>true</optional> <!-- org.jboss.net.protocol.http.DavURLLister -->
- </dependency>
-
- <dependency>
- <groupId>apache-slide</groupId>
- <artifactId>webdavlib</artifactId>
- <version>2.0</version>
- <scope>compile</scope>
- <optional>true</optional> <!-- org.jboss.net.protocol.http.DavURLLister -->
- </dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <version>2.0.5.GA</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.4</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
-</project>
\ No newline at end of file
Copied: common-core/tags/2.2.10/pom.xml (from rev 2940, common-core/trunk/pom.xml)
===================================================================
--- common-core/tags/2.2.10/pom.xml (rev 0)
+++ common-core/tags/2.2.10/pom.xml 2008-11-18 21:27:54 UTC (rev 2941)
@@ -0,0 +1,95 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>4.0.CR1</version>
+ </parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <packaging>jar</packaging>
+ <version>2.2.10</version>
+ <name>JBoss Common Classes</name>
+ <url>http://www.jboss.org</url>
+ <description>JBoss Common Core Utility classes</description>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/common/common-core/tags/2.2.10</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/common/common-core/tags/2.2.10</developerConnection>
+ </scm>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
+ <configuration>
+ <printSummary>true</printSummary>
+ <disableXmlReport>false</disableXmlReport>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ <includes>
+ <include>**/*TestCase.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!--
+ Eclipse settings have been removed from parent. This needs to be
+ done via an eclipse profile.
+ http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085896#4085896
+ -->
+ <profiles>
+ <profile>
+ <id>eclipse</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <buildOutputDirectory>target/eclipse-classes</buildOutputDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>apache-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>2.0.2</version>
+ <scope>compile</scope>
+ <optional>true</optional> <!-- org.jboss.net.protocol.http.DavURLLister -->
+ </dependency>
+
+ <dependency>
+ <groupId>apache-slide</groupId>
+ <artifactId>webdavlib</artifactId>
+ <version>2.0</version>
+ <scope>compile</scope>
+ <optional>true</optional> <!-- org.jboss.net.protocol.http.DavURLLister -->
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ <version>2.0.5.GA</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
\ No newline at end of file
Deleted: common-core/tags/2.2.10/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java
===================================================================
--- common-core/trunk/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java 2008-11-03 13:03:37 UTC (rev 2938)
+++ common-core/tags/2.2.10/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java 2008-11-18 21:27:54 UTC (rev 2941)
@@ -1,109 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.loading;
-
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.net.URLStreamHandlerFactory;
-
-/**
- * A URL classloader that delegates to its parent, avoiding
- * synchronization.
- *
- * A standard flag is provided so it can be used as a parent class,
- * but later subclassed and to revert to standard class loading
- * if the subclass wants to load classes.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public class DelegatingClassLoader
- extends URLClassLoader
-{
- /** The value returned by {@link #getURLs()}. */
- public static final URL[] EMPTY_URL_ARRAY = {};
-
- /** Whether to use standard loading */
- protected boolean standard = false;
-
- /**
- * Constructor
- *
- * @param parent the parent classloader, cannot be null.
- */
- public DelegatingClassLoader(ClassLoader parent)
- {
- super(EMPTY_URL_ARRAY, parent);
- if (parent == null)
- throw new IllegalArgumentException("No parent");
- }
-
- /**
- * Constructor
- *
- * @param parent the parent classloader, cannot be null.
- * @param factory the url stream factory.
- */
- public DelegatingClassLoader(ClassLoader parent, URLStreamHandlerFactory factory)
- {
- super(EMPTY_URL_ARRAY, parent, factory);
- if (parent == null)
- throw new IllegalArgumentException("No parent");
- }
-
- /**
- * Load a class, by asking the parent
- *
- * @param className the class name to load
- * @param resolve whether to link the class
- * @return the loaded class
- * @throws ClassNotFoundException when the class could not be found
- */
- protected Class<?> loadClass(String className, boolean resolve)
- throws ClassNotFoundException
- {
- // Revert to standard rules
- if (standard)
- return super.loadClass(className, resolve);
-
- // Ask the parent
- Class<?> clazz = null;
- try
- {
- clazz = getParent().loadClass(className);
- }
- catch (ClassNotFoundException e)
- {
- // Not found in parent,
- // maybe it is a proxy registered against this classloader?
- clazz = findLoadedClass(className);
- if (clazz == null)
- throw e;
- }
-
- // Link the class
- if (resolve)
- resolveClass(clazz);
-
- return clazz;
- }
-}
Copied: common-core/tags/2.2.10/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java (from rev 2939, common-core/trunk/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java)
===================================================================
--- common-core/tags/2.2.10/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java (rev 0)
+++ common-core/tags/2.2.10/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java 2008-11-18 21:27:54 UTC (rev 2941)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.util.loading;
+
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.net.URLStreamHandlerFactory;
+
+/**
+ * A URL classloader that delegates to its parent, avoiding
+ * synchronization.
+ *
+ * A standard flag is provided so it can be used as a parent class,
+ * but later subclassed and to revert to standard class loading
+ * if the subclass wants to load classes.
+ *
+ * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
+ * @version $Revision$
+ */
+public class DelegatingClassLoader
+ extends URLClassLoader
+{
+ /** The value returned by {@link #getURLs()}. */
+ public static final URL[] EMPTY_URL_ARRAY = {};
+
+ /** Whether to use standard loading */
+ protected boolean standard = false;
+
+ /** Cache the parent*/
+ private ClassLoader parent = null;
+
+ /**
+ * Constructor
+ *
+ * @param parent the parent classloader, cannot be null.
+ */
+ public DelegatingClassLoader(ClassLoader parent)
+ {
+ super(EMPTY_URL_ARRAY, parent);
+ if (parent == null)
+ throw new IllegalArgumentException("No parent");
+ this.parent = parent;
+ }
+
+ /**
+ * Constructor
+ *
+ * @param parent the parent classloader, cannot be null.
+ * @param factory the url stream factory.
+ */
+ public DelegatingClassLoader(ClassLoader parent, URLStreamHandlerFactory factory)
+ {
+ super(EMPTY_URL_ARRAY, parent, factory);
+ if (parent == null)
+ throw new IllegalArgumentException("No parent");
+ this.parent = parent;
+ }
+
+ /**
+ * Load a class, by asking the parent
+ *
+ * @param className the class name to load
+ * @param resolve whether to link the class
+ * @return the loaded class
+ * @throws ClassNotFoundException when the class could not be found
+ */
+ protected Class<?> loadClass(String className, boolean resolve)
+ throws ClassNotFoundException
+ {
+ // Revert to standard rules
+ if (standard)
+ return super.loadClass(className, resolve);
+
+ // Ask the parent
+ Class<?> clazz = null;
+ try
+ {
+ clazz = parent.loadClass(className);
+ }
+ catch (ClassNotFoundException e)
+ {
+ // Not found in parent,
+ // maybe it is a proxy registered against this classloader?
+ clazz = findLoadedClass(className);
+ if (clazz == null)
+ throw e;
+ }
+
+ // Link the class
+ if (resolve)
+ resolveClass(clazz);
+
+ return clazz;
+ }
+}
More information about the jboss-svn-commits
mailing list