Skip to content
This repository has been archived by the owner on Jan 1, 2022. It is now read-only.

Commit

Permalink
Add source for jdk_1.4.0_04
Browse files Browse the repository at this point in the history
  • Loading branch information
fanhongtao committed Aug 18, 2013
1 parent 70023ae commit 5015bbe
Show file tree
Hide file tree
Showing 12 changed files with 410 additions and 272 deletions.
4 changes: 2 additions & 2 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2002 Sun Microsystems, Inc., 4150 Network Circle,
Copyright 2003 Sun Microsystems, Inc., 4150 Network Circle,
Santa Clara, California 95054, U.S.A. All rights reserved.

Sun Microsystems, Inc. has intellectual property rights relating to
Expand Down Expand Up @@ -41,7 +41,7 @@ Federal Acquisitions: Commercial Software - Government Users Subject
to Standard License Terms and Conditions.


Copyright 2002 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
Copyright 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
California 95054, �tats-Unis. Tous droits r�serv�s.

Sun Microsystems, Inc. d�tient les droits de propri�t�
Expand Down
275 changes: 140 additions & 135 deletions LICENSE

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ Redistribution

In addition, the Java Web Start product may be excluded from
redistributions. The Java Web Start product is contained in a
file named javaws-1_0_1_04-solaris-sparc-i.zip,
javaws-1_0_1_04-solaris-i586-i.zip,
javaws-1_0_1_04-linux-i586-i.zip, or
javaws-1_0_1_04-windows-i586-i.exe, depending on the platform.
file named javaws-1_0_1_05-solaris-sparc-i.zip,
javaws-1_0_1_05-solaris-i586-i.zip,
javaws-1_0_1_05-linux-i586-i.zip, or
javaws-1_0_1_05-windows-i586-i.exe, depending on the platform.


Unlimited Strength Java Cryptography Extension
Expand Down Expand Up @@ -204,6 +204,6 @@ Sun Java Web Pages
The Java 2 SDK, Standard Edition, is a product of Sun Microsystems(TM),
Inc. This product includes code licensed from RSA Security.

Copyright 2002 Sun Microsystems, Inc., 4150 Network Circle,
Copyright 2003 Sun Microsystems, Inc., 4150 Network Circle,
Santa Clara, California 95054, U.S.A. All rights reserved.

10 changes: 5 additions & 5 deletions src/com/sun/corba/se/internal/util/Utility.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)Utility.java 1.32 01/12/03
* @(#)Utility.java 1.34 03/02/14
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/

Expand Down Expand Up @@ -863,9 +863,9 @@ public static String stubNameFromRepID (String repID) {
/*
* Load an RMI-IIOP Stub.
*/
public static Remote loadStub (ObjectImpl narrowFrom,
public static Stub loadStub (ObjectImpl narrowFrom,
Class narrowTo) {
Remote result = null;
Stub result = null;

try {

Expand Down Expand Up @@ -903,7 +903,7 @@ public static Remote loadStub (ObjectImpl narrowFrom,
narrowTo.getClassLoader());
}
// Create a stub instance and set the delegate...
result = (Remote) resultClass.newInstance();
result = (Stub) resultClass.newInstance();
((ObjectImpl)result)._set_delegate(narrowFrom._get_delegate());

} catch (Exception err) {
Expand Down
18 changes: 15 additions & 3 deletions src/java/awt/Dialog.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)Dialog.java 1.83 01/12/03
* @(#)Dialog.java 1.85 03/02/14
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package java.awt;
Expand Down Expand Up @@ -62,7 +62,7 @@
* @see WindowEvent
* @see Window#addWindowListener
*
* @version 1.83, 12/03/01
* @version 1.85, 02/14/03
* @author Sami Shaio
* @author Arthur van Hoff
* @since JDK1.0
Expand Down Expand Up @@ -519,6 +519,18 @@ public void show() {
enqueueKeyEvents(time, predictedFocusOwner);

if (Toolkit.getEventQueue().isDispatchThread()) {
/*
* dispose SequencedEvent we are dispatching on current
* AppContext, to prevent us from hang.
*
* BugId 4531693 ([email protected])
*/
SequencedEvent currentSequencedEvent = KeyboardFocusManager.
getCurrentKeyboardFocusManager().getCurrentSequencedEvent();
if (currentSequencedEvent != null) {
currentSequencedEvent.dispose();
}

EventDispatchThread dispatchThread =
(EventDispatchThread)Thread.currentThread();
dispatchThread.pumpEventsForHierarchy(new Conditional() {
Expand Down
23 changes: 20 additions & 3 deletions src/java/awt/KeyboardFocusManager.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)KeyboardFocusManager.java 1.25 02/03/02
* @(#)KeyboardFocusManager.java 1.28 03/02/14
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package java.awt;
Expand Down Expand Up @@ -52,7 +52,7 @@
* ClassLoader.
*
* @author David Mendenhall
* @version 1.25, 03/02/02
* @version 1.28, 02/14/03
*
* @see Window
* @see Frame
Expand Down Expand Up @@ -302,6 +302,23 @@ public synchronized static void setCurrentKeyboardFocusManager(
*/
private static AWTPermission replaceKeyboardFocusManagerPermission;

/*
* SequencedEvent which is currently dispatched in AppContext.
*/
transient SequencedEvent currentSequencedEvent = null;

final void setCurrentSequencedEvent(SequencedEvent current) {
synchronized (SequencedEvent.class) {
currentSequencedEvent = current;
}
}

final SequencedEvent getCurrentSequencedEvent() {
synchronized (SequencedEvent.class) {
return currentSequencedEvent;
}
}

static Set loadFocusTraversalKeys(String propName, String defaultValue,
Set targetSet) {
String keys = Toolkit.getProperty(propName, defaultValue);
Expand Down
72 changes: 47 additions & 25 deletions src/java/awt/SequencedEvent.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)SequencedEvent.java 1.4 01/12/03
* @(#)SequencedEvent.java 1.8 03/02/14
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/

Expand All @@ -22,7 +22,7 @@
* before the wrapping SequencedEvent was able to be dispatched. In this case,
* the nested event is never dispatched.
*
* @version 1.4, 12/03/01
* @version 1.8, 02/14/03
* @author David Mendenhall
*/
class SequencedEvent extends AWTEvent implements ActiveEvent {
Expand Down Expand Up @@ -102,6 +102,8 @@ public boolean evaluate() {
}

if (!disposed) {
KeyboardFocusManager.getCurrentKeyboardFocusManager().
setCurrentSequencedEvent(this);
Toolkit.getEventQueue().dispatchEvent(nested);
}
} finally {
Expand All @@ -127,30 +129,50 @@ private final static boolean isOwnerAppContextDisposed(SequencedEvent se) {
* Disposes of this instance. This method is invoked once the nested event
* has been dispatched and handled, or when the peer of the target of the
* nested event has been disposed with a call to Component.removeNotify.
*
* NOTE: Locking protocol. Since SunToolkit.postEvent can get EventQueue lock,
* it shall never be called while holding the lock on the list,
* as EventQueue lock is held during dispatching and dispatch() will get
* lock on the list. The locks should be acquired in the same order.
*/
final void dispose() {
synchronized (SequencedEvent.class) {
disposed = true;

// Wake myself up
if (appContext != null) {
SunToolkit.postEvent(appContext, new SentEvent());
}
SequencedEvent.class.notifyAll();

if (list.getFirst() == this) {
list.removeFirst();
synchronized (SequencedEvent.class) {
if (disposed) {
return;
}
if (KeyboardFocusManager.getCurrentKeyboardFocusManager().
getCurrentSequencedEvent() == this) {
KeyboardFocusManager.getCurrentKeyboardFocusManager().
setCurrentSequencedEvent(null);
}
disposed = true;
}

// Wake up waiting threads
if (!list.isEmpty()) {
SequencedEvent next = (SequencedEvent)list.getFirst();
if (next.appContext != null) {
SunToolkit.postEvent(next.appContext, new SentEvent());
}
}
} else {
list.remove(this);
}
}
// Wake myself up
if (appContext != null) {
SunToolkit.postEvent(appContext, new SentEvent());
}

SequencedEvent next = null;

synchronized (SequencedEvent.class) {
SequencedEvent.class.notifyAll();
if (list.getFirst() == this) {
list.removeFirst();
// Wake up waiting threads
if (!list.isEmpty()) {
next = (SequencedEvent)list.getFirst();
}
} else {
list.remove(this);
}
}
// Wake up waiting threads
if (next != null && next.appContext != null) {
SunToolkit.postEvent(next.appContext, new SentEvent());
}
}
}



17 changes: 12 additions & 5 deletions src/java/net/URLClassLoader.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)URLClassLoader.java 1.76 02/09/04
* @(#)URLClassLoader.java 1.78 03/02/14
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/

Expand Down Expand Up @@ -48,7 +48,7 @@
* access the URLs specified when the URLClassLoader was created.
*
* @author David Connelly
* @version 1.76, 09/04/02
* @version 1.78, 02/14/03
* @since 1.2
*/
public class URLClassLoader extends SecureClassLoader {
Expand Down Expand Up @@ -418,12 +418,15 @@ protected PermissionCollection getPermissions(CodeSource codesource)
URL url = codesource.getLocation();

Permission p;
URLConnection urlConnection;

try {
p = url.openConnection().getPermission();
urlConnection = url.openConnection();
p = urlConnection.getPermission();
} catch (java.io.IOException ioe) {

p = null;
urlConnection = null;
}

if (p instanceof FilePermission) {
Expand All @@ -442,7 +445,11 @@ protected PermissionCollection getPermissions(CodeSource codesource)
path += "-";
p = new FilePermission(path, "read");
} else {
String host = url.getHost();
URL locUrl = url;
if (urlConnection instanceof JarURLConnection) {
locUrl = ((JarURLConnection)urlConnection).getJarFileURL();
}
String host = locUrl.getHost();
if (host == null)
host = "localhost";
p = new SocketPermission(host,"connect, accept");
Expand Down
Loading

0 comments on commit 5015bbe

Please sign in to comment.