summaryrefslogtreecommitdiff
path: root/gnu/java/lang
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/java/lang')
-rw-r--r--gnu/java/lang/CPStringBuilder.java110
-rw-r--r--gnu/java/lang/CharData.java4
-rw-r--r--gnu/java/lang/InstrumentationImpl.java50
-rw-r--r--gnu/java/lang/MainThread.java10
-rw-r--r--gnu/java/lang/management/BeanImpl.java350
-rw-r--r--gnu/java/lang/management/ClassLoadingMXBeanImpl.java3
-rw-r--r--gnu/java/lang/management/CompilationMXBeanImpl.java8
-rw-r--r--gnu/java/lang/management/GarbageCollectorMXBeanImpl.java2
-rw-r--r--gnu/java/lang/management/MemoryMXBeanImpl.java158
-rw-r--r--gnu/java/lang/management/MemoryManagerMXBeanImpl.java2
-rw-r--r--gnu/java/lang/management/MemoryPoolMXBeanImpl.java25
-rw-r--r--gnu/java/lang/management/OperatingSystemMXBeanImpl.java4
-rw-r--r--gnu/java/lang/management/RuntimeMXBeanImpl.java28
-rw-r--r--gnu/java/lang/management/ThreadMXBeanImpl.java67
-rw-r--r--gnu/java/lang/reflect/TypeSignature.java2
15 files changed, 410 insertions, 413 deletions
diff --git a/gnu/java/lang/CPStringBuilder.java b/gnu/java/lang/CPStringBuilder.java
index 27e7d2cc7..f42629d46 100644
--- a/gnu/java/lang/CPStringBuilder.java
+++ b/gnu/java/lang/CPStringBuilder.java
@@ -215,13 +215,13 @@ public final class CPStringBuilder
/* If the StringBuffer's value just grew, then we know that
value is newly allocated and the region between count and
newLength is filled with '\0'. */
- count = newLength;
+ count = newLength;
}
else
{
- /* The StringBuffer's value doesn't need to grow. However,
- we should clear out any cruft that may exist. */
- while (count < newLength)
+ /* The StringBuffer's value doesn't need to grow. However,
+ we should clear out any cruft that may exist. */
+ while (count < newLength)
value[count++] = '\0';
}
}
@@ -290,7 +290,7 @@ public final class CPStringBuilder
* @see System#arraycopy(Object, int, Object, int, int)
*/
public void getChars(int srcOffset, int srcEnd,
- char[] dst, int dstOffset)
+ char[] dst, int dstOffset)
{
if (srcOffset < 0 || srcEnd > count || srcEnd < srcOffset)
throw new StringIndexOutOfBoundsException();
@@ -362,10 +362,10 @@ public final class CPStringBuilder
return append("null");
synchronized (stringBuffer)
{
- int len = stringBuffer.length();
- ensureCapacity(count + len);
- stringBuffer.getChars(0, len, value, count);
- count += len;
+ int len = stringBuffer.length();
+ ensureCapacity(count + len);
+ stringBuffer.getChars(0, len, value, count);
+ count += len;
}
return this;
}
@@ -466,9 +466,9 @@ public final class CPStringBuilder
return append("null");
if (end - start > 0)
{
- ensureCapacity(count + end - start);
- for (; start < end; ++start)
- value[count++] = seq.charAt(start);
+ ensureCapacity(count + end - start);
+ for (; start < end; ++start)
+ value[count++] = seq.charAt(start);
}
return this;
}
@@ -979,23 +979,23 @@ public final class CPStringBuilder
int count = 0;
while (start < end)
{
- char base = value[start];
- if (base < Character.MIN_HIGH_SURROGATE
- || base > Character.MAX_HIGH_SURROGATE
- || start == end
- || start == count
- || value[start + 1] < Character.MIN_LOW_SURROGATE
- || value[start + 1] > Character.MAX_LOW_SURROGATE)
- {
- // Nothing.
- }
- else
- {
- // Surrogate pair.
- ++start;
- }
- ++start;
- ++count;
+ char base = value[start];
+ if (base < Character.MIN_HIGH_SURROGATE
+ || base > Character.MAX_HIGH_SURROGATE
+ || start == end
+ || start == count
+ || value[start + 1] < Character.MIN_LOW_SURROGATE
+ || value[start + 1] > Character.MAX_LOW_SURROGATE)
+ {
+ // Nothing.
+ }
+ else
+ {
+ // Surrogate pair.
+ ++start;
+ }
+ ++start;
+ ++count;
}
return count;
}
@@ -1015,22 +1015,22 @@ public final class CPStringBuilder
{
while (codePoints > 0)
{
- char base = value[start];
- if (base < Character.MIN_HIGH_SURROGATE
- || base > Character.MAX_HIGH_SURROGATE
- || start == count
- || value[start + 1] < Character.MIN_LOW_SURROGATE
- || value[start + 1] > Character.MAX_LOW_SURROGATE)
- {
- // Nothing.
- }
- else
- {
- // Surrogate pair.
- ++start;
- }
- ++start;
- --codePoints;
+ char base = value[start];
+ if (base < Character.MIN_HIGH_SURROGATE
+ || base > Character.MAX_HIGH_SURROGATE
+ || start == count
+ || value[start + 1] < Character.MIN_LOW_SURROGATE
+ || value[start + 1] > Character.MAX_LOW_SURROGATE)
+ {
+ // Nothing.
+ }
+ else
+ {
+ // Surrogate pair.
+ ++start;
+ }
+ ++start;
+ --codePoints;
}
return start;
}
@@ -1040,7 +1040,7 @@ public final class CPStringBuilder
* ensure that an expensive growing operation will not occur until either
* <code>minimumCapacity</code> is reached or the array has been allocated.
* The buffer is grown to either <code>minimumCapacity * 2</code>, if
- * the array has been allocated or the larger of <code>minimumCapacity</code> and
+ * the array has been allocated or the larger of <code>minimumCapacity</code> and
* <code>capacity() * 2 + 2</code>, if it is not already large enough.
*
* @param minimumCapacity the new capacity
@@ -1050,14 +1050,14 @@ public final class CPStringBuilder
{
if (allocated || minimumCapacity > value.length)
{
- if (minimumCapacity > value.length)
- {
- int max = value.length * 2 + 2;
- minimumCapacity = (minimumCapacity < max ? max : minimumCapacity);
- }
- else
- minimumCapacity *= 2;
- allocateArray(minimumCapacity);
+ if (minimumCapacity > value.length)
+ {
+ int max = value.length * 2 + 2;
+ minimumCapacity = (minimumCapacity < max ? max : minimumCapacity);
+ }
+ else
+ minimumCapacity *= 2;
+ allocateArray(minimumCapacity);
}
}
@@ -1076,7 +1076,7 @@ public final class CPStringBuilder
value = nb;
allocated = false;
}
-
+
/**
* Get the length of the <code>String</code> this <code>StringBuilder</code>
* would create. Not to be confused with the <em>capacity</em> of the
diff --git a/gnu/java/lang/CharData.java b/gnu/java/lang/CharData.java
index a84d94da2..cb33035e6 100644
--- a/gnu/java/lang/CharData.java
+++ b/gnu/java/lang/CharData.java
@@ -58,7 +58,7 @@ package gnu.java.lang;
* attribute tables are much smaller than 0xffff entries; as many characters
* in Unicode share common attributes. Numbers that are too large to fit
* into NUM_VALUE as 16 bit chars are stored in LARGENUMS and a number N is
- * stored in NUM_VALUE such that (-N - 3) is the offset into LARGENUMS for
+ * stored in NUM_VALUE such that (-N - 3) is the offset into LARGENUMS for
* the particular character. The DIRECTION table also contains a field for
* detecting characters with multi-character uppercase expansions.
* Next, there is a listing for <code>TITLE</code> exceptions (most characters
@@ -81,7 +81,7 @@ public interface CharData
/**
* The character shift amount to look up the block offset. In other words,
- * <code>(char) (BLOCKS.value[ch >> SHIFT[p]] + ch)</code> is the index
+ * <code>(char) (BLOCKS.value[ch >> SHIFT[p]] + ch)</code> is the index
* where <code>ch</code> is described in <code>DATA</code> if <code>ch</code>
* is in Unicode plane <code>p</code>. Note that <code>p</code> is simply
* the integer division of ch and 0x10000.
diff --git a/gnu/java/lang/InstrumentationImpl.java b/gnu/java/lang/InstrumentationImpl.java
index 2425b35c8..a601baf55 100644
--- a/gnu/java/lang/InstrumentationImpl.java
+++ b/gnu/java/lang/InstrumentationImpl.java
@@ -66,7 +66,7 @@ public final class InstrumentationImpl implements Instrumentation
private ArrayList<ClassFileTransformer> transformers =
new ArrayList<ClassFileTransformer>();
-
+
InstrumentationImpl()
{
}
@@ -76,7 +76,7 @@ public final class InstrumentationImpl implements Instrumentation
* to the instrumentation. Each time a class is defined
* or redefined, the <code>transform</code> method of the
* <code>transformer</code> object is called.
- *
+ *
* @param transformer the transformer to add
* @throws NullPointerException if transformer is null
*/
@@ -89,11 +89,11 @@ public final class InstrumentationImpl implements Instrumentation
transformers.add(transformer);
}
}
-
+
/**
* Removes the given transformer from the set of transformers
* this Instrumentation object has.
- *
+ *
* @param transformer the transformer to remove
* @return true if the transformer was found and removed, false if
* the transformer was not found
@@ -103,8 +103,8 @@ public final class InstrumentationImpl implements Instrumentation
{
if (transformer == null)
throw new NullPointerException();
-
- boolean result;
+
+ boolean result;
synchronized (transformers)
{
result = transformers.remove(transformer);
@@ -114,22 +114,22 @@ public final class InstrumentationImpl implements Instrumentation
/**
* Returns if the current JVM supports class redefinition
- *
+ *
* @return true if the current JVM supports class redefinition
*/
public boolean isRedefineClassesSupported()
{
return VMInstrumentationImpl.isRedefineClassesSupported();
}
-
+
/**
* Redefine classes present in the definitions array, with
* the corresponding class files.
*
* @param definitions an array of classes to redefine
- *
- * @throws ClassNotFoundException if a class cannot be found
- * @throws UnmodifiableClassException if a class cannot be modified
+ *
+ * @throws ClassNotFoundException if a class cannot be found
+ * @throws UnmodifiableClassException if a class cannot be modified
* @throws UnsupportedOperationException if the JVM does not support
* redefinition or the redefinition made unsupported changes
* @throws ClassFormatError if a class file is not valid
@@ -139,7 +139,7 @@ public final class InstrumentationImpl implements Instrumentation
* are unsupported
* @throws ClassCircularityError if circularity occured with the new
* classes
- * @throws LinkageError if a linkage error occurs
+ * @throws LinkageError if a linkage error occurs
* @throws NullPointerException if the definitions array is null, or any
* of its element
*
@@ -153,14 +153,14 @@ public final class InstrumentationImpl implements Instrumentation
{
if (!isRedefineClassesSupported())
throw new UnsupportedOperationException();
-
+
VMInstrumentationImpl.redefineClasses(this, definitions);
}
/**
* Get all the classes loaded by the JVM.
- *
+ *
* @return an array containing all the classes loaded by the JVM. The array
* is empty if no class is loaded.
*/
@@ -171,9 +171,9 @@ public final class InstrumentationImpl implements Instrumentation
/**
* Get all the classes loaded by a given class loader
- *
+ *
* @param loader the loader
- *
+ *
* @return an array containing all the classes loaded by the given loader.
* The array is empty if no class was loaded by the loader.
*/
@@ -184,7 +184,7 @@ public final class InstrumentationImpl implements Instrumentation
/**
* Get the size of an object.
- *
+ *
* @param objectToSize the object
* @return the size of the object
* @throws NullPointerException if objectToSize is null.
@@ -207,12 +207,12 @@ public final class InstrumentationImpl implements Instrumentation
* @param protectionDomain the protection domain of the class being defined
* or redefined
* @param classfileBuffer the input byte buffer in class file format
- *
+ *
* @return the new class file
*/
public byte[] callTransformers(ClassLoader loader, String className,
- Class<?> classBeingRedefined, ProtectionDomain protectionDomain,
- byte[] classfileBuffer)
+ Class<?> classBeingRedefined, ProtectionDomain protectionDomain,
+ byte[] classfileBuffer)
{
byte[] newBuffer = null;
byte[] oldBuffer = classfileBuffer;
@@ -227,13 +227,13 @@ public final class InstrumentationImpl implements Instrumentation
{
newBuffer = current.transform(loader, className,
classBeingRedefined, protectionDomain, oldBuffer);
- }
- catch (IllegalClassFormatException ignored)
- {
+ }
+ catch (IllegalClassFormatException ignored)
+ {
//IGNORED
- }
+ }
if (newBuffer != null)
- oldBuffer = newBuffer;
+ oldBuffer = newBuffer;
}
}
return oldBuffer;
diff --git a/gnu/java/lang/MainThread.java b/gnu/java/lang/MainThread.java
index 7ad70cd7c..a72956421 100644
--- a/gnu/java/lang/MainThread.java
+++ b/gnu/java/lang/MainThread.java
@@ -8,7 +8,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath 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
@@ -58,7 +58,7 @@ public class MainThread
throws ClassNotFoundException, NoSuchMethodException
{
Class found = Class.forName(classname, true,
- ClassLoader.getSystemClassLoader());
+ ClassLoader.getSystemClassLoader());
Class[] argTypes = new Class[1];
argTypes[0] = args.getClass();
mainMethod = found.getMethod("main", argTypes);
@@ -69,15 +69,15 @@ public class MainThread
{
try
{
- mainMethod.invoke(null,(Object) args);
+ mainMethod.invoke(null,(Object) args);
}
catch(IllegalAccessException e)
{
- // Ignore.
+ // Ignore.
}
catch(InvocationTargetException e)
{
- // Ignore.
+ // Ignore.
}
}
}
diff --git a/gnu/java/lang/management/BeanImpl.java b/gnu/java/lang/management/BeanImpl.java
index a651e3548..a7c2357b6 100644
--- a/gnu/java/lang/management/BeanImpl.java
+++ b/gnu/java/lang/management/BeanImpl.java
@@ -116,66 +116,66 @@ public class BeanImpl
return;
try
{
- MBeanAttributeInfo[] oldA = info.getAttributes();
- OpenMBeanAttributeInfo[] attribs =
- new OpenMBeanAttributeInfoSupport[oldA.length];
- for (int a = 0; a < oldA.length; ++a)
- {
- OpenMBeanParameterInfo param = Translator.translate(oldA[a].getType());
- if (param.getMinValue() == null)
- {
- Object[] lv;
- if (param.getLegalValues() == null)
- lv = null;
- else
- lv = param.getLegalValues().toArray();
- attribs[a] = new OpenMBeanAttributeInfoSupport(oldA[a].getName(),
- oldA[a].getDescription(),
- ((OpenType<Object>)
- param.getOpenType()),
- oldA[a].isReadable(),
- oldA[a].isWritable(),
- oldA[a].isIs(),
- param.getDefaultValue(),
- lv);
- }
- else
- attribs[a] = new OpenMBeanAttributeInfoSupport(oldA[a].getName(),
- oldA[a].getDescription(),
- ((OpenType<Object>)
- param.getOpenType()),
- oldA[a].isReadable(),
- oldA[a].isWritable(),
- oldA[a].isIs(),
- param.getDefaultValue(),
- ((Comparable<Object>)
- param.getMinValue()),
- ((Comparable<Object>)
- param.getMaxValue()));
- }
- MBeanConstructorInfo[] oldC = info.getConstructors();
- OpenMBeanConstructorInfo[] cons = new OpenMBeanConstructorInfoSupport[oldC.length];
- for (int a = 0; a < oldC.length; ++a)
- cons[a] =
- new OpenMBeanConstructorInfoSupport(oldC[a].getName(),
- oldC[a].getDescription(),
- translateSignature(oldC[a].getSignature()));
- MBeanOperationInfo[] oldO = info.getOperations();
- OpenMBeanOperationInfo[] ops = new OpenMBeanOperationInfoSupport[oldO.length];
- for (int a = 0; a < oldO.length; ++a)
- ops[a] =
- new OpenMBeanOperationInfoSupport(oldO[a].getName(),
- oldO[a].getDescription(),
- translateSignature(oldO[a].getSignature()),
- Translator.translate(oldO[a].getReturnType()).getOpenType(),
- oldO[a].getImpact());
- openInfo = new OpenMBeanInfoSupport(info.getClassName(), info.getDescription(),
- attribs, cons, ops, info.getNotifications());
+ MBeanAttributeInfo[] oldA = info.getAttributes();
+ OpenMBeanAttributeInfo[] attribs =
+ new OpenMBeanAttributeInfoSupport[oldA.length];
+ for (int a = 0; a < oldA.length; ++a)
+ {
+ OpenMBeanParameterInfo param = Translator.translate(oldA[a].getType());
+ if (param.getMinValue() == null)
+ {
+ Object[] lv;
+ if (param.getLegalValues() == null)
+ lv = null;
+ else
+ lv = param.getLegalValues().toArray();
+ attribs[a] = new OpenMBeanAttributeInfoSupport(oldA[a].getName(),
+ oldA[a].getDescription(),
+ ((OpenType<Object>)
+ param.getOpenType()),
+ oldA[a].isReadable(),
+ oldA[a].isWritable(),
+ oldA[a].isIs(),
+ param.getDefaultValue(),
+ lv);
+ }
+ else
+ attribs[a] = new OpenMBeanAttributeInfoSupport(oldA[a].getName(),
+ oldA[a].getDescription(),
+ ((OpenType<Object>)
+ param.getOpenType()),
+ oldA[a].isReadable(),
+ oldA[a].isWritable(),
+ oldA[a].isIs(),
+ param.getDefaultValue(),
+ ((Comparable<Object>)
+ param.getMinValue()),
+ ((Comparable<Object>)
+ param.getMaxValue()));
+ }
+ MBeanConstructorInfo[] oldC = info.getConstructors();
+ OpenMBeanConstructorInfo[] cons = new OpenMBeanConstructorInfoSupport[oldC.length];
+ for (int a = 0; a < oldC.length; ++a)
+ cons[a] =
+ new OpenMBeanConstructorInfoSupport(oldC[a].getName(),
+ oldC[a].getDescription(),
+ translateSignature(oldC[a].getSignature()));
+ MBeanOperationInfo[] oldO = info.getOperations();
+ OpenMBeanOperationInfo[] ops = new OpenMBeanOperationInfoSupport[oldO.length];
+ for (int a = 0; a < oldO.length; ++a)
+ ops[a] =
+ new OpenMBeanOperationInfoSupport(oldO[a].getName(),
+ oldO[a].getDescription(),
+ translateSignature(oldO[a].getSignature()),
+ Translator.translate(oldO[a].getReturnType()).getOpenType(),
+ oldO[a].getImpact());
+ openInfo = new OpenMBeanInfoSupport(info.getClassName(), info.getDescription(),
+ attribs, cons, ops, info.getNotifications());
}
catch (OpenDataException e)
{
- throw (InternalError) (new InternalError("A problem occurred creating the open type " +
- "descriptors.").initCause(e));
+ throw (InternalError) (new InternalError("A problem occurred creating the open type " +
+ "descriptors.").initCause(e));
}
}
@@ -195,7 +195,7 @@ public class BeanImpl
public Object getAttribute(String attribute)
throws AttributeNotFoundException, MBeanException,
- ReflectionException
+ ReflectionException
{
Object value = super.getAttribute(attribute);
if (value instanceof Enum)
@@ -207,60 +207,60 @@ public class BeanImpl
String[] allowedTypes = OpenType.ALLOWED_CLASSNAMES;
for (int a = 0; a < allowedTypes.length; ++a)
if (cName.equals(allowedTypes[a]))
- return value;
+ return value;
OpenMBeanInfo info = (OpenMBeanInfo) getMBeanInfo();
MBeanAttributeInfo[] attribs =
(MBeanAttributeInfo[]) info.getAttributes();
OpenType type = null;
for (int a = 0; a < attribs.length; ++a)
if (attribs[a].getName().equals(attribute))
- type = ((OpenMBeanAttributeInfo) attribs[a]).getOpenType();
+ type = ((OpenMBeanAttributeInfo) attribs[a]).getOpenType();
if (value instanceof List)
{
- try
- {
- Class e =
- Class.forName(((ArrayType) type).getElementOpenType().getClassName());
- List l = (List) value;
- Object[] array = (Object[]) Array.newInstance(e, l.size());
- return l.toArray(array);
- }
- catch (ClassNotFoundException e)
- {
- throw (InternalError) (new InternalError("The class of the list " +
- "element type could not " +
- "be created").initCause(e));
- }
+ try
+ {
+ Class e =
+ Class.forName(((ArrayType) type).getElementOpenType().getClassName());
+ List l = (List) value;
+ Object[] array = (Object[]) Array.newInstance(e, l.size());
+ return l.toArray(array);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw (InternalError) (new InternalError("The class of the list " +
+ "element type could not " +
+ "be created").initCause(e));
+ }
}
if (value instanceof Map)
{
- TabularType ttype = (TabularType) type;
- TabularData data = new TabularDataSupport(ttype);
- Iterator it = ((Map) value).entrySet().iterator();
- while (it.hasNext())
- {
- Map.Entry entry = (Map.Entry) it.next();
- try
- {
- data.put(new CompositeDataSupport(ttype.getRowType(),
- new String[] {
- "key",
- "value"
- },
- new Object[] {
- entry.getKey(),
- entry.getValue()
- }));
- }
- catch (OpenDataException e)
- {
- throw (InternalError) (new InternalError("A problem occurred " +
- "converting the map " +
- "to a composite data " +
- "structure.").initCause(e));
- }
- }
- return data;
+ TabularType ttype = (TabularType) type;
+ TabularData data = new TabularDataSupport(ttype);
+ Iterator it = ((Map) value).entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry entry = (Map.Entry) it.next();
+ try
+ {
+ data.put(new CompositeDataSupport(ttype.getRowType(),
+ new String[] {
+ "key",
+ "value"
+ },
+ new Object[] {
+ entry.getKey(),
+ entry.getValue()
+ }));
+ }
+ catch (OpenDataException e)
+ {
+ throw (InternalError) (new InternalError("A problem occurred " +
+ "converting the map " +
+ "to a composite data " +
+ "structure.").initCause(e));
+ }
+ }
+ return data;
}
CompositeType cType = (CompositeType) type;
Set names = cType.keySet();
@@ -268,51 +268,51 @@ public class BeanImpl
List values = new ArrayList(names.size());
while (it.hasNext())
{
- String field = (String) it.next();
- Method getter = null;
- try
- {
- getter = vClass.getMethod("get" + field);
- }
- catch (NoSuchMethodException e)
- {
- /* Ignored; the type tells us it's there. */
- }
- try
- {
- values.add(getter.invoke(value));
- }
- catch (IllegalAccessException e)
- {
- throw new ReflectionException(e, "Failed to retrieve " + field);
- }
- catch (IllegalArgumentException e)
- {
- throw new ReflectionException(e, "Failed to retrieve " + field);
- }
- catch (InvocationTargetException e)
- {
- throw new MBeanException((Exception) e.getCause(),
- "The getter of " + field +
- " threw an exception");
- }
+ String field = (String) it.next();
+ Method getter = null;
+ try
+ {
+ getter = vClass.getMethod("get" + field);
+ }
+ catch (NoSuchMethodException e)
+ {
+ /* Ignored; the type tells us it's there. */
+ }
+ try
+ {
+ values.add(getter.invoke(value));
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new ReflectionException(e, "Failed to retrieve " + field);
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw new ReflectionException(e, "Failed to retrieve " + field);
+ }
+ catch (InvocationTargetException e)
+ {
+ throw new MBeanException((Exception) e.getCause(),
+ "The getter of " + field +
+ " threw an exception");
+ }
}
try
{
- return new CompositeDataSupport(cType,
- (String[])
- names.toArray(new String[names.size()]),
- values.toArray());
+ return new CompositeDataSupport(cType,
+ (String[])
+ names.toArray(new String[names.size()]),
+ values.toArray());
}
catch (OpenDataException e)
{
- throw (InternalError) (new InternalError("A problem occurred " +
- "converting the value " +
- "to a composite data " +
- "structure.").initCause(e));
+ throw (InternalError) (new InternalError("A problem occurred " +
+ "converting the value " +
+ "to a composite data " +
+ "structure.").initCause(e));
}
}
-
+
protected MBeanInfo getCachedMBeanInfo()
{
return (MBeanInfo) openInfo;
@@ -322,15 +322,15 @@ public class BeanImpl
* Override this method so as to prevent the description of a constructor's
* parameter being @code{null}. Open MBeans can not have @code{null} descriptions,
* but one will occur as the names of parameters aren't stored for reflection.
- *
+ *
* @param constructor the constructor whose parameter needs describing.
* @param parameter the parameter to be described.
* @param sequenceNo the number of the parameter to describe.
* @return a description of the constructor's parameter.
*/
protected String getDescription(MBeanConstructorInfo constructor,
- MBeanParameterInfo parameter,
- int sequenceNo)
+ MBeanParameterInfo parameter,
+ int sequenceNo)
{
String desc = parameter.getDescription();
if (desc == null)
@@ -343,15 +343,15 @@ public class BeanImpl
* Override this method so as to prevent the description of an operation's
* parameter being @code{null}. Open MBeans can not have @code{null} descriptions,
* but one will occur as the names of parameters aren't stored for reflection.
- *
+ *
* @param operation the operation whose parameter needs describing.
* @param parameter the parameter to be described.
* @param sequenceNo the number of the parameter to describe.
* @return a description of the operation's parameter.
*/
protected String getDescription(MBeanOperationInfo operation,
- MBeanParameterInfo parameter,
- int sequenceNo)
+ MBeanParameterInfo parameter,
+ int sequenceNo)
{
String desc = parameter.getDescription();
if (desc == null)
@@ -364,15 +364,15 @@ public class BeanImpl
* Override this method so as to prevent the name of a constructor's
* parameter being @code{null}. Open MBeans can not have @code{null} names,
* but one will occur as the names of parameters aren't stored for reflection.
- *
+ *
* @param constructor the constructor whose parameter needs a name.
* @param parameter the parameter to be named.
* @param sequenceNo the number of the parameter to name.
* @return a description of the constructor's parameter.
*/
protected String getParameterName(MBeanConstructorInfo constructor,
- MBeanParameterInfo parameter,
- int sequenceNo)
+ MBeanParameterInfo parameter,
+ int sequenceNo)
{
String name = parameter.getName();
if (name == null)
@@ -385,15 +385,15 @@ public class BeanImpl
* Override this method so as to prevent the name of an operation's
* parameter being @code{null}. Open MBeans can not have @code{null} names,
* but one will occur as the names of parameters aren't stored for reflection.
- *
+ *
* @param operation the operation whose parameter needs a name.
* @param parameter the parameter to be named.
* @param sequenceNo the number of the parameter to name.
* @return a description of the operation's parameter.
*/
protected String getParameterName(MBeanOperationInfo operation,
- MBeanParameterInfo parameter,
- int sequenceNo)
+ MBeanParameterInfo parameter,
+ int sequenceNo)
{
String name = parameter.getName();
if (name == null)
@@ -414,31 +414,31 @@ public class BeanImpl
OpenMBeanParameterInfo[] sig = new OpenMBeanParameterInfoSupport[oldS.length];
for (int a = 0; a < oldS.length; ++a)
{
- OpenMBeanParameterInfo param = Translator.translate(oldS[a].getType());
- if (param.getMinValue() == null)
- {
- Object[] lv;
- if (param.getLegalValues() == null)
- lv = null;
- else
- lv = param.getLegalValues().toArray();
- sig[a] = new OpenMBeanParameterInfoSupport(oldS[a].getName(),
- oldS[a].getDescription(),
- ((OpenType<Object>)
- param.getOpenType()),
- param.getDefaultValue(),
- lv);
- }
- else
- sig[a] = new OpenMBeanParameterInfoSupport(oldS[a].getName(),
- oldS[a].getDescription(),
- ((OpenType<Object>)
- param.getOpenType()),
- param.getDefaultValue(),
- ((Comparable<Object>)
- param.getMinValue()),
- ((Comparable<Object>)
- param.getMaxValue()));
+ OpenMBeanParameterInfo param = Translator.translate(oldS[a].getType());
+ if (param.getMinValue() == null)
+ {
+ Object[] lv;
+ if (param.getLegalValues() == null)
+ lv = null;
+ else
+ lv = param.getLegalValues().toArray();
+ sig[a] = new OpenMBeanParameterInfoSupport(oldS[a].getName(),
+ oldS[a].getDescription(),
+ ((OpenType<Object>)
+ param.getOpenType()),
+ param.getDefaultValue(),
+ lv);
+ }
+ else
+ sig[a] = new OpenMBeanParameterInfoSupport(oldS[a].getName(),
+ oldS[a].getDescription(),
+ ((OpenType<Object>)
+ param.getOpenType()),
+ param.getDefaultValue(),
+ ((Comparable<Object>)
+ param.getMinValue()),
+ ((Comparable<Object>)
+ param.getMaxValue()));
}
return sig;
}
diff --git a/gnu/java/lang/management/ClassLoadingMXBeanImpl.java b/gnu/java/lang/management/ClassLoadingMXBeanImpl.java
index 92e68ae76..d98a39633 100644
--- a/gnu/java/lang/management/ClassLoadingMXBeanImpl.java
+++ b/gnu/java/lang/management/ClassLoadingMXBeanImpl.java
@@ -42,7 +42,7 @@ import java.lang.management.ClassLoadingMXBean;
import javax.management.NotCompliantMBeanException;
/**
- * Provides access to information about the class loading
+ * Provides access to information about the class loading
* behaviour of the current invocation of the virtual
* machine. Instances of this bean are obtained by calling
* {@link ManagementFactory#getClassLoadingMXBean()}.
@@ -96,4 +96,3 @@ public final class ClassLoadingMXBeanImpl
}
}
-
diff --git a/gnu/java/lang/management/CompilationMXBeanImpl.java b/gnu/java/lang/management/CompilationMXBeanImpl.java
index b3ad898b5..1b77edf5a 100644
--- a/gnu/java/lang/management/CompilationMXBeanImpl.java
+++ b/gnu/java/lang/management/CompilationMXBeanImpl.java
@@ -44,7 +44,7 @@ import java.lang.management.CompilationMXBean;
import javax.management.NotCompliantMBeanException;
/**
- * Provides access to information about the JIT
+ * Provides access to information about the JIT
* compiler of the virtual machine, if one exists.
* Instances of this bean are obtained by calling
* {@link ManagementFactory#getCompilationMXBean()},
@@ -66,7 +66,7 @@ public final class CompilationMXBeanImpl
/**
* Constant for compilation time support.
*/
- private static final String COMPILATION_TIME_SUPPORT =
+ private static final String COMPILATION_TIME_SUPPORT =
"gnu.java.lang.management.CompilationTimeSupport";
/**
@@ -87,7 +87,7 @@ public final class CompilationMXBeanImpl
{
return SystemProperties.getProperty(COMPILER_NAME);
}
-
+
public boolean isCompilationTimeMonitoringSupported()
{
return SystemProperties.getProperty(COMPILATION_TIME_SUPPORT) != null;
@@ -99,7 +99,7 @@ public final class CompilationMXBeanImpl
return VMCompilationMXBeanImpl.getTotalCompilationTime();
else
throw new UnsupportedOperationException("Compilation time monitoring "
- + "is not supported");
+ + "is not supported");
}
}
diff --git a/gnu/java/lang/management/GarbageCollectorMXBeanImpl.java b/gnu/java/lang/management/GarbageCollectorMXBeanImpl.java
index b752e6b86..7a2d762fa 100644
--- a/gnu/java/lang/management/GarbageCollectorMXBeanImpl.java
+++ b/gnu/java/lang/management/GarbageCollectorMXBeanImpl.java
@@ -42,7 +42,7 @@ import java.lang.management.GarbageCollectorMXBean;
import javax.management.NotCompliantMBeanException;
/**
- * Provides access to information about one of the garbage
+ * Provides access to information about one of the garbage
* collectors used by the current invocation of the
* virtual machine. An instance of this bean for each garbage
* collector is obtained by calling
diff --git a/gnu/java/lang/management/MemoryMXBeanImpl.java b/gnu/java/lang/management/MemoryMXBeanImpl.java
index 1e6c63afc..10e6522f1 100644
--- a/gnu/java/lang/management/MemoryMXBeanImpl.java
+++ b/gnu/java/lang/management/MemoryMXBeanImpl.java
@@ -63,7 +63,7 @@ import javax.management.openmbean.OpenType;
import javax.management.openmbean.SimpleType;
/**
- * Provides access to information about the memory
+ * Provides access to information about the memory
* management of the current invocation of the virtual
* machine. Instances of this bean are obtained by calling
* {@link ManagementFactory#getMemoryMXBean()}.
@@ -88,39 +88,39 @@ public final class MemoryMXBeanImpl
{
try
{
- CompositeType usageType =
- new CompositeType(MemoryUsage.class.getName(),
- "Describes the usage levels of a pool",
- new String[] { "init", "used",
- "committed", "max"
- },
- new String[] { "Initial level",
- "Used level",
- "Committed level",
- "Maximum level"
- },
- new OpenType[] {
- SimpleType.LONG, SimpleType.LONG,
- SimpleType.LONG, SimpleType.LONG
- });
- CompositeType notifType =
- new CompositeType(MemoryNotificationInfo.class.getName(),
- "Provides the notification info on memory usage",
- new String[] { "poolName", "usage", "count" },
- new String[] { "Name of the memory pool",
- "Usage level of the memory pool",
- "Number of times the threshold " +
- "has been crossed"
- },
- new OpenType[] {
- SimpleType.STRING, usageType, SimpleType.LONG
- });
- }
- catch (OpenDataException e)
- {
- throw new IllegalStateException("Something went wrong in creating " +
- "the composite data types.", e);
- }
+ CompositeType usageType =
+ new CompositeType(MemoryUsage.class.getName(),
+ "Describes the usage levels of a pool",
+ new String[] { "init", "used",
+ "committed", "max"
+ },
+ new String[] { "Initial level",
+ "Used level",
+ "Committed level",
+ "Maximum level"
+ },
+ new OpenType[] {
+ SimpleType.LONG, SimpleType.LONG,
+ SimpleType.LONG, SimpleType.LONG
+ });
+ CompositeType notifType =
+ new CompositeType(MemoryNotificationInfo.class.getName(),
+ "Provides the notification info on memory usage",
+ new String[] { "poolName", "usage", "count" },
+ new String[] { "Name of the memory pool",
+ "Usage level of the memory pool",
+ "Number of times the threshold " +
+ "has been crossed"
+ },
+ new OpenType[] {
+ SimpleType.STRING, usageType, SimpleType.LONG
+ });
+ }
+ catch (OpenDataException e)
+ {
+ throw new IllegalStateException("Something went wrong in creating " +
+ "the composite data types.", e);
+ }
}
/**
@@ -171,8 +171,8 @@ public final class MemoryMXBeanImpl
}
public void addNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
{
if (listener == null)
throw new IllegalArgumentException("Null listener added to bean.");
@@ -183,13 +183,13 @@ public final class MemoryMXBeanImpl
{
return new MBeanNotificationInfo[]
{
- new MBeanNotificationInfo(new String[]
- {
- MemoryNotificationInfo.MEMORY_COLLECTION_THRESHOLD_EXCEEDED,
- MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED
- },
- Notification.class.getName(),
- "Memory Usage Notifications")
+ new MBeanNotificationInfo(new String[]
+ {
+ MemoryNotificationInfo.MEMORY_COLLECTION_THRESHOLD_EXCEEDED,
+ MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED
+ },
+ Notification.class.getName(),
+ "Memory Usage Notifications")
};
}
@@ -200,82 +200,82 @@ public final class MemoryMXBeanImpl
boolean foundOne = false;
while (it.hasNext())
{
- ListenerData data = (ListenerData) it.next();
- if (data.getListener() == listener)
- {
- it.remove();
- foundOne = true;
- }
+ ListenerData data = (ListenerData) it.next();
+ if (data.getListener() == listener)
+ {
+ it.remove();
+ foundOne = true;
+ }
}
if (!foundOne)
throw new ListenerNotFoundException("The specified listener, " + listener +
- "is not registered with this bean.");
+ "is not registered with this bean.");
}
public void removeNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws ListenerNotFoundException
{
if (!(listeners.remove(new ListenerData(listener, filter, passback))))
{
- throw new ListenerNotFoundException("The specified listener, " + listener +
- " with filter " + filter +
- "and passback " + passback +
- ", is not registered with this bean.");
+ throw new ListenerNotFoundException("The specified listener, " + listener +
+ " with filter " + filter +
+ "and passback " + passback +
+ ", is not registered with this bean.");
}
}
void fireNotification(String type, String poolName, long init, long used,
- long committed, long max, long count)
+ long committed, long max, long count)
{
Notification notif = new Notification(type, this, notificationCount);
MemoryUsage usage = new MemoryUsage(init, used, committed, max);
CompositeData data;
try
{
- data = new CompositeDataSupport(notifType,
- new String[] {
- "poolName", "usage", "count"
- },
- new Object[] {
- poolName, usage, Long.valueOf(count)
- });
+ data = new CompositeDataSupport(notifType,
+ new String[] {
+ "poolName", "usage", "count"
+ },
+ new Object[] {
+ poolName, usage, Long.valueOf(count)
+ });
}
catch (OpenDataException e)
{
- throw new IllegalStateException("Something went wrong in creating " +
- "the composite data instance.", e);
+ throw new IllegalStateException("Something went wrong in creating " +
+ "the composite data instance.", e);
}
notif.setUserData(data);
Iterator it = listeners.iterator();
while (it.hasNext())
{
- ListenerData ldata = (ListenerData) it.next();
- NotificationFilter filter = ldata.getFilter();
- if (filter == null || filter.isNotificationEnabled(notif))
- ldata.getListener().handleNotification(notif, ldata.getPassback());
+ ListenerData ldata = (ListenerData) it.next();
+ NotificationFilter filter = ldata.getFilter();
+ if (filter == null || filter.isNotificationEnabled(notif))
+ ldata.getListener().handleNotification(notif, ldata.getPassback());
}
++notificationCount;
}
void fireThresholdExceededNotification(String poolName, long init,
- long used, long committed,
- long max, long count)
+ long used, long committed,
+ long max, long count)
{
fireNotification(MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED,
- poolName, init, used, committed, max, count);
+ poolName, init, used, committed, max, count);
}
void fireCollectionThresholdExceededNotification(String poolName,
- long init,
- long used,
- long committed,
- long max,
- long count)
+ long init,
+ long used,
+ long committed,
+ long max,
+ long count)
{
fireNotification(MemoryNotificationInfo.MEMORY_COLLECTION_THRESHOLD_EXCEEDED,
- poolName, init, used, committed, max, count);
+ poolName, init, used, committed, max, count);
}
}
diff --git a/gnu/java/lang/management/MemoryManagerMXBeanImpl.java b/gnu/java/lang/management/MemoryManagerMXBeanImpl.java
index 5766af9cc..51d0ed972 100644
--- a/gnu/java/lang/management/MemoryManagerMXBeanImpl.java
+++ b/gnu/java/lang/management/MemoryManagerMXBeanImpl.java
@@ -42,7 +42,7 @@ import java.lang.management.MemoryManagerMXBean;
import javax.management.NotCompliantMBeanException;
/**
- * Provides access to information about one of the memory
+ * Provides access to information about one of the memory
* managers used by the current invocation of the
* virtual machine. An instance of this bean for each memory
* manager is obtained by calling
diff --git a/gnu/java/lang/management/MemoryPoolMXBeanImpl.java b/gnu/java/lang/management/MemoryPoolMXBeanImpl.java
index e314ca164..d92e6703f 100644
--- a/gnu/java/lang/management/MemoryPoolMXBeanImpl.java
+++ b/gnu/java/lang/management/MemoryPoolMXBeanImpl.java
@@ -46,7 +46,7 @@ import java.lang.management.MemoryUsage;
import javax.management.NotCompliantMBeanException;
/**
- * Provides access to information about one of the memory
+ * Provides access to information about one of the memory
* resources or pools used by the current invocation of the
* virtual machine. An instance of this bean for each memory
* pool is obtained by calling
@@ -68,13 +68,13 @@ public final class MemoryPoolMXBeanImpl
/**
* Constant for collection usage threshold.
*/
- private static final String COLLECTION_USAGE_THRESHOLD =
+ private static final String COLLECTION_USAGE_THRESHOLD =
"gnu.java.lang.management.CollectionUsageThresholdSupport";
/**
* Constant for thread time support.
*/
- private static final String USAGE_THRESHOLD =
+ private static final String USAGE_THRESHOLD =
"gnu.java.lang.management.UsageThresholdSupport";
/**
@@ -104,7 +104,7 @@ public final class MemoryPoolMXBeanImpl
return VMMemoryPoolMXBeanImpl.getCollectionUsageThreshold(name);
else
throw new UnsupportedOperationException("A collection usage "+
- "threshold is not supported.");
+ "threshold is not supported.");
}
public long getCollectionUsageThresholdCount()
@@ -113,7 +113,7 @@ public final class MemoryPoolMXBeanImpl
return VMMemoryPoolMXBeanImpl.getCollectionUsageThresholdCount(name);
else
throw new UnsupportedOperationException("A collection usage "+
- "threshold is not supported.");
+ "threshold is not supported.");
}
public String[] getMemoryManagerNames()
@@ -136,7 +136,7 @@ public final class MemoryPoolMXBeanImpl
public MemoryType getType()
{
- return
+ return
MemoryType.valueOf(VMMemoryPoolMXBeanImpl.getType(name));
}
@@ -154,7 +154,7 @@ public final class MemoryPoolMXBeanImpl
return VMMemoryPoolMXBeanImpl.getUsageThreshold(name);
else
throw new UnsupportedOperationException("A usage threshold " +
- "is not supported.");
+ "is not supported.");
}
public long getUsageThresholdCount()
@@ -163,7 +163,7 @@ public final class MemoryPoolMXBeanImpl
return VMMemoryPoolMXBeanImpl.getUsageThresholdCount(name);
else
throw new UnsupportedOperationException("A usage threshold " +
- "is not supported.");
+ "is not supported.");
}
public boolean isCollectionUsageThresholdExceeded()
@@ -202,12 +202,12 @@ public final class MemoryPoolMXBeanImpl
checkControlPermissions();
if (threshold < 0)
throw new IllegalArgumentException("Threshold of " + threshold +
- "is less than zero.");
+ "is less than zero.");
if (isCollectionUsageThresholdSupported())
VMMemoryPoolMXBeanImpl.setCollectionUsageThreshold(name, threshold);
else
throw new UnsupportedOperationException("A collection usage "+
- "threshold is not supported.");
+ "threshold is not supported.");
}
public void setUsageThreshold(long threshold)
@@ -215,13 +215,12 @@ public final class MemoryPoolMXBeanImpl
checkControlPermissions();
if (threshold < 0)
throw new IllegalArgumentException("Threshold of " + threshold +
- "is less than zero.");
+ "is less than zero.");
if (isUsageThresholdSupported())
VMMemoryPoolMXBeanImpl.setUsageThreshold(name, threshold);
else
throw new UnsupportedOperationException("A usage threshold " +
- "is not supported.");
+ "is not supported.");
}
}
-
diff --git a/gnu/java/lang/management/OperatingSystemMXBeanImpl.java b/gnu/java/lang/management/OperatingSystemMXBeanImpl.java
index 07fb7bf03..7f5a9586c 100644
--- a/gnu/java/lang/management/OperatingSystemMXBeanImpl.java
+++ b/gnu/java/lang/management/OperatingSystemMXBeanImpl.java
@@ -43,7 +43,7 @@ import javax.management.NotCompliantMBeanException;
/**
* Provides access to information about the underlying operating
- * system.
+ * system.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -91,5 +91,5 @@ public final class OperatingSystemMXBeanImpl
{
return System.getProperty("os.version");
}
-
+
}
diff --git a/gnu/java/lang/management/RuntimeMXBeanImpl.java b/gnu/java/lang/management/RuntimeMXBeanImpl.java
index e3ebd162e..8db943bb6 100644
--- a/gnu/java/lang/management/RuntimeMXBeanImpl.java
+++ b/gnu/java/lang/management/RuntimeMXBeanImpl.java
@@ -92,8 +92,8 @@ public final class RuntimeMXBeanImpl
return bootClassPath;
else
throw
- new UnsupportedOperationException("Retrieving the boot " +
- "classpath is not supported.");
+ new UnsupportedOperationException("Retrieving the boot " +
+ "classpath is not supported.");
}
public String getClassPath()
@@ -151,16 +151,16 @@ public final class RuntimeMXBeanImpl
Iterator entries = props.entrySet().iterator();
while (entries.hasNext())
{
- Map.Entry next = (Map.Entry) entries.next();
- Object key = next.getKey();
- Object value = next.getValue();
- if (key instanceof String &&
- value instanceof String)
- map.put(key, value);
+ Map.Entry next = (Map.Entry) entries.next();
+ Object key = next.getKey();
+ Object value = next.getValue();
+ if (key instanceof String &&
+ value instanceof String)
+ map.put(key, value);
}
return map;
}
-
+
public long getUptime()
{
return new Date().getTime() - getStartTime();
@@ -185,11 +185,11 @@ public final class RuntimeMXBeanImpl
{
if (bootClassPath == null)
{
- bootClassPath = SystemProperties.getProperty(JAVA_BOOT_CLASS_PATH);
- if (bootClassPath == null)
- bootClassPath = SystemProperties.getProperty(SUN_BOOT_CLASS_PATH);
- if (bootClassPath == null)
- bootClassPathSupported = false;
+ bootClassPath = SystemProperties.getProperty(JAVA_BOOT_CLASS_PATH);
+ if (bootClassPath == null)
+ bootClassPath = SystemProperties.getProperty(SUN_BOOT_CLASS_PATH);
+ if (bootClassPath == null)
+ bootClassPathSupported = false;
}
return bootClassPathSupported;
}
diff --git a/gnu/java/lang/management/ThreadMXBeanImpl.java b/gnu/java/lang/management/ThreadMXBeanImpl.java
index 5d0282301..97040997b 100644
--- a/gnu/java/lang/management/ThreadMXBeanImpl.java
+++ b/gnu/java/lang/management/ThreadMXBeanImpl.java
@@ -45,7 +45,7 @@ import java.lang.management.ThreadMXBean;
import javax.management.NotCompliantMBeanException;
/**
- * Provides access to information about the threads
+ * Provides access to information about the threads
* of the virtual machine. An instance of this bean is
* obtained by calling
* {@link ManagementFactory#getThreadMXBean()}.
@@ -63,25 +63,25 @@ public final class ThreadMXBeanImpl
/**
* Constant for current thread time support.
*/
- private static final String CURRENT_THREAD_TIME_SUPPORT =
+ private static final String CURRENT_THREAD_TIME_SUPPORT =
"gnu.java.lang.management.CurrentThreadTimeSupport";
/**
* Constant for thread time support.
*/
- private static final String THREAD_TIME_SUPPORT =
+ private static final String THREAD_TIME_SUPPORT =
"gnu.java.lang.management.ThreadTimeSupport";
/**
* Constant for thread contention support.
*/
- private static final String CONTENTION_SUPPORT =
+ private static final String CONTENTION_SUPPORT =
"gnu.java.lang.management.ThreadContentionSupport";
/**
* Constant for initial value of thread time support.
*/
- private static final String TIME_ENABLED =
+ private static final String TIME_ENABLED =
"gnu.java.lang.management.ThreadTimeInitallyEnabled";
/**
@@ -125,10 +125,10 @@ public final class ThreadMXBeanImpl
}
public ThreadInfo[] dumpAllThreads(boolean lockedMonitors,
- boolean lockedSynchronizers)
+ boolean lockedSynchronizers)
{
return getThreadInfo(getAllThreadIds(), lockedMonitors,
- lockedSynchronizers);
+ lockedSynchronizers);
}
public long[] findDeadlockedThreads()
@@ -136,8 +136,8 @@ public final class ThreadMXBeanImpl
checkMonitorPermissions();
if (!isSynchronizerUsageSupported())
throw new UnsupportedOperationException("Ownable synchronizer usage " +
- "monitoring is not provided " +
- "by this VM.");
+ "monitoring is not provided " +
+ "by this VM.");
return VMThreadMXBeanImpl.findDeadlockedThreads();
}
@@ -157,7 +157,7 @@ public final class ThreadMXBeanImpl
{
if (!isCurrentThreadCpuTimeSupported())
throw new UnsupportedOperationException("Current thread CPU " +
- "time not supported.");
+ "time not supported.");
if (!timeEnabled)
return -1;
return VMThreadMXBeanImpl.getCurrentThreadCpuTime();
@@ -167,7 +167,7 @@ public final class ThreadMXBeanImpl
{
if (!isCurrentThreadCpuTimeSupported())
throw new UnsupportedOperationException("Current thread user " +
- "time not supported.");
+ "time not supported.");
if (!timeEnabled)
return -1;
return VMThreadMXBeanImpl.getCurrentThreadUserTime();
@@ -192,7 +192,7 @@ public final class ThreadMXBeanImpl
{
if (!isThreadCpuTimeSupported())
throw new UnsupportedOperationException("Thread CPU time not " +
- "supported.");
+ "supported.");
if (id <= 0)
throw new IllegalArgumentException("Invalid thread id: " + id);
if (!timeEnabled)
@@ -228,32 +228,32 @@ public final class ThreadMXBeanImpl
ThreadInfo[] infos = new ThreadInfo[ids.length];
for (int a = 0; a < ids.length; ++a)
{
- if (ids[a] <= 0)
- throw new IllegalArgumentException("Invalid thread id " + a +
- ": " + ids[a]);
- infos[a] = VMThreadMXBeanImpl.getThreadInfoForId(ids[a], maxDepth);
+ if (ids[a] <= 0)
+ throw new IllegalArgumentException("Invalid thread id " + a +
+ ": " + ids[a]);
+ infos[a] = VMThreadMXBeanImpl.getThreadInfoForId(ids[a], maxDepth);
}
return infos;
}
public ThreadInfo[] getThreadInfo(long[] ids, boolean lockedMonitors,
- boolean lockedSynchronizers)
+ boolean lockedSynchronizers)
{
checkMonitorPermissions();
if (lockedMonitors && !isObjectMonitorUsageSupported())
throw new UnsupportedOperationException("Monitor usage monitoring is " +
- "not provided by this VM.");
+ "not provided by this VM.");
if (lockedSynchronizers && !isSynchronizerUsageSupported())
throw new UnsupportedOperationException("Ownable synchronizer usage " +
- "monitoring is not provided " +
- "by this VM.");
+ "monitoring is not provided " +
+ "by this VM.");
ThreadInfo[] infos = getThreadInfo(ids, Integer.MAX_VALUE);
if (lockedMonitors)
for (ThreadInfo info : infos)
- VMThreadMXBeanImpl.getMonitorInfo(info);
+ VMThreadMXBeanImpl.getMonitorInfo(info);
if (lockedSynchronizers)
for (ThreadInfo info : infos)
- VMThreadMXBeanImpl.getLockInfo(info);
+ VMThreadMXBeanImpl.getLockInfo(info);
return infos;
}
@@ -261,7 +261,7 @@ public final class ThreadMXBeanImpl
{
if (!isThreadCpuTimeSupported())
throw new UnsupportedOperationException("Thread user time not " +
- "supported.");
+ "supported.");
if (id <= 0)
throw new IllegalArgumentException("Invalid thread id: " + id);
if (!timeEnabled)
@@ -297,7 +297,7 @@ public final class ThreadMXBeanImpl
return contentionEnabled;
else
throw new UnsupportedOperationException("Contention monitoring " +
- "not supported.");
+ "not supported.");
}
public boolean isThreadContentionMonitoringSupported()
@@ -308,13 +308,13 @@ public final class ThreadMXBeanImpl
public boolean isThreadCpuTimeEnabled()
{
if (isThreadCpuTimeSupported() ||
- isCurrentThreadCpuTimeSupported())
+ isCurrentThreadCpuTimeSupported())
return timeEnabled;
else
throw new UnsupportedOperationException("Thread time not " +
- "supported.");
+ "supported.");
}
-
+
public boolean isThreadCpuTimeSupported()
{
return SystemProperties.getProperty(THREAD_TIME_SUPPORT) != null;
@@ -325,7 +325,7 @@ public final class ThreadMXBeanImpl
checkControlPermissions();
VMThreadMXBeanImpl.resetPeakThreadCount();
}
-
+
public void setThreadContentionMonitoringEnabled(boolean enable)
{
checkControlPermissions();
@@ -333,19 +333,18 @@ public final class ThreadMXBeanImpl
contentionEnabled = enable;
else
throw new UnsupportedOperationException("Contention monitoring " +
- "not supported.");
- }
-
+ "not supported.");
+ }
+
public void setThreadCpuTimeEnabled(boolean enable)
{
checkControlPermissions();
if (isThreadCpuTimeSupported() ||
- isCurrentThreadCpuTimeSupported())
+ isCurrentThreadCpuTimeSupported())
timeEnabled = enable;
else
throw new UnsupportedOperationException("Thread time not " +
- "supported.");
+ "supported.");
}
}
-
diff --git a/gnu/java/lang/reflect/TypeSignature.java b/gnu/java/lang/reflect/TypeSignature.java
index 612058dbf..c0a3ab0a5 100644
--- a/gnu/java/lang/reflect/TypeSignature.java
+++ b/gnu/java/lang/reflect/TypeSignature.java
@@ -176,7 +176,7 @@ public class TypeSignature
* @see #getClassForEncoding(String, boolean)
*/
public static Class getClassForEncoding(String type_code, boolean descriptor,
- ClassLoader loader)
+ ClassLoader loader)
throws ClassNotFoundException
{
if (descriptor)