harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r439999 - in /incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java: java/lang/instrument/ org/apache/harmony/instrument/internal/ org/apache/harmony/instrument/internal/nls/
Date Mon, 04 Sep 2006 09:47:29 GMT
Author: pyang
Date: Mon Sep  4 02:47:28 2006
New Revision: 439999

URL: http://svn.apache.org/viewvc?view=rev&rev=439999
Log:
Patch applied for HARMONY-1333 ([classlib][internationalization]Internationalization of the
instrument module)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/java/lang/instrument/ClassDefinition.java
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/org/apache/harmony/instrument/internal/InstrumentationImpl.java
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/org/apache/harmony/instrument/internal/nls/messages.properties

Modified: incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/java/lang/instrument/ClassDefinition.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/java/lang/instrument/ClassDefinition.java?view=diff&rev=439999&r1=439998&r2=439999
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/java/lang/instrument/ClassDefinition.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/java/lang/instrument/ClassDefinition.java
Mon Sep  4 02:47:28 2006
@@ -15,6 +15,8 @@
 
 package java.lang.instrument;
 
+import org.apache.harmony.instrument.internal.nls.Messages;
+
 /**
  * Wraps a {@link java.lang.Class} that is to be redefined together with the
  * byte array which constitutes the updated version of the class.
@@ -48,10 +50,10 @@
      */
     public ClassDefinition(Class<?> theClass, byte[] theClassFile) {
         if (theClass == null) {
-            throw new NullPointerException("Received null class argument.");
+            throw new NullPointerException(Messages.getString("instrument.1"));
         }
         if (theClassFile == null) {
-            throw new NullPointerException("Received null class file argument.");
+            throw new NullPointerException(Messages.getString("instrument.2"));
         }
         this.definitionClass = theClass;
         this.definitionClassFile = theClassFile;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/org/apache/harmony/instrument/internal/InstrumentationImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/org/apache/harmony/instrument/internal/InstrumentationImpl.java?view=diff&rev=439999&r1=439998&r2=439999
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/org/apache/harmony/instrument/internal/InstrumentationImpl.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/org/apache/harmony/instrument/internal/InstrumentationImpl.java
Mon Sep  4 02:47:28 2006
@@ -22,6 +22,8 @@
 import java.lang.reflect.Method;
 import java.security.ProtectionDomain;
 
+import org.apache.harmony.instrument.internal.nls.Messages;
+
 /**
  * Default implementation of Instrumentation
  */
@@ -87,8 +89,7 @@
     public void redefineClasses(ClassDefinition[] definitions)
             throws ClassNotFoundException, UnmodifiableClassException {
         if (!isRedefineClassesSupported) {
-            throw new UnsupportedOperationException(
-                    "Redefinition operation is not supported!"); //$NON-NLS-1$
+            throw new UnsupportedOperationException(Messages.getString("instrument.3"));
         }
         for (int i = 0; i < definitions.length; i++) {
             if (null == definitions[i]) {
@@ -211,7 +212,7 @@
         } catch (Exception e) {
             e.printStackTrace();
             System.err
-                    .println("Fatal error: failed to execute premain class of java agent.");
+                    .println(Messages.getString("instrument.4"));
             System.exit(1);
         }
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/org/apache/harmony/instrument/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/org/apache/harmony/instrument/internal/nls/messages.properties?view=diff&rev=439999&r1=439998&r2=439999
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/org/apache/harmony/instrument/internal/nls/messages.properties
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/org/apache/harmony/instrument/internal/nls/messages.properties
Mon Sep  4 02:47:28 2006
@@ -14,3 +14,7 @@
 # 
 
 # messages for EN locale
+instrument.1=Received null class argument.
+instrument.2=Received null class file argument.
+instrument.3=Redefinition operation is not supported!
+instrument.4=Fatal error: failed to execute premain class of java agent.



Mime
View raw message