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.1_07, No change for jdk_1.4.1_06
Browse files Browse the repository at this point in the history
  • Loading branch information
fanhongtao committed Aug 19, 2013
1 parent 6fbb0df commit 1e869b3
Show file tree
Hide file tree
Showing 13 changed files with 269 additions and 218 deletions.
4 changes: 2 additions & 2 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
Copyright 2004 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 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
Copyright 2004 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
200 changes: 64 additions & 136 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,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 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
California 95054, U.S.A. All rights reserved.

6 changes: 3 additions & 3 deletions src/com/sun/corba/se/internal/iiop/CDRInputStream_1_0.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)CDRInputStream_1_0.java 1.80 03/04/25
* @(#)CDRInputStream_1_0.java 1.82 03/12/02
*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
Expand Down Expand Up @@ -1755,7 +1755,7 @@ private String read_repositoryIds() {
} else {

// read first array element and store it as an indirection to the whole array
int indirection = get_offset() - 4;
int indirection = get_offset();
String repID = read_repositoryId();
if (repositoryIdCache == null)
repositoryIdCache = new CacheTable(false);
Expand Down
5 changes: 3 additions & 2 deletions src/com/sun/corba/se/internal/iiop/GIOPImpl.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)GIOPImpl.java 1.48 01/12/03
* @(#)GIOPImpl.java 1.50 03/12/02
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/

Expand Down Expand Up @@ -241,6 +241,7 @@ private synchronized ListenerThread createListener(final String socketType,
lis = (ListenerThread) AccessController.doPrivileged(new PrivilegedAction() {
public java.lang.Object run() {
ListenerThread thread = new ListenerThread(finalTable,
orb.threadGroup,
ss,
socketType);
thread.setDaemon(true);
Expand Down
66 changes: 47 additions & 19 deletions src/com/sun/corba/se/internal/iiop/ORB.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)ORB.java 1.215 01/12/03
* @(#)ORB.java 1.217 03/12/02
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/

Expand All @@ -10,6 +10,7 @@
// Import JDK stuff
import java.net.*;
import java.util.*;
import java.security.*;

// Import our stuff

Expand Down Expand Up @@ -76,7 +77,49 @@ public class ORB extends com.sun.corba.se.internal.corba.ORB implements RequestH
protected int transientServerId=0;

// The thread group of the main thread (for applications) or applet.
protected ThreadGroup threadGroup;
// We make it package private from a security perspective.
static ThreadGroup threadGroup;

// We intend to create new threads in a reliable thread group.
// This avoids problems if the application/applet
// creates a thread group, makes JavaIDL calls which create a new
// connection and ReaderThread, and then destroys the thread
// group. If our ReaderThreads were to be part of such destroyed thread
// group then it might get killed and cause other invoking threads
// sharing the same connection to get a non-restartable
// CommunicationFailure. We'd like to avoid that.
//
// Our solution is to create all of our threads in the highest thread
// group that we have access to, given our own security clearance.
//
static {
try {
// try to get a thread group that's as high in the threadgroup
// parent-child hierarchy, as we can get to.
// this will prevent an ORB thread created during applet-init from
// being killed when an applet dies.
threadGroup = (ThreadGroup) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
ThreadGroup tg, ptg;
tg = ptg = Thread.currentThread().getThreadGroup();
try {
while (ptg != null) {
tg = ptg;
ptg = tg.getParent();
}
} catch (SecurityException se) {
// Discontinue going higher on a security exception.
}
return new ThreadGroup(tg, "ORB ThreadGroup");
}
}
);
} catch (SecurityException e) {
// something wrong, we go back to the original code
threadGroup = Thread.currentThread().getThreadGroup();
}
}

protected ServiceContextRegistry scr ;

Expand All @@ -93,22 +136,7 @@ public ORB()
// tagged components can be fully decoded when an IOR
// is unmarshalled.
TaggedComponentFactories.registerFactories() ;

//
// We attempt to create new threads in this thread group, if
// possible. This avoids problems if the application/applet
// creates a thread group, makes JavaIDL calls which create a new
// connection and ReaderThread, and then destroys the thread
// group. If our ReaderThread were part of this destroyed thread
// group then it might get killed and cause other invoking threads
// sharing the same connection to get a non-restartable
// CommunicationFailure. We'd like to avoid that.
//
// Our solution is to create all of our threads in the same
// thread group that we were initialized under.
//
threadGroup = Thread.currentThread().getThreadGroup();


// Compute transientServerId = (milliseconds since Jan 1, 1970)/10.
// Note: transientServerId will wrap in about 2^32 / 8640000 = 497 days.
// If two ORBS are started at the same time then there is a possibility
Expand Down
10 changes: 5 additions & 5 deletions src/java/io/ObjectInputStream.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)ObjectInputStream.java 1.142 02/07/19
* @(#)ObjectInputStream.java 1.144 03/12/02
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/

Expand Down Expand Up @@ -156,7 +156,7 @@
*
* @author Mike Warres
* @author Roger Riggs
* @version 1.142, 02/07/19
* @version 1.144, 03/12/02
* @see java.io.DataInput
* @see java.io.ObjectOutputStream
* @see java.io.Serializable
Expand Down Expand Up @@ -1502,8 +1502,8 @@ private ObjectStreamClass readNonProxyDesc(boolean unshared)
try {
readDesc = readClassDescriptor();
} catch (ClassNotFoundException ex) {
// REMIND: do something less drastic here?
throw new StreamCorruptedException();
throw (IOException) new InvalidClassException(
"failed to read class descriptor").initCause(ex);
}

Class cl = null;
Expand Down
9 changes: 6 additions & 3 deletions src/java/net/PlainSocketImpl.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)PlainSocketImpl.java 1.60 03/04/25
* @(#)PlainSocketImpl.java 1.62 03/12/02
*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/

Expand All @@ -22,7 +22,7 @@
* Note this class should <b>NOT</b> be public.
*
* @author Steven B. Byrne
* @version 1.60, 04/25/03
* @version 1.62, 12/02/03
*/
class PlainSocketImpl extends SocketImpl
{
Expand Down Expand Up @@ -438,6 +438,9 @@ protected void close() throws IOException {
synchronized(fdLock) {
if (fd != null) {
if (fdUseCount == 0) {
if (closePending) {
return;
}
closePending = true;
/*
* We close the FileDescriptor in two-steps - first the
Expand Down
46 changes: 43 additions & 3 deletions src/java/nio/charset/Charset.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)Charset.java 1.32 02/01/02
* @(#)Charset.java 1.34 03/12/02
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/

Expand Down Expand Up @@ -232,7 +232,7 @@
*
* @author Mark Reinhold
* @author JSR-51 Expert Group
* @version 1.32, 02/01/02
* @version 1.34, 03/12/02
* @since 1.4
*
* @see CharsetDecoder
Expand Down Expand Up @@ -371,13 +371,53 @@ public Object run() {
}
}

/* The extended set of charsets */
private static Object extendedProviderLock = new Object();
private static boolean extendedProviderProbed = false;
private static CharsetProvider extendedProvider = null;

private static void probeExtendedProvider() {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
try {
Class epc
= Class.forName("sun.nio.cs.ext.ExtendedCharsets");
extendedProvider = (CharsetProvider)epc.newInstance();
} catch (ClassNotFoundException x) {
// Extended charsets not available
// (charsets.jar not present)
} catch (InstantiationException x) {
throw new Error(x);
} catch (IllegalAccessException x) {
throw new Error(x);
}
return null;
}
});
}

private static Charset lookupExtendedCharset(String charsetName) {
CharsetProvider ecp = null;
synchronized (extendedProviderLock) {
if (!extendedProviderProbed) {
probeExtendedProvider();
extendedProviderProbed = true;
}
ecp = extendedProvider;
}
return (ecp != null) ? ecp.charsetForName(charsetName) : null;
}

private static Charset lookup(String charsetName) {
if (charsetName == null)
throw new IllegalArgumentException("Null charset name");
Object[] ca = cache;
if ((ca != null) && ca[0].equals(charsetName))
return (Charset)ca[1];
Charset cs = standardProvider.charsetForName(charsetName);
if (cs != null)
return cache(charsetName, cs);
cs = lookupExtendedCharset(charsetName);
if (cs != null)
return cache(charsetName, cs);
cs = lookupViaProviders(charsetName);
Expand Down
6 changes: 3 additions & 3 deletions src/java/text/RBTableBuilder.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)RBTableBuilder.java 1.7 01/12/03
* @(#)RBTableBuilder.java 1.9 03/12/02
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/

Expand Down Expand Up @@ -76,7 +76,7 @@ public void build(String pattern, int decmp) throws ParseException
// the combining characters must be in their canonical order
//
Normalizer.Mode mode = NormalizerUtilities.toNormalizerMode(decmp);
pattern = Normalizer.normalize(pattern, mode, 0);
pattern = Normalizer.normalize(pattern, mode, 0, true);

// Build the merged collation entries
// Since rules can be specified in any order in the string
Expand Down
10 changes: 5 additions & 5 deletions src/javax/swing/JTable.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)JTable.java 1.202 02/07/15
* @(#)JTable.java 1.204 03/12/02
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/

Expand Down Expand Up @@ -122,7 +122,7 @@
* attribute: isContainer false
* description: A component which displays data in a two dimensional grid.
*
* @version 1.202 07/15/02
* @version 1.204 12/02/03
* @author Philip Milne
*/
/* The first versions of the JTable, contained in Swing-0.1 through
Expand Down Expand Up @@ -2172,6 +2172,7 @@ public void doLayout() {
if (delta != 0) {
resizingColumn.setWidth(resizingColumn.getWidth() + delta);
}
setWidthsFromPreferredWidths(true);
}

super.doLayout();
Expand Down Expand Up @@ -2215,6 +2216,7 @@ public void sizeColumnsToFit(int resizingColumn) {
else {
int delta = getWidth() - getColumnModel().getTotalColumnWidth();
accommodateDelta(resizingColumn, delta);
setWidthsFromPreferredWidths(true);
}
}
}
Expand Down Expand Up @@ -2295,8 +2297,6 @@ private void accommodateDelta(int resizingColumnIndex, int delta) {

adjustSizes(totalWidth + delta, r, false);

setWidthsFromPreferredWidths(true);
// setWidthsFromPreferredWidths(false);
return;
}

Expand Down
14 changes: 10 additions & 4 deletions src/javax/swing/text/DefaultHighlighter.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @(#)DefaultHighlighter.java 1.35 01/12/03
* @(#)DefaultHighlighter.java 1.37 03/12/02
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.swing.text;
Expand All @@ -15,7 +15,7 @@
* painter that renders in a solid color.
*
* @author Timothy Prinzing
* @version 1.35 12/03/01
* @version 1.37 12/02/03
* @see Highlighter
*/
public class DefaultHighlighter extends LayeredHighlighter {
Expand Down Expand Up @@ -238,7 +238,11 @@ public void changeHighlight(Object tag, int p0, int p1) throws BadLocationExcept
* @see Highlighter#getHighlights
*/
public Highlighter.Highlight[] getHighlights() {
Highlighter.Highlight[] h = new Highlighter.Highlight[highlights.size()];
int size = highlights.size();
if (size == 0) {
return noHighlights;
}
Highlighter.Highlight[] h = new Highlighter.Highlight[size];
highlights.copyInto(h);
return h;
}
Expand Down Expand Up @@ -291,6 +295,8 @@ public boolean getDrawsLayeredHighlights() {

// ---- member variables --------------------------------------------

private final static Highlighter.Highlight[] noHighlights =
new Highlighter.Highlight[0];
private Vector highlights = new Vector(); // Vector<HighlightInfo>
private JTextComponent component;
private boolean drawsLayeredHighlights;
Expand Down
Loading

0 comments on commit 1e869b3

Please sign in to comment.