natives = getFlavorToNative().get(dataFlavor);
if (natives != null && !natives.isEmpty()) {
if (retval == null) {
- retval = new ArrayList<>();
+ retval = new LinkedHashSet<>();
}
retval.addAll(natives);
}
}
- return retval;
+ return retval == null ? null : new ArrayList<>(retval);
}
}
diff --git a/src/share/classes/java/beans/IndexedPropertyDescriptor.java b/src/share/classes/java/beans/IndexedPropertyDescriptor.java
index 866d35ba56cd92475c67ee780e9c3501110bba5f..f38c35774fee43105919c3ba10ad1f5e10224e22 100644
--- a/src/share/classes/java/beans/IndexedPropertyDescriptor.java
+++ b/src/share/classes/java/beans/IndexedPropertyDescriptor.java
@@ -373,12 +373,13 @@ public class IndexedPropertyDescriptor extends PropertyDescriptor {
if (params[0] != Integer.TYPE) {
throw new IntrospectionException("non int index to indexed write method");
}
- if (indexedPropertyType != null && indexedPropertyType != params[1]) {
+ if (indexedPropertyType == null || params[1].isAssignableFrom(indexedPropertyType)) {
+ indexedPropertyType = params[1];
+ } else if (!indexedPropertyType.isAssignableFrom(params[1])) {
throw new IntrospectionException(
"type mismatch between indexed read and indexed write methods: "
+ getName());
}
- indexedPropertyType = params[1];
}
Class> propertyType = getPropertyType();
if (propertyType != null && (!propertyType.isArray() ||
diff --git a/src/share/classes/java/beans/Introspector.java b/src/share/classes/java/beans/Introspector.java
index fc8b21856d6e91fe2f19074f098d23281221f85e..61745dd9efa655af4b6deb6eefe5633304623823 100644
--- a/src/share/classes/java/beans/Introspector.java
+++ b/src/share/classes/java/beans/Introspector.java
@@ -684,8 +684,7 @@ public class Introspector {
ipd = (IndexedPropertyDescriptor)pd;
if (ipd.getIndexedWriteMethod() != null) {
if (igpd != null) {
- if (igpd.getIndexedPropertyType()
- == ipd.getIndexedPropertyType()) {
+ if (isAssignable(igpd.getIndexedPropertyType(), ipd.getIndexedPropertyType())) {
if (ispd != null) {
ispd = new IndexedPropertyDescriptor(ispd, ipd);
} else {
@@ -703,7 +702,7 @@ public class Introspector {
} else {
if (pd.getWriteMethod() != null) {
if (gpd != null) {
- if (gpd.getPropertyType() == pd.getPropertyType()) {
+ if (isAssignable(gpd.getPropertyType(), pd.getPropertyType())) {
if (spd != null) {
spd = new PropertyDescriptor(spd, pd);
} else {
@@ -806,6 +805,10 @@ public class Introspector {
}
}
+ private static boolean isAssignable(Class> current, Class> candidate) {
+ return current == null ? candidate == null : current.isAssignableFrom(candidate);
+ }
+
/**
* Adds the property descriptor to the indexedproperty descriptor only if the
* types are the same.
diff --git a/src/share/classes/java/io/DataInput.java b/src/share/classes/java/io/DataInput.java
index c61aeb58edafb99a52ef1d8785a0745a6517f711..3e0f0ddbd22b05d3937356f42631359c49c262c6 100644
--- a/src/share/classes/java/io/DataInput.java
+++ b/src/share/classes/java/io/DataInput.java
@@ -444,7 +444,7 @@ interface DataInput {
* a {@code double} value. It does this
* by first constructing a {@code long}
* value in exactly the manner
- * of the {@code readlong}
+ * of the {@code readLong}
* method, then converting this {@code long}
* value to a {@code double} in exactly
* the manner of the method {@code Double.longBitsToDouble}.
diff --git a/src/share/classes/java/io/ObjectOutputStream.java b/src/share/classes/java/io/ObjectOutputStream.java
index c851b3a641a6825d6962561b71d6158de52d9669..612bb4eb16b1768d4da4e10e3c5593eda7fe9912 100644
--- a/src/share/classes/java/io/ObjectOutputStream.java
+++ b/src/share/classes/java/io/ObjectOutputStream.java
@@ -1248,7 +1248,7 @@ public class ObjectOutputStream
handles.assign(unshared ? null : desc);
Class> cl = desc.forClass();
- Class[] ifaces = cl.getInterfaces();
+ Class>[] ifaces = cl.getInterfaces();
bout.writeInt(ifaces.length);
for (int i = 0; i < ifaces.length; i++) {
bout.writeUTF(ifaces[i].getName());
diff --git a/src/share/classes/java/io/ObjectStreamClass.java b/src/share/classes/java/io/ObjectStreamClass.java
index 04873c8a85dbb9b3bb8ccd0a181e24ed85c0fbe4..5667690a74909ecba02660dc9392abab1ba24d19 100644
--- a/src/share/classes/java/io/ObjectStreamClass.java
+++ b/src/share/classes/java/io/ObjectStreamClass.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1746,7 +1746,7 @@ public class ObjectStreamClass implements Serializable {
dout.writeUTF("()V");
}
- Constructor[] cons = cl.getDeclaredConstructors();
+ Constructor>[] cons = cl.getDeclaredConstructors();
MemberSignature[] consSigs = new MemberSignature[cons.length];
for (int i = 0; i < cons.length; i++) {
consSigs[i] = new MemberSignature(cons[i]);
diff --git a/src/share/classes/java/lang/String.java b/src/share/classes/java/lang/String.java
index 9223c0ab54f93af8f2ffde71dc458f2155cd1c22..e0a73d557527b062f578ae1aa2ff029e4d3a9dfe 100644
--- a/src/share/classes/java/lang/String.java
+++ b/src/share/classes/java/lang/String.java
@@ -122,14 +122,9 @@ public final class String
/**
* Class String is special cased within the Serialization Stream Protocol.
*
- * A String instance is written initially into an ObjectOutputStream in the
- * following format:
- *
- * {@code TC_STRING} (utf String)
- *
- * The String is written by method {@code DataOutput.writeUTF}.
- * A new handle is generated to refer to all future references to the
- * string instance within the stream.
+ * A String instance is written into an ObjectOutputStream according to
+ *
+ * Object Serialization Specification, Section 6.2, "Stream Elements"
*/
private static final ObjectStreamField[] serialPersistentFields =
new ObjectStreamField[0];
@@ -2242,6 +2237,11 @@ public final class String
* expression does not match any part of the input then the resulting array
* has just one element, namely this string.
*
+ * When there is a positive-width match at the beginning of this
+ * string then an empty leading substring is included at the beginning
+ * of the resulting array. A zero-width match at the beginning however
+ * never produces such empty leading substring.
+ *
*
The {@code limit} parameter controls the number of times the
* pattern is applied and therefore affects the length of the resulting
* array. If the limit n is greater than zero then the pattern
diff --git a/src/share/classes/java/lang/System.java b/src/share/classes/java/lang/System.java
index f68a5401704324d5e58cfcf9c83994f599890305..69d1d0fe1ef0866381a7d32fc1d8dbb5036829c1 100644
--- a/src/share/classes/java/lang/System.java
+++ b/src/share/classes/java/lang/System.java
@@ -1263,6 +1263,9 @@ public final class System {
public Thread newThreadWithAcc(Runnable target, AccessControlContext acc) {
return new Thread(target, acc);
}
+ public void invokeFinalize(Object o) throws Throwable {
+ o.finalize();
+ }
});
}
}
diff --git a/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
index a85c505c0f87b31e159e914ba3b3b197cf29a458..2fc8618cbc5ca2181c47a737de2aaf3263161661 100644
--- a/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
+++ b/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -51,7 +51,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
/* package */ final class InnerClassLambdaMetafactory extends AbstractValidatingLambdaMetafactory {
private static final Unsafe UNSAFE = Unsafe.getUnsafe();
- private static final int CLASSFILE_VERSION = 51;
+ private static final int CLASSFILE_VERSION = 52;
private static final String METHOD_DESCRIPTOR_VOID = Type.getMethodDescriptor(Type.VOID_TYPE);
private static final String JAVA_LANG_OBJECT = "java/lang/Object";
private static final String NAME_CTOR = "";
@@ -465,7 +465,9 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
convertArgumentTypes(methodType);
// Invoke the method we want to forward to
- visitMethodInsn(invocationOpcode(), implMethodClassName, implMethodName, implMethodDesc);
+ visitMethodInsn(invocationOpcode(), implMethodClassName,
+ implMethodName, implMethodDesc,
+ implDefiningClass.isInterface());
// Convert the return value (if any) and return it
// Note: if adapting from non-void to void, the 'return'
diff --git a/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
index 639b3628fa5a950339e3812539a98e5ad0f93834..5a3ee424b1af7df8dffc6593848298962dc5234b 100644
--- a/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
+++ b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
@@ -275,7 +275,7 @@ class InvokerBytecodeGenerator {
*/
private void classFilePrologue() {
cw = new ClassWriter(ClassWriter.COMPUTE_MAXS + ClassWriter.COMPUTE_FRAMES);
- cw.visit(Opcodes.V1_6, Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL + Opcodes.ACC_SUPER, className, null, superName, null);
+ cw.visit(Opcodes.V1_8, Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL + Opcodes.ACC_SUPER, className, null, superName, null);
cw.visitSource(sourceFile, null);
String invokerDesc = invokerType.toMethodDescriptorString();
@@ -646,7 +646,8 @@ class InvokerBytecodeGenerator {
// invocation
if (member.isMethod()) {
mtype = member.getMethodType().toMethodDescriptorString();
- mv.visitMethodInsn(refKindOpcode(refKind), cname, mname, mtype);
+ mv.visitMethodInsn(refKindOpcode(refKind), cname, mname, mtype,
+ member.getDeclaringClass().isInterface());
} else {
mtype = MethodType.toFieldDescriptorString(member.getFieldType());
mv.visitFieldInsn(refKindOpcode(refKind), cname, mname, mtype);
diff --git a/src/share/classes/java/lang/invoke/MethodHandleImpl.java b/src/share/classes/java/lang/invoke/MethodHandleImpl.java
index 0d6ed2da06aaeabfca578c37e1d036f0e6f7743c..eca236ce308fa7969243808155f52cbfc2ff1ea6 100644
--- a/src/share/classes/java/lang/invoke/MethodHandleImpl.java
+++ b/src/share/classes/java/lang/invoke/MethodHandleImpl.java
@@ -744,8 +744,11 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
MethodHandle ginvoker = GuardWithCatch.INVOKES[nargs].bindReceiver(gguard);
return makePairwiseConvert(ginvoker, type, 2);
} else {
+ target = target.asType(type.changeReturnType(Object.class));
MethodHandle gtarget = makeSpreadArguments(target, Object[].class, 0, nargs);
- catcher = catcher.asType(ctype.changeParameterType(0, Throwable.class));
+ MethodType catcherType = ctype.changeParameterType(0, Throwable.class)
+ .changeReturnType(Object.class);
+ catcher = catcher.asType(catcherType);
MethodHandle gcatcher = makeSpreadArguments(catcher, Object[].class, 1, nargs);
GuardWithCatch gguard = new GuardWithCatch(gtarget, exType, gcatcher);
if (gtarget == null || gcatcher == null) throw new InternalError();
diff --git a/src/share/classes/java/lang/invoke/MethodType.java b/src/share/classes/java/lang/invoke/MethodType.java
index cfef437cda6d7b00ac816bb1b94ee96d9217d69e..214ca6ce48ca4337c6159376e83aae95520df140 100644
--- a/src/share/classes/java/lang/invoke/MethodType.java
+++ b/src/share/classes/java/lang/invoke/MethodType.java
@@ -32,6 +32,7 @@ import java.lang.ref.ReferenceQueue;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import java.util.Objects;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentHashMap;
import sun.invoke.util.BytecodeDescriptor;
@@ -98,13 +99,25 @@ class MethodType implements java.io.Serializable {
private @Stable MethodTypeForm form; // erased form, plus cached data about primitives
private @Stable MethodType wrapAlt; // alternative wrapped/unwrapped version
private @Stable Invokers invokers; // cache of handy higher-order adapters
+ private @Stable String methodDescriptor; // cache for toMethodDescriptorString
/**
* Check the given parameters for validity and store them into the final fields.
*/
- private MethodType(Class> rtype, Class>[] ptypes) {
+ private MethodType(Class> rtype, Class>[] ptypes, boolean trusted) {
checkRtype(rtype);
checkPtypes(ptypes);
+ this.rtype = rtype;
+ // defensively copy the array passed in by the user
+ this.ptypes = trusted ? ptypes : Arrays.copyOf(ptypes, ptypes.length);
+ }
+
+ /**
+ * Construct a temporary unchecked instance of MethodType for use only as a key to the intern table.
+ * Does not check the given parameters for validity, and must be discarded after it is used as a searching key.
+ * The parameters are reversed for this constructor, so that is is not accidentally used.
+ */
+ private MethodType(Class>[] ptypes, Class> rtype) {
this.rtype = rtype;
this.ptypes = ptypes;
}
@@ -146,20 +159,21 @@ class MethodType implements java.io.Serializable {
/*non-public*/ static final int MAX_MH_INVOKER_ARITY = MAX_MH_ARITY-1; // deduct one more for invoker
private static void checkRtype(Class> rtype) {
- rtype.equals(rtype); // null check
+ Objects.requireNonNull(rtype);
}
- private static int checkPtype(Class> ptype) {
- ptype.getClass(); //NPE
+ private static void checkPtype(Class> ptype) {
+ Objects.requireNonNull(ptype);
if (ptype == void.class)
throw newIllegalArgumentException("parameter type cannot be void");
- if (ptype == double.class || ptype == long.class) return 1;
- return 0;
}
/** Return number of extra slots (count of long/double args). */
private static int checkPtypes(Class>[] ptypes) {
int slots = 0;
for (Class> ptype : ptypes) {
- slots += checkPtype(ptype);
+ checkPtype(ptype);
+ if (ptype == double.class || ptype == long.class) {
+ slots++;
+ }
}
checkSlotCount(ptypes.length + slots);
return slots;
@@ -284,20 +298,16 @@ class MethodType implements java.io.Serializable {
*/
/*trusted*/ static
MethodType makeImpl(Class> rtype, Class>[] ptypes, boolean trusted) {
+ MethodType mt = internTable.get(new MethodType(ptypes, rtype));
+ if (mt != null)
+ return mt;
if (ptypes.length == 0) {
ptypes = NO_PTYPES; trusted = true;
}
- MethodType mt1 = new MethodType(rtype, ptypes);
- MethodType mt0 = internTable.get(mt1);
- if (mt0 != null)
- return mt0;
- if (!trusted)
- // defensively copy the array passed in by the user
- mt1 = new MethodType(rtype, ptypes.clone());
+ mt = new MethodType(rtype, ptypes, trusted);
// promote the object to the Real Thing, and reprobe
- MethodTypeForm form = MethodTypeForm.findForm(mt1);
- mt1.form = form;
- return internTable.add(mt1);
+ mt.form = MethodTypeForm.findForm(mt);
+ return internTable.add(mt);
}
private static final MethodType[] objectOnlyTypes = new MethodType[20];
@@ -919,7 +929,12 @@ class MethodType implements java.io.Serializable {
* @return the bytecode type descriptor representation
*/
public String toMethodDescriptorString() {
- return BytecodeDescriptor.unparse(this);
+ String desc = methodDescriptor;
+ if (desc == null) {
+ desc = BytecodeDescriptor.unparse(this);
+ methodDescriptor = desc;
+ }
+ return desc;
}
/*non-public*/ static String toFieldDescriptorString(Class> cls) {
diff --git a/src/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java b/src/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java
index f65049df036a2261510d2736b14431400888a3b2..5d8e1bf82f5b6ef38c7642698976d2bbc7a0d290 100644
--- a/src/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java
+++ b/src/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@ import static sun.invoke.util.Wrapper.*;
class TypeConvertingMethodAdapter extends MethodVisitor {
TypeConvertingMethodAdapter(MethodVisitor mv) {
- super(Opcodes.ASM4, mv);
+ super(Opcodes.ASM5, mv);
}
private static final int NUM_WRAPPERS = Wrapper.values().length;
diff --git a/src/share/classes/java/lang/ref/Finalizer.java b/src/share/classes/java/lang/ref/Finalizer.java
index 2be6466931bde15ef19e0f5618b1dff32d69365c..f37b3e79b9caf430257fa5bc539bf4e65ed23f05 100644
--- a/src/share/classes/java/lang/ref/Finalizer.java
+++ b/src/share/classes/java/lang/ref/Finalizer.java
@@ -27,17 +27,14 @@ package java.lang.ref;
import java.security.PrivilegedAction;
import java.security.AccessController;
-
+import sun.misc.JavaLangAccess;
+import sun.misc.SharedSecrets;
+import sun.misc.VM;
final class Finalizer extends FinalReference { /* Package-private; must be in
same package as the Reference
class */
- /* A native method that invokes an arbitrary object's finalize method is
- required since the finalize method is protected
- */
- static native void invokeFinalizeMethod(Object o) throws Throwable;
-
private static ReferenceQueue queue = new ReferenceQueue<>();
private static Finalizer unfinalized = null;
private static final Object lock = new Object();
@@ -90,7 +87,7 @@ final class Finalizer extends FinalReference { /* Package-private; must
new Finalizer(finalizee);
}
- private void runFinalizer() {
+ private void runFinalizer(JavaLangAccess jla) {
synchronized (this) {
if (hasBeenFinalized()) return;
remove();
@@ -98,7 +95,8 @@ final class Finalizer extends FinalReference { /* Package-private; must
try {
Object finalizee = this.get();
if (finalizee != null && !(finalizee instanceof java.lang.Enum)) {
- invokeFinalizeMethod(finalizee);
+ jla.invokeFinalize(finalizee);
+
/* Clear stack slot containing this variable, to decrease
the chances of false retention with a conservative GC */
finalizee = null;
@@ -141,16 +139,21 @@ final class Finalizer extends FinalReference { /* Package-private; must
/* Called by Runtime.runFinalization() */
static void runFinalization() {
+ if (!VM.isBooted()) {
+ return;
+ }
+
forkSecondaryFinalizer(new Runnable() {
private volatile boolean running;
public void run() {
if (running)
return;
+ final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
running = true;
for (;;) {
Finalizer f = (Finalizer)queue.poll();
if (f == null) break;
- f.runFinalizer();
+ f.runFinalizer(jla);
}
}
});
@@ -158,11 +161,16 @@ final class Finalizer extends FinalReference { /* Package-private; must
/* Invoked by java.lang.Shutdown */
static void runAllFinalizers() {
+ if (!VM.isBooted()) {
+ return;
+ }
+
forkSecondaryFinalizer(new Runnable() {
private volatile boolean running;
public void run() {
if (running)
return;
+ final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
running = true;
for (;;) {
Finalizer f;
@@ -171,7 +179,7 @@ final class Finalizer extends FinalReference { /* Package-private; must
if (f == null) break;
unfinalized = f.next;
}
- f.runFinalizer();
+ f.runFinalizer(jla);
}}});
}
@@ -183,13 +191,25 @@ final class Finalizer extends FinalReference { /* Package-private; must
public void run() {
if (running)
return;
+
+ // Finalizer thread starts before System.initializeSystemClass
+ // is called. Wait until JavaLangAccess is available
+ while (!VM.isBooted()) {
+ // delay until VM completes initialization
+ try {
+ VM.awaitBooted();
+ } catch (InterruptedException x) {
+ // ignore and continue
+ }
+ }
+ final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
running = true;
for (;;) {
try {
Finalizer f = (Finalizer)queue.remove();
- f.runFinalizer();
+ f.runFinalizer(jla);
} catch (InterruptedException x) {
- continue;
+ // ignore and continue
}
}
}
diff --git a/src/share/classes/java/lang/reflect/Executable.java b/src/share/classes/java/lang/reflect/Executable.java
index d033e7e9300a548555f3f262877ae8d6744c1a7a..95665706c2bb368cd8ce07497b02e5bd748eec48 100644
--- a/src/share/classes/java/lang/reflect/Executable.java
+++ b/src/share/classes/java/lang/reflect/Executable.java
@@ -240,6 +240,7 @@ public abstract class Executable extends AccessibleObject
* declared or implicitly declared or neither) for the executable
* represented by this object.
*
+ * @since 1.8
* @return The number of formal parameters for the executable this
* object represents
*/
@@ -290,6 +291,7 @@ public abstract class Executable extends AccessibleObject
* have unique names, or names that are legal identifiers in the
* Java programming language (JLS 3.8).
*
+ * @since 1.8
* @throws MalformedParametersException if the class file contains
* a MethodParameters attribute that is improperly formatted.
* @return an array of {@code Parameter} objects representing all
diff --git a/src/share/classes/java/lang/reflect/Proxy.java b/src/share/classes/java/lang/reflect/Proxy.java
index f2e4eda4e62a295fa3ac2f3eb90628b188f0effb..20e62b642ca0be3827773ce443a53cb3ce76ee32 100644
--- a/src/share/classes/java/lang/reflect/Proxy.java
+++ b/src/share/classes/java/lang/reflect/Proxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -494,9 +494,10 @@ public class Proxy implements java.io.Serializable {
private final int hash;
private final WeakReference>[] refs;
+ @SuppressWarnings("unchecked")
KeyX(Class>[] interfaces) {
hash = Arrays.hashCode(interfaces);
- refs = new WeakReference[interfaces.length];
+ refs = (WeakReference>[])new WeakReference>[interfaces.length];
for (int i = 0; i < interfaces.length; i++) {
refs[i] = new WeakReference<>(interfaces[i]);
}
diff --git a/src/share/classes/java/net/HostPortrange.java b/src/share/classes/java/net/HostPortrange.java
index fc5e3d98a2063d2f8481a8fa00cb96241d5db9cb..3c924d8bfc05a605820fae0a6f9e16b1939a8248 100644
--- a/src/share/classes/java/net/HostPortrange.java
+++ b/src/share/classes/java/net/HostPortrange.java
@@ -114,7 +114,7 @@ class HostPortrange {
if (hoststr.equals("*")) {
hoststr = "";
} else if (hoststr.startsWith("*.")) {
- hoststr = hoststr.substring(1).toLowerCase(); // leave the '.' ?
+ hoststr = toLowerCase(hoststr.substring(1));
} else {
throw new IllegalArgumentException("invalid host wildcard specification");
}
@@ -147,7 +147,7 @@ class HostPortrange {
hoststr = sb.toString();
} else {
// regular domain name
- hoststr = hoststr.toLowerCase();
+ hoststr = toLowerCase(hoststr);
}
}
}
@@ -161,6 +161,38 @@ class HostPortrange {
}
}
+ static final int CASE_DIFF = 'A' - 'a';
+
+ /**
+ * Convert to lower case, and check that all chars are ascii
+ * alphanumeric, '-' or '.' only.
+ */
+ static String toLowerCase(String s) {
+ int len = s.length();
+ StringBuilder sb = null;
+
+ for (int i=0; i= 'a' && c <= 'z') || (c == '.')) {
+ if (sb != null)
+ sb.append(c);
+ } else if ((c >= '0' && c <= '9') || (c == '-')) {
+ if (sb != null)
+ sb.append(c);
+ } else if (c >= 'A' && c <= 'Z') {
+ if (sb == null) {
+ sb = new StringBuilder(len);
+ sb.append(s, 0, i);
+ }
+ sb.append((char)(c - CASE_DIFF));
+ } else {
+ throw new IllegalArgumentException("Invalid characters in hostname");
+ }
+ }
+ return sb == null ? s : sb.toString();
+ }
+
+
public boolean literal() {
return literal;
}
diff --git a/src/share/classes/java/net/InetAddress.java b/src/share/classes/java/net/InetAddress.java
index 3bb7249d72a754ef333ca02b7b6625de98cb6ae2..99ec1acb97f62fbb9ce7646aa5529351a9df60ed 100644
--- a/src/share/classes/java/net/InetAddress.java
+++ b/src/share/classes/java/net/InetAddress.java
@@ -1135,7 +1135,7 @@ class InetAddress implements java.io.Serializable {
// see if it is IPv4 address
addr = IPAddressUtil.textToNumericFormatV4(host);
if (addr == null) {
- // see if it is IPv6 address
+ // This is supposed to be an IPv6 literal
// Check if a numeric or string zone id is present
int pos;
if ((pos=host.indexOf ("%")) != -1) {
@@ -1144,7 +1144,9 @@ class InetAddress implements java.io.Serializable {
ifname = host.substring (pos+1);
}
}
- addr = IPAddressUtil.textToNumericFormatV6(host);
+ if ((addr = IPAddressUtil.textToNumericFormatV6(host)) == null && host.contains(":")) {
+ throw new UnknownHostException(host + ": invalid IPv6 address");
+ }
} else if (ipv6Expected) {
// Means an IPv4 litteral between brackets!
throw new UnknownHostException("["+host+"]");
@@ -1162,10 +1164,10 @@ class InetAddress implements java.io.Serializable {
}
return ret;
}
- } else if (ipv6Expected) {
- // We were expecting an IPv6 Litteral, but got something else
- throw new UnknownHostException("["+host+"]");
- }
+ } else if (ipv6Expected) {
+ // We were expecting an IPv6 Litteral, but got something else
+ throw new UnknownHostException("["+host+"]");
+ }
return getAllByName0(host, reqAddr, true);
}
diff --git a/src/share/classes/java/net/URLPermission.java b/src/share/classes/java/net/URLPermission.java
index 7ad56a1c20f77111a63396ed70aba6f430cc0bdb..13472a9e5ab28083786297f7327833d0cbc2f5f6 100644
--- a/src/share/classes/java/net/URLPermission.java
+++ b/src/share/classes/java/net/URLPermission.java
@@ -426,7 +426,10 @@ public final class URLPermission extends Permission {
this.ssp = url.substring(delim + 1);
if (!ssp.startsWith("//")) {
- this.authority = new Authority(scheme, ssp.toLowerCase());
+ if (!ssp.equals("*")) {
+ throw new IllegalArgumentException("invalid URL string");
+ }
+ this.authority = new Authority(scheme, "*");
return;
}
String authpath = ssp.substring(2);
diff --git a/src/share/classes/java/nio/file/TempFileHelper.java b/src/share/classes/java/nio/file/TempFileHelper.java
index 7c348d5c8ddd20ffe005fcd000e07d08255e7da4..8d171dee269865f905fa90325a8c01ed7fa91168 100644
--- a/src/share/classes/java/nio/file/TempFileHelper.java
+++ b/src/share/classes/java/nio/file/TempFileHelper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -81,7 +81,7 @@ class TempFileHelper {
String prefix,
String suffix,
boolean createDirectory,
- FileAttribute[] attrs)
+ FileAttribute>[] attrs)
throws IOException
{
if (prefix == null)
@@ -155,7 +155,7 @@ class TempFileHelper {
static Path createTempFile(Path dir,
String prefix,
String suffix,
- FileAttribute[] attrs)
+ FileAttribute>[] attrs)
throws IOException
{
return create(dir, prefix, suffix, false, attrs);
@@ -167,7 +167,7 @@ class TempFileHelper {
*/
static Path createTempDirectory(Path dir,
String prefix,
- FileAttribute[] attrs)
+ FileAttribute>[] attrs)
throws IOException
{
return create(dir, prefix, null, true, attrs);
diff --git a/src/share/classes/java/time/format/DateTimeParseContext.java b/src/share/classes/java/time/format/DateTimeParseContext.java
index 3157747a6f712967af0342de098ce9be8e40720c..026a595896c11796caa1941be91005d2193bde8b 100644
--- a/src/share/classes/java/time/format/DateTimeParseContext.java
+++ b/src/share/classes/java/time/format/DateTimeParseContext.java
@@ -369,7 +369,8 @@ final class DateTimeParseContext {
Objects.requireNonNull(chrono, "chrono");
currentParsed().chrono = chrono;
if (chronoListeners != null && !chronoListeners.isEmpty()) {
- Consumer[] tmp = new Consumer[1];
+ @SuppressWarnings({"rawtypes", "unchecked"})
+ Consumer[] tmp = new Consumer[1];
Consumer[] listeners = chronoListeners.toArray(tmp);
chronoListeners.clear();
for (Consumer l : listeners) {
diff --git a/src/share/classes/java/time/format/Parsed.java b/src/share/classes/java/time/format/Parsed.java
index 38eda948f8291a5c6ec3384d04127916ec25369f..71961003e23a4d8596e281593fb8184389185808 100644
--- a/src/share/classes/java/time/format/Parsed.java
+++ b/src/share/classes/java/time/format/Parsed.java
@@ -266,14 +266,14 @@ final class Parsed implements TemporalAccessor {
TemporalAccessor resolvedObject = targetField.resolve(fieldValues, this, resolverStyle);
if (resolvedObject != null) {
if (resolvedObject instanceof ChronoZonedDateTime) {
- ChronoZonedDateTime czdt = (ChronoZonedDateTime) resolvedObject;
+ ChronoZonedDateTime> czdt = (ChronoZonedDateTime) resolvedObject;
if (zone.equals(czdt.getZone()) == false) {
throw new DateTimeException("ChronoZonedDateTime must use the effective parsed zone: " + zone);
}
resolvedObject = czdt.toLocalDateTime();
}
if (resolvedObject instanceof ChronoLocalDateTime) {
- ChronoLocalDateTime cldt = (ChronoLocalDateTime) resolvedObject;
+ ChronoLocalDateTime> cldt = (ChronoLocalDateTime) resolvedObject;
updateCheckConflict(cldt.toLocalTime(), Period.ZERO);
updateCheckConflict(cldt.toLocalDate());
changedCount++;
diff --git a/src/share/classes/java/util/Base64.java b/src/share/classes/java/util/Base64.java
index db281388791c2b06399b46dabd4abf62cd183530..ac5a5d6be9226cff3e995cb43068b29c9212cedc 100644
--- a/src/share/classes/java/util/Base64.java
+++ b/src/share/classes/java/util/Base64.java
@@ -138,7 +138,7 @@ public class Base64 {
if (lineLength <= 0) {
return Encoder.RFC4648;
}
- return new Encoder(false, lineSeparator, lineLength >> 2 << 2);
+ return new Encoder(false, lineSeparator, lineLength >> 2 << 2, true);
}
/**
@@ -192,11 +192,13 @@ public class Base64 {
private final byte[] newline;
private final int linemax;
private final boolean isURL;
+ private final boolean doPadding;
- private Encoder(boolean isURL, byte[] newline, int linemax) {
+ private Encoder(boolean isURL, byte[] newline, int linemax, boolean doPadding) {
this.isURL = isURL;
this.newline = newline;
this.linemax = linemax;
+ this.doPadding = doPadding;
}
/**
@@ -228,9 +230,22 @@ public class Base64 {
private static final int MIMELINEMAX = 76;
private static final byte[] CRLF = new byte[] {'\r', '\n'};
- static final Encoder RFC4648 = new Encoder(false, null, -1);
- static final Encoder RFC4648_URLSAFE = new Encoder(true, null, -1);
- static final Encoder RFC2045 = new Encoder(false, CRLF, MIMELINEMAX);
+ static final Encoder RFC4648 = new Encoder(false, null, -1, true);
+ static final Encoder RFC4648_URLSAFE = new Encoder(true, null, -1, true);
+ static final Encoder RFC2045 = new Encoder(false, CRLF, MIMELINEMAX, true);
+
+ private final int outLength(int srclen) {
+ int len = 0;
+ if (doPadding) {
+ len = 4 * ((srclen + 2) / 3);
+ } else {
+ int n = srclen % 3;
+ len = 4 * (srclen / 3) + (n == 0 ? 0 : n + 1);
+ }
+ if (linemax > 0) // line separators
+ len += (len - 1) / linemax * newline.length;
+ return len;
+ }
/**
* Encodes all bytes from the specified byte array into a newly-allocated
@@ -243,9 +258,7 @@ public class Base64 {
* encoded bytes.
*/
public byte[] encode(byte[] src) {
- int len = 4 * ((src.length + 2) / 3); // dst array size
- if (linemax > 0) // line separators
- len += (len - 1) / linemax * newline.length;
+ int len = outLength(src.length); // dst array size
byte[] dst = new byte[len];
int ret = encode0(src, 0, src.length, dst);
if (ret != dst.length)
@@ -273,10 +286,7 @@ public class Base64 {
* space for encoding all input bytes.
*/
public int encode(byte[] src, byte[] dst) {
- int len = 4 * ((src.length + 2) / 3); // dst array size
- if (linemax > 0) {
- len += (len - 1) / linemax * newline.length;
- }
+ int len = outLength(src.length); // dst array size
if (dst.length < len)
throw new IllegalArgumentException(
"Output byte array is too small for encoding all input bytes");
@@ -321,9 +331,7 @@ public class Base64 {
* @return A newly-allocated byte buffer containing the encoded bytes.
*/
public ByteBuffer encode(ByteBuffer buffer) {
- int len = 4 * ((buffer.remaining() + 2) / 3);
- if (linemax > 0)
- len += (len - 1) / linemax * newline.length;
+ int len = outLength(buffer.remaining());
byte[] dst = new byte[len];
int ret = 0;
if (buffer.hasArray()) {
@@ -415,7 +423,25 @@ public class Base64 {
public OutputStream wrap(OutputStream os) {
Objects.requireNonNull(os);
return new EncOutputStream(os, isURL ? toBase64URL : toBase64,
- newline, linemax);
+ newline, linemax, doPadding);
+ }
+
+ /**
+ * Returns an encoder instance that encodes equivalently to this one,
+ * but without adding any padding character at the end of the encoded
+ * byte data.
+ *
+ * The encoding scheme of this encoder instance is unaffected by
+ * this invocation. The returned encoder instance should be used for
+ * non-padding encoding operation.
+ *
+ * @return an equivalent encoder that encodes without adding any
+ * padding character at the end
+ */
+ public Encoder withoutPadding() {
+ if (!doPadding)
+ return this;
+ return new Encoder(isURL, newline, linemax, false);
}
private int encodeArray(ByteBuffer src, ByteBuffer dst, int bytesOut) {
@@ -476,13 +502,17 @@ public class Base64 {
da[dp++] = (byte)base64[b0 >> 2];
if (sp == sl) {
da[dp++] = (byte)base64[(b0 << 4) & 0x3f];
- da[dp++] = '=';
- da[dp++] = '=';
+ if (doPadding) {
+ da[dp++] = '=';
+ da[dp++] = '=';
+ }
} else {
int b1 = sa[sp++] & 0xff;
da[dp++] = (byte)base64[(b0 << 4) & 0x3f | (b1 >> 4)];
da[dp++] = (byte)base64[(b1 << 2) & 0x3f];
- da[dp++] = '=';
+ if (doPadding) {
+ da[dp++] = '=';
+ }
}
}
return dp - dp00 + bytesOut;
@@ -548,13 +578,17 @@ public class Base64 {
dst.put(dp++, (byte)base64[b0 >> 2]);
if (sp == src.limit()) {
dst.put(dp++, (byte)base64[(b0 << 4) & 0x3f]);
- dst.put(dp++, (byte)'=');
- dst.put(dp++, (byte)'=');
+ if (doPadding) {
+ dst.put(dp++, (byte)'=');
+ dst.put(dp++, (byte)'=');
+ }
} else {
int b1 = src.get(sp++) & 0xff;
dst.put(dp++, (byte)base64[(b0 << 4) & 0x3f | (b1 >> 4)]);
dst.put(dp++, (byte)base64[(b1 << 2) & 0x3f]);
- dst.put(dp++, (byte)'=');
+ if (doPadding) {
+ dst.put(dp++, (byte)'=');
+ }
}
}
return dp - dp00 + bytesOut;
@@ -597,13 +631,17 @@ public class Base64 {
dst[dp++] = (byte)base64[b0 >> 2];
if (sp == end) {
dst[dp++] = (byte)base64[(b0 << 4) & 0x3f];
- dst[dp++] = '=';
- dst[dp++] = '=';
+ if (doPadding) {
+ dst[dp++] = '=';
+ dst[dp++] = '=';
+ }
} else {
int b1 = src[sp++] & 0xff;
dst[dp++] = (byte)base64[(b0 << 4) & 0x3f | (b1 >> 4)];
dst[dp++] = (byte)base64[(b1 << 2) & 0x3f];
- dst[dp++] = '=';
+ if (doPadding) {
+ dst[dp++] = '=';
+ }
}
}
return dp;
@@ -1149,14 +1187,16 @@ public class Base64 {
private final char[] base64; // byte->base64 mapping
private final byte[] newline; // line separator, if needed
private final int linemax;
+ private final boolean doPadding;// whether or not to pad
private int linepos = 0;
- EncOutputStream(OutputStream os,
- char[] base64, byte[] newline, int linemax) {
+ EncOutputStream(OutputStream os, char[] base64,
+ byte[] newline, int linemax, boolean doPadding) {
super(os);
this.base64 = base64;
this.newline = newline;
this.linemax = linemax;
+ this.doPadding = doPadding;
}
@Override
@@ -1228,14 +1268,18 @@ public class Base64 {
checkNewline();
out.write(base64[b0 >> 2]);
out.write(base64[(b0 << 4) & 0x3f]);
- out.write('=');
- out.write('=');
+ if (doPadding) {
+ out.write('=');
+ out.write('=');
+ }
} else if (leftover == 2) {
checkNewline();
out.write(base64[b0 >> 2]);
out.write(base64[(b0 << 4) & 0x3f | (b1 >> 4)]);
out.write(base64[(b1 << 2) & 0x3f]);
- out.write('=');
+ if (doPadding) {
+ out.write('=');
+ }
}
leftover = 0;
out.close();
diff --git a/src/share/classes/java/util/IdentityHashMap.java b/src/share/classes/java/util/IdentityHashMap.java
index 4080821389416654d98119a0fba00dabeb30e72e..3db40588d77664e33879350628a39803094b55f0 100644
--- a/src/share/classes/java/util/IdentityHashMap.java
+++ b/src/share/classes/java/util/IdentityHashMap.java
@@ -1243,7 +1243,7 @@ public class IdentityHashMap
if (ti >= size) {
throw new ConcurrentModificationException();
}
- a[ti++] = (T) new AbstractMap.SimpleEntry(unmaskNull(key), tab[si + 1]);
+ a[ti++] = (T) new AbstractMap.SimpleEntry<>(unmaskNull(key), tab[si + 1]);
}
}
// fewer elements than expected or concurrent modification from other thread detected
diff --git a/src/share/classes/java/util/concurrent/ForkJoinPool.java b/src/share/classes/java/util/concurrent/ForkJoinPool.java
index 749f8b573618b1080ca7bcc64344cab01727cfe2..edf17873b6041d0df83246c1b34085cc98a87e3d 100644
--- a/src/share/classes/java/util/concurrent/ForkJoinPool.java
+++ b/src/share/classes/java/util/concurrent/ForkJoinPool.java
@@ -1820,7 +1820,7 @@ public class ForkJoinPool extends AbstractExecutorService {
}
}
for (;;) { // help stealer or descend to its stealer
- ForkJoinTask[] a; int b;
+ ForkJoinTask>[] a; int b;
if (subtask.status < 0) // surround probes with
continue restart; // consistency checks
if ((b = v.base) - v.top < 0 && (a = v.array) != null) {
diff --git a/src/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java b/src/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java
index 458828c90ed2ad7e08163a7d76a9af760aeb5072..24ab59acd29c057e384a3772792730caf454d691 100644
--- a/src/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java
+++ b/src/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java
@@ -1253,11 +1253,11 @@ public class ScheduledThreadPoolExecutor
* Snapshot iterator that works off copy of underlying q array.
*/
private class Itr implements Iterator {
- final RunnableScheduledFuture[] array;
+ final RunnableScheduledFuture>[] array;
int cursor = 0; // index of next element to return
int lastRet = -1; // index of last element, or -1 if no such
- Itr(RunnableScheduledFuture[] array) {
+ Itr(RunnableScheduledFuture>[] array) {
this.array = array;
}
diff --git a/src/share/classes/java/util/logging/Logger.java b/src/share/classes/java/util/logging/Logger.java
index efc18c520c0100f998d273fac28d6c3bff1ae9a5..1976512cac8f124ef7b077676e087c9cb9b87306 100644
--- a/src/share/classes/java/util/logging/Logger.java
+++ b/src/share/classes/java/util/logging/Logger.java
@@ -351,7 +351,7 @@ public class Logger {
? caller.getClassLoader()
: null);
if (callersClassLoader != null) {
- this.callersClassLoaderRef = new WeakReference(callersClassLoader);
+ this.callersClassLoaderRef = new WeakReference<>(callersClassLoader);
}
}
diff --git a/src/share/classes/java/util/logging/Logging.java b/src/share/classes/java/util/logging/Logging.java
index e22a82e9d19e0fd81f25e18c0b0315a48af63696..740a533063d1542cef2ab0bbd0b0258a9404e30c 100644
--- a/src/share/classes/java/util/logging/Logging.java
+++ b/src/share/classes/java/util/logging/Logging.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -55,11 +55,11 @@ class Logging implements LoggingMXBean {
}
public List getLoggerNames() {
- Enumeration loggers = logManager.getLoggerNames();
+ Enumeration loggers = logManager.getLoggerNames();
ArrayList array = new ArrayList<>();
for (; loggers.hasMoreElements();) {
- array.add((String) loggers.nextElement());
+ array.add(loggers.nextElement());
}
return array;
}
diff --git a/src/share/classes/java/util/regex/Pattern.java b/src/share/classes/java/util/regex/Pattern.java
index e9a0c67f79df3993e490291b6a1229fa6ac2b21c..b5578b6a9187eda974bba4ad315d6e15dd1a5bde 100644
--- a/src/share/classes/java/util/regex/Pattern.java
+++ b/src/share/classes/java/util/regex/Pattern.java
@@ -1142,10 +1142,15 @@ public final class Pattern
* input sequence that is terminated by another subsequence that matches
* this pattern or is terminated by the end of the input sequence. The
* substrings in the array are in the order in which they occur in the
- * input. If this pattern does not match any subsequence of the input then
+ * input. If this pattern does not match any subsequence of the input then
* the resulting array has just one element, namely the input sequence in
* string form.
*
+ * When there is a positive-width match at the beginning of the input
+ * sequence then an empty leading substring is included at the beginning
+ * of the resulting array. A zero-width match at the beginning however
+ * never produces such empty leading substring.
+ *
*
The limit parameter controls the number of times the
* pattern is applied and therefore affects the length of the resulting
* array. If the limit n is greater than zero then the pattern
@@ -1185,7 +1190,6 @@ public final class Pattern
*
{ "b", "", ":and:f" }
*
*
- *
* @param input
* The character sequence to be split
*
@@ -1204,6 +1208,11 @@ public final class Pattern
// Add segments before each match found
while(m.find()) {
if (!matchLimited || matchList.size() < limit - 1) {
+ if (index == 0 && index == m.start() && m.start() == m.end()) {
+ // no empty leading substring included for zero-width match
+ // at the beginning of the input char sequence.
+ continue;
+ }
String match = input.subSequence(index, m.start()).toString();
matchList.add(match);
index = m.end();
@@ -5755,13 +5764,18 @@ NEXT: while (i <= last) {
* input sequence that is terminated by another subsequence that matches
* this pattern or is terminated by the end of the input sequence. The
* substrings in the stream are in the order in which they occur in the
- * input. Trailing empty strings will be discarded and not encountered in
+ * input. Trailing empty strings will be discarded and not encountered in
* the stream.
*
* If this pattern does not match any subsequence of the input then
* the resulting stream has just one element, namely the input sequence in
* string form.
*
+ *
When there is a positive-width match at the beginning of the input
+ * sequence then an empty leading substring is included at the beginning
+ * of the stream. A zero-width match at the beginning however never produces
+ * such empty leading substring.
+ *
*
If the input sequence is mutable, it must remain constant during the
* execution of the terminal stream operation. Otherwise, the result of the
* terminal stream operation is undefined.
@@ -5817,7 +5831,8 @@ NEXT: while (i <= last) {
current = matcher.end();
if (!nextElement.isEmpty()) {
return true;
- } else {
+ } else if (current > 0) { // no empty leading substring for zero-width
+ // match at the beginning of the input
emptyElementCount++;
}
}
diff --git a/src/share/classes/javax/management/AttributeList.java b/src/share/classes/javax/management/AttributeList.java
index 9825d93fc19003ddfd2428bd325200b08372e927..2fd3bdb65052a0905820c17911fe52a75dce7e4f 100644
--- a/src/share/classes/javax/management/AttributeList.java
+++ b/src/share/classes/javax/management/AttributeList.java
@@ -178,8 +178,8 @@ public class AttributeList extends ArrayList {
/**
* Inserts the attribute specified as an element at the position specified.
* Elements with an index greater than or equal to the current position are
- * shifted up. If the index is out of range (index < 0 || index >
- * size()) a RuntimeOperationsException should be raised, wrapping the
+ * shifted up. If the index is out of range {@literal (index < 0 || index >
+ * size())} a RuntimeOperationsException should be raised, wrapping the
* java.lang.IndexOutOfBoundsException thrown.
*
* @param object The Attribute object to be inserted.
@@ -199,7 +199,7 @@ public class AttributeList extends ArrayList {
/**
* Sets the element at the position specified to be the attribute specified.
* The previous element at that position is discarded. If the index is
- * out of range (index < 0 || index > size() a RuntimeOperationsException
+ * out of range {@literal (index < 0 || index > size())} a RuntimeOperationsException
* should be raised, wrapping the java.lang.IndexOutOfBoundsException thrown.
*
* @param object The value to which the attribute element should be set.
@@ -234,7 +234,7 @@ public class AttributeList extends ArrayList {
* Inserts all of the elements in the AttributeList specified
* into this list, starting at the specified position, in the order in which
* they are returned by the Iterator of the {@code AttributeList} specified.
- * If the index is out of range (index < 0 || index > size() a
+ * If the index is out of range {@literal (index < 0 || index > size())} a
* RuntimeOperationsException should be raised, wrapping the
* java.lang.IndexOutOfBoundsException thrown.
*
diff --git a/src/share/classes/javax/management/BooleanValueExp.java b/src/share/classes/javax/management/BooleanValueExp.java
index 8aa399a28dfb40c8d038e70fa91a4ae49fc04608..23842612c2e52356653af3a460de1caa54b7ad6c 100644
--- a/src/share/classes/javax/management/BooleanValueExp.java
+++ b/src/share/classes/javax/management/BooleanValueExp.java
@@ -44,12 +44,12 @@ class BooleanValueExp extends QueryEval implements ValueExp {
private boolean val = false;
- /** Creates a new BooleanValueExp representing the boolean literal .*/
+ /** Creates a new BooleanValueExp representing the boolean literal {@code val}.*/
BooleanValueExp(boolean val) {
this.val = val;
}
- /**Creates a new BooleanValueExp representing the Boolean object .*/
+ /**Creates a new BooleanValueExp representing the Boolean object {@code val}.*/
BooleanValueExp(Boolean val) {
this.val = val.booleanValue();
}
diff --git a/src/share/classes/javax/management/Descriptor.java b/src/share/classes/javax/management/Descriptor.java
index b07447ad590dbf0612e288bcdbcf526bc0325597..0cd325fc1cdbb7111daeafeb9fa0b14400aa0c86 100644
--- a/src/share/classes/javax/management/Descriptor.java
+++ b/src/share/classes/javax/management/Descriptor.java
@@ -96,7 +96,7 @@ import javax.management.openmbean.OpenType;
* of the mapped Java type, called opendata (J) in the MXBean type mapping rules .
*
- *
+ *
*
* Name Type Used in Meaning
*
@@ -330,7 +330,7 @@ import javax.management.openmbean.OpenType;
* interest outside Model MBeans, for example. But only Model MBeans have
* a predefined behavior for these fields.
*
- *
+ *
*
* Name Type Used in Meaning
*
diff --git a/src/share/classes/javax/management/DescriptorKey.java b/src/share/classes/javax/management/DescriptorKey.java
index 6422499973190326142cce65c8c46147c0570d78..5ca8ee9bd51241b583fa35b74ad4e3769898eb5a 100644
--- a/src/share/classes/javax/management/DescriptorKey.java
+++ b/src/share/classes/javax/management/DescriptorKey.java
@@ -94,7 +94,7 @@ import java.lang.annotation.*;
* then the resulting {@code Descriptor} will contain the following
* fields:
*
- *
+ *
* Name Value
* units "bytes"
* descriptionResourceKey "bytes.key"
@@ -143,7 +143,7 @@ import java.lang.annotation.*;
* or an array of annotations. The value of the field is derived from
* the value of the annotation element as follows:
*
- *
+ *
* Annotation element Descriptor field
* Primitive value ({@code 5}, {@code false}, etc)
* Wrapped value ({@code Integer.valueOf(5)},
diff --git a/src/share/classes/javax/management/ImmutableDescriptor.java b/src/share/classes/javax/management/ImmutableDescriptor.java
index 3eff0c25e0bb9ecd0179206589fcb339c6dcc977..b2af95e52e7d4a5bdd48cdb1bba92429b1ddfc0a 100644
--- a/src/share/classes/javax/management/ImmutableDescriptor.java
+++ b/src/share/classes/javax/management/ImmutableDescriptor.java
@@ -344,7 +344,7 @@ public class ImmutableDescriptor implements Descriptor {
* the given object is also a Descriptor, and if the two Descriptors have
* the same field names (possibly differing in case) and the same
* associated values. The respective values for a field in the two
- * Descriptors are equal if the following conditions hold:
+ * Descriptors are equal if the following conditions hold:
*
*
* If one value is null then the other must be too.
diff --git a/src/share/classes/javax/management/JMX.java b/src/share/classes/javax/management/JMX.java
index fe5d9093ac277cde6e93c9cf8d45c0fe8be10b1f..ffa53cfe2c91e3a74de53e5f88019cfdb13c697d 100644
--- a/src/share/classes/javax/management/JMX.java
+++ b/src/share/classes/javax/management/JMX.java
@@ -217,8 +217,7 @@ public class JMX {
}
/**
- * Make a proxy for an MXBean in a local or remote
- * MBean Server.
+ * Make a proxy for an MXBean in a local or remote MBean Server.
*
* If you have an MBean Server {@code mbs} containing an
* MXBean with {@link ObjectName} {@code name}, and if the
@@ -253,7 +252,7 @@ public class JMX {
*
{@code proxy.setSimpleAttribute("whatever")} will result
* in a call to {@code mbs.}{@link
* MBeanServerConnection#setAttribute setAttribute}(name,
- * new Attribute("SimpleAttribute", "whatever")).
+ * new Attribute("SimpleAttribute", "whatever")).
*
* Because {@code String} is a simple type , in the
* sense of {@link javax.management.openmbean.SimpleType}, it
diff --git a/src/share/classes/javax/management/MBeanFeatureInfo.java b/src/share/classes/javax/management/MBeanFeatureInfo.java
index ec8e8b622b85c4b81c7bb6de7fb70d8be2173268..5acd054affe79fd718905c1108dbd393091a7906 100644
--- a/src/share/classes/javax/management/MBeanFeatureInfo.java
+++ b/src/share/classes/javax/management/MBeanFeatureInfo.java
@@ -162,7 +162,7 @@ public class MBeanFeatureInfo implements Serializable, DescriptorRead {
* Serializes an {@link MBeanFeatureInfo} to an {@link ObjectOutputStream}.
* @serialData
* For compatibility reasons, an object of this class is serialized as follows.
- *
+ *
* The method {@link ObjectOutputStream#defaultWriteObject defaultWriteObject()}
* is called first to serialize the object except the field {@code descriptor}
* which is declared as transient. The field {@code descriptor} is serialized
@@ -180,7 +180,7 @@ public class MBeanFeatureInfo implements Serializable, DescriptorRead {
* {@link ObjectOutputStream#writeObject writeObject(Object obj)} is called
* to serialize directly the field {@code descriptor}.
*
- *
+ *
* @since 1.6
*/
private void writeObject(ObjectOutputStream out) throws IOException {
@@ -206,7 +206,7 @@ public class MBeanFeatureInfo implements Serializable, DescriptorRead {
* Deserializes an {@link MBeanFeatureInfo} from an {@link ObjectInputStream}.
* @serialData
* For compatibility reasons, an object of this class is deserialized as follows.
- *
+ *
* The method {@link ObjectInputStream#defaultReadObject defaultReadObject()}
* is called first to deserialize the object except the field
* {@code descriptor}, which is not serialized in the default way. Then the method
@@ -228,7 +228,7 @@ public class MBeanFeatureInfo implements Serializable, DescriptorRead {
* to {@link ImmutableDescriptor#EMPTY_DESCRIPTOR EMPTY_DESCRIPTOR}
*
Any other value. A {@link StreamCorruptedException} is thrown.
*
- *
+ *
* @since 1.6
*/
private void readObject(ObjectInputStream in)
diff --git a/src/share/classes/javax/management/MBeanInfo.java b/src/share/classes/javax/management/MBeanInfo.java
index f4a9581c5200b270aa83c361537b95179a9c204e..d10dd1cca28d1db7fd7db0d0c6306742e04a05fb 100644
--- a/src/share/classes/javax/management/MBeanInfo.java
+++ b/src/share/classes/javax/management/MBeanInfo.java
@@ -619,7 +619,7 @@ public class MBeanInfo implements Cloneable, Serializable, DescriptorRead {
* Serializes an {@link MBeanInfo} to an {@link ObjectOutputStream}.
* @serialData
* For compatibility reasons, an object of this class is serialized as follows.
- *
+ *
* The method {@link ObjectOutputStream#defaultWriteObject defaultWriteObject()}
* is called first to serialize the object except the field {@code descriptor}
* which is declared as transient. The field {@code descriptor} is serialized
@@ -637,7 +637,7 @@ public class MBeanInfo implements Cloneable, Serializable, DescriptorRead {
* {@link ObjectOutputStream#writeObject writeObject(Object obj)} is called
* to serialize the field {@code descriptor} directly.
*
- *
+ *
* @since 1.6
*/
private void writeObject(ObjectOutputStream out) throws IOException {
@@ -661,7 +661,7 @@ public class MBeanInfo implements Cloneable, Serializable, DescriptorRead {
* Deserializes an {@link MBeanInfo} from an {@link ObjectInputStream}.
* @serialData
* For compatibility reasons, an object of this class is deserialized as follows.
- *
+ *
* The method {@link ObjectInputStream#defaultReadObject defaultReadObject()}
* is called first to deserialize the object except the field
* {@code descriptor}, which is not serialized in the default way. Then the method
@@ -683,7 +683,7 @@ public class MBeanInfo implements Cloneable, Serializable, DescriptorRead {
* {@link ImmutableDescriptor#EMPTY_DESCRIPTOR EMPTY_DESCRIPTOR}.
*
Any other value. A {@link StreamCorruptedException} is thrown.
*
- *
+ *
* @since 1.6
*/
diff --git a/src/share/classes/javax/management/MBeanServer.java b/src/share/classes/javax/management/MBeanServer.java
index 901be1076e1718f78bfa375f64e56f4da21ead19..909e31da5f536b8b6c29e755232860df9fecd272 100644
--- a/src/share/classes/javax/management/MBeanServer.java
+++ b/src/share/classes/javax/management/MBeanServer.java
@@ -244,7 +244,6 @@ import javax.management.loading.ClassLoaderRepository;
* the caller's permissions must imply {@link
* MBeanPermission#MBeanPermission(String,String,ObjectName,String)
* MBeanPermission(className, null, name, "unregisterMBean")}.
- *
*
*
*
diff --git a/src/share/classes/javax/management/MBeanServerConnection.java b/src/share/classes/javax/management/MBeanServerConnection.java
index dc3c3f4b35d0db156a25d07df4100442e8e2ad2f..505a44e4a6ef34bfc3e0478a562ee2dcfc93f143 100644
--- a/src/share/classes/javax/management/MBeanServerConnection.java
+++ b/src/share/classes/javax/management/MBeanServerConnection.java
@@ -627,7 +627,7 @@ public interface MBeanServerConnection {
* for that attribute, although this is not guaranteed to work. (For
* example, the values of two attributes may have been rejected because
* they were inconsistent with each other. Setting one of them alone might
- * be allowed.)
+ * be allowed.)
*
*
Here is an example of calling this method and checking that it
* succeeded in setting all the requested attributes:
diff --git a/src/share/classes/javax/management/MBeanServerNotification.java b/src/share/classes/javax/management/MBeanServerNotification.java
index 61d57e6dc582adace84d6c7300290b11a9133665..aec2f1870d529799dd28859029d5c7905d782478 100644
--- a/src/share/classes/javax/management/MBeanServerNotification.java
+++ b/src/share/classes/javax/management/MBeanServerNotification.java
@@ -86,7 +86,7 @@ package javax.management;
* be set to an array of ObjectNames containing the names of all MBeans
* being registered or unregistered.
*
- *
+ *
*
* MBeans which emit these group registration/unregistration notifications will
* declare them in their {@link MBeanInfo#getNotifications()
diff --git a/src/share/classes/javax/management/MXBean.java b/src/share/classes/javax/management/MXBean.java
index e4c920651bc8bb8e21d33a32c7a3ed407bcfe027..85db37b241a5e3cedc52400515d6f661ce00defb 100644
--- a/src/share/classes/javax/management/MXBean.java
+++ b/src/share/classes/javax/management/MXBean.java
@@ -79,7 +79,7 @@ import javax.management.openmbean.TabularType;
public interface MisleadingMXBean {}
-
MXBean specification
+ MXBean specification
The MXBean concept provides a simple way to code an MBean
that only references a predefined set of types, the ones defined
@@ -93,7 +93,7 @@ import javax.management.openmbean.TabularType;
Standard MBean concept. Here is how a managed object might be
represented as a Standard MBean, and as an MXBean:
-
+
Standard MBean MXBean
@@ -133,7 +133,7 @@ public interface MemoryPoolMXBean {
So, we might define MemoryUsage like this:
-
+
Standard MBean MXBean
@@ -195,7 +195,7 @@ public class MemoryUsage {
This becomes clearer if we compare what the clients of the two
models might look like:
-
+
Standard MBean MXBean
@@ -232,7 +232,7 @@ String name = (String)
managed objects when you know the model beforehand, regardless
of whether you are using Standard MBeans or MXBeans:
-
+
Standard MBean MXBean
@@ -265,7 +265,7 @@ long used = usage.getUsed();
Implementing the MemoryPool object works similarly for both
Standard MBeans and MXBeans.
-
+
Standard MBean MXBean
@@ -292,7 +292,7 @@ public class MemoryPool
Registering the MBean in the MBean Server works in the same way
in both cases:
-
+
Standard MBean MXBean
@@ -478,13 +478,13 @@ public class MemoryPool
The following table summarizes the type mapping rules.
-
+
Java type J
opentype(J)
opendata(J)
-
+
{@code int}, {@code boolean}, etc
(the 8 primitive Java types)
@@ -785,7 +785,7 @@ public interface ModuleMXBean {
then the item in the {@code CompositeType} is called {@code name}
- and has type {@code SimpleType.BOOLEAN}.
+ and has type {@code SimpleType.BOOLEAN}.
Notice that the first character (or code point) is converted to
lower case. This follows the Java Beans convention, which for
diff --git a/src/share/classes/javax/management/NumericValueExp.java b/src/share/classes/javax/management/NumericValueExp.java
index 9609035223155aceadedc40c0e3b67768d7170d8..2feb1f3467b13ca88e1566c292b59f09585fb9d3 100644
--- a/src/share/classes/javax/management/NumericValueExp.java
+++ b/src/share/classes/javax/management/NumericValueExp.java
@@ -112,7 +112,7 @@ class NumericValueExp extends QueryEval implements ValueExp {
public NumericValueExp() {
}
- /** Creates a new NumericValue representing the numeric literal .*/
+ /** Creates a new NumericValue representing the numeric literal @{code val}.*/
NumericValueExp(Number val)
{
this.val = val;
diff --git a/src/share/classes/javax/management/ObjectName.java b/src/share/classes/javax/management/ObjectName.java
index 32b06ccdb5e6d6afe2cfce970c366af218059813..c1942f0eba98554e8ddb2e1618aa5b82f094f8ad 100644
--- a/src/share/classes/javax/management/ObjectName.java
+++ b/src/share/classes/javax/management/ObjectName.java
@@ -195,7 +195,7 @@ import java.util.Map;
* represents an ObjectName with two keys. The name of each key
* contains six characters, of which the first and last are spaces.
* The value associated with the key " key1 "
- * also begins and ends with a space.
+ * also begins and ends with a space.
*
* In addition to the restrictions on characters spelt out above,
* no part of an ObjectName may contain a newline character
@@ -665,7 +665,7 @@ public class ObjectName implements Comparable, QueryExp {
* Construct an ObjectName from a domain and a Hashtable.
*
* @param domain Domain of the ObjectName.
- * @param props Map containing couples key -> value .
+ * @param props Map containing couples key {@literal ->} value .
*
* @exception MalformedObjectNameException The domain
* contains an illegal character, or one of the keys or values in
@@ -1549,7 +1549,7 @@ public class ObjectName implements Comparable, QueryExp {
* a comma and an
* asterisk (,*) for an ObjectName that is a property
* list pattern with at least one key.
- *
+ *
*
* @return The canonical form of the name.
*/
diff --git a/src/share/classes/javax/management/PersistentMBean.java b/src/share/classes/javax/management/PersistentMBean.java
index 0f16202511f57ca270fdf954c946bcca0796e580..63334096612270a345f7dfec333ecf3f24070c8b 100644
--- a/src/share/classes/javax/management/PersistentMBean.java
+++ b/src/share/classes/javax/management/PersistentMBean.java
@@ -70,17 +70,19 @@ public interface PersistentMBean {
*
* Persistence policy from the MBean and attribute descriptor is used to guide execution
* of this method. The MBean should be stored if 'persistPolicy' field is:
- *
!= "never"
+ * {@literal != "never"
* = "always"
* = "onTimer" and now > 'lastPersistTime' + 'persistPeriod'
* = "NoMoreOftenThan" and now > 'lastPersistTime' + 'persistPeriod'
* = "onUnregister"
- *
+ * }
+ *
* Do not store the MBean if 'persistPolicy' field is:
+ *
{@literal
* = "never"
* = "onUpdate"
* = "onTimer" && now < 'lastPersistTime' + 'persistPeriod'
- *
+ * }
*
* @exception MBeanException Wraps another exception or persistence is not supported
* @exception RuntimeOperationsException Wraps exceptions from the persistence mechanism
diff --git a/src/share/classes/javax/management/Query.java b/src/share/classes/javax/management/Query.java
index 267f6aa1daea1da1c0030610c5fdc1a71bed7ffc..2a1b33e5868d2bb465999f0a72be688920d9d1ef 100644
--- a/src/share/classes/javax/management/Query.java
+++ b/src/share/classes/javax/management/Query.java
@@ -127,9 +127,9 @@ package javax.management;
* @param q2 Another query expression.
*
* @return The conjunction of the two arguments. The returned object
- * will be serialized as an instance of the non-public class {@link
+ * will be serialized as an instance of the non-public class
*
- * javax.management.AndQueryExp }.
+ * javax.management.AndQueryExp.
*/
public static QueryExp and(QueryExp q1, QueryExp q2) {
return new AndQueryExp(q1, q2);
@@ -143,9 +143,9 @@ package javax.management;
* @param q2 Another query expression.
*
* @return The disjunction of the two arguments. The returned object
- * will be serialized as an instance of the non-public class {@link
+ * will be serialized as an instance of the non-public class
*
- * javax.management.OrQueryExp }.
+ * javax.management.OrQueryExp.
*/
public static QueryExp or(QueryExp q1, QueryExp q2) {
return new OrQueryExp(q1, q2);
@@ -160,9 +160,9 @@ package javax.management;
*
* @return A "greater than" constraint on the arguments. The
* returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.BinaryRelQueryExp } with a {@code relOp} equal
+ * non-public class
+ *
+ * javax.management.BinaryRelQueryExp with a {@code relOp} equal
* to {@link #GT}.
*/
public static QueryExp gt(ValueExp v1, ValueExp v2) {
@@ -178,9 +178,9 @@ package javax.management;
*
* @return A "greater than or equal to" constraint on the
* arguments. The returned object will be serialized as an
- * instance of the non-public class {@link
- * javax.management.BinaryRelQueryExp } with a {@code relOp} equal
+ * instance of the non-public class
+ *
+ * javax.management.BinaryRelQueryExp with a {@code relOp} equal
* to {@link #GE}.
*/
public static QueryExp geq(ValueExp v1, ValueExp v2) {
@@ -196,9 +196,9 @@ package javax.management;
*
* @return A "less than or equal to" constraint on the arguments.
* The returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.BinaryRelQueryExp } with a {@code relOp} equal
+ * non-public class
+ *
+ * javax.management.BinaryRelQueryExp with a {@code relOp} equal
* to {@link #LE}.
*/
public static QueryExp leq(ValueExp v1, ValueExp v2) {
@@ -214,9 +214,9 @@ package javax.management;
*
* @return A "less than" constraint on the arguments. The
* returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.BinaryRelQueryExp } with a {@code relOp} equal
+ * non-public class
+ *
+ * javax.management.BinaryRelQueryExp with a {@code relOp} equal
* to {@link #LT}.
*/
public static QueryExp lt(ValueExp v1, ValueExp v2) {
@@ -232,9 +232,9 @@ package javax.management;
*
* @return A "equal to" constraint on the arguments. The
* returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.BinaryRelQueryExp } with a {@code relOp} equal
+ * non-public class
+ *
+ * javax.management.BinaryRelQueryExp with a {@code relOp} equal
* to {@link #EQ}.
*/
public static QueryExp eq(ValueExp v1, ValueExp v2) {
@@ -251,9 +251,9 @@ package javax.management;
*
* @return The constraint that v1 lies between v2 and v3. The
* returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.BetweenQueryExp }.
+ * non-public class
+ *
+ * javax.management.BetweenQueryExp .
*/
public static QueryExp between(ValueExp v1, ValueExp v2, ValueExp v3) {
return new BetweenQueryExp(v1, v2, v3);
@@ -279,9 +279,9 @@ package javax.management;
*
* @return A query expression that represents the matching
* constraint on the string argument. The returned object will
- * be serialized as an instance of the non-public class {@link
- * javax.management.MatchQueryExp }.
+ * be serialized as an instance of the non-public class
+ *
+ * javax.management.MatchQueryExp .
*/
public static QueryExp match(AttributeValueExp a, StringValueExp s) {
return new MatchQueryExp(a, s);
@@ -319,9 +319,9 @@ package javax.management;
*
* @return An attribute expression for the attribute named name.
* The returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.QualifiedAttributeValueExp }.
+ * non-public class
+ *
+ * javax.management.QualifiedAttributeValueExp .
*/
public static AttributeValueExp attr(String className, String name) {
return new QualifiedAttributeValueExp(className, name);
@@ -338,9 +338,8 @@ package javax.management;
*
* @return A class attribute expression. The returned object
* will be serialized as an instance of the non-public class
- * {@link
- * javax.management.ClassAttributeValueExp }.
+ *
+ * javax.management.ClassAttributeValueExp .
*/
public static AttributeValueExp classattr() {
return new ClassAttributeValueExp();
@@ -352,9 +351,9 @@ package javax.management;
* @param queryExp The constraint to negate.
*
* @return A negated constraint. The returned object will be
- * serialized as an instance of the non-public class {@link
- * javax.management.NotQueryExp }.
+ * serialized as an instance of the non-public class
+ *
+ * javax.management.NotQueryExp .
*/
public static QueryExp not(QueryExp queryExp) {
return new NotQueryExp(queryExp);
@@ -368,9 +367,9 @@ package javax.management;
*
* @return A QueryExp that represents the constraint. The
* returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.InQueryExp }.
+ * non-public class
+ *
+ * javax.management.InQueryExp .
*/
public static QueryExp in(ValueExp val, ValueExp valueList[]) {
return new InQueryExp(val, valueList);
@@ -395,9 +394,9 @@ package javax.management;
*
* @return A ValueExp object containing the argument. The
* returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.NumericValueExp }.
+ * non-public class
+ *
+ * javax.management.NumericValueExp .
*/
public static ValueExp value(Number val) {
return new NumericValueExp(val);
@@ -411,9 +410,9 @@ package javax.management;
*
* @return A ValueExp object containing the argument. The
* returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.NumericValueExp }.
+ * non-public class
+ *
+ * javax.management.NumericValueExp .
*/
public static ValueExp value(int val) {
return new NumericValueExp((long) val);
@@ -427,9 +426,9 @@ package javax.management;
*
* @return A ValueExp object containing the argument. The
* returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.NumericValueExp }.
+ * non-public class
+ *
+ * javax.management.NumericValueExp .
*/
public static ValueExp value(long val) {
return new NumericValueExp(val);
@@ -443,9 +442,9 @@ package javax.management;
*
* @return A ValueExp object containing the argument. The
* returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.NumericValueExp }.
+ * non-public class
+ *
+ * javax.management.NumericValueExp .
*/
public static ValueExp value(float val) {
return new NumericValueExp((double) val);
@@ -459,9 +458,9 @@ package javax.management;
*
* @return A ValueExp object containing the argument. The
* returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.NumericValueExp }.
+ * non-public class
+ *
+ * javax.management.NumericValueExp .
*/
public static ValueExp value(double val) {
return new NumericValueExp(val);
@@ -475,9 +474,9 @@ package javax.management;
*
* @return A ValueExp object containing the argument. The
* returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.BooleanValueExp }.
+ * non-public class
+ *
+ * javax.management.BooleanValueExp .
*/
public static ValueExp value(boolean val) {
return new BooleanValueExp(val);
@@ -492,9 +491,9 @@ package javax.management;
*
* @return A ValueExp representing the sum or concatenation of
* the two arguments. The returned object will be serialized as
- * an instance of the non-public class {@link
- * javax.management.BinaryOpValueExp } with an {@code op} equal to
+ * an instance of the non-public class
+ *
+ * javax.management.BinaryOpValueExp with an {@code op} equal to
* {@link #PLUS}.
*/
public static ValueExp plus(ValueExp value1, ValueExp value2) {
@@ -510,9 +509,9 @@ package javax.management;
*
* @return A ValueExp representing the product. The returned
* object will be serialized as an instance of the non-public
- * class {@link
- * javax.management.BinaryOpValueExp } with an {@code op} equal to
+ * class
+ *
+ * javax.management.BinaryOpValueExp with an {@code op} equal to
* {@link #TIMES}.
*/
public static ValueExp times(ValueExp value1,ValueExp value2) {
@@ -528,9 +527,9 @@ package javax.management;
*
* @return A ValueExp representing the difference between two
* arguments. The returned object will be serialized as an
- * instance of the non-public class {@link
- * javax.management.BinaryOpValueExp } with an {@code op} equal to
+ * instance of the non-public class
+ *
+ * javax.management.BinaryOpValueExp with an {@code op} equal to
* {@link #MINUS}.
*/
public static ValueExp minus(ValueExp value1, ValueExp value2) {
@@ -546,9 +545,9 @@ package javax.management;
*
* @return A ValueExp representing the quotient of two arguments.
* The returned object will be serialized as an instance of the
- * non-public class {@link
- * javax.management.BinaryOpValueExp } with an {@code op} equal to
+ * non-public class
+ *
+ * javax.management.BinaryOpValueExp with an {@code op} equal to
* {@link #DIV}.
*/
public static ValueExp div(ValueExp value1, ValueExp value2) {
@@ -566,9 +565,9 @@ package javax.management;
*
* @return The constraint that a matches s. The returned object
* will be serialized as an instance of the non-public class
- * {@link
- * javax.management.MatchQueryExp }.
+ *
+ *
+ * javax.management.MatchQueryExp .
*/
public static QueryExp initialSubString(AttributeValueExp a, StringValueExp s) {
return new MatchQueryExp(a,
@@ -585,9 +584,9 @@ package javax.management;
*
* @return The constraint that a matches s. The returned object
* will be serialized as an instance of the non-public class
- * {@link
- * javax.management.MatchQueryExp }.
+ *
+ *
+ * javax.management.MatchQueryExp .
*/
public static QueryExp anySubString(AttributeValueExp a, StringValueExp s) {
return new MatchQueryExp(a,
@@ -605,9 +604,9 @@ package javax.management;
*
* @return The constraint that a matches s. The returned object
* will be serialized as an instance of the non-public class
- * {@link
- * javax.management.MatchQueryExp }.
+ *
+ *
+ * javax.management.MatchQueryExp .
*/
public static QueryExp finalSubString(AttributeValueExp a, StringValueExp s) {
return new MatchQueryExp(a,
@@ -630,9 +629,9 @@ package javax.management;
* of the class of which selected MBeans should be instances.
* @return a query expression that represents an inheritance
* constraint on an MBean class. The returned object will be
- * serialized as an instance of the non-public class {@link
- * javax.management.InstanceOfQueryExp }.
+ * serialized as an instance of the non-public class
+ *
+ * javax.management.InstanceOfQueryExp .
* @since 1.6
*/
public static QueryExp isInstanceOf(StringValueExp classNameValue) {
diff --git a/src/share/classes/javax/management/loading/MLet.java b/src/share/classes/javax/management/loading/MLet.java
index b1dc72aa64a395be440be0086fba40b3c08ebf17..ab50507d6af1e8a8f64df3e4a32413528a06d6bd 100644
--- a/src/share/classes/javax/management/loading/MLet.java
+++ b/src/share/classes/javax/management/loading/MLet.java
@@ -145,17 +145,17 @@ import javax.management.ServiceNotFoundException;
* This optional attribute specifies a list of one or more parameters for the
* MBean to be instantiated. This list describes the parameters to be passed the MBean's constructor.
* Use the following syntax to specify each item in
- * arglist :
+ * arglist :
*
- *
*
<ARG TYPE=argumentType VALUE=value >
- *
- *
where:
+ * where:
*
* argumentType is the type of the argument that will be passed as parameter to the MBean's constructor.
+ *
*
* The arguments' type in the argument list should be a Java primitive type or a Java basic type
* (java.lang.Boolean, java.lang.Byte, java.lang.Short, java.lang.Long, java.lang.Integer, java.lang.Float, java.lang.Double, java.lang.String).
+ *
*
*
* When an m-let text file is loaded, an
diff --git a/src/share/classes/javax/management/loading/MLetParser.java b/src/share/classes/javax/management/loading/MLetParser.java
index 88fb37a3de48b69dd151e3e0d08ec7d94a5a52c1..bc3af8c9c25f8be5c53cc2bb0e233204af359697 100644
--- a/src/share/classes/javax/management/loading/MLetParser.java
+++ b/src/share/classes/javax/management/loading/MLetParser.java
@@ -149,7 +149,7 @@ class MLetParser {
}
/**
- * Scan an html file for tags
+ * Scan an html file for {@literal } tags.
*/
public List parse(URL url) throws IOException {
String mth = "parse";
diff --git a/src/share/classes/javax/management/modelmbean/DescriptorSupport.java b/src/share/classes/javax/management/modelmbean/DescriptorSupport.java
index 4ba4d4cdde228cd4ae0f6f75a01d784a4e1220c4..1f7ad27e43d34f186529f2c075e92dfcbac9bdc0 100644
--- a/src/share/classes/javax/management/modelmbean/DescriptorSupport.java
+++ b/src/share/classes/javax/management/modelmbean/DescriptorSupport.java
@@ -799,7 +799,7 @@ public class DescriptorSupport
* the given object is also a Descriptor, and if the two Descriptors have
* the same field names (possibly differing in case) and the same
* associated values. The respective values for a field in the two
- * Descriptors are equal if the following conditions hold:
+ * Descriptors are equal if the following conditions hold:
*
*