activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r602565 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq: openwire/ openwire/v1/ openwire/v2/ openwire/v3/ util/
Date Sat, 08 Dec 2007 21:45:56 GMT
Author: chirino
Date: Sat Dec  8 13:45:55 2007
New Revision: 602565

URL: http://svn.apache.org/viewvc?rev=602565&view=rev
Log:
Applied patch in AMQ-1515 Thx David.

Removed:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoading.java
Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java?rev=602565&r1=602564&r2=602565&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java
Sat Dec  8 13:45:55 2007
@@ -28,7 +28,6 @@
 import org.apache.activemq.command.WireFormatInfo;
 import org.apache.activemq.util.ByteSequence;
 import org.apache.activemq.util.ByteSequenceData;
-import org.apache.activemq.util.ClassLoading;
 import org.apache.activemq.util.DataByteArrayInputStream;
 import org.apache.activemq.util.DataByteArrayOutputStream;
 import org.apache.activemq.wireformat.WireFormat;
@@ -326,7 +325,7 @@
         String mfName = "org.apache.activemq.openwire.v" + version + ".MarshallerFactory";
         Class mfClass;
         try {
-            mfClass = ClassLoading.loadClass(mfName, getClass().getClassLoader());
+            mfClass = Class.forName(mfName, false, getClass().getClassLoader());
         } catch (ClassNotFoundException e) {
             throw (IllegalArgumentException)new IllegalArgumentException("Invalid version:
" + version
                                                                          + ", could not load
" + mfName)

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java?rev=602565&r1=602564&r2=602565&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java
Sat Dec  8 13:45:55 2007
@@ -26,7 +26,6 @@
 import org.apache.activemq.openwire.DataStreamMarshaller;
 import org.apache.activemq.openwire.OpenWireFormat;
 import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.ClassLoading;
 
 public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
 
@@ -228,7 +227,7 @@
 
     private Throwable createThrowable(String className, String message) {
         try {
-            Class clazz = ClassLoading.loadClass(className, BaseDataStreamMarshaller.class.getClassLoader());
+            Class clazz = Class.forName(className, false, BaseDataStreamMarshaller.class.getClassLoader());
             Constructor constructor = clazz.getConstructor(new Class[] {String.class});
             return (Throwable)constructor.newInstance(new Object[] {message});
         } catch (Throwable e) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java?rev=602565&r1=602564&r2=602565&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v2/BaseDataStreamMarshaller.java
Sat Dec  8 13:45:55 2007
@@ -26,7 +26,6 @@
 import org.apache.activemq.openwire.DataStreamMarshaller;
 import org.apache.activemq.openwire.OpenWireFormat;
 import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.ClassLoading;
 
 public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
 
@@ -228,7 +227,7 @@
 
     private Throwable createThrowable(String className, String message) {
         try {
-            Class clazz = ClassLoading.loadClass(className, BaseDataStreamMarshaller.class.getClassLoader());
+            Class clazz = Class.forName(className, false, BaseDataStreamMarshaller.class.getClassLoader());
             Constructor constructor = clazz.getConstructor(new Class[] {String.class});
             return (Throwable)constructor.newInstance(new Object[] {message});
         } catch (Throwable e) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java?rev=602565&r1=602564&r2=602565&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java
Sat Dec  8 13:45:55 2007
@@ -26,7 +26,6 @@
 import org.apache.activemq.openwire.DataStreamMarshaller;
 import org.apache.activemq.openwire.OpenWireFormat;
 import org.apache.activemq.util.ByteSequence;
-import org.apache.activemq.util.ClassLoading;
 
 public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
 
@@ -228,7 +227,7 @@
 
     private Throwable createThrowable(String className, String message) {
         try {
-            Class clazz = ClassLoading.loadClass(className, BaseDataStreamMarshaller.class.getClassLoader());
+            Class clazz = Class.forName(className, false, BaseDataStreamMarshaller.class.getClassLoader());
             Constructor constructor = clazz.getConstructor(new Class[] {String.class});
             return (Throwable)constructor.newInstance(new Object[] {message});
         } catch (Throwable e) {
@@ -291,7 +290,7 @@
                 dataIn.readFully(data);
                 // Yes deprecated, but we know what we are doing.
                 // This allows us to create a String from a ASCII byte array. (no UTF-8 decoding)
-                return new String(data, 0); 
+                return new String(data, 0);
             } else {
                 return dataIn.readUTF();
             }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java?rev=602565&r1=602564&r2=602565&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java
Sat Dec  8 13:45:55 2007
@@ -51,9 +51,9 @@
 
     private Class load(String className, ClassLoader cl) throws ClassNotFoundException {
         try {
-            return ClassLoading.loadClass(className, cl);
+            return Class.forName(className, false, cl);
         } catch (ClassNotFoundException e) {
-            return ClassLoading.loadClass(className, FALLBACK_CLASS_LOADER);
+            return Class.forName(className, false, FALLBACK_CLASS_LOADER);
         }
     }
 



Mime
View raw message