harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r979275 - in /harmony/enhanced/java/branches/java6: ./ classlib/ classlib/depends/libs/ classlib/modules/lang-management/src/main/java/java/lang/management/ classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ ...
Date Mon, 26 Jul 2010 13:28:42 GMT
Author: hindessm
Date: Mon Jul 26 13:28:41 2010
New Revision: 979275

URL: http://svn.apache.org/viewvc?rev=979275&view=rev
Log:
Merge change from /harmony/enhanced/java/trunk@967199

Added:
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/internals/
      - copied from r967199, harmony/enhanced/java/trunk/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/internals/
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/internals/nls/
      - copied from r967199, harmony/enhanced/java/trunk/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/internals/nls/
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/internals/nls/Messages.java
      - copied unchanged from r967199, harmony/enhanced/java/trunk/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/internals/nls/Messages.java
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/internals/nls/messages.properties
      - copied unchanged from r967199, harmony/enhanced/java/trunk/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/internals/nls/messages.properties
Modified:
    harmony/enhanced/java/branches/java6/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/depends/libs/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/ManagementFactory.java
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/MemoryNotificationInfo.java
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/ThreadInfo.java
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/CompilationMXBeanImpl.java
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/DynamicMXBeanImpl.java
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/LoggingMXBeanImpl.java
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ManagementUtils.java
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/MemoryPoolMXBeanImpl.java
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/OpenTypeMappingIHandler.java
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/RuntimeMXBeanImpl.java
    harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ThreadMXBeanImpl.java
    harmony/enhanced/java/branches/java6/drlvm/   (props changed)
    harmony/enhanced/java/branches/java6/jdktools/   (props changed)

Propchange: harmony/enhanced/java/branches/java6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 26 13:28:41 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/java/branches/mrh:935751-941490
-/harmony/enhanced/java/trunk:929253-967074
+/harmony/enhanced/java/trunk:929253-967074,967199
 /harmony/enhanced/trunk:476395-929252
 /incubator/harmony/enhanced/trunk:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 26 13:28:41 2010
@@ -1,7 +1,7 @@
 /harmony/enhanced/classlib/trunk:713674-735919,765923-926091,926318-926838
 /harmony/enhanced/classlib/trunk/working_classlib:884014-884286
 /harmony/enhanced/java/branches/mrh/classlib:935751-941490
-/harmony/enhanced/java/trunk/classlib:929253-967074
+/harmony/enhanced/java/trunk/classlib:929253-967074,967199
 /harmony/enhanced/trunk/classlib:476395-929252
 /harmony/enhanced/trunk/working_classlib:476396-920147
 /incubator/harmony/enhanced/trunk/classlib:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/depends/libs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 26 13:28:41 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/classlib/trunk/depends/libs:544451-926091
-/harmony/enhanced/java/trunk/classlib/depends/libs:929253-967074
+/harmony/enhanced/java/trunk/classlib/depends/libs:929253-967074,967199
 /harmony/enhanced/trunk/classlib/depends/libs:476395-929252
 /incubator/harmony/enhanced/trunk/classlib/depends/libs:292550-476394

Modified: harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/ManagementFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/ManagementFactory.java?rev=979275&r1=979274&r2=979275&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/ManagementFactory.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/ManagementFactory.java
Mon Jul 26 13:28:41 2010
@@ -43,6 +43,7 @@ import javax.management.ObjectName;
 import org.apache.harmony.lang.management.ManagementUtils;
 import org.apache.harmony.lang.management.MemoryManagerMXBeanImpl;
 import org.apache.harmony.lang.management.OpenTypeMappingIHandler;
+import org.apache.harmony.lang.management.internals.nls.Messages;
 
 
 /**
@@ -374,16 +375,16 @@ public class ManagementFactory {
         if (multiInstanceBeanNames.contains(mxbeanInterfaceName)) {
             // partial match is good enough
             if (!mxbeanName.startsWith(expectedObjectName)) {
-                throw new IllegalArgumentException(mxbeanName
-                        + " is not an instance of interface "
-                        + mxbeanInterfaceName);
+                // lm.01= is not an instance of interface {0}
+                throw new IllegalArgumentException(Messages.getString(
+                        "lm.01", mxbeanInterfaceName)); //$NON-NLS-1$                
             }
         } else {
             // exact match required
             if (!expectedObjectName.equals(mxbeanName)) {
-                throw new IllegalArgumentException(mxbeanName
-                        + " is not an instance of interface "
-                        + mxbeanInterfaceName);
+                // lm.02= {0} is not an instance of interface {1}
+                throw new IllegalArgumentException(Messages.getString(
+                        "lm.02", mxbeanName, mxbeanInterfaceName)); //$NON-NLS-1$       
        
             }
         }
     }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/MemoryNotificationInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/MemoryNotificationInfo.java?rev=979275&r1=979274&r2=979275&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/MemoryNotificationInfo.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/MemoryNotificationInfo.java
Mon Jul 26 13:28:41 2010
@@ -20,6 +20,7 @@ package java.lang.management;
 import javax.management.openmbean.CompositeData;
 
 import org.apache.harmony.lang.management.ManagementUtils;
+import org.apache.harmony.lang.management.internals.nls.Messages;
 
 /**
  * <p>
@@ -78,10 +79,12 @@ public class MemoryNotificationInfo {
     public MemoryNotificationInfo(String poolName, MemoryUsage usage, long count) {
         super();
         if (poolName == null) {
-            throw new NullPointerException("pooName is null"); //$NON-NLS-1$
+            //lm.03= poolName is null
+            throw new NullPointerException(Messages.getString("lm.03")); //$NON-NLS-1$  
         
         }
         if (usage == null) {
-            throw new NullPointerException("usage is null"); //$NON-NLS-1$
+            //lm.04=usage is null
+            throw new NullPointerException(Messages.getString("lm.04")); //$NOn-NLs-1$  
         
         }
         
         this.poolName = poolName;
@@ -92,8 +95,8 @@ public class MemoryNotificationInfo {
     private MemoryNotificationInfo(CompositeData cd) {
         final Object poolName = cd.get("poolName"); //$NON-NLS-1$
         if (poolName == null) {
-            throw new IllegalArgumentException(
-                    "Attribute poolName has null value"); //$NON-NLS-1$
+            //lm.05=Attribute poolName has null value
+            throw new IllegalArgumentException(Messages.getString("lm.05")); //$NON-NLs-1$
          
         }
         this.poolName = (String) poolName;
         this.usage = MemoryUsage.from((CompositeData) cd.get("usage")); //$NON-NLS-1$

Modified: harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/ThreadInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/ThreadInfo.java?rev=979275&r1=979274&r2=979275&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/ThreadInfo.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/java/lang/management/ThreadInfo.java
Mon Jul 26 13:28:41 2010
@@ -20,6 +20,7 @@ package java.lang.management;
 import javax.management.openmbean.CompositeData;
 
 import org.apache.harmony.lang.management.ManagementUtils;
+import org.apache.harmony.lang.management.internals.nls.Messages;
 
 
 /**
@@ -102,9 +103,9 @@ public class ThreadInfo {
             long threadIdVal = ((Long) attributeVals[0]).longValue();
             String threadNameVal = (String) attributeVals[1];
             if (threadNameVal == null) {
-                throw new IllegalArgumentException(
-                        "Invalid composite data: Attribute threadName has null value");
-            }
+                //lm.06=Invalid composite data: Attribute threadNAme has null value
+                throw new IllegalArgumentException(Messages.getString("lm.06")); //$NON-NLS-1$
               
+                }
             String threadStateStringVal = (String) attributeVals[2];
 
             // Verify that threadStateStringVal contains a string that can be
@@ -113,9 +114,8 @@ public class ThreadInfo {
             try {
                 threadStateVal = Thread.State.valueOf(threadStateStringVal);
             } catch (IllegalArgumentException e) {
-                throw new IllegalArgumentException(
-                        "CompositeData contains an unexpected threadState value.",
-                        e);
+                //lm.07=CompsiteData contains an unexpected threadState value. {0}
+                throw new IllegalArgumentException(Messages.getString("lm.07", e)); //$NON-NLS-1$
               
             }
 
             boolean suspendedVal = ((Boolean) attributeVals[3]).booleanValue();
@@ -131,7 +131,8 @@ public class ThreadInfo {
                     : null;
             CompositeData[] stackTraceDataVal = (CompositeData[]) attributeVals[12];
             if (stackTraceDataVal == null) {
-                throw new IllegalArgumentException("StackTraceElement[] is missing");
+                //lm.08=StackTraceElement[] is missing
+                throw new IllegalArgumentException(Messages.getString("lm.08")); //$NON-NLS-1$
           
             }
             StackTraceElement[] stackTraceVals = getStackTracesFromCompositeData(stackTraceDataVal);
             result = new ThreadInfo(threadIdVal, threadNameVal, threadStateVal,

Modified: harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/CompilationMXBeanImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/CompilationMXBeanImpl.java?rev=979275&r1=979274&r2=979275&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/CompilationMXBeanImpl.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/CompilationMXBeanImpl.java
Mon Jul 26 13:28:41 2010
@@ -21,6 +21,8 @@ import java.lang.management.CompilationM
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
+import org.apache.harmony.lang.management.internals.nls.Messages;
+
 /**
  * Runtime type for {@link CompilationMXBean}
  * 
@@ -97,9 +99,9 @@ public final class CompilationMXBeanImpl
      * @see java.lang.management.CompilationMXBean#getTotalCompilationTime()
      */
     public long getTotalCompilationTime() {
-        if (!isCompilationTimeMonitoringSupported()) {
-            throw new UnsupportedOperationException(
-                    "VM does not support monitoring of compilation time.");
+        if (!isCompilationTimeMonitoringSupported()) {            
+            //lm.09=VM does not support monitoring of compilation time
+            throw new UnsupportedOperationException(Messages.getString("lm.09")); //$NON-NLs-1$
           
         }
         return this.getTotalCompilationTimeImpl();
     }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/DynamicMXBeanImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/DynamicMXBeanImpl.java?rev=979275&r1=979274&r2=979275&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/DynamicMXBeanImpl.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/DynamicMXBeanImpl.java
Mon Jul 26 13:28:41 2010
@@ -31,6 +31,8 @@ import javax.management.MBeanOperationIn
 import javax.management.MBeanParameterInfo;
 import javax.management.ReflectionException;
 
+import org.apache.harmony.lang.management.internals.nls.Messages;
+
 /**
  * Abstract implementation of the {@link DynamicMBean} interface that provides
  * behaviour required by a dynamic MBean. This class is subclassed by all of the
@@ -169,9 +171,9 @@ public abstract class DynamicMXBeanImpl 
         Method getterMethod = null;
         MBeanAttributeInfo attribInfo = getPresentAttribute(attribute,
                 AttributeAccessType.READING);
-        if (attribInfo == null) {
-            throw new AttributeNotFoundException("No such attribute : "
-                    + attribute);
+        if (attribInfo == null) {            
+            //lm.0A=No such attribute :{0}
+            throw new AttributeNotFoundException(Messages.getString("lm.0A")); //$NON-NLs-1$
         }
 
         try {
@@ -228,8 +230,8 @@ public abstract class DynamicMXBeanImpl 
         MBeanAttributeInfo attribInfo = getPresentAttribute(
                 attribute.getName(), AttributeAccessType.WRITING);
         if (attribInfo == null) {
-            throw new AttributeNotFoundException("No such attribute : "
-                    + attribute);
+            //lm.0A=No such attribute :{0}
+            throw new AttributeNotFoundException(Messages.getString("lm.0A")); //$NON-NLs-1$
         }
 
         try {
@@ -245,13 +247,13 @@ public abstract class DynamicMXBeanImpl 
 
         if (argType.isPrimitive()) {
             if (!ManagementUtils.isWrapperClass(
-                    attribute.getValue().getClass(), argType)) {
-                throw new InvalidAttributeValueException(attribInfo.getName()
-                        + " is a " + attribInfo.getType() + " attribute");
+                    attribute.getValue().getClass(), argType)) {               
+                //lm.0B= {0} is a {1} attribute
+                throw new InvalidAttributeValueException(Messages.getString("lm.0B", attribInfo.getName(),
attribInfo.getType())); //$NON-NLS-1$
             }
         } else if (!argType.equals(attribute.getValue().getClass())) {
-            throw new InvalidAttributeValueException(attribInfo.getName()
-                    + " is a " + attribInfo.getType() + " attribute");
+            //lm.0B= {0} is a {1} attribute
+            throw new InvalidAttributeValueException(Messages.getString("lm.0B", attribInfo.getName(),
attribInfo.getType())); //$NON-NLS-1$
         }
 
         Method setterMethod = null;
@@ -302,11 +304,10 @@ public abstract class DynamicMXBeanImpl 
         // Validate that we have the named action
         MBeanOperationInfo opInfo = getPresentOperation(actionName,
                 localSignature);
-        if (opInfo == null) {
-            throw new ReflectionException(
-                    new NoSuchMethodException(actionName),
-                    "No such operation : " + actionName);
-        }
+        if (opInfo == null) {            
+            //lm.0C=No such operation : {0}
+            throw new ReflectionException( new NoSuchMethodException (actionName), Messages.getString("lm.0C",
actionName)); //$NON-NLS-1$          
+            }
 
         // For Java 5.0 platform MXBeans, no conversion
         // to open MBean types is necessary for any of the arguments.
@@ -412,7 +413,7 @@ public abstract class DynamicMXBeanImpl 
             Throwable root = e.getCause();
             if (root instanceof RuntimeException) {
                 throw (RuntimeException) root;
-            } else {
+            } else {                
                 throw new MBeanException((Exception) root);
             }// end else
         }// end catch

Modified: harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/LoggingMXBeanImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/LoggingMXBeanImpl.java?rev=979275&r1=979274&r2=979275&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/LoggingMXBeanImpl.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/LoggingMXBeanImpl.java
Mon Jul 26 13:28:41 2010
@@ -25,6 +25,8 @@ import java.util.logging.LogManager;
 import java.util.logging.Logger;
 import java.util.logging.LoggingMXBean;
 
+import org.apache.harmony.lang.management.internals.nls.Messages;
+
 /**
  * Runtime type for {@link java.util.logging.LoggingMXBean}.
  * 
@@ -139,9 +141,9 @@ public class LoggingMXBeanImpl extends D
                 logger.setLevel(null);
             }
         } else {
-            // Named Logger does not exist.
-            throw new IllegalArgumentException(
-                    "Unable to find Logger with name " + loggerName);
+            // Named Logger does not exist.           
+            //lm.0D=Unable to find logger with name {0}
+            throw new IllegalArgumentException(Messages.getString("lm.0D", loggerName));
//$NON-NLS-1$            
         }
     }
 }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ManagementUtils.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ManagementUtils.java?rev=979275&r1=979274&r2=979275&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ManagementUtils.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ManagementUtils.java
Mon Jul 26 13:28:41 2010
@@ -61,6 +61,8 @@ import javax.management.openmbean.Tabula
 import javax.management.openmbean.TabularDataSupport;
 import javax.management.openmbean.TabularType;
 
+import org.apache.harmony.lang.management.internals.nls.Messages;
+
 /**
  * Support methods for org.apache.harmony.lang.management classes.
  * 
@@ -772,9 +774,9 @@ public class ManagementUtils {
             String[] expectedNames, String[] expectedTypes) {
         Object[] allVals = cd.getAll(expectedNames);
         // Check that the number of elements match
-        if (allVals.length != expectedTypes.length) {
-            throw new IllegalArgumentException(
-                    "CompositeData does not contain the expected number of attributes.");
+        if (allVals.length != expectedTypes.length) {                    
+            //lm.0E=CompositeData does not contain the expected number of attribute.
+            throw new IllegalArgumentException(Messages.getString("lm.0E")); //$NON-NLS-1$
      
         }
 
         // Type of corresponding elements must be the same
@@ -793,11 +795,10 @@ public class ManagementUtils {
                     if (allVals[i] instanceof CompositeData) {
                         continue;
                     }
-                }
-                throw new IllegalArgumentException(
-                        "CompositeData contains an attribute not of expected type. "
-                                + "Expected " + expectedType + ", found "
-                                + actualType);
+                }                                
+                //lm.0F=CompositeData contains an attribute not of expected type. Expected
{0} ,found {1}
+                throw new IllegalArgumentException(Messages.getString("lm.0F", expectedType,
actualType)); //$NON-NLS-1$               
+               
             }
         }// end for
     }
@@ -814,10 +815,9 @@ public class ManagementUtils {
      */
     public static void verifyFieldNames(CompositeData cd, String[] expected) {
         for (int i = 0; i < expected.length; i++) {
-            if (!cd.containsKey(expected[i])) {
-                throw new IllegalArgumentException(
-                        "CompositeData object does not contain expected key : " //$NON-NLS-1$
-                                + expected[i]);
+            if (!cd.containsKey(expected[i])) {                
+                //lm.10=CompositeData object does not contain expected key: {0}
+                throw new IllegalArgumentException(Messages.getString("lm.10", expected[i]));
//$NON-NLS-1$                
             }
         }// end for all elements in expected
     }
@@ -833,10 +833,10 @@ public class ManagementUtils {
      *            the number of expected attributes in <code>cd</code>
      */
     public static void verifyFieldNumber(CompositeData cd, int minSize) {
-        if (cd.values().size() < minSize) {
-            throw new IllegalArgumentException(
-                    "CompositeData object does not have the expected number of attributes");
//$NON-NLS-1$
-        }
+        if (cd.values().size() < minSize) {            
+            //lm.11=CompositeData object does not have the expected number of attributes

+            throw new IllegalArgumentException(Messages.getString("lm.11")); //$NON-NLS-1$
         
+            }
     }
 
     /**
@@ -1129,9 +1129,9 @@ public class ManagementUtils {
         Set<String> cdKeySet = data.getTabularType().getRowType().keySet();
         // The key set for the CompositeData instances comprising each row
         // must contain only two elements.
-        if (cdKeySet.size() != 2) {
-            throw new IllegalArgumentException(
-                    "TabularData's row type is not a CompositeType with two items.");
+        if (cdKeySet.size() != 2) {            
+            //lm.12=TabularData row type is not CompositeType with two items.
+            throw new IllegalArgumentException(Messages.getString("lm.12")); //$NON-NLS-1$
         }
         String[] keysArray = new String[2];
         int count = 0;

Modified: harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/MemoryPoolMXBeanImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/MemoryPoolMXBeanImpl.java?rev=979275&r1=979274&r2=979275&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/MemoryPoolMXBeanImpl.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/MemoryPoolMXBeanImpl.java
Mon Jul 26 13:28:41 2010
@@ -26,6 +26,8 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 
+import org.apache.harmony.lang.management.internals.nls.Messages;
+
 /**
  * Runtime type for {@link java.lang.management.MemoryPoolMXBean}
  * 
@@ -104,9 +106,10 @@ public final class MemoryPoolMXBeanImpl 
      * @see java.lang.management.MemoryPoolMXBean#getCollectionUsageThreshold()
      */
     public long getCollectionUsageThreshold() {
-        if (!isCollectionUsageThresholdSupported()) {
-            throw new UnsupportedOperationException(
-                    "VM does not support collection usage threshold.");
+        if (!isCollectionUsageThresholdSupported()) {            
+            //lm.13=VM does not support collection usage threshold.
+            throw new UnsupportedOperationException(Messages.getString("lm.13")); //$NON-NLS-1$
+            
         }
         return this.getCollectionUsageThresholdImpl();
     }
@@ -125,8 +128,8 @@ public final class MemoryPoolMXBeanImpl 
      */
     public long getCollectionUsageThresholdCount() {
         if (!isCollectionUsageThresholdSupported()) {
-            throw new UnsupportedOperationException(
-                    "VM does not support collection usage threshold.");
+            //lm.13=VM does not support collection usage threshold.
+            throw new UnsupportedOperationException(Messages.getString("lm.13")); //$NON-NLS-1$
         }
         return this.getCollectionUsageThresholdCountImpl();
     }
@@ -224,8 +227,8 @@ public final class MemoryPoolMXBeanImpl 
      */
     public long getUsageThreshold() {
         if (!isUsageThresholdSupported()) {
-            throw new UnsupportedOperationException(
-                    "VM does not support usage threshold.");
+            //lm.14=VM does not support usage threshold.
+            throw new UnsupportedOperationException(Messages.getString("lm.14")); //$NON-NLS-1$
         }
         return this.getUsageThresholdImpl();
     }
@@ -244,8 +247,8 @@ public final class MemoryPoolMXBeanImpl 
      */
     public long getUsageThresholdCount() {
         if (!isUsageThresholdSupported()) {
-            throw new UnsupportedOperationException(
-                    "VM does not support usage threshold.");
+            //lm.14=VM does not support usage threshold.
+            throw new UnsupportedOperationException(Messages.getString("lm.14")); //$NON-NLS-1$
         }
         return this.getUsageThresholdCountImpl();
     }
@@ -265,8 +268,8 @@ public final class MemoryPoolMXBeanImpl 
      */
     public boolean isCollectionUsageThresholdExceeded() {
         if (!isCollectionUsageThresholdSupported()) {
-            throw new UnsupportedOperationException(
-                    "VM does not support collection usage threshold.");
+            //lm.13=VM does not support collection usage threshold.
+            throw new UnsupportedOperationException(Messages.getString("lm.13")); //$NON-NLS-1$
           
         }
         return this.isCollectionUsageThresholdExceededImpl();
     }
@@ -300,8 +303,8 @@ public final class MemoryPoolMXBeanImpl 
      */
     public boolean isUsageThresholdExceeded() {
         if (!isUsageThresholdSupported()) {
-            throw new UnsupportedOperationException(
-                    "VM does not support usage threshold.");
+            //lm.14=VM does not support usage threshold.
+            throw new UnsupportedOperationException(Messages.getString("lm.14")); //$NON-NLS-1$
         }
         return this.isUsageThresholdExceededImpl();
     }
@@ -370,8 +373,8 @@ public final class MemoryPoolMXBeanImpl 
      */
     public void setCollectionUsageThreshold(long threshold) {
         if (!isCollectionUsageThresholdSupported()) {
-            throw new UnsupportedOperationException(
-                    "VM does not support collection usage threshold.");
+            //lm.13=VM does not support collection usage threshold.
+            throw new UnsupportedOperationException(Messages.getString("lm.13")); //$NON-NLS-1$
         }
 
         SecurityManager security = System.getSecurityManager();
@@ -379,14 +382,14 @@ public final class MemoryPoolMXBeanImpl 
             security.checkPermission(new ManagementPermission("control"));
         }
 
-        if (threshold < 0) {
-            throw new IllegalArgumentException(
-                    "Collection usage threshold cannot be negative.");
+        if (threshold < 0) {            
+            //lm.15=Collection usage threshold cannot be negative.
+            throw new IllegalArgumentException(Messages.getString("lm.15")); //$NON-NLS-1$
           
         }
 
-        if (exceedsMaxPoolSize(threshold)) {
-            throw new IllegalArgumentException(
-                    "Collection usage threshold cannot exceed maximum amount of memory for
pool.");
+        if (exceedsMaxPoolSize(threshold)) {            
+            //lm.16=Collection usage threshold cannot exceed maximum amount of memory for
pool.
+            throw new IllegalArgumentException(Messages.getString("lm.16")); //$NON-NLS-1$
         }
         this.setCollectionUsageThresholdImpl(threshold);
     }
@@ -405,8 +408,8 @@ public final class MemoryPoolMXBeanImpl 
      */
     public void setUsageThreshold(long threshold) {
         if (!isUsageThresholdSupported()) {
-            throw new UnsupportedOperationException(
-                    "VM does not support usage threshold.");
+            //lm.13=VM does not support collection usage threshold.
+            throw new UnsupportedOperationException(Messages.getString("lm.13"));
         }
 
         SecurityManager security = System.getSecurityManager();
@@ -415,13 +418,13 @@ public final class MemoryPoolMXBeanImpl 
         }
 
         if (threshold < 0) {
-            throw new IllegalArgumentException(
-                    "Usage threshold cannot be negative.");
+            //lm.15=Collection usage threshold cannot be negative.
+            throw new IllegalArgumentException(Messages.getString("lm.15")); //$NON-NLS-1$
           
         }
 
         if (exceedsMaxPoolSize(threshold)) {
-            throw new IllegalArgumentException(
-                    "Usage threshold cannot exceed maximum amount of memory for pool.");
+            //lm.16=Collection usage threshold cannot exceed maximum amount of memory for
pool.
+            throw new IllegalArgumentException(Messages.getString("lm.16")); //$NON-NLS-1$
         }
         this.setUsageThresholdImpl(threshold);
     }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/OpenTypeMappingIHandler.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/OpenTypeMappingIHandler.java?rev=979275&r1=979274&r2=979275&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/OpenTypeMappingIHandler.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/OpenTypeMappingIHandler.java
Mon Jul 26 13:28:41 2010
@@ -44,6 +44,8 @@ import javax.management.ObjectName;
 import javax.management.ReflectionException;
 import javax.management.RuntimeMBeanException;
 
+import org.apache.harmony.lang.management.internals.nls.Messages;
+
 /**
  * Concrete instance of the {@link InvocationHandler} interface that is used to
  * handle method invocations on MXBeans that have been obtained using the proxy
@@ -80,8 +82,8 @@ public class OpenTypeMappingIHandler imp
     private void setInfo(String mxBeanType) {
         this.info = ManagementUtils.getMBeanInfo(mxBeanType);
         if (info == null) {
-            throw new IllegalArgumentException("Unknown MXBean type : "
-                    + mxBeanType);
+            //lm.17=Unknown MXBean type : {0}
+            throw new IllegalArgumentException(Messages.getString("lm.17", mxBeanType));
//$NON-NLS-1$         
         }
     }
 
@@ -95,8 +97,8 @@ public class OpenTypeMappingIHandler imp
             if (ManagementUtils.VERBOSE_MODE) {
                 e.printStackTrace(System.err);
             }// end if
-            throw new IllegalArgumentException(
-                    "Bean name not in valid format.", e);
+            //lm.18=Bean name not in valid format. {0}
+            throw new IllegalArgumentException(Messages.getString("lm.18", e)); //$NON-NLS-1$
          
         }
     }
 
@@ -105,8 +107,8 @@ public class OpenTypeMappingIHandler imp
      */
     private void checkBeanIsRegistered() throws IOException {
         if (!this.connection.isRegistered(this.mxBeanObjectName)) {
-            throw new IllegalArgumentException("Not registered : "
-                    + this.mxBeanObjectName);
+            //lm.19=Not registered {0}
+            throw new IllegalArgumentException(Messages.getString("lm.19", this.mxBeanObjectName));
//$NON-NLS-1$
         }
     }
 

Modified: harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/RuntimeMXBeanImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/RuntimeMXBeanImpl.java?rev=979275&r1=979274&r2=979275&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/RuntimeMXBeanImpl.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/RuntimeMXBeanImpl.java
Mon Jul 26 13:28:41 2010
@@ -28,6 +28,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
+import org.apache.harmony.lang.management.internals.nls.Messages;
+
 /**
  * Runtime type for {@link java.lang.management.RuntimeMXBean}
  * 
@@ -63,8 +65,8 @@ public final class RuntimeMXBeanImpl ext
 	 */
 	public String getBootClassPath() {
 		if (!isBootClassPathSupported()) {
-			throw new UnsupportedOperationException(
-					"VM does not support boot classpath.");
+            //lm.1A=VM does not support boot classpath
+            throw new UnsupportedOperationException(Messages.getString("lm.1A")); //$NON-NLS-1$
 		}
 
 		SecurityManager security = System.getSecurityManager();

Modified: harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ThreadMXBeanImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ThreadMXBeanImpl.java?rev=979275&r1=979274&r2=979275&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ThreadMXBeanImpl.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ThreadMXBeanImpl.java
Mon Jul 26 13:28:41 2010
@@ -23,6 +23,8 @@ import java.lang.management.ThreadMXBean
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
+import org.apache.harmony.lang.management.internals.nls.Messages;
+
 /**
  * Runtime type for {@link java.lang.management.ThreadMXBean}
  * 
@@ -177,8 +179,8 @@ public final class ThreadMXBeanImpl exte
     public long getThreadCpuTime(long id) {
         // Validate input.
         if (id <= 0) {
-            throw new IllegalArgumentException(
-                    "Thread id must be greater than 0.");
+            //lm.1B=Thread id must be greater than 0
+            throw new IllegalArgumentException(Messages.getString("lm.1B")); //$NON-NLS-1$
           
         }
 
         long result = -1;
@@ -187,8 +189,8 @@ public final class ThreadMXBeanImpl exte
                 result = this.getThreadCpuTimeImpl(id);
             }
         } else {
-            throw new UnsupportedOperationException(
-                    "CPU time measurement is not supported on this virtual machine.");
+            //lm.1C=CPU time measurement is not supported on this virtual machine
+            throw new UnsupportedOperationException(Messages.getString("lm.1C")); //$NON-NLS-1$
         }
         return result;
     }
@@ -225,14 +227,14 @@ public final class ThreadMXBeanImpl exte
         // Validate inputs
         for (int i = 0; i < ids.length; i++) {
             if (ids[i] <= 0) {
-                throw new IllegalArgumentException(
-                        "Thread id must be greater than 0.");
+                //lm.1B=Thread id must be greater than 0
+                throw new IllegalArgumentException(Messages.getString("lm.1B")); //$NON-NLS-1$
           
             }
         }
 
-        if (maxDepth < 0) {
-            throw new IllegalArgumentException(
-                    "maxDepth value cannot be negative.");
+        if (maxDepth < 0) {            
+            //lm.1D=maxDepth value cannot be negative.
+            throw new IllegalArgumentException(Messages.getString("lm.1D")); //$NON-NLS-1$
         }
 
         // Create an array and populate with individual ThreadInfos
@@ -256,12 +258,12 @@ public final class ThreadMXBeanImpl exte
 
         // Validate inputs
         if (id <= 0) {
-            throw new IllegalArgumentException(
-                    "Thread id must be greater than 0.");
+            //lm.1B=Thread id must be greater than 0
+            throw new IllegalArgumentException(Messages.getString("lm.1B")); //$NON-NLS-1$
           
         }
         if (maxDepth < 0) {
-            throw new IllegalArgumentException(
-                    "maxDepth value cannot be negative.");
+            //lm.1D=maxDepth value cannot be negative.
+            throw new IllegalArgumentException(Messages.getString("lm.1D")); //$NON-NLS-1$
         }
         return this.getThreadInfoImpl(id, maxDepth);
     }
@@ -480,8 +482,8 @@ public final class ThreadMXBeanImpl exte
     public long getThreadUserTime(long id) {
         // Validate input.
         if (id <= 0) {
-            throw new IllegalArgumentException(
-                    "Thread id must be greater than 0.");
+            //lm.1B=Thread id must be greater than 0
+            throw new IllegalArgumentException(Messages.getString("lm.1B")); //$NON-NLS-1$
                         
         }
 
         long result = -1;
@@ -490,8 +492,8 @@ public final class ThreadMXBeanImpl exte
                 result = this.getThreadUserTimeImpl(id);
             }
         } else {
-            throw new UnsupportedOperationException(
-                    "CPU time measurement is not supported on this virtual machine.");
+            //lm.1C=CPU time measurement is not supported on this virtual machine
+            throw new UnsupportedOperationException(Messages.getString("lm.1C")); //$NON-NLS-1$
   
         }
         return result;
     }
@@ -541,8 +543,8 @@ public final class ThreadMXBeanImpl exte
      */
     public boolean isThreadContentionMonitoringEnabled() {
         if (!isThreadContentionMonitoringSupported()) {
-            throw new UnsupportedOperationException(
-                    "Thread contention monitoring is not supported on this virtual machine.");
+            //lm.1E=Thread contention monitoring is not supported on this virtual machine.
+            throw new UnsupportedOperationException(Messages.getString("lm.1E")); //$NON-NLS-1$
         }
         return this.isThreadContentionMonitoringEnabledImpl();
     }
@@ -577,8 +579,9 @@ public final class ThreadMXBeanImpl exte
      */
     public boolean isThreadCpuTimeEnabled() {
         if (!isThreadCpuTimeSupported()) {
-            throw new UnsupportedOperationException(
-                    "Thread CPU timing is not supported on this virtual machine.");
+            
+            //lm.1F=Thread CPU timing is not supported on this virtual machine.
+            throw new UnsupportedOperationException(Messages.getString("lm.1F")); //$NON-NLS-1$
         }
         return this.isThreadCpuTimeEnabledImpl();
     }
@@ -631,8 +634,8 @@ public final class ThreadMXBeanImpl exte
      */
     public void setThreadContentionMonitoringEnabled(boolean enable) {
         if (!isThreadContentionMonitoringSupported()) {
-            throw new UnsupportedOperationException(
-                    "Thread contention monitoring is not supported on this virtual machine.");
+            //lm.1E=Thread contention monitoring is not supported on this virtual machine.
+            throw new UnsupportedOperationException(Messages.getString("lm.1E")); //$NON-NLS-1$
           
         }
 
         SecurityManager security = System.getSecurityManager();
@@ -656,8 +659,8 @@ public final class ThreadMXBeanImpl exte
      */
     public void setThreadCpuTimeEnabled(boolean enable) {
         if (!isThreadCpuTimeSupported()) {
-            throw new UnsupportedOperationException(
-                    "Thread CPU timing is not supported on this virtual machine.");
+            //lm.1F=Thread CPU timing is not supported on this virtual machine.
+            throw new UnsupportedOperationException(Messages.getString("lm.1F")); //$NON-NLS-1$
         
         }
 
         SecurityManager security = System.getSecurityManager();

Propchange: harmony/enhanced/java/branches/java6/drlvm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 26 13:28:41 2010
@@ -1,5 +1,5 @@
 /harmony/enhanced/java/branches/mrh/drlvm:935751-941490
-/harmony/enhanced/java/trunk/drlvm:929253-967074
+/harmony/enhanced/java/trunk/drlvm:929253-967074,967199
 /harmony/enhanced/trunk/drlvm:476395-929252
 /harmony/enhanced/trunk/working_vm:476396-920147
 /incubator/harmony/enhanced/trunk/drlvm:292550-476394

Propchange: harmony/enhanced/java/branches/java6/jdktools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 26 13:28:41 2010
@@ -1,4 +1,4 @@
-/harmony/enhanced/java/trunk/jdktools:929253-967074
+/harmony/enhanced/java/trunk/jdktools:929253-967074,967199
 /harmony/enhanced/jdktools/trunk:630107-925933
 /harmony/enhanced/trunk/jdktools:476395-929252
 /harmony/enhanced/trunk/working_jdktools:476396-920147



Mime
View raw message