提交 1adc62db 编写于 作者: L lana

Merge

...@@ -366,6 +366,7 @@ TOOLS = \ ...@@ -366,6 +366,7 @@ TOOLS = \
com/sun/source \ com/sun/source \
com/sun/tools/classfile \ com/sun/tools/classfile \
com/sun/tools/doclets \ com/sun/tools/doclets \
com/sun/tools/doclint \
com/sun/tools/example/debug/expr \ com/sun/tools/example/debug/expr \
com/sun/tools/example/debug/tty \ com/sun/tools/example/debug/tty \
com/sun/tools/extcheck \ com/sun/tools/extcheck \
......
...@@ -35,6 +35,7 @@ IMPORT_TOOLS_PACKAGES += \ ...@@ -35,6 +35,7 @@ IMPORT_TOOLS_PACKAGES += \
com/sun/source \ com/sun/source \
com/sun/tools/classfile \ com/sun/tools/classfile \
com/sun/tools/doclets \ com/sun/tools/doclets \
com/sun/tools/doclint \
com/sun/tools/javac \ com/sun/tools/javac \
com/sun/tools/javadoc \ com/sun/tools/javadoc \
com/sun/tools/javah \ com/sun/tools/javah \
......
...@@ -76,7 +76,8 @@ ATTACH_PKGS = com.sun.tools.attach \ ...@@ -76,7 +76,8 @@ ATTACH_PKGS = com.sun.tools.attach \
JCONSOLE_PKGS = com.sun.tools.jconsole JCONSOLE_PKGS = com.sun.tools.jconsole
TREEAPI_PKGS = com.sun.source.tree \ TREEAPI_PKGS = com.sunsource.doctree \
com.sun.source.tree \
com.sun.source.util com.sun.source.util
SMARTCARDIO_PKGS = javax.smartcardio SMARTCARDIO_PKGS = javax.smartcardio
......
...@@ -294,6 +294,7 @@ JAVA_JAVA_java = \ ...@@ -294,6 +294,7 @@ JAVA_JAVA_java = \
java/util/IdentityHashMap.java \ java/util/IdentityHashMap.java \
java/util/EnumMap.java \ java/util/EnumMap.java \
java/util/Arrays.java \ java/util/Arrays.java \
java/util/ArraysParallelSortHelpers.java \
java/util/DualPivotQuicksort.java \ java/util/DualPivotQuicksort.java \
java/util/TimSort.java \ java/util/TimSort.java \
java/util/ComparableTimSort.java \ java/util/ComparableTimSort.java \
...@@ -322,6 +323,7 @@ JAVA_JAVA_java = \ ...@@ -322,6 +323,7 @@ JAVA_JAVA_java = \
java/util/concurrent/CopyOnWriteArrayList.java \ java/util/concurrent/CopyOnWriteArrayList.java \
java/util/concurrent/CopyOnWriteArraySet.java \ java/util/concurrent/CopyOnWriteArraySet.java \
java/util/concurrent/CountDownLatch.java \ java/util/concurrent/CountDownLatch.java \
java/util/concurrent/CountedCompleter.java \
java/util/concurrent/CyclicBarrier.java \ java/util/concurrent/CyclicBarrier.java \
java/util/concurrent/DelayQueue.java \ java/util/concurrent/DelayQueue.java \
java/util/concurrent/Delayed.java \ java/util/concurrent/Delayed.java \
......
# #
# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
...@@ -23,16 +23,18 @@ ...@@ -23,16 +23,18 @@
# questions. # questions.
# #
#
# Makefile for building all of java
#
BUILDDIR = .. BUILDDIR = ..
PACKAGE = jdk
PRODUCT = jdk PRODUCT = jdk
JAVAC_LINT_OPTIONS=-Xlint:all
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
SUBDIRS = asm #
include $(BUILDDIR)/common/Subdirs.gmk # Files to compile
#
AUTO_FILES_JAVA_DIRS = jdk
all build clean clobber:: #
$(SUBDIRS-loop) # Rules
#
include $(BUILDDIR)/common/Classes.gmk
...@@ -38,6 +38,7 @@ excludes=\ ...@@ -38,6 +38,7 @@ excludes=\
com/sun/jmx/snmp/ com/sun/jmx/snmp/
jtreg.tests=\ jtreg.tests=\
com/sun/jmx/ \
com/sun/management/ \ com/sun/management/ \
java/lang/management/ \ java/lang/management/ \
javax/management/ javax/management/
......
...@@ -729,6 +729,7 @@ TOOLS_JAR_INCLUDES := \ ...@@ -729,6 +729,7 @@ TOOLS_JAR_INCLUDES := \
com/sun/source \ com/sun/source \
com/sun/tools/classfile \ com/sun/tools/classfile \
com/sun/tools/doclets \ com/sun/tools/doclets \
com/sun/tools/doclint \
com/sun/tools/example/debug/expr \ com/sun/tools/example/debug/expr \
com/sun/tools/example/debug/tty \ com/sun/tools/example/debug/tty \
com/sun/tools/extcheck \ com/sun/tools/extcheck \
......
...@@ -115,6 +115,7 @@ public abstract class ClientCommunicatorAdmin { ...@@ -115,6 +115,7 @@ public abstract class ClientCommunicatorAdmin {
// restarted is failed by another thread // restarted is failed by another thread
throw ioe; throw ioe;
} }
return;
} else { } else {
state = RE_CONNECTING; state = RE_CONNECTING;
lock.notifyAll(); lock.notifyAll();
...@@ -195,7 +196,7 @@ public abstract class ClientCommunicatorAdmin { ...@@ -195,7 +196,7 @@ public abstract class ClientCommunicatorAdmin {
if (e instanceof IOException && if (e instanceof IOException &&
!(e instanceof InterruptedIOException)) { !(e instanceof InterruptedIOException)) {
try { try {
restart((IOException)e); gotIOException((IOException)e);
} catch (Exception ee) { } catch (Exception ee) {
logger.warning("Checker-run", logger.warning("Checker-run",
"Failed to check connection: "+ e); "Failed to check connection: "+ e);
......
...@@ -51,6 +51,7 @@ import javax.management.remote.TargetedNotification; ...@@ -51,6 +51,7 @@ import javax.management.remote.TargetedNotification;
import com.sun.jmx.remote.util.ClassLogger; import com.sun.jmx.remote.util.ClassLogger;
import com.sun.jmx.remote.util.EnvHelp; import com.sun.jmx.remote.util.EnvHelp;
import java.rmi.UnmarshalException;
public abstract class ClientNotifForwarder { public abstract class ClientNotifForwarder {
...@@ -594,10 +595,7 @@ public abstract class ClientNotifForwarder { ...@@ -594,10 +595,7 @@ public abstract class ClientNotifForwarder {
} }
return nr; return nr;
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException | NotSerializableException | UnmarshalException e) {
logger.trace("NotifFetcher.fetchNotifs", e);
return fetchOneNotif();
} catch (NotSerializableException e) {
logger.trace("NotifFetcher.fetchNotifs", e); logger.trace("NotifFetcher.fetchNotifs", e);
return fetchOneNotif(); return fetchOneNotif();
} catch (IOException ioe) { } catch (IOException ioe) {
...@@ -619,17 +617,18 @@ public abstract class ClientNotifForwarder { ...@@ -619,17 +617,18 @@ public abstract class ClientNotifForwarder {
timeout. This allows us to skip sequence numbers for timeout. This allows us to skip sequence numbers for
notifications that don't match our filters. Then we ask notifications that don't match our filters. Then we ask
for one notification. If that produces a for one notification. If that produces a
ClassNotFoundException or a NotSerializableException, we ClassNotFoundException, NotSerializableException or
increase our sequence number and ask again. Eventually we UnmarshalException, we increase our sequence number and ask again.
will either get a successful notification, or a return with Eventually we will either get a successful notification, or a
0 notifications. In either case we can return a return with 0 notifications. In either case we can return a
NotificationResult. This algorithm works (albeit less NotificationResult. This algorithm works (albeit less
well) even if the server implementation doesn't optimize a well) even if the server implementation doesn't optimize a
request for 0 notifications to skip sequence numbers for request for 0 notifications to skip sequence numbers for
notifications that don't match our filters. notifications that don't match our filters.
If we had at least one ClassNotFoundException, then we If we had at least one
must emit a JMXConnectionNotification.LOST_NOTIFS. ClassNotFoundException/NotSerializableException/UnmarshalException,
then we must emit a JMXConnectionNotification.LOST_NOTIFS.
*/ */
private NotificationResult fetchOneNotif() { private NotificationResult fetchOneNotif() {
ClientNotifForwarder cnf = ClientNotifForwarder.this; ClientNotifForwarder cnf = ClientNotifForwarder.this;
...@@ -668,23 +667,20 @@ public abstract class ClientNotifForwarder { ...@@ -668,23 +667,20 @@ public abstract class ClientNotifForwarder {
try { try {
// 1 notif to skip possible missing class // 1 notif to skip possible missing class
result = cnf.fetchNotifs(startSequenceNumber, 1, 0L); result = cnf.fetchNotifs(startSequenceNumber, 1, 0L);
} catch (Exception e) { } catch (ClassNotFoundException | NotSerializableException | UnmarshalException e) {
if (e instanceof ClassNotFoundException logger.warning("NotifFetcher.fetchOneNotif",
|| e instanceof NotSerializableException) { "Failed to deserialize a notification: "+e.toString());
logger.warning("NotifFetcher.fetchOneNotif", if (logger.traceOn()) {
"Failed to deserialize a notification: "+e.toString()); logger.trace("NotifFetcher.fetchOneNotif",
if (logger.traceOn()) { "Failed to deserialize a notification.", e);
logger.trace("NotifFetcher.fetchOneNotif",
"Failed to deserialize a notification.", e);
}
notFoundCount++;
startSequenceNumber++;
} else {
if (!shouldStop())
logger.trace("NotifFetcher.fetchOneNotif", e);
return null;
} }
notFoundCount++;
startSequenceNumber++;
} catch (Exception e) {
if (!shouldStop())
logger.trace("NotifFetcher.fetchOneNotif", e);
return null;
} }
} }
...@@ -692,7 +688,7 @@ public abstract class ClientNotifForwarder { ...@@ -692,7 +688,7 @@ public abstract class ClientNotifForwarder {
final String msg = final String msg =
"Dropped " + notFoundCount + " notification" + "Dropped " + notFoundCount + " notification" +
(notFoundCount == 1 ? "" : "s") + (notFoundCount == 1 ? "" : "s") +
" because classes were missing locally"; " because classes were missing locally or incompatible";
lostNotifs(msg, notFoundCount); lostNotifs(msg, notFoundCount);
// Even if result.getEarliestSequenceNumber() is now greater than // Even if result.getEarliestSequenceNumber() is now greater than
// it was initially, meaning some notifs have been dropped // it was initially, meaning some notifs have been dropped
......
...@@ -26,13 +26,8 @@ ...@@ -26,13 +26,8 @@
package com.sun.jmx.remote.internal; package com.sun.jmx.remote.internal;
import java.util.Properties; import java.util.Properties;
import java.io.IOException;
import java.rmi.Remote; import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.NoSuchObjectException;
import java.util.Properties;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.NoSuchObjectException; import java.rmi.NoSuchObjectException;
import java.security.AccessController; import java.security.AccessController;
...@@ -115,9 +110,10 @@ public final class IIOPHelper { ...@@ -115,9 +110,10 @@ public final class IIOPHelper {
* Connects the Stub to the given ORB. * Connects the Stub to the given ORB.
*/ */
public static void connect(Object stub, Object orb) public static void connect(Object stub, Object orb)
throws RemoteException throws IOException
{ {
ensureAvailable(); if (proxy == null)
throw new IOException("Connection to ORB failed, RMI/IIOP not available");
proxy.connect(stub, orb); proxy.connect(stub, orb);
} }
...@@ -125,15 +121,17 @@ public final class IIOPHelper { ...@@ -125,15 +121,17 @@ public final class IIOPHelper {
* Returns true if the given object is an ORB. * Returns true if the given object is an ORB.
*/ */
public static boolean isOrb(Object obj) { public static boolean isOrb(Object obj) {
ensureAvailable(); return (proxy == null) ? false : proxy.isOrb(obj);
return proxy.isOrb(obj);
} }
/** /**
* Creates, and returns, a new ORB instance. * Creates, and returns, a new ORB instance.
*/ */
public static Object createOrb(String[] args, Properties props) { public static Object createOrb(String[] args, Properties props)
ensureAvailable(); throws IOException
{
if (proxy == null)
throw new IOException("ORB initialization failed, RMI/IIOP not available");
return proxy.createOrb(args, props); return proxy.createOrb(args, props);
} }
...@@ -166,24 +164,27 @@ public final class IIOPHelper { ...@@ -166,24 +164,27 @@ public final class IIOPHelper {
/** /**
* Makes a server object ready to receive remote calls * Makes a server object ready to receive remote calls
*/ */
public static void exportObject(Remote obj) throws RemoteException { public static void exportObject(Remote obj) throws IOException {
ensureAvailable(); if (proxy == null)
throw new IOException("RMI object cannot be exported, RMI/IIOP not available");
proxy.exportObject(obj); proxy.exportObject(obj);
} }
/** /**
* Deregisters a server object from the runtime. * Deregisters a server object from the runtime.
*/ */
public static void unexportObject(Remote obj) throws NoSuchObjectException { public static void unexportObject(Remote obj) throws IOException {
ensureAvailable(); if (proxy == null)
throw new NoSuchObjectException("Object not exported");
proxy.unexportObject(obj); proxy.unexportObject(obj);
} }
/** /**
* Returns a stub for the given server object. * Returns a stub for the given server object.
*/ */
public static Remote toStub(Remote obj) throws NoSuchObjectException { public static Remote toStub(Remote obj) throws IOException {
ensureAvailable(); if (proxy == null)
throw new NoSuchObjectException("Object not exported");
return proxy.toStub(obj); return proxy.toStub(obj);
} }
} }
...@@ -25,16 +25,15 @@ ...@@ -25,16 +25,15 @@
package com.sun.jmx.remote.internal; package com.sun.jmx.remote.internal;
import com.sun.jmx.mbeanserver.Util;
import com.sun.jmx.remote.security.NotificationAccessController; import com.sun.jmx.remote.security.NotificationAccessController;
import com.sun.jmx.remote.util.ClassLogger; import com.sun.jmx.remote.util.ClassLogger;
import com.sun.jmx.remote.util.EnvHelp; import com.sun.jmx.remote.util.EnvHelp;
import java.io.IOException; import java.io.IOException;
import java.security.AccessControlContext; import java.security.AccessControlContext;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException; import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction; import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
...@@ -291,13 +290,18 @@ public class ServerNotifForwarder { ...@@ -291,13 +290,18 @@ public class ServerNotifForwarder {
// so that we can know too, and remove the corresponding entry from the listenerMap. // so that we can know too, and remove the corresponding entry from the listenerMap.
// See 6957378. // See 6957378.
private void snoopOnUnregister(NotificationResult nr) { private void snoopOnUnregister(NotificationResult nr) {
Set<IdAndFilter> delegateSet = listenerMap.get(MBeanServerDelegate.DELEGATE_NAME); List<IdAndFilter> copy = null;
if (delegateSet == null || delegateSet.isEmpty()) { synchronized (listenerMap) {
return; Set<IdAndFilter> delegateSet = listenerMap.get(MBeanServerDelegate.DELEGATE_NAME);
if (delegateSet == null || delegateSet.isEmpty()) {
return;
}
copy = new ArrayList<>(delegateSet);
} }
for (TargetedNotification tn : nr.getTargetedNotifications()) { for (TargetedNotification tn : nr.getTargetedNotifications()) {
Integer id = tn.getListenerID(); Integer id = tn.getListenerID();
for (IdAndFilter idaf : delegateSet) { for (IdAndFilter idaf : copy) {
if (idaf.id == id) { if (idaf.id == id) {
// This is a notification from the MBeanServerDelegate. // This is a notification from the MBeanServerDelegate.
Notification n = tn.getNotification(); Notification n = tn.getNotification();
......
...@@ -506,6 +506,7 @@ public final ...@@ -506,6 +506,7 @@ public final
* returns {@code false} otherwise. * returns {@code false} otherwise.
* @return {@code true} if and only if this class is a synthetic class as * @return {@code true} if and only if this class is a synthetic class as
* defined by the Java Language Specification. * defined by the Java Language Specification.
* @jls 13.1 The Form of a Binary
* @since 1.5 * @since 1.5
*/ */
public boolean isSynthetic() { public boolean isSynthetic() {
......
...@@ -66,6 +66,8 @@ public final class Constructor<T> extends Executable { ...@@ -66,6 +66,8 @@ public final class Constructor<T> extends Executable {
private transient ConstructorRepository genericInfo; private transient ConstructorRepository genericInfo;
private byte[] annotations; private byte[] annotations;
private byte[] parameterAnnotations; private byte[] parameterAnnotations;
// This is set by the vm at Constructor creation
private byte[] typeAnnotations;
// Generics infrastructure // Generics infrastructure
// Accessor for factory // Accessor for factory
...@@ -138,6 +140,8 @@ public final class Constructor<T> extends Executable { ...@@ -138,6 +140,8 @@ public final class Constructor<T> extends Executable {
res.root = this; res.root = this;
// Might as well eagerly propagate this if already present // Might as well eagerly propagate this if already present
res.constructorAccessor = constructorAccessor; res.constructorAccessor = constructorAccessor;
res.typeAnnotations = typeAnnotations;
return res; return res;
} }
...@@ -407,6 +411,7 @@ public final class Constructor<T> extends Executable { ...@@ -407,6 +411,7 @@ public final class Constructor<T> extends Executable {
/** /**
* {@inheritDoc} * {@inheritDoc}
* @jls 13.1 The Form of a Binary
* @since 1.5 * @since 1.5
*/ */
@Override @Override
......
...@@ -324,6 +324,7 @@ public abstract class Executable extends AccessibleObject ...@@ -324,6 +324,7 @@ public abstract class Executable extends AccessibleObject
* @return true if and only if this executable is a synthetic * @return true if and only if this executable is a synthetic
* construct as defined by * construct as defined by
* <cite>The Java&trade; Language Specification</cite>. * <cite>The Java&trade; Language Specification</cite>.
* @jls 13.1 The Form of a Binary
*/ */
public boolean isSynthetic() { public boolean isSynthetic() {
return Modifier.isSynthetic(getModifiers()); return Modifier.isSynthetic(getModifiers());
......
...@@ -80,6 +80,8 @@ class Field extends AccessibleObject implements Member { ...@@ -80,6 +80,8 @@ class Field extends AccessibleObject implements Member {
// currently only two levels deep (i.e., one root Field and // currently only two levels deep (i.e., one root Field and
// potentially many Field objects pointing to it.) // potentially many Field objects pointing to it.)
private Field root; private Field root;
// This is set by the vm at Field creation
private byte[] typeAnnotations;
// Generics infrastructure // Generics infrastructure
...@@ -144,6 +146,8 @@ class Field extends AccessibleObject implements Member { ...@@ -144,6 +146,8 @@ class Field extends AccessibleObject implements Member {
// Might as well eagerly propagate this if already present // Might as well eagerly propagate this if already present
res.fieldAccessor = fieldAccessor; res.fieldAccessor = fieldAccessor;
res.overrideFieldAccessor = overrideFieldAccessor; res.overrideFieldAccessor = overrideFieldAccessor;
res.typeAnnotations = typeAnnotations;
return res; return res;
} }
......
/* /*
* Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -87,6 +87,7 @@ interface Member { ...@@ -87,6 +87,7 @@ interface Member {
* *
* @return true if and only if this member was introduced by * @return true if and only if this member was introduced by
* the compiler. * the compiler.
* @jls 13.1 The Form of a Binary
* @since 1.5 * @since 1.5
*/ */
public boolean isSynthetic(); public boolean isSynthetic();
......
...@@ -79,7 +79,8 @@ public final class Method extends Executable { ...@@ -79,7 +79,8 @@ public final class Method extends Executable {
// currently only two levels deep (i.e., one root Method and // currently only two levels deep (i.e., one root Method and
// potentially many Method objects pointing to it.) // potentially many Method objects pointing to it.)
private Method root; private Method root;
// This is set by the vm at Method creation
private byte[] typeAnnotations;
// Generics infrastructure // Generics infrastructure
private String getGenericSignature() {return signature;} private String getGenericSignature() {return signature;}
...@@ -150,6 +151,8 @@ public final class Method extends Executable { ...@@ -150,6 +151,8 @@ public final class Method extends Executable {
res.root = this; res.root = this;
// Might as well eagerly propagate this if already present // Might as well eagerly propagate this if already present
res.methodAccessor = methodAccessor; res.methodAccessor = methodAccessor;
res.typeAnnotations = typeAnnotations;
return res; return res;
} }
...@@ -497,6 +500,7 @@ public final class Method extends Executable { ...@@ -497,6 +500,7 @@ public final class Method extends Executable {
/** /**
* {@inheritDoc} * {@inheritDoc}
* @jls 13.1 The Form of a Binary
* @since 1.5 * @since 1.5
*/ */
@Override @Override
...@@ -504,6 +508,22 @@ public final class Method extends Executable { ...@@ -504,6 +508,22 @@ public final class Method extends Executable {
return super.isSynthetic(); return super.isSynthetic();
} }
/**
* Returns {@code true} if this method is a default
* method; returns {@code false} otherwise.
*
* A default method is a non-abstract method, that is, a method
* with a body, declared in an interface type.
*
* @return true if and only if this method is a default
* method as defined by the Java Language Specification.
* @since 1.8
*/
public boolean isDefault() {
return (getModifiers() & Modifier.ABSTRACT) == 0 &&
getDeclaringClass().isInterface();
}
// NOTE that there is no synchronization used here. It is correct // NOTE that there is no synchronization used here. It is correct
// (though not efficient) to generate more than one MethodAccessor // (though not efficient) to generate more than one MethodAccessor
// for a given Method. However, avoiding synchronization will // for a given Method. However, avoiding synchronization will
......
...@@ -129,15 +129,6 @@ import sun.net.www.MessageHeader; ...@@ -129,15 +129,6 @@ import sun.net.www.MessageHeader;
* <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a> * <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a>
* </pre></blockquote> * </pre></blockquote>
* *
* Note about <code>fileNameMap</code>: In versions prior to JDK 1.1.6,
* field <code>fileNameMap</code> of <code>URLConnection</code> was public.
* In JDK 1.1.6 and later, <code>fileNameMap</code> is private; accessor
* and mutator methods {@link #getFileNameMap() getFileNameMap} and
* {@link #setFileNameMap(java.net.FileNameMap) setFileNameMap} are added
* to access it. This change is also described on the <a href=
* "http://java.sun.com/products/jdk/1.2/compatibility.html">
* Compatibility</a> page.
*
* Invoking the <tt>close()</tt> methods on the <tt>InputStream</tt> or <tt>OutputStream</tt> of an * Invoking the <tt>close()</tt> methods on the <tt>InputStream</tt> or <tt>OutputStream</tt> of an
* <tt>URLConnection</tt> after a request may free network resources associated with this * <tt>URLConnection</tt> after a request may free network resources associated with this
* instance, unless particular protocol specifications specify different behaviours * instance, unless particular protocol specifications specify different behaviours
...@@ -305,8 +296,7 @@ public abstract class URLConnection { ...@@ -305,8 +296,7 @@ public abstract class URLConnection {
* Loads filename map (a mimetable) from a data file. It will * Loads filename map (a mimetable) from a data file. It will
* first try to load the user-specific table, defined * first try to load the user-specific table, defined
* by &quot;content.types.user.table&quot; property. If that fails, * by &quot;content.types.user.table&quot; property. If that fails,
* it tries to load the default built-in table at * it tries to load the default built-in table.
* lib/content-types.properties under java home.
* *
* @return the FileNameMap * @return the FileNameMap
* @since 1.2 * @since 1.2
......
...@@ -749,7 +749,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca ...@@ -749,7 +749,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
* *
* @see #NARROW_STANDALONE * @see #NARROW_STANDALONE
* @see #SHORT_FORMAT * @see #SHORT_FORMAT
* @see #LONG_FOTMAT * @see #LONG_FORMAT
* @since 1.8 * @since 1.8
*/ */
public static final int NARROW_FORMAT = 4; public static final int NARROW_FORMAT = 4;
......
...@@ -1188,7 +1188,7 @@ class Properties extends Hashtable<Object,Object> { ...@@ -1188,7 +1188,7 @@ class Properties extends Hashtable<Object,Object> {
provider = loadProviderAsService(cl); provider = loadProviderAsService(cl);
if (provider != null) if (provider != null)
return provider; return provider;
throw new InternalError("No fallback"); return new jdk.internal.util.xml.BasicXmlPropertiesProvider();
}}); }});
} }
......
...@@ -239,12 +239,10 @@ public class MBeanFeatureInfo implements Serializable, DescriptorRead { ...@@ -239,12 +239,10 @@ public class MBeanFeatureInfo implements Serializable, DescriptorRead {
case 1: case 1:
final String[] names = (String[])in.readObject(); final String[] names = (String[])in.readObject();
if (names.length == 0) { final Object[] values = (Object[]) in.readObject();
descriptor = ImmutableDescriptor.EMPTY_DESCRIPTOR; descriptor = (names.length == 0) ?
} else { ImmutableDescriptor.EMPTY_DESCRIPTOR :
final Object[] values = (Object[])in.readObject(); new ImmutableDescriptor(names, values);
descriptor = new ImmutableDescriptor(names, values);
}
break; break;
case 0: case 0:
......
...@@ -704,12 +704,10 @@ public class MBeanInfo implements Cloneable, Serializable, DescriptorRead { ...@@ -704,12 +704,10 @@ public class MBeanInfo implements Cloneable, Serializable, DescriptorRead {
case 1: case 1:
final String[] names = (String[])in.readObject(); final String[] names = (String[])in.readObject();
if (names.length == 0) { final Object[] values = (Object[]) in.readObject();
descriptor = ImmutableDescriptor.EMPTY_DESCRIPTOR; descriptor = (names.length == 0) ?
} else { ImmutableDescriptor.EMPTY_DESCRIPTOR :
final Object[] values = (Object[])in.readObject(); new ImmutableDescriptor(names, values);
descriptor = new ImmutableDescriptor(names, values);
}
break; break;
case 0: case 0:
......
...@@ -137,8 +137,10 @@ import com.sun.jmx.remote.util.EnvHelp; ...@@ -137,8 +137,10 @@ import com.sun.jmx.remote.util.EnvHelp;
* JAR conventions for service providers</a>, where the service * JAR conventions for service providers</a>, where the service
* interface is <code>JMXConnectorProvider</code>.</p> * interface is <code>JMXConnectorProvider</code>.</p>
* *
* <p>Every implementation must support the RMI connector protocols, * <p>Every implementation must support the RMI connector protocol with
* specified with the string <code>rmi</code> or * the default RMI transport, specified with string <code>rmi</code>.
* An implementation may optionally support the RMI connector protocol
* with the RMI/IIOP transport, specified with the string
* <code>iiop</code>.</p> * <code>iiop</code>.</p>
* *
* <p>Once a provider is found, the result of the * <p>Once a provider is found, the result of the
......
...@@ -129,8 +129,10 @@ import javax.management.MBeanServer; ...@@ -129,8 +129,10 @@ import javax.management.MBeanServer;
* JAR conventions for service providers</a>, where the service * JAR conventions for service providers</a>, where the service
* interface is <code>JMXConnectorServerProvider</code>.</p> * interface is <code>JMXConnectorServerProvider</code>.</p>
* *
* <p>Every implementation must support the RMI connector protocols, * <p>Every implementation must support the RMI connector protocol with
* specified with the string <code>rmi</code> or * the default RMI transport, specified with string <code>rmi</code>.
* An implementation may optionally support the RMI connector protocol
* with the RMI/IIOP transport, specified with the string
* <code>iiop</code>.</p> * <code>iiop</code>.</p>
* *
* <p>Once a provider is found, the result of the * <p>Once a provider is found, the result of the
......
...@@ -238,10 +238,21 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable ...@@ -238,10 +238,21 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable
//-------------------------------------------------------------------- //--------------------------------------------------------------------
// implements JMXConnector interface // implements JMXConnector interface
//-------------------------------------------------------------------- //--------------------------------------------------------------------
/**
* @throws IOException if the connection could not be made because of a
* communication problem, or in the case of the {@code iiop} protocol,
* that RMI/IIOP is not supported
*/
public void connect() throws IOException { public void connect() throws IOException {
connect(null); connect(null);
} }
/**
* @throws IOException if the connection could not be made because of a
* communication problem, or in the case of the {@code iiop} protocol,
* that RMI/IIOP is not supported
*/
public synchronized void connect(Map<String,?> environment) public synchronized void connect(Map<String,?> environment)
throws IOException { throws IOException {
final boolean tracing = logger.traceOn(); final boolean tracing = logger.traceOn();
......
...@@ -337,7 +337,8 @@ public class RMIConnectorServer extends JMXConnectorServer { ...@@ -337,7 +337,8 @@ public class RMIConnectorServer extends JMXConnectorServer {
* @exception IllegalStateException if the connector server has * @exception IllegalStateException if the connector server has
* not been attached to an MBean server. * not been attached to an MBean server.
* @exception IOException if the connector server cannot be * @exception IOException if the connector server cannot be
* started. * started, or in the case of the {@code iiop} protocol, that
* RMI/IIOP is not supported.
*/ */
public synchronized void start() throws IOException { public synchronized void start() throws IOException {
final boolean tracing = logger.traceOn(); final boolean tracing = logger.traceOn();
......
...@@ -36,8 +36,8 @@ questions. ...@@ -36,8 +36,8 @@ questions.
that different implementations of the RMI connector can that different implementations of the RMI connector can
interoperate.</p> interoperate.</p>
<p>The RMI connector supports both the JRMP and the IIOP transports <p>The RMI connector supports the JRMP transport for RMI, and
for RMI.</p> optionally the IIOP transport.</p>
<p>Like most connectors in the JMX Remote API, an RMI connector <p>Like most connectors in the JMX Remote API, an RMI connector
usually has an address, which usually has an address, which
......
...@@ -43,10 +43,15 @@ questions. ...@@ -43,10 +43,15 @@ questions.
You can provide the name of your default realm and Key Distribution You can provide the name of your default realm and Key Distribution
Center (KDC) host for that realm using the system properties Center (KDC) host for that realm using the system properties
java.security.krb5.realm and java.security.krb5.kdc. Alternatively, you {@code java.security.krb5.realm} and {@code java.security.krb5.kdc}.
can provide an MIT style configuration file called krb5.conf in Both properties must be set.
&lt;java-home&gt;/lib/security. If you place this file elsewhere, you can Alternatively, the {@code java.security.krb5.conf} system property can
indicate that location via the system property java.security.krb5.conf.<p> be set to the location of an MIT style {@code krb5.conf} configuration
file. If none of these system properties are set, the {@code krb5.conf}
file is searched for in an implementation-specific manner. Typically,
an implementation will first look for a {@code krb5.conf} file in
{@code <java-home>/lib/security} and failing that, in an OS-specific
location.<p>
<!-- <!--
<h2>Package Specification</h2> <h2>Package Specification</h2>
......
/*
* Copyright (c) 2000, 2005, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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 General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// SAX DTD handler.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: DTDHandler.java,v 1.2 2004/11/03 22:44:51 jsuttor Exp $
package jdk.internal.org.xml.sax;
/**
* Receive notification of basic DTD-related events.
*
* <blockquote>
* <em>This module, both source code and documentation, is in the
* Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
* See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
* for further information.
* </blockquote>
*
* <p>If a SAX application needs information about notations and
* unparsed entities, then the application implements this
* interface and registers an instance with the SAX parser using
* the parser's setDTDHandler method. The parser uses the
* instance to report notation and unparsed entity declarations to
* the application.</p>
*
* <p>Note that this interface includes only those DTD events that
* the XML recommendation <em>requires</em> processors to report:
* notation and unparsed entity declarations.</p>
*
* <p>The SAX parser may report these events in any order, regardless
* of the order in which the notations and unparsed entities were
* declared; however, all DTD events must be reported after the
* document handler's startDocument event, and before the first
* startElement event.
* (If the {@link org.xml.sax.ext.LexicalHandler LexicalHandler} is
* used, these events must also be reported before the endDTD event.)
* </p>
*
* <p>It is up to the application to store the information for
* future use (perhaps in a hash table or object tree).
* If the application encounters attributes of type "NOTATION",
* "ENTITY", or "ENTITIES", it can use the information that it
* obtained through this interface to find the entity and/or
* notation corresponding with the attribute value.</p>
*
* @since SAX 1.0
* @author David Megginson
* @see org.xml.sax.XMLReader#setDTDHandler
*/
public interface DTDHandler {
/**
* Receive notification of a notation declaration event.
*
* <p>It is up to the application to record the notation for later
* reference, if necessary;
* notations may appear as attribute values and in unparsed entity
* declarations, and are sometime used with processing instruction
* target names.</p>
*
* <p>At least one of publicId and systemId must be non-null.
* If a system identifier is present, and it is a URL, the SAX
* parser must resolve it fully before passing it to the
* application through this event.</p>
*
* <p>There is no guarantee that the notation declaration will be
* reported before any unparsed entities that use it.</p>
*
* @param name The notation name.
* @param publicId The notation's public identifier, or null if
* none was given.
* @param systemId The notation's system identifier, or null if
* none was given.
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
* @see #unparsedEntityDecl
* @see org.xml.sax.Attributes
*/
public abstract void notationDecl (String name,
String publicId,
String systemId)
throws SAXException;
/**
* Receive notification of an unparsed entity declaration event.
*
* <p>Note that the notation name corresponds to a notation
* reported by the {@link #notationDecl notationDecl} event.
* It is up to the application to record the entity for later
* reference, if necessary;
* unparsed entities may appear as attribute values.
* </p>
*
* <p>If the system identifier is a URL, the parser must resolve it
* fully before passing it to the application.</p>
*
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
* @param name The unparsed entity's name.
* @param publicId The entity's public identifier, or null if none
* was given.
* @param systemId The entity's system identifier.
* @param notationName The name of the associated notation.
* @see #notationDecl
* @see org.xml.sax.Attributes
*/
public abstract void unparsedEntityDecl (String name,
String publicId,
String systemId,
String notationName)
throws SAXException;
}
// end of DTDHandler.java
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -104,7 +104,7 @@ public abstract class TimeZoneNamesBundle extends OpenListResourceBundle { ...@@ -104,7 +104,7 @@ public abstract class TimeZoneNamesBundle extends OpenListResourceBundle {
if (contents == null) { if (contents == null) {
return null; return null;
} }
int clen = Math.min(n, contents.length); int clen = Math.min(n - 1, contents.length);
String[] tmpobj = new String[clen+1]; String[] tmpobj = new String[clen+1];
tmpobj[0] = key; tmpobj[0] = key;
System.arraycopy(contents, 0, tmpobj, 1, clen); System.arraycopy(contents, 0, tmpobj, 1, clen);
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册