--- a/jdk/make/Setup.gmk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/make/Setup.gmk Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, 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
@@ -27,7 +27,7 @@
# To build with all warnings enabled, do the following:
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
-JAVAC_WARNINGS := -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,classfile,dep-ann,divzero,empty,overloads,try,varargs -Werror
+JAVAC_WARNINGS := -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,cast,classfile,dep-ann,divzero,empty,overloads,static,try,varargs -Werror
# Any java code executed during a JDK build to build other parts of the JDK must be
# executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this
--- a/jdk/make/mapfiles/libmanagement/mapfile-vers Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/make/mapfiles/libmanagement/mapfile-vers Tue Jan 28 11:22:25 2014 -0800
@@ -27,17 +27,17 @@
SUNWprivate_1.1 {
global:
- Java_sun_management_OperatingSystemImpl_getCommittedVirtualMemorySize;
- Java_sun_management_OperatingSystemImpl_getFreePhysicalMemorySize;
- Java_sun_management_OperatingSystemImpl_getFreeSwapSpaceSize;
- Java_sun_management_OperatingSystemImpl_getMaxFileDescriptorCount;
- Java_sun_management_OperatingSystemImpl_getOpenFileDescriptorCount;
- Java_sun_management_OperatingSystemImpl_getProcessCpuLoad;
- Java_sun_management_OperatingSystemImpl_getProcessCpuTime;
- Java_sun_management_OperatingSystemImpl_getSystemCpuLoad;
- Java_sun_management_OperatingSystemImpl_getTotalPhysicalMemorySize;
- Java_sun_management_OperatingSystemImpl_getTotalSwapSpaceSize;
- Java_sun_management_OperatingSystemImpl_initialize;
+ Java_sun_management_OperatingSystemImpl_getCommittedVirtualMemorySize0;
+ Java_sun_management_OperatingSystemImpl_getFreePhysicalMemorySize0;
+ Java_sun_management_OperatingSystemImpl_getFreeSwapSpaceSize0;
+ Java_sun_management_OperatingSystemImpl_getMaxFileDescriptorCount0;
+ Java_sun_management_OperatingSystemImpl_getOpenFileDescriptorCount0;
+ Java_sun_management_OperatingSystemImpl_getProcessCpuLoad0;
+ Java_sun_management_OperatingSystemImpl_getProcessCpuTime0;
+ Java_sun_management_OperatingSystemImpl_getSystemCpuLoad0;
+ Java_sun_management_OperatingSystemImpl_getTotalPhysicalMemorySize0;
+ Java_sun_management_OperatingSystemImpl_getTotalSwapSpaceSize0;
+ Java_sun_management_OperatingSystemImpl_initialize0;
Java_sun_management_ClassLoadingImpl_setVerboseClass;
Java_sun_management_DiagnosticCommandImpl_executeDiagnosticCommand;
Java_sun_management_DiagnosticCommandImpl_getDiagnosticCommands;
--- a/jdk/src/macosx/classes/apple/security/KeychainStore.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/macosx/classes/apple/security/KeychainStore.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -248,7 +248,7 @@
if (((KeyEntry)entry).chain == null) {
return null;
} else {
- return (Certificate[])((KeyEntry)entry).chain.clone();
+ return ((KeyEntry)entry).chain.clone();
}
} else {
return null;
@@ -365,7 +365,7 @@
throw new KeyStoreException("Certificate chain does not validate");
}
- entry.chain = (Certificate[])chain.clone();
+ entry.chain = chain.clone();
entry.chainRefs = new long[entry.chain.length];
}
@@ -429,7 +429,7 @@
if ((chain != null) &&
(chain.length != 0)) {
- entry.chain = (Certificate[])chain.clone();
+ entry.chain = chain.clone();
entry.chainRefs = new long[entry.chain.length];
}
@@ -1122,7 +1122,7 @@
throw uke;
}
- return ((byte[])key);
+ return key;
}
--- a/jdk/src/macosx/classes/sun/font/CFontManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/macosx/classes/sun/font/CFontManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -76,7 +76,7 @@
// This is a way to register any kind of Font2D, not just files and composites.
public static Font2D[] getGenericFonts() {
- return (Font2D[])genericFonts.values().toArray(new Font2D[0]);
+ return genericFonts.values().toArray(new Font2D[0]);
}
public Font2D registerGenericFont(Font2D f)
@@ -117,7 +117,7 @@
}
return f;
} else {
- return (Font2D)genericFonts.get(fontName);
+ return genericFonts.get(fontName);
}
}
--- a/jdk/src/macosx/classes/sun/java2d/CRenderer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/macosx/classes/sun/java2d/CRenderer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -457,7 +457,7 @@
protected boolean blitImage(SunGraphics2D sg2d, Image img, boolean fliph, boolean flipv, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, Color bgColor) {
CPrinterSurfaceData surfaceData = (CPrinterSurfaceData)sg2d.getSurfaceData();
- OSXOffScreenSurfaceData imgSurfaceData = (OSXOffScreenSurfaceData) OSXOffScreenSurfaceData.createNewSurface((BufferedImage)img);
+ OSXOffScreenSurfaceData imgSurfaceData = OSXOffScreenSurfaceData.createNewSurface((BufferedImage)img);
surfaceData.blitImage(this, sg2d, imgSurfaceData, fliph, flipv, sx, sy, sw, sh, dx, dy, dw, dh, bgColor);
return true;
}
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CPrinterJob.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CPrinterJob.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -640,7 +640,7 @@
if (onEventThread) {
try { EventQueue.invokeAndWait(r);
} catch (java.lang.reflect.InvocationTargetException ite) {
- Throwable te = (Throwable)ite.getTargetException();
+ Throwable te = ite.getTargetException();
if (te instanceof PrinterException) throw (PrinterException)te;
else te.printStackTrace();
} catch (Exception e) { e.printStackTrace(); }
--- a/jdk/src/share/classes/com/oracle/net/Sdp.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/oracle/net/Sdp.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -56,7 +56,7 @@
private static final Constructor<ServerSocket> serverSocketCtor;
static {
try {
- serverSocketCtor = (Constructor<ServerSocket>)
+ serverSocketCtor =
ServerSocket.class.getDeclaredConstructor(SocketImpl.class);
setAccessible(serverSocketCtor);
} catch (NoSuchMethodException e) {
--- a/jdk/src/share/classes/com/sun/beans/TypeResolver.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/beans/TypeResolver.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -238,7 +238,7 @@
return (Class<?>) pt.getRawType();
}
if (type instanceof TypeVariable) {
- TypeVariable tv = (TypeVariable)type;
+ TypeVariable<?> tv = (TypeVariable<?>)type;
Type[] bounds = tv.getBounds();
return (0 < bounds.length)
? erase(bounds[0])
@@ -267,9 +267,9 @@
*
* @see #erase(Type)
*/
- public static Class[] erase(Type[] types) {
+ public static Class<?>[] erase(Type[] types) {
int length = types.length;
- Class[] classes = new Class[length];
+ Class<?>[] classes = new Class<?>[length];
for (int i = 0; i < length; i++) {
classes[i] = TypeResolver.erase(types[i]);
}
--- a/jdk/src/share/classes/com/sun/beans/editors/EnumEditor.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/beans/editors/EnumEditor.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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
@@ -45,17 +45,18 @@
public final class EnumEditor implements PropertyEditor {
private final List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();
- private final Class type;
+ @SuppressWarnings("rawtypes")
+ private final Class<? extends Enum> type;
private final String[] tags;
private Object value;
- public EnumEditor( Class type ) {
+ public EnumEditor(Class<?> type) {
Object[] values = type.getEnumConstants();
if ( values == null ) {
throw new IllegalArgumentException( "Unsupported " + type );
}
- this.type = type;
+ this.type = type.asSubclass(java.lang.Enum.class);
this.tags = new String[values.length];
for ( int i = 0; i < values.length; i++ ) {
this.tags[i] = ( ( Enum )values[i] ).name();
@@ -98,9 +99,11 @@
}
public void setAsText( String text ) {
- setValue( ( text != null )
- ? Enum.valueOf( this.type, text )
- : null );
+ @SuppressWarnings("unchecked")
+ Object tmp = ( text != null )
+ ? Enum.valueOf( (Class)this.type, text )
+ : null;
+ setValue(tmp);
}
public String[] getTags() {
--- a/jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, 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
@@ -44,7 +44,7 @@
public final class ConstructorFinder extends AbstractFinder<Constructor<?>> {
private static final Cache<Signature, Constructor<?>> CACHE = new Cache<Signature, Constructor<?>>(SOFT, SOFT) {
@Override
- public Constructor create(Signature signature) {
+ public Constructor<?> create(Signature signature) {
try {
ConstructorFinder finder = new ConstructorFinder(signature.getArgs());
return finder.find(signature.getType().getConstructors());
--- a/jdk/src/share/classes/com/sun/beans/finder/InstanceFinder.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/beans/finder/InstanceFinder.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2014, 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
@@ -93,7 +93,9 @@
type = ClassFinder.findClass(name, type.getClassLoader());
}
if (this.type.isAssignableFrom(type)) {
- return (T) type.newInstance();
+ @SuppressWarnings("unchecked")
+ T tmp = (T) type.newInstance();
+ return tmp;
}
}
catch (Exception exception) {
--- a/jdk/src/share/classes/com/sun/beans/finder/SignatureException.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/beans/finder/SignatureException.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -25,6 +25,8 @@
package com.sun.beans.finder;
final class SignatureException extends RuntimeException {
+ private static final long serialVersionUID = 4536098341586118473L;
+
SignatureException(Throwable cause) {
super(cause);
}
--- a/jdk/src/share/classes/com/sun/beans/util/Cache.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/beans/util/Cache.java Tue Jan 28 11:22:25 2014 -0800
@@ -244,7 +244,7 @@
* @param size requested capacity MUST be a power of two
* @return a new array for the cache entries
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "rawtypes"})
private CacheEntry<K,V>[] newTable(int size) {
return (CacheEntry<K,V>[]) new CacheEntry[size];
}
@@ -265,6 +265,7 @@
synchronized (this.queue) {
do {
if (reference instanceof Ref) {
+ @SuppressWarnings("rawtypes")
Ref ref = (Ref) reference;
@SuppressWarnings("unchecked")
CacheEntry<K,V> owner = (CacheEntry<K,V>) ref.getOwner();
--- a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -806,14 +806,11 @@
// the sampleModel can be null in case of embedded image
if (sampleModel != null) {
if (sampleModel.getDataType() == DataBuffer.TYPE_BYTE)
- bdata = (byte[])
- ((DataBufferByte)raster.getDataBuffer()).getData();
+ bdata = ((DataBufferByte)raster.getDataBuffer()).getData();
else if (sampleModel.getDataType() == DataBuffer.TYPE_USHORT)
- sdata = (short[])
- ((DataBufferUShort)raster.getDataBuffer()).getData();
+ sdata = ((DataBufferUShort)raster.getDataBuffer()).getData();
else if (sampleModel.getDataType() == DataBuffer.TYPE_INT)
- idata = (int[])
- ((DataBufferInt)raster.getDataBuffer()).getData();
+ idata = ((DataBufferInt)raster.getDataBuffer()).getData();
}
// There should only be one tile.
--- a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -574,7 +574,7 @@
imageSize = embedded_stream.size();
long endPos = stream.getStreamPosition();
- fileSize = (int)(offset + imageSize);
+ fileSize = offset + imageSize;
stream.seek(headPos);
writeSize(fileSize, 2);
stream.seek(headPos);
--- a/jdk/src/share/classes/com/sun/imageio/plugins/common/ImageUtil.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/common/ImageUtil.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -593,16 +593,15 @@
int i = eltOffset;
while(xRemaining > 24) {
data[i++] =
- (int)(((binaryDataArray[b++] & 0xFF) << 24) |
- ((binaryDataArray[b++] & 0xFF) << 16) |
- ((binaryDataArray[b++] & 0xFF) << 8) |
- (binaryDataArray[b++] & 0xFF));
+ (((binaryDataArray[b++] & 0xFF) << 24) |
+ ((binaryDataArray[b++] & 0xFF) << 16) |
+ ((binaryDataArray[b++] & 0xFF) << 8) |
+ (binaryDataArray[b++] & 0xFF));
xRemaining -= 32;
}
int shift = 24;
while(xRemaining > 0) {
- data[i] |=
- (int)((binaryDataArray[b++] & 0xFF) << shift);
+ data[i] |= ((binaryDataArray[b++] & 0xFF) << shift);
shift -= 8;
xRemaining -= 8;
}
@@ -835,8 +834,7 @@
for(int x = 0; x < rectWidth; x++) {
if(bdata[k++] != (byte)0) {
data[bOffset/32] |=
- (int)(0x00000001 <<
- (31 - bOffset % 32));
+ (0x00000001 << (31 - bOffset % 32));
}
bOffset++;
}
--- a/jdk/src/share/classes/com/sun/imageio/plugins/common/LZWStringTable.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/common/LZWStringTable.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -143,7 +143,7 @@
}
static public int hash(short index, byte lastbyte) {
- return ((int)((short)(lastbyte << 8) ^ index) & 0xFFFF) % HASHSIZE;
+ return (((short)(lastbyte << 8) ^ index) & 0xFFFF) % HASHSIZE;
}
/*
--- a/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadata.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadata.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -232,7 +232,7 @@
appExtNode.setAttribute("authenticationCode",
toISO8859(authenticationCode));
byte[] appData = (byte[])applicationData.get(i);
- appExtNode.setUserObject((byte[])appData.clone());
+ appExtNode.setUserObject(appData.clone());
node.appendChild(appExtNode);
}
--- a/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageWriter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageWriter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -357,7 +357,7 @@
// Undo change to interlace flag if not MODE_COPY_FROM_METADATA.
if (param != null && param.canWriteProgressive() &&
- param.getProgressiveMode() != param.MODE_COPY_FROM_METADATA) {
+ param.getProgressiveMode() != ImageWriteParam.MODE_COPY_FROM_METADATA) {
im.interlaceFlag = isProgressive;
}
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/DHTMarkerSegment.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/DHTMarkerSegment.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -211,10 +211,10 @@
newGuy = (Htable) super.clone();
} catch (CloneNotSupportedException e) {} // won't happen
if (numCodes != null) {
- newGuy.numCodes = (short []) numCodes.clone();
+ newGuy.numCodes = numCodes.clone();
}
if (values != null) {
- newGuy.values = (short []) values.clone();
+ newGuy.values = values.clone();
}
return newGuy;
}
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/DQTMarkerSegment.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/DQTMarkerSegment.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -274,7 +274,7 @@
newGuy = (Qtable) super.clone();
} catch (CloneNotSupportedException e) {} // won't happen
if (data != null) {
- newGuy.data = (int []) data.clone();
+ newGuy.data = data.clone();
}
return newGuy;
}
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -1448,7 +1448,7 @@
protected Object clone () {
ICCMarkerSegment newGuy = (ICCMarkerSegment) super.clone();
if (profile != null) {
- newGuy.profile = (byte[]) profile.clone();
+ newGuy.profile = profile.clone();
}
return newGuy;
}
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -319,7 +319,7 @@
IIOMetadata streamMetadata,
IIOMetadata imageMetadata) {
if (jfifOK(imageType, param, streamMetadata, imageMetadata)) {
- return (Dimension [])preferredThumbSizes.clone();
+ return preferredThumbSizes.clone();
}
return null;
}
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -724,7 +724,7 @@
newGuy = (JPEGMetadata) super.clone();
} catch (CloneNotSupportedException e) {} // won't happen
if (markerSequence != null) {
- newGuy.markerSequence = (List) cloneSequence();
+ newGuy.markerSequence = cloneSequence();
}
newGuy.resetSequence = null;
return newGuy;
@@ -2016,14 +2016,14 @@
// First approximation
int y = 1;
- int x = (int) Math.round(value);
+ int x = Math.round(value);
float ratio = (float) x;
float delta = Math.abs(value - ratio);
while (delta > epsilon) { // not close enough
// Increment y and compute a new x
y++;
- x = (int) Math.round(y*value);
+ x = Math.round(y*value);
ratio = (float)x/(float)y;
delta = Math.abs(value - ratio);
}
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/MarkerSegment.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/MarkerSegment.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -119,7 +119,7 @@
newGuy = (MarkerSegment) super.clone();
} catch (CloneNotSupportedException e) {} // won't happen
if (this.data != null) {
- newGuy.data = (byte[]) data.clone();
+ newGuy.data = data.clone();
}
return newGuy;
}
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/SOFMarkerSegment.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/SOFMarkerSegment.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -98,7 +98,7 @@
protected Object clone() {
SOFMarkerSegment newGuy = (SOFMarkerSegment) super.clone();
if (componentSpecs != null) {
- newGuy.componentSpecs = (ComponentSpec []) componentSpecs.clone();
+ newGuy.componentSpecs = componentSpecs.clone();
for (int i = 0; i < componentSpecs.length; i++) {
newGuy.componentSpecs[i] =
(ComponentSpec) componentSpecs[i].clone();
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/SOSMarkerSegment.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/SOSMarkerSegment.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -93,8 +93,7 @@
protected Object clone () {
SOSMarkerSegment newGuy = (SOSMarkerSegment) super.clone();
if (componentSpecs != null) {
- newGuy.componentSpecs =
- (ScanComponentSpec []) componentSpecs.clone();
+ newGuy.componentSpecs = componentSpecs.clone();
for (int i = 0; i < componentSpecs.length; i++) {
newGuy.componentSpecs[i] =
(ScanComponentSpec) componentSpecs[i].clone();
--- a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -344,9 +344,9 @@
IHDR_colorType = PNGImageReader.PNG_COLOR_PALETTE;
PLTE_present = true;
PLTE_order = null;
- PLTE_red = (byte[])reds.clone();
- PLTE_green = (byte[])greens.clone();
- PLTE_blue = (byte[])blues.clone();
+ PLTE_red = reds.clone();
+ PLTE_green = greens.clone();
+ PLTE_blue = blues.clone();
if (hasAlpha) {
tRNS_present = true;
@@ -430,7 +430,7 @@
} else {
ArrayList<byte[]> list = new ArrayList<byte[]>(in.size());
for (byte[] b: in) {
- list.add((b == null) ? null : (byte[])b.clone());
+ list.add((b == null) ? null : b.clone());
}
return list;
}
@@ -703,8 +703,8 @@
IIOMetadataNode tEXt_parent = new IIOMetadataNode("tEXt");
for (int i = 0; i < tEXt_keyword.size(); i++) {
IIOMetadataNode tEXt_node = new IIOMetadataNode("tEXtEntry");
- tEXt_node.setAttribute("keyword" , (String)tEXt_keyword.get(i));
- tEXt_node.setAttribute("value" , (String)tEXt_text.get(i));
+ tEXt_node.setAttribute("keyword" , tEXt_keyword.get(i));
+ tEXt_node.setAttribute("value" , tEXt_text.get(i));
tEXt_parent.appendChild(tEXt_node);
}
@@ -759,13 +759,13 @@
IIOMetadataNode zTXt_parent = new IIOMetadataNode("zTXt");
for (int i = 0; i < zTXt_keyword.size(); i++) {
IIOMetadataNode zTXt_node = new IIOMetadataNode("zTXtEntry");
- zTXt_node.setAttribute("keyword", (String)zTXt_keyword.get(i));
+ zTXt_node.setAttribute("keyword", zTXt_keyword.get(i));
- int cm = ((Integer)zTXt_compressionMethod.get(i)).intValue();
+ int cm = (zTXt_compressionMethod.get(i)).intValue();
zTXt_node.setAttribute("compressionMethod",
zTXt_compressionMethodNames[cm]);
- zTXt_node.setAttribute("text", (String)zTXt_text.get(i));
+ zTXt_node.setAttribute("text", zTXt_text.get(i));
zTXt_parent.appendChild(zTXt_node);
}
@@ -781,8 +781,8 @@
IIOMetadataNode unknown_node =
new IIOMetadataNode("UnknownChunk");
unknown_node.setAttribute("type",
- (String)unknownChunkType.get(i));
- unknown_node.setUserObject((byte[])unknownChunkData.get(i));
+ unknownChunkType.get(i));
+ unknown_node.setUserObject(unknownChunkData.get(i));
unknown_parent.appendChild(unknown_node);
}
@@ -1016,8 +1016,8 @@
for (int i = 0; i < tEXt_keyword.size(); i++) {
node = new IIOMetadataNode("TextEntry");
- node.setAttribute("keyword", (String)tEXt_keyword.get(i));
- node.setAttribute("value", (String)tEXt_text.get(i));
+ node.setAttribute("keyword", tEXt_keyword.get(i));
+ node.setAttribute("value", tEXt_text.get(i));
node.setAttribute("encoding", "ISO-8859-1");
node.setAttribute("compression", "none");
@@ -1041,8 +1041,8 @@
for (int i = 0; i < zTXt_keyword.size(); i++) {
node = new IIOMetadataNode("TextEntry");
- node.setAttribute("keyword", (String)zTXt_keyword.get(i));
- node.setAttribute("value", (String)zTXt_text.get(i));
+ node.setAttribute("keyword", zTXt_keyword.get(i));
+ node.setAttribute("value", zTXt_text.get(i));
node.setAttribute("compression", "zip");
text_node.appendChild(node);
@@ -1400,8 +1400,7 @@
fatal(node, "User object not a byte array!");
}
- iCCP_compressedProfile =
- (byte[])((byte[])compressedProfile).clone();
+ iCCP_compressedProfile = ((byte[])compressedProfile).clone();
iCCP_present = true;
} else if (name.equals("iTXt")) {
--- a/jdk/src/share/classes/com/sun/java/browser/dom/DOMService.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/java/browser/dom/DOMService.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -43,10 +43,10 @@
{
try
{
- String provider = (String) java.security.AccessController.doPrivileged(
+ String provider = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("com.sun.java.browser.dom.DOMServiceProvider"));
- Class clazz = DOMService.class.forName("sun.plugin.dom.DOMService");
+ Class clazz = Class.forName("sun.plugin.dom.DOMService");
return (DOMService) clazz.newInstance();
}
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -433,7 +433,7 @@
if (objects.length == 1
&& ((File)objects[0]).isDirectory()
&& chooser.isTraversable(((File)objects[0]))
- && (chooser.getFileSelectionMode() != chooser.DIRECTORIES_ONLY
+ && (chooser.getFileSelectionMode() != JFileChooser.DIRECTORIES_ONLY
|| !chooser.getFileSystemView().isFileSystem(((File)objects[0])))) {
setDirectorySelected(true);
setDirectory(((File)objects[0]));
@@ -458,7 +458,7 @@
if (file != null
&& file.isDirectory()
&& chooser.isTraversable(file)
- && (chooser.getFileSelectionMode() == chooser.FILES_ONLY
+ && (chooser.getFileSelectionMode() == JFileChooser.FILES_ONLY
|| !chooser.getFileSystemView().isFileSystem(file))) {
setDirectorySelected(true);
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/PangoFonts.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/PangoFonts.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -61,7 +61,7 @@
GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
- if (!ge.isHeadless()) {
+ if (!GraphicsEnvironment.isHeadless()) {
GraphicsConfiguration gc =
ge.getDefaultScreenDevice().getDefaultConfiguration();
AffineTransform at = gc.getNormalizingTransform();
--- a/jdk/src/share/classes/com/sun/jmx/remote/security/MBeanServerFileAccessController.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/jmx/remote/security/MBeanServerFileAccessController.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -283,7 +283,7 @@
public synchronized void refresh() throws IOException {
Properties props;
if (accessFileName == null)
- props = (Properties) originalProps;
+ props = originalProps;
else
props = propertiesFromFile(accessFileName);
parseProperties(props);
--- a/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -667,7 +667,7 @@
} else {
if (TRACE_TRANSMITTER) Printer.println("Sending packed message to "+size+" transmitter's receivers");
for (int i = 0; i < size; i++) {
- Receiver receiver = ((Transmitter)transmitters.get(i)).getReceiver();
+ Receiver receiver = transmitters.get(i).getReceiver();
if (receiver != null) {
if (optimizedReceiverCount > 0) {
if (receiver instanceof MidiOutDevice.MidiOutReceiver) {
@@ -693,7 +693,7 @@
int size = transmitters.size();
if (TRACE_TRANSMITTER) Printer.println("Sending long message to "+size+" transmitter's receivers");
for (int i = 0; i < size; i++) {
- Receiver receiver = ((Transmitter)transmitters.get(i)).getReceiver();
+ Receiver receiver = transmitters.get(i).getReceiver();
if (receiver != null) {
//$$fb 2002-04-02: SysexMessages are mutable, so
// an application could change the contents of this object,
@@ -729,7 +729,7 @@
} else {
if (TRACE_TRANSMITTER) Printer.println("Sending MIDI message to "+size+" transmitter's receivers");
for (int i = 0; i < size; i++) {
- Receiver receiver = ((Transmitter)transmitters.get(i)).getReceiver();
+ Receiver receiver = transmitters.get(i).getReceiver();
if (receiver != null) {
//$$fb 2002-04-02: ShortMessages are mutable, so
// an application could change the contents of this object,
--- a/jdk/src/share/classes/com/sun/media/sound/AiffFileReader.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/AiffFileReader.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -406,7 +406,7 @@
int expon = 0;
long hiMant = 0, loMant = 0;
long t1, t2;
- double HUGE = ((double)3.40282346638528860e+38);
+ double HUGE = 3.40282346638528860e+38;
expon = dis.readUnsignedShort();
--- a/jdk/src/share/classes/com/sun/media/sound/AiffFileWriter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/AiffFileWriter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -239,18 +239,18 @@
while( (bytesRead = fileStream.read( buffer )) >= 0 ) {
if (maxLength>0) {
if( bytesRead < maxLength ) {
- out.write( buffer, 0, (int)bytesRead );
+ out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead;
maxLength -= bytesRead;
} else {
- out.write( buffer, 0, (int)maxLength );
+ out.write( buffer, 0, maxLength );
bytesWritten += maxLength;
maxLength = 0;
break;
}
} else {
- out.write( buffer, 0, (int)bytesRead );
+ out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead;
}
}
--- a/jdk/src/share/classes/com/sun/media/sound/AlawCodec.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/AlawCodec.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -316,7 +316,7 @@
// set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) {
- frameLength = ((AudioInputStream)stream).getFrameLength();
+ frameLength = stream.getFrameLength();
}
// set framePos to zero
@@ -346,7 +346,7 @@
public int read() throws IOException {
byte[] b = new byte[1];
- return (int)read(b, 0, b.length);
+ return read(b, 0, b.length);
}
@@ -432,8 +432,8 @@
int readCount = super.read(b, readOffset, readLen);
for (i = off; i < (off + (readCount*2)); i+=2) {
- b[i] = (byte)tabByte1[b[readOffset] & 0xFF];
- b[i+1] = (byte)tabByte2[b[readOffset] & 0xFF];
+ b[i] = tabByte1[b[readOffset] & 0xFF];
+ b[i+1] = tabByte2[b[readOffset] & 0xFF];
readOffset++;
}
--- a/jdk/src/share/classes/com/sun/media/sound/AuFileWriter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/AuFileWriter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -308,17 +308,17 @@
while( (bytesRead = fileStream.read( buffer )) >= 0 ) {
if (maxLength>0) {
if( bytesRead < maxLength ) {
- out.write( buffer, 0, (int)bytesRead );
+ out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead;
maxLength -= bytesRead;
} else {
- out.write( buffer, 0, (int)maxLength );
+ out.write( buffer, 0, maxLength );
bytesWritten += maxLength;
maxLength = 0;
break;
}
} else {
- out.write( buffer, 0, (int)bytesRead );
+ out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead;
}
}
--- a/jdk/src/share/classes/com/sun/media/sound/DLSSoundbank.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/DLSSoundbank.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -531,7 +531,7 @@
chunk.read(); // Read Reserved byte
instrument.bank = bank;
- instrument.preset = (int) id;
+ instrument.preset = id;
instrument.druminstrument = (drumins & 128) > 0;
//System.out.println("bank="+bank+" drumkit="+drumkit
// +" id="+id);
--- a/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -495,7 +495,7 @@
}
// align buffer to full frames
- bufferSize = ((int) bufferSize / format.getFrameSize()) * format.getFrameSize();
+ bufferSize = ( bufferSize / format.getFrameSize()) * format.getFrameSize();
id = nOpen(mixerIndex, deviceID, isSource,
encoding,
@@ -1381,7 +1381,7 @@
if (toWriteBytes > getBufferSize()) {
toWriteBytes = Toolkit.align(getBufferSize(), frameSize);
}
- int written = write(audioData, (int) clipBytePosition, toWriteBytes); // increases bytePosition
+ int written = write(audioData, clipBytePosition, toWriteBytes); // increases bytePosition
clipBytePosition += written;
// make sure nobody called setFramePosition, or stop() during the write() call
if (doIO && newFramePosition < 0 && written >= 0) {
--- a/jdk/src/share/classes/com/sun/media/sound/MidiInDeviceProvider.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/MidiInDeviceProvider.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -88,9 +88,9 @@
}
MidiDevice[] getDeviceCache() { return devices; }
- void setDeviceCache(MidiDevice[] devices) { this.devices = devices; }
+ void setDeviceCache(MidiDevice[] devices) { MidiInDeviceProvider.devices = devices; }
Info[] getInfoCache() { return infos; }
- void setInfoCache(Info[] infos) { this.infos = infos; }
+ void setInfoCache(Info[] infos) { MidiInDeviceProvider.infos = infos; }
// INNER CLASSES
--- a/jdk/src/share/classes/com/sun/media/sound/MidiOutDeviceProvider.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/MidiOutDeviceProvider.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -86,9 +86,9 @@
}
MidiDevice[] getDeviceCache() { return devices; }
- void setDeviceCache(MidiDevice[] devices) { this.devices = devices; }
+ void setDeviceCache(MidiDevice[] devices) { MidiOutDeviceProvider.devices = devices; }
Info[] getInfoCache() { return infos; }
- void setInfoCache(Info[] infos) { this.infos = infos; }
+ void setInfoCache(Info[] infos) { MidiOutDeviceProvider.infos = infos; }
// INNER CLASSES
--- a/jdk/src/share/classes/com/sun/media/sound/PortMixer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/PortMixer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -212,7 +212,7 @@
ports = new PortMixerPort[portInfos.length];
}
if (ports[index] == null) {
- ports[index] = new PortMixerPort((Port.Info)portInfos[index], this, index);
+ ports[index] = new PortMixerPort(portInfos[index], this, index);
return ports[index];
}
// $$fb TODO: return (Port) (ports[index].clone());
--- a/jdk/src/share/classes/com/sun/media/sound/RealTimeSequencer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/RealTimeSequencer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -386,7 +386,7 @@
// last resort: return a standard tempo: 120bpm
return (float) MidiUtils.DEFAULT_TEMPO_MPQ;
}
- return (float)getDataPump().getTempoMPQ();
+ return getDataPump().getTempoMPQ();
}
--- a/jdk/src/share/classes/com/sun/media/sound/SF2Soundbank.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/SF2Soundbank.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -617,8 +617,8 @@
private void writeGenerators(RIFFWriter writer, Map<Integer, Short> generators)
throws IOException {
- Short keyrange = (Short) generators.get(SF2Region.GENERATOR_KEYRANGE);
- Short velrange = (Short) generators.get(SF2Region.GENERATOR_VELRANGE);
+ Short keyrange = generators.get(SF2Region.GENERATOR_KEYRANGE);
+ Short velrange = generators.get(SF2Region.GENERATOR_VELRANGE);
if (keyrange != null) {
writer.writeUnsignedShort(SF2Region.GENERATOR_KEYRANGE);
writer.writeShort(keyrange);
@@ -706,7 +706,7 @@
}
for (SF2InstrumentRegion region : preset.getRegions()) {
writeGenerators(pgen_chunk, region.getGenerators());
- int ix = (int) layers.indexOf(region.layer);
+ int ix = layers.indexOf(region.layer);
if (ix != -1) {
pgen_chunk.writeUnsignedShort(SF2Region.GENERATOR_INSTRUMENT);
pgen_chunk.writeShort((short) ix);
--- a/jdk/src/share/classes/com/sun/media/sound/SoftInstrument.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/SoftInstrument.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -44,7 +44,7 @@
ins.getDataClass());
data = ins.getData();
this.ins = ins;
- initPerformers(((ModelInstrument)ins).getPerformers());
+ initPerformers(ins.getPerformers());
}
public SoftInstrument(ModelInstrument ins,
--- a/jdk/src/share/classes/com/sun/media/sound/StandardMidiFileWriter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/StandardMidiFileWriter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -141,7 +141,7 @@
buffer = new byte[bufferSize];
while( (bytesRead = fileStream.read( buffer )) >= 0 ) {
- out.write( buffer, 0, (int)bytesRead );
+ out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead;
}
// Done....return bytesWritten
--- a/jdk/src/share/classes/com/sun/media/sound/Toolkit.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/Toolkit.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -74,7 +74,7 @@
*/
static float linearToDB(float linear) {
- float dB = (float) (Math.log((double)((linear==0.0)?0.0001:linear))/Math.log(10.0) * 20.0);
+ float dB = (float) (Math.log(((linear==0.0)?0.0001:linear))/Math.log(10.0) * 20.0);
return dB;
}
--- a/jdk/src/share/classes/com/sun/media/sound/UlawCodec.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/UlawCodec.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -301,7 +301,7 @@
// set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) {
- frameLength = ((AudioInputStream)stream).getFrameLength();
+ frameLength = stream.getFrameLength();
}
// set framePos to zero
framePos = 0;
@@ -406,8 +406,8 @@
return readCount;
}
for (i = off; i < (off + (readCount*2)); i+=2) {
- b[i] = (byte)tabByte1[b[readOffset] & 0xFF];
- b[i+1] = (byte)tabByte2[b[readOffset] & 0xFF];
+ b[i] = tabByte1[b[readOffset] & 0xFF];
+ b[i+1] = tabByte2[b[readOffset] & 0xFF];
readOffset++;
}
return (i - off);
--- a/jdk/src/share/classes/com/sun/media/sound/WaveFileWriter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/media/sound/WaveFileWriter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -240,17 +240,17 @@
if (maxLength>0) {
if( bytesRead < maxLength ) {
- out.write( buffer, 0, (int)bytesRead );
+ out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead;
maxLength -= bytesRead;
} else {
- out.write( buffer, 0, (int)maxLength );
+ out.write( buffer, 0, maxLength );
bytesWritten += maxLength;
maxLength = 0;
break;
}
} else {
- out.write( buffer, 0, (int)bytesRead );
+ out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead;
}
}
@@ -272,7 +272,7 @@
short channels = (short) audioFormat.getChannels();
short sampleSizeInBits = (short) audioFormat.getSampleSizeInBits();
int sampleRate = (int) audioFormat.getSampleRate();
- int frameSizeInBytes = (int) audioFormat.getFrameSize();
+ int frameSizeInBytes = audioFormat.getFrameSize();
int frameRate = (int) audioFormat.getFrameRate();
int avgBytesPerSec = channels * sampleSizeInBits * sampleRate / 8;;
short blockAlign = (short) ((sampleSizeInBits / 8) * channels);
--- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -1282,7 +1282,7 @@
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = (curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
--- a/jdk/src/share/classes/java/awt/AWTKeyStroke.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/AWTKeyStroke.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -243,7 +243,7 @@
return null;
}
});
- return (Constructor)ctor;
+ return ctor;
}
private static synchronized AWTKeyStroke getCachedStroke
@@ -275,7 +275,7 @@
cacheKey.modifiers = mapNewModifiers(mapOldModifiers(modifiers));
cacheKey.onKeyRelease = onKeyRelease;
- AWTKeyStroke stroke = (AWTKeyStroke)cache.get(cacheKey);
+ AWTKeyStroke stroke = cache.get(cacheKey);
if (stroke == null) {
stroke = cacheKey;
cache.put(stroke, stroke);
@@ -581,7 +581,7 @@
continue;
}
- Integer tokenMask = (Integer)modifierKeywords.get(token);
+ Integer tokenMask = modifierKeywords.get(token);
if (tokenMask != null) {
mask |= tokenMask.intValue();
} else {
@@ -879,11 +879,11 @@
public synchronized Integer findCode(String name) {
assert(name != null);
- return (Integer)name2code.get(name);
+ return name2code.get(name);
}
public synchronized String findName(Integer code) {
assert(code != null);
- return (String)code2name.get(code);
+ return code2name.get(code);
}
}
--- a/jdk/src/share/classes/java/awt/BasicStroke.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/BasicStroke.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -225,7 +225,7 @@
this.join = join;
this.miterlimit = miterlimit;
if (dash != null) {
- this.dash = (float []) dash.clone();
+ this.dash = dash.clone();
}
this.dash_phase = dash_phase;
}
@@ -359,7 +359,7 @@
return null;
}
- return (float[]) dash.clone();
+ return dash.clone();
}
/**
--- a/jdk/src/share/classes/java/awt/CardLayout.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/CardLayout.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -223,8 +223,8 @@
comp.setVisible(false);
}
for (int i=0; i < vector.size(); i++) {
- if (((Card)vector.get(i)).name.equals(name)) {
- ((Card)vector.get(i)).comp = comp;
+ if ((vector.get(i)).name.equals(name)) {
+ (vector.get(i)).comp = comp;
return;
}
}
@@ -242,7 +242,7 @@
public void removeLayoutComponent(Component comp) {
synchronized (comp.getTreeLock()) {
for (int i = 0; i < vector.size(); i++) {
- if (((Card)vector.get(i)).comp == comp) {
+ if ((vector.get(i)).comp == comp) {
// if we remove current component we should show next one
if (comp.isVisible() && (comp.getParent() != null)) {
next(comp.getParent());
@@ -527,7 +527,7 @@
Component next = null;
int ncomponents = vector.size();
for (int i = 0; i < ncomponents; i++) {
- Card card = (Card)vector.get(i);
+ Card card = vector.get(i);
if (card.name.equals(name)) {
next = card.comp;
currentCard = i;
@@ -574,8 +574,8 @@
vector = new Vector<>();
if (tab != null && !tab.isEmpty()) {
for (Enumeration<String> e = tab.keys() ; e.hasMoreElements() ; ) {
- String key = (String)e.nextElement();
- Component comp = (Component)tab.get(key);
+ String key = e.nextElement();
+ Component comp = tab.get(key);
vector.add(new Card(key, comp));
if (comp.isVisible()) {
currentCard = vector.size() - 1;
@@ -597,7 +597,7 @@
Hashtable<String, Component> tab = new Hashtable<>();
int ncomponents = vector.size();
for (int i = 0; i < ncomponents; i++) {
- Card card = (Card)vector.get(i);
+ Card card = vector.get(i);
tab.put(card.name, card.comp);
}
--- a/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -578,7 +578,7 @@
// newFocusOwner is not focus traversable.
dequeueKeyEvents(-1, newFocusOwner);
if (KeyboardFocusManager.isAutoFocusTransferEnabled()) {
- restoreFocus(fe, (Window)newFocusedWindow);
+ restoreFocus(fe, newFocusedWindow);
}
break;
}
@@ -590,7 +590,7 @@
// Focus change was rejected. Unlikely, but possible.
dequeueKeyEvents(-1, newFocusOwner);
if (KeyboardFocusManager.isAutoFocusTransferEnabled()) {
- restoreFocus(fe, (Window)newFocusedWindow);
+ restoreFocus(fe, newFocusedWindow);
}
break;
}
--- a/jdk/src/share/classes/java/awt/GradientPaintContext.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/GradientPaintContext.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -46,7 +46,7 @@
static synchronized Raster getCachedRaster(ColorModel cm, int w, int h) {
if (cm == cachedModel) {
if (cached != null) {
- Raster ras = (Raster) cached.get();
+ Raster ras = cached.get();
if (ras != null &&
ras.getWidth() >= w &&
ras.getHeight() >= h)
@@ -61,7 +61,7 @@
static synchronized void putCachedRaster(ColorModel cm, Raster ras) {
if (cached != null) {
- Raster cras = (Raster) cached.get();
+ Raster cras = cached.get();
if (cras != null) {
int cw = cras.getWidth();
int ch = cras.getHeight();
--- a/jdk/src/share/classes/java/awt/KeyboardFocusManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/KeyboardFocusManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -1909,7 +1909,7 @@
static synchronized Component getMostRecentFocusOwner(Window window) {
WeakReference<Component> weakValue =
(WeakReference)mostRecentFocusOwners.get(window);
- return weakValue == null ? null : (Component)weakValue.get();
+ return weakValue == null ? null : weakValue.get();
}
/**
@@ -2496,9 +2496,9 @@
HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER)
{
int size = heavyweightRequests.size();
- hwFocusRequest = (HeavyweightFocusRequest)((size >= 2)
+ hwFocusRequest = (size >= 2)
? heavyweightRequests.get(size - 2)
- : null);
+ : null;
}
if (focusedWindowChanged(heavyweight,
(hwFocusRequest != null)
--- a/jdk/src/share/classes/java/awt/MultipleGradientPaintContext.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/MultipleGradientPaintContext.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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
@@ -665,7 +665,7 @@
{
if (cm == cachedModel) {
if (cached != null) {
- Raster ras = (Raster) cached.get();
+ Raster ras = cached.get();
if (ras != null &&
ras.getWidth() >= w &&
ras.getHeight() >= h)
@@ -687,7 +687,7 @@
Raster ras)
{
if (cached != null) {
- Raster cras = (Raster) cached.get();
+ Raster cras = cached.get();
if (cras != null) {
int cw = cras.getWidth();
int ch = cras.getHeight();
--- a/jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -418,9 +418,8 @@
* @since 1.4
*/
public synchronized AdjustmentListener[] getAdjustmentListeners() {
- return (AdjustmentListener[])(AWTEventMulticaster.getListeners(
- adjustmentListener,
- AdjustmentListener.class));
+ return AWTEventMulticaster.getListeners(adjustmentListener,
+ AdjustmentListener.class);
}
/**
--- a/jdk/src/share/classes/java/awt/SequencedEvent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/SequencedEvent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -160,7 +160,7 @@
}
private final synchronized static SequencedEvent getFirst() {
- return (SequencedEvent)list.getFirst();
+ return list.getFirst();
}
/* Disposes all events from disposed AppContext
@@ -211,7 +211,7 @@
list.removeFirst();
if (!list.isEmpty()) {
- next = (SequencedEvent)list.getFirst();
+ next = list.getFirst();
}
} else {
list.remove(this);
--- a/jdk/src/share/classes/java/awt/SystemTray.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/SystemTray.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -337,7 +337,7 @@
public TrayIcon[] getTrayIcons() {
Vector<TrayIcon> icons = (Vector<TrayIcon>)AppContext.getAppContext().get(TrayIcon.class);
if (icons != null) {
- return (TrayIcon[])icons.toArray(new TrayIcon[icons.size()]);
+ return icons.toArray(new TrayIcon[icons.size()]);
}
return EMPTY_TRAY_ARRAY;
}
--- a/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java Tue Jan 28 11:22:25 2014 -0800
@@ -730,9 +730,8 @@
textFlavorComparator = new TextFlavorComparator();
}
- DataFlavor bestFlavor =
- (DataFlavor)Collections.max(Arrays.asList(availableFlavors),
- textFlavorComparator);
+ DataFlavor bestFlavor = Collections.max(Arrays.asList(availableFlavors),
+ textFlavorComparator);
if (!bestFlavor.isFlavorTextType()) {
return null;
--- a/jdk/src/share/classes/java/awt/datatransfer/StringSelection.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/datatransfer/StringSelection.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -76,7 +76,7 @@
public DataFlavor[] getTransferDataFlavors() {
// returning flavors itself would allow client code to modify
// our internal behavior
- return (DataFlavor[])flavors.clone();
+ return flavors.clone();
}
/**
--- a/jdk/src/share/classes/java/awt/image/AffineTransformOp.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/AffineTransformOp.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -110,23 +110,23 @@
this.hints = hints;
if (hints != null) {
- Object value = hints.get(hints.KEY_INTERPOLATION);
+ Object value = hints.get(RenderingHints.KEY_INTERPOLATION);
if (value == null) {
- value = hints.get(hints.KEY_RENDERING);
- if (value == hints.VALUE_RENDER_SPEED) {
+ value = hints.get(RenderingHints.KEY_RENDERING);
+ if (value == RenderingHints.VALUE_RENDER_SPEED) {
interpolationType = TYPE_NEAREST_NEIGHBOR;
}
- else if (value == hints.VALUE_RENDER_QUALITY) {
+ else if (value == RenderingHints.VALUE_RENDER_QUALITY) {
interpolationType = TYPE_BILINEAR;
}
}
- else if (value == hints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR) {
+ else if (value == RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR) {
interpolationType = TYPE_NEAREST_NEIGHBOR;
}
- else if (value == hints.VALUE_INTERPOLATION_BILINEAR) {
+ else if (value == RenderingHints.VALUE_INTERPOLATION_BILINEAR) {
interpolationType = TYPE_BILINEAR;
}
- else if (value == hints.VALUE_INTERPOLATION_BICUBIC) {
+ else if (value == RenderingHints.VALUE_INTERPOLATION_BICUBIC) {
interpolationType = TYPE_BICUBIC;
}
}
@@ -235,10 +235,12 @@
{
int type = xform.getType();
boolean needTrans = ((type&
- (xform.TYPE_MASK_ROTATION|
- xform.TYPE_GENERAL_TRANSFORM))
+ (AffineTransform.TYPE_MASK_ROTATION|
+ AffineTransform.TYPE_GENERAL_TRANSFORM))
!= 0);
- if (! needTrans && type != xform.TYPE_TRANSLATION && type != xform.TYPE_IDENTITY)
+ if (! needTrans &&
+ type != AffineTransform.TYPE_TRANSLATION &&
+ type != AffineTransform.TYPE_IDENTITY)
{
double[] mtx = new double[4];
xform.getMatrix(mtx);
--- a/jdk/src/share/classes/java/awt/image/ComponentColorModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/ComponentColorModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -1514,13 +1514,13 @@
intpixel[0] = (int) (red * factor * ((1<<nBits[0]) - 1) + 0.5f);
}
if (nBits[1] == precision) {
- intpixel[1] = (int)(grn);
+ intpixel[1] = grn;
}
else {
intpixel[1] = (int) (grn * factor * ((1<<nBits[1]) - 1) + 0.5f);
}
if (nBits[2] == precision) {
- intpixel[2] = (int)(blu);
+ intpixel[2] = blu;
}
else {
intpixel[2] = (int) (blu * factor * ((1<<nBits[2]) - 1) + 0.5f);
--- a/jdk/src/share/classes/java/awt/image/ComponentSampleModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/ComponentSampleModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -147,7 +147,7 @@
this.dataType = dataType;
this.pixelStride = pixelStride;
this.scanlineStride = scanlineStride;
- this.bandOffsets = (int[])bandOffsets.clone();
+ this.bandOffsets = bandOffsets.clone();
numBands = this.bandOffsets.length;
if (pixelStride < 0) {
throw new IllegalArgumentException("Pixel stride must be >= 0");
@@ -211,8 +211,8 @@
this.dataType = dataType;
this.pixelStride = pixelStride;
this.scanlineStride = scanlineStride;
- this.bandOffsets = (int[])bandOffsets.clone();
- this.bankIndices = (int[]) bankIndices.clone();
+ this.bandOffsets = bandOffsets.clone();
+ this.bankIndices = bankIndices.clone();
if (pixelStride < 0) {
throw new IllegalArgumentException("Pixel stride must be >= 0");
}
@@ -526,14 +526,14 @@
* @return the bank indices for all bands.
*/
public final int [] getBankIndices() {
- return (int[]) bankIndices.clone();
+ return bankIndices.clone();
}
/** Returns the band offset for all bands.
* @return the band offsets for all bands.
*/
public final int [] getBandOffsets() {
- return (int[])bandOffsets.clone();
+ return bandOffsets.clone();
}
/** Returns the scanline stride of this ComponentSampleModel.
--- a/jdk/src/share/classes/java/awt/image/DataBuffer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/DataBuffer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -279,7 +279,7 @@
this.banks = numBanks;
this.size = size;
this.offset = offsets[0];
- this.offsets = (int[])offsets.clone();
+ this.offsets = offsets.clone();
}
/** Returns the data type of this DataBuffer.
@@ -307,7 +307,7 @@
* @return the offsets of all banks.
*/
public int[] getOffsets() {
- return (int[])offsets.clone();
+ return offsets.clone();
}
/** Returns the number of banks in this DataBuffer.
--- a/jdk/src/share/classes/java/awt/image/DataBufferByte.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/DataBufferByte.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -156,7 +156,7 @@
*/
public DataBufferByte(byte dataArray[][], int size) {
super(UNTRACKABLE, TYPE_BYTE, size, dataArray.length);
- bankdata = (byte[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
@@ -181,7 +181,7 @@
*/
public DataBufferByte(byte dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_BYTE, size, dataArray.length, offsets);
- bankdata = (byte[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
@@ -228,7 +228,7 @@
*/
public byte[][] getBankData() {
theTrackable.setUntrackable();
- return (byte[][]) bankdata.clone();
+ return bankdata.clone();
}
/**
--- a/jdk/src/share/classes/java/awt/image/DataBufferDouble.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/DataBufferDouble.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -154,7 +154,7 @@
*/
public DataBufferDouble(double dataArray[][], int size) {
super(UNTRACKABLE, TYPE_DOUBLE, size, dataArray.length);
- bankdata = (double[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
@@ -178,7 +178,7 @@
*/
public DataBufferDouble(double dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_DOUBLE, size, dataArray.length, offsets);
- bankdata = (double[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
@@ -225,7 +225,7 @@
*/
public double[][] getBankData() {
theTrackable.setUntrackable();
- return (double[][]) bankdata.clone();
+ return bankdata.clone();
}
/**
--- a/jdk/src/share/classes/java/awt/image/DataBufferFloat.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/DataBufferFloat.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -156,7 +156,7 @@
*/
public DataBufferFloat(float dataArray[][], int size) {
super(UNTRACKABLE, TYPE_FLOAT, size, dataArray.length);
- bankdata = (float[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
@@ -180,7 +180,7 @@
*/
public DataBufferFloat(float dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_FLOAT, size,dataArray.length, offsets);
- bankdata = (float[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
@@ -227,7 +227,7 @@
*/
public float[][] getBankData() {
theTrackable.setUntrackable();
- return (float[][]) bankdata.clone();
+ return bankdata.clone();
}
/**
--- a/jdk/src/share/classes/java/awt/image/DataBufferInt.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/DataBufferInt.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -154,7 +154,7 @@
*/
public DataBufferInt(int dataArray[][], int size) {
super(UNTRACKABLE, TYPE_INT, size, dataArray.length);
- bankdata = (int [][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
@@ -179,7 +179,7 @@
*/
public DataBufferInt(int dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_INT, size, dataArray.length, offsets);
- bankdata = (int [][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
@@ -226,7 +226,7 @@
*/
public int[][] getBankData() {
theTrackable.setUntrackable();
- return (int [][]) bankdata.clone();
+ return bankdata.clone();
}
/**
@@ -278,7 +278,7 @@
* @see #getElem(int, int)
*/
public void setElem(int bank, int i, int val) {
- bankdata[bank][i+offsets[bank]] = (int)val;
+ bankdata[bank][i+offsets[bank]] = val;
theTrackable.markDirty();
}
}
--- a/jdk/src/share/classes/java/awt/image/DataBufferShort.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/DataBufferShort.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -153,7 +153,7 @@
*/
public DataBufferShort(short dataArray[][], int size) {
super(UNTRACKABLE, TYPE_SHORT, size, dataArray.length);
- bankdata = (short[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
@@ -178,7 +178,7 @@
*/
public DataBufferShort(short dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_SHORT, size, dataArray.length, offsets);
- bankdata = (short[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
@@ -225,7 +225,7 @@
*/
public short[][] getBankData() {
theTrackable.setUntrackable();
- return (short[][]) bankdata.clone();
+ return bankdata.clone();
}
/**
--- a/jdk/src/share/classes/java/awt/image/DataBufferUShort.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/DataBufferUShort.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -174,7 +174,7 @@
}
}
- bankdata = (short[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
@@ -213,7 +213,7 @@
}
}
- bankdata = (short[][]) dataArray.clone();
+ bankdata = dataArray.clone();
data = bankdata[0];
}
@@ -260,7 +260,7 @@
*/
public short[][] getBankData() {
theTrackable.setUntrackable();
- return (short[][]) bankdata.clone();
+ return bankdata.clone();
}
/**
@@ -272,7 +272,7 @@
* @see #setElem(int, int, int)
*/
public int getElem(int i) {
- return (int)(data[i+offset]&0xffff);
+ return data[i+offset]&0xffff;
}
/**
@@ -285,7 +285,7 @@
* @see #setElem(int, int, int)
*/
public int getElem(int bank, int i) {
- return (int)(bankdata[bank][i+offsets[bank]]&0xffff);
+ return bankdata[bank][i+offsets[bank]]&0xffff;
}
/**
--- a/jdk/src/share/classes/java/awt/image/IndexColorModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/IndexColorModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -909,7 +909,7 @@
int minDist = 256;
int d;
- int gray = (int) (red*77 + green*150 + blue*29 + 128)/256;
+ int gray = (red*77 + green*150 + blue*29 + 128)/256;
for (int i = 0; i < map_size; i++) {
if (this.rgb[i] == 0x0) {
--- a/jdk/src/share/classes/java/awt/image/LookupOp.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/LookupOp.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,6 @@
+
/*
- * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -373,11 +374,11 @@
int trans = cm.getTransparency();
int[] nbits = null;
if (ltable instanceof ByteLookupTable) {
- if (db.getDataType() == db.TYPE_USHORT) {
+ if (db.getDataType() == DataBuffer.TYPE_USHORT) {
// Dst raster should be of type byte
if (hasAlpha) {
nbits = new int[2];
- if (trans == cm.BITMASK) {
+ if (trans == java.awt.Transparency.BITMASK) {
nbits[1] = 1;
}
else {
@@ -393,10 +394,10 @@
}
else if (ltable instanceof ShortLookupTable) {
transferType = DataBuffer.TYPE_USHORT;
- if (db.getDataType() == db.TYPE_BYTE) {
+ if (db.getDataType() == DataBuffer.TYPE_BYTE) {
if (hasAlpha) {
nbits = new int[2];
- if (trans == cm.BITMASK) {
+ if (trans == java.awt.Transparency.BITMASK) {
nbits[1] = 1;
}
else {
--- a/jdk/src/share/classes/java/awt/image/MultiPixelPackedSampleModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/MultiPixelPackedSampleModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -198,7 +198,7 @@
public DataBuffer createDataBuffer() {
DataBuffer dataBuffer = null;
- int size = (int)scanlineStride*height;
+ int size = scanlineStride*height;
switch (dataType) {
case DataBuffer.TYPE_BYTE:
dataBuffer = new DataBufferByte(size+(dataBitOffset+7)/8);
--- a/jdk/src/share/classes/java/awt/image/PackedColorModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/PackedColorModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -252,7 +252,7 @@
* representation contain the color or alpha samples.
*/
final public int[] getMasks() {
- return (int[]) maskArray.clone();
+ return maskArray.clone();
}
/*
--- a/jdk/src/share/classes/java/awt/image/RescaleOp.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/RescaleOp.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -144,7 +144,7 @@
*/
final public float[] getScaleFactors (float scaleFactors[]) {
if (scaleFactors == null) {
- return (float[]) this.scaleFactors.clone();
+ return this.scaleFactors.clone();
}
System.arraycopy (this.scaleFactors, 0, scaleFactors, 0,
Math.min(this.scaleFactors.length,
@@ -162,7 +162,7 @@
*/
final public float[] getOffsets(float offsets[]) {
if (offsets == null) {
- return (float[]) this.offsets.clone();
+ return this.offsets.clone();
}
System.arraycopy (this.offsets, 0, offsets, 0,
--- a/jdk/src/share/classes/java/awt/image/SinglePixelPackedSampleModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/awt/image/SinglePixelPackedSampleModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -149,7 +149,7 @@
dataType);
}
this.dataType = dataType;
- this.bitMasks = (int[]) bitMasks.clone();
+ this.bitMasks = bitMasks.clone();
this.scanlineStride = scanlineStride;
this.bitOffsets = new int[numBands];
@@ -276,14 +276,14 @@
* @return the bit offsets representing a pixel for all bands.
*/
public int [] getBitOffsets() {
- return (int[])bitOffsets.clone();
+ return bitOffsets.clone();
}
/** Returns the bit masks for all bands.
* @return the bit masks for all bands.
*/
public int [] getBitMasks() {
- return (int[])bitMasks.clone();
+ return bitMasks.clone();
}
/** Returns the scanline stride of this SinglePixelPackedSampleModel.
@@ -746,7 +746,7 @@
int value = data.getElem(lineOffset+j);
value &= ~bitMasks[b];
int sample = iArray[srcOffset++];
- value |= ((int)sample << bitOffsets[b]) & bitMasks[b];
+ value |= (sample << bitOffsets[b]) & bitMasks[b];
data.setElem(lineOffset+j,value);
}
lineOffset += scanlineStride;
--- a/jdk/src/share/classes/java/lang/Class.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/Class.java Tue Jan 28 11:22:25 2014 -0800
@@ -1488,10 +1488,9 @@
List<Class<?>> list = new ArrayList<>();
Class<?> currentClass = Class.this;
while (currentClass != null) {
- Class<?>[] members = currentClass.getDeclaredClasses();
- for (int i = 0; i < members.length; i++) {
- if (Modifier.isPublic(members[i].getModifiers())) {
- list.add(members[i]);
+ for (Class<?> m : currentClass.getDeclaredClasses()) {
+ if (Modifier.isPublic(m.getModifiers())) {
+ list.add(m);
}
}
currentClass = currentClass.getSuperclass();
@@ -2626,8 +2625,8 @@
}
private static void addAll(Collection<Field> c, Field[] o) {
- for (int i = 0; i < o.length; i++) {
- c.add(o[i]);
+ for (Field f : o) {
+ c.add(f);
}
}
@@ -2713,8 +2712,8 @@
}
void addAll(Method[] ma) {
- for (int i = 0; i < ma.length; i++) {
- add(ma[i]);
+ for (Method m : ma) {
+ add(m);
}
}
@@ -2819,9 +2818,8 @@
// out concrete implementations inherited from superclasses at
// the end.
MethodArray inheritedMethods = new MethodArray();
- Class<?>[] interfaces = getInterfaces();
- for (int i = 0; i < interfaces.length; i++) {
- inheritedMethods.addAllNonStatic(interfaces[i].privateGetPublicMethods());
+ for (Class<?> i : getInterfaces()) {
+ inheritedMethods.addAllNonStatic(i.privateGetPublicMethods());
}
if (!isInterface()) {
Class<?> c = getSuperclass();
@@ -2864,9 +2862,9 @@
private static Field searchFields(Field[] fields, String name) {
String internedName = name.intern();
- for (int i = 0; i < fields.length; i++) {
- if (fields[i].getName() == internedName) {
- return getReflectionFactory().copyField(fields[i]);
+ for (Field field : fields) {
+ if (field.getName() == internedName) {
+ return getReflectionFactory().copyField(field);
}
}
return null;
@@ -2887,8 +2885,7 @@
}
// Direct superinterfaces, recursively
Class<?>[] interfaces = getInterfaces();
- for (int i = 0; i < interfaces.length; i++) {
- Class<?> c = interfaces[i];
+ for (Class<?> c : interfaces) {
if ((res = c.getField0(name)) != null) {
return res;
}
@@ -2911,8 +2908,7 @@
{
Method res = null;
String internedName = name.intern();
- for (int i = 0; i < methods.length; i++) {
- Method m = methods[i];
+ for (Method m : methods) {
if (m.getName() == internedName
&& arrayContentsEq(parameterTypes, m.getParameterTypes())
&& (res == null
--- a/jdk/src/share/classes/java/lang/ClassLoader.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/ClassLoader.java Tue Jan 28 11:22:25 2014 -0800
@@ -172,6 +172,10 @@
* "java.net.URLClassLoader$3$1"
* </pre></blockquote>
*
+ * {@code Class} objects for array classes are not created by {@code ClassLoader};
+ * use the {@link Class#forName} method instead.
+ *
+ * @jls 13.1 The Form of a Binary
* @see #resolveClass(Class)
* @since 1.0
*/
@@ -195,8 +199,7 @@
// the set of parallel capable loader types
private static final Set<Class<? extends ClassLoader>> loaderTypes =
- Collections.newSetFromMap(
- new WeakHashMap<Class<? extends ClassLoader>, Boolean>());
+ Collections.newSetFromMap(new WeakHashMap<>());
static {
synchronized (loaderTypes) { loaderTypes.add(ClassLoader.class); }
}
@@ -281,8 +284,7 @@
if (ParallelLoaders.isRegistered(this.getClass())) {
parallelLockMap = new ConcurrentHashMap<>();
package2certs = new ConcurrentHashMap<>();
- domains =
- Collections.synchronizedSet(new HashSet<ProtectionDomain>());
+ domains = Collections.synchronizedSet(new HashSet<>());
assertionLock = new Object();
} else {
// no finer-grained lock; lock on the classloader instance
@@ -851,9 +853,6 @@
return c;
}
- private native Class<?> defineClass0(String name, byte[] b, int off, int len,
- ProtectionDomain pd);
-
private native Class<?> defineClass1(String name, byte[] b, int off, int len,
ProtectionDomain pd, String source);
@@ -865,8 +864,7 @@
private boolean checkName(String name) {
if ((name == null) || (name.length() == 0))
return true;
- if ((name.indexOf('/') != -1)
- || (!VM.allowArraySyntax() && (name.charAt(0) == '[')))
+ if ((name.indexOf('/') != -1) || (name.charAt(0) == '['))
return false;
return true;
}
@@ -916,10 +914,10 @@
// go through and make sure all the certs in one array
// are in the other and vice-versa.
boolean match;
- for (int i = 0; i < certs.length; i++) {
+ for (Certificate cert : certs) {
match = false;
- for (int j = 0; j < pcerts.length; j++) {
- if (certs[i].equals(pcerts[j])) {
+ for (Certificate pcert : pcerts) {
+ if (cert.equals(pcert)) {
match = true;
break;
}
@@ -928,10 +926,10 @@
}
// now do the same for pcerts
- for (int i = 0; i < pcerts.length; i++) {
+ for (Certificate pcert : pcerts) {
match = false;
- for (int j = 0; j < certs.length; j++) {
- if (pcerts[i].equals(certs[j])) {
+ for (Certificate cert : certs) {
+ if (pcert.equals(cert)) {
match = true;
break;
}
@@ -1648,10 +1646,10 @@
pkgs = Package.getSystemPackages();
}
if (pkgs != null) {
- for (int i = 0; i < pkgs.length; i++) {
- String pkgName = pkgs[i].getName();
+ for (Package pkg : pkgs) {
+ String pkgName = pkg.getName();
if (map.get(pkgName) == null) {
- map.put(pkgName, pkgs[i]);
+ map.put(pkgName, pkg);
}
}
}
@@ -1830,8 +1828,8 @@
throw new UnsatisfiedLinkError("Can't load " + libfilename);
}
}
- for (int i = 0 ; i < sys_paths.length ; i++) {
- File libfile = new File(sys_paths[i], System.mapLibraryName(name));
+ for (String sys_path : sys_paths) {
+ File libfile = new File(sys_path, System.mapLibraryName(name));
if (loadLibrary0(fromClass, libfile)) {
return;
}
@@ -1841,9 +1839,8 @@
}
}
if (loader != null) {
- for (int i = 0 ; i < usr_paths.length ; i++) {
- File libfile = new File(usr_paths[i],
- System.mapLibraryName(name));
+ for (String usr_path : usr_paths) {
+ File libfile = new File(usr_path, System.mapLibraryName(name));
if (loadLibrary0(fromClass, libfile)) {
return;
}
--- a/jdk/src/share/classes/java/lang/ConditionalSpecialCasing.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/ConditionalSpecialCasing.java Tue Jan 28 11:22:25 2014 -0800
@@ -91,15 +91,14 @@
static Hashtable<Integer, HashSet<Entry>> entryTable = new Hashtable<>();
static {
// create hashtable from the entry
- for (int i = 0; i < entry.length; i ++) {
- Entry cur = entry[i];
- Integer cp = new Integer(cur.getCodePoint());
+ for (Entry cur : entry) {
+ Integer cp = cur.getCodePoint();
HashSet<Entry> set = entryTable.get(cp);
if (set == null) {
- set = new HashSet<Entry>();
+ set = new HashSet<>();
+ entryTable.put(cp, set);
}
set.add(cur);
- entryTable.put(cp, set);
}
}
--- a/jdk/src/share/classes/java/lang/Package.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/Package.java Tue Jan 28 11:22:25 2014 -0800
@@ -557,8 +557,8 @@
// First, update the system package map with new package names
String[] names = getSystemPackages0();
synchronized (pkgs) {
- for (int i = 0; i < names.length; i++) {
- defineSystemPackage(names[i], getSystemPackage0(names[i]));
+ for (String name : names) {
+ defineSystemPackage(name, getSystemPackage0(name));
}
return pkgs.values().toArray(new Package[pkgs.size()]);
}
--- a/jdk/src/share/classes/java/lang/SecurityManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/SecurityManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1476,10 +1476,10 @@
/*
* Traverse the list of packages, check for any matches.
*/
- for (int i = 0; i < pkgs.length; i++) {
- if (pkg.startsWith(pkgs[i]) || pkgs[i].equals(pkg + ".")) {
+ for (String restrictedPkg : pkgs) {
+ if (pkg.startsWith(restrictedPkg) || restrictedPkg.equals(pkg + ".")) {
checkPermission(
- new RuntimePermission("accessClassInPackage."+pkg));
+ new RuntimePermission("accessClassInPackage." + pkg));
break; // No need to continue; only need to check this once
}
}
@@ -1544,10 +1544,10 @@
/*
* Traverse the list of packages, check for any matches.
*/
- for (int i = 0; i < pkgs.length; i++) {
- if (pkg.startsWith(pkgs[i]) || pkgs[i].equals(pkg + ".")) {
+ for (String restrictedPkg : pkgs) {
+ if (pkg.startsWith(restrictedPkg) || restrictedPkg.equals(pkg + ".")) {
checkPermission(
- new RuntimePermission("defineClassInPackage."+pkg));
+ new RuntimePermission("defineClassInPackage." + pkg));
break; // No need to continue; only need to check this once
}
}
--- a/jdk/src/share/classes/java/lang/StringCoding.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/StringCoding.java Tue Jan 28 11:22:25 2014 -0800
@@ -67,7 +67,7 @@
}
private static <T> void set(ThreadLocal<SoftReference<T>> tl, T ob) {
- tl.set(new SoftReference<T>(ob));
+ tl.set(new SoftReference<>(ob));
}
// Trim the given byte array to the given length
--- a/jdk/src/share/classes/java/lang/ThreadLocal.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/ThreadLocal.java Tue Jan 28 11:22:25 2014 -0800
@@ -382,8 +382,7 @@
setThreshold(len);
table = new Entry[len];
- for (int j = 0; j < len; j++) {
- Entry e = parentTable[j];
+ for (Entry e : parentTable) {
if (e != null) {
@SuppressWarnings("unchecked")
ThreadLocal<Object> key = (ThreadLocal<Object>) e.get();
@@ -685,8 +684,7 @@
Entry[] newTab = new Entry[newLen];
int count = 0;
- for (int j = 0; j < oldLen; ++j) {
- Entry e = oldTab[j];
+ for (Entry e : oldTab) {
if (e != null) {
ThreadLocal<?> k = e.get();
if (k == null) {
--- a/jdk/src/share/classes/java/lang/Throwable.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/Throwable.java Tue Jan 28 11:22:25 2014 -0800
@@ -646,8 +646,7 @@
private void printStackTrace(PrintStreamOrWriter s) {
// Guard against malicious overrides of Throwable.equals by
// using a Set with identity equality semantics.
- Set<Throwable> dejaVu =
- Collections.newSetFromMap(new IdentityHashMap<Throwable, Boolean>());
+ Set<Throwable> dejaVu = Collections.newSetFromMap(new IdentityHashMap<>());
dejaVu.add(this);
synchronized (s.lock()) {
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java Tue Jan 28 11:22:25 2014 -0800
@@ -303,7 +303,7 @@
private static
Method[] getSingleNameMethods(Class<?> intfc) {
- ArrayList<Method> methods = new ArrayList<Method>();
+ ArrayList<Method> methods = new ArrayList<>();
String uniqueName = null;
for (Method m : intfc.getMethods()) {
if (isObjectMethod(m)) continue;
--- a/jdk/src/share/classes/java/lang/invoke/MutableCallSite.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/invoke/MutableCallSite.java Tue Jan 28 11:22:25 2014 -0800
@@ -274,8 +274,8 @@
public static void syncAll(MutableCallSite[] sites) {
if (sites.length == 0) return;
STORE_BARRIER.lazySet(0);
- for (int i = 0; i < sites.length; i++) {
- sites[i].getClass(); // trigger NPE on first null
+ for (MutableCallSite site : sites) {
+ site.getClass(); // trigger NPE on first null
}
// FIXME: NYI
}
--- a/jdk/src/share/classes/java/lang/management/MemoryUsage.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/management/MemoryUsage.java Tue Jan 28 11:22:25 2014 -0800
@@ -237,7 +237,7 @@
* Returns a descriptive representation of this memory usage.
*/
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("init = " + init + "(" + (init >> 10) + "K) ");
buf.append("used = " + used + "(" + (used >> 10) + "K) ");
buf.append("committed = " + committed + "(" +
--- a/jdk/src/share/classes/java/lang/reflect/AccessibleObject.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/reflect/AccessibleObject.java Tue Jan 28 11:22:25 2014 -0800
@@ -93,8 +93,8 @@
throws SecurityException {
SecurityManager sm = System.getSecurityManager();
if (sm != null) sm.checkPermission(ACCESS_PERMISSION);
- for (int i = 0; i < array.length; i++) {
- setAccessible0(array[i], flag);
+ for (AccessibleObject ao : array) {
+ setAccessible0(ao, flag);
}
}
--- a/jdk/src/share/classes/java/lang/reflect/Parameter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/reflect/Parameter.java Tue Jan 28 11:22:25 2014 -0800
@@ -337,11 +337,9 @@
private synchronized Map<Class<? extends Annotation>, Annotation> declaredAnnotations() {
if(null == declaredAnnotations) {
- declaredAnnotations =
- new HashMap<Class<? extends Annotation>, Annotation>();
- Annotation[] ann = getDeclaredAnnotations();
- for(int i = 0; i < ann.length; i++)
- declaredAnnotations.put(ann[i].annotationType(), ann[i]);
+ declaredAnnotations = new HashMap<>();
+ for (Annotation a : getDeclaredAnnotations())
+ declaredAnnotations.put(a.annotationType(), a);
}
return declaredAnnotations;
}
--- a/jdk/src/share/classes/java/lang/reflect/Proxy.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/lang/reflect/Proxy.java Tue Jan 28 11:22:25 2014 -0800
@@ -465,7 +465,7 @@
Key2(Class<?> intf1, Class<?> intf2) {
super(intf1);
hash = 31 * intf1.hashCode() + intf2.hashCode();
- ref2 = new WeakReference<Class<?>>(intf2);
+ ref2 = new WeakReference<>(intf2);
}
@Override
@@ -725,7 +725,6 @@
}
final Constructor<?> cons = cl.getConstructor(constructorParams);
- final InvocationHandler ih = h;
if (!Modifier.isPublic(cl.getModifiers())) {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
@@ -735,7 +734,7 @@
});
}
return cons.newInstance(new Object[]{h});
- } catch (IllegalAccessException|InstantiationException e) {
+ } catch (IllegalAccessException | InstantiationException | NoSuchMethodException e) {
throw new InternalError(e.toString(), e);
} catch (InvocationTargetException e) {
Throwable t = e.getCause();
@@ -744,8 +743,6 @@
} else {
throw new InternalError(t.toString(), t);
}
- } catch (NoSuchMethodException e) {
- throw new InternalError(e.toString(), e);
}
}
--- a/jdk/src/share/classes/java/time/Duration.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/Duration.java Tue Jan 28 11:22:25 2014 -0800
@@ -1326,6 +1326,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/Instant.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/Instant.java Tue Jan 28 11:22:25 2014 -0800
@@ -1348,6 +1348,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/LocalDate.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/LocalDate.java Tue Jan 28 11:22:25 2014 -0800
@@ -2053,6 +2053,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/LocalDateTime.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/LocalDateTime.java Tue Jan 28 11:22:25 2014 -0800
@@ -1986,6 +1986,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/LocalTime.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/LocalTime.java Tue Jan 28 11:22:25 2014 -0800
@@ -1638,6 +1638,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/MonthDay.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/MonthDay.java Tue Jan 28 11:22:25 2014 -0800
@@ -771,6 +771,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/OffsetDateTime.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/OffsetDateTime.java Tue Jan 28 11:22:25 2014 -0800
@@ -1925,6 +1925,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/OffsetTime.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/OffsetTime.java Tue Jan 28 11:22:25 2014 -0800
@@ -1396,6 +1396,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/Period.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/Period.java Tue Jan 28 11:22:25 2014 -0800
@@ -1058,6 +1058,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws java.io.InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/Year.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/Year.java Tue Jan 28 11:22:25 2014 -0800
@@ -1104,6 +1104,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/YearMonth.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/YearMonth.java Tue Jan 28 11:22:25 2014 -0800
@@ -1230,6 +1230,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/ZoneId.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/ZoneId.java Tue Jan 28 11:22:25 2014 -0800
@@ -624,6 +624,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/ZoneOffset.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/ZoneOffset.java Tue Jan 28 11:22:25 2014 -0800
@@ -769,6 +769,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/ZoneRegion.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/ZoneRegion.java Tue Jan 28 11:22:25 2014 -0800
@@ -196,6 +196,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/ZonedDateTime.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/ZonedDateTime.java Tue Jan 28 11:22:25 2014 -0800
@@ -2225,6 +2225,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/chrono/AbstractChronology.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/AbstractChronology.java Tue Jan 28 11:22:25 2014 -0800
@@ -766,6 +766,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws java.io.InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws ObjectStreamException {
--- a/jdk/src/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java Tue Jan 28 11:22:25 2014 -0800
@@ -416,6 +416,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/chrono/ChronoPeriodImpl.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/ChronoPeriodImpl.java Tue Jan 28 11:22:25 2014 -0800
@@ -376,6 +376,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws ObjectStreamException {
--- a/jdk/src/share/classes/java/time/chrono/ChronoZonedDateTimeImpl.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/ChronoZonedDateTimeImpl.java Tue Jan 28 11:22:25 2014 -0800
@@ -340,6 +340,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/chrono/HijrahChronology.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/HijrahChronology.java Tue Jan 28 11:22:25 2014 -0800
@@ -1096,6 +1096,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/chrono/HijrahDate.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/HijrahDate.java Tue Jan 28 11:22:25 2014 -0800
@@ -654,6 +654,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/chrono/IsoChronology.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/IsoChronology.java Tue Jan 28 11:22:25 2014 -0800
@@ -604,6 +604,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/chrono/JapaneseChronology.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/JapaneseChronology.java Tue Jan 28 11:22:25 2014 -0800
@@ -525,6 +525,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/chrono/JapaneseDate.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/JapaneseDate.java Tue Jan 28 11:22:25 2014 -0800
@@ -716,6 +716,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/chrono/JapaneseEra.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/JapaneseEra.java Tue Jan 28 11:22:25 2014 -0800
@@ -357,6 +357,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/chrono/MinguoChronology.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/MinguoChronology.java Tue Jan 28 11:22:25 2014 -0800
@@ -355,6 +355,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/chrono/MinguoDate.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/MinguoDate.java Tue Jan 28 11:22:25 2014 -0800
@@ -478,6 +478,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java Tue Jan 28 11:22:25 2014 -0800
@@ -391,6 +391,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/chrono/ThaiBuddhistDate.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/chrono/ThaiBuddhistDate.java Tue Jan 28 11:22:25 2014 -0800
@@ -478,6 +478,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/temporal/ValueRange.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/temporal/ValueRange.java Tue Jan 28 11:22:25 2014 -0800
@@ -344,10 +344,13 @@
/**
* Restore the state of an ValueRange from the stream.
* Check that the values are valid.
+ *
+ * @param s the stream to read
* @throws InvalidObjectException if
* the smallest minimum is greater than the smallest maximum,
* or the smallest maximum is greater than the largest maximum
* or the largest minimum is greater than the largest maximum
+ * @throws ClassNotFoundException if a class cannot be resolved
*/
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException, InvalidObjectException
--- a/jdk/src/share/classes/java/time/temporal/WeekFields.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/temporal/WeekFields.java Tue Jan 28 11:22:25 2014 -0800
@@ -344,8 +344,11 @@
/**
* Restore the state of a WeekFields from the stream.
* Check that the values are valid.
+ *
+ * @param s the stream to read
* @throws InvalidObjectException if the serialized object has an invalid
* value for firstDayOfWeek or minimalDays.
+ * @throws ClassNotFoundException if a class cannot be resolved
*/
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException, InvalidObjectException
--- a/jdk/src/share/classes/java/time/zone/ZoneOffsetTransition.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/zone/ZoneOffsetTransition.java Tue Jan 28 11:22:25 2014 -0800
@@ -173,6 +173,8 @@
//-----------------------------------------------------------------------
/**
* Defend against malicious streams.
+ *
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java Tue Jan 28 11:22:25 2014 -0800
@@ -235,6 +235,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/time/zone/ZoneRules.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/time/zone/ZoneRules.java Tue Jan 28 11:22:25 2014 -0800
@@ -319,6 +319,7 @@
/**
* Defend against malicious streams.
*
+ * @param s the stream to read
* @throws InvalidObjectException always
*/
private void readObject(ObjectInputStream s) throws InvalidObjectException {
--- a/jdk/src/share/classes/java/util/jar/JarFile.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/java/util/jar/JarFile.java Tue Jan 28 11:22:25 2014 -0800
@@ -40,6 +40,7 @@
import sun.security.action.GetPropertyAction;
import sun.security.util.ManifestEntryVerifier;
import sun.misc.SharedSecrets;
+import sun.security.util.SignatureFileVerifier;
/**
* The <code>JarFile</code> class is used to read the contents of a jar file
@@ -364,11 +365,13 @@
String[] names = getMetaInfEntryNames();
if (names != null) {
for (String name : names) {
- JarEntry e = getJarEntry(name);
- if (e == null) {
- throw new JarException("corrupted jar file");
- }
- if (!e.isDirectory()) {
+ String uname = name.toUpperCase(Locale.ENGLISH);
+ if (MANIFEST_NAME.equals(uname)
+ || SignatureFileVerifier.isBlockOrSF(uname)) {
+ JarEntry e = getJarEntry(name);
+ if (e == null) {
+ throw new JarException("corrupted jar file");
+ }
if (mev == null) {
mev = new ManifestEntryVerifier
(getManifestFromReference());
--- a/jdk/src/share/classes/javax/accessibility/AccessibleRelationSet.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/accessibility/AccessibleRelationSet.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -195,8 +195,7 @@
} else {
int len = relations.size();
for (int i = 0; i < len; i++) {
- AccessibleRelation relation =
- (AccessibleRelation)relations.elementAt(i);
+ AccessibleRelation relation = relations.elementAt(i);
if (relation != null && relation.getKey().equals(key)) {
return relation;
}
@@ -216,7 +215,7 @@
AccessibleRelation[] relationArray
= new AccessibleRelation[relations.size()];
for (int i = 0; i < relationArray.length; i++) {
- relationArray[i] = (AccessibleRelation) relations.elementAt(i);
+ relationArray[i] = relations.elementAt(i);
}
return relationArray;
}
@@ -232,11 +231,10 @@
public String toString() {
String ret = "";
if ((relations != null) && (relations.size() > 0)) {
- ret = ((AccessibleRelation) (relations.elementAt(0))).toDisplayString();
+ ret = (relations.elementAt(0)).toDisplayString();
for (int i = 1; i < relations.size(); i++) {
ret = ret + ","
- + ((AccessibleRelation) (relations.elementAt(i))).
- toDisplayString();
+ + (relations.elementAt(i)).toDisplayString();
}
}
return ret;
--- a/jdk/src/share/classes/javax/accessibility/AccessibleStateSet.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/accessibility/AccessibleStateSet.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -171,7 +171,7 @@
} else {
AccessibleState[] stateArray = new AccessibleState[states.size()];
for (int i = 0; i < stateArray.length; i++) {
- stateArray[i] = (AccessibleState) states.elementAt(i);
+ stateArray[i] = states.elementAt(i);
}
return stateArray;
}
@@ -187,11 +187,10 @@
public String toString() {
String ret = null;
if ((states != null) && (states.size() > 0)) {
- ret = ((AccessibleState) (states.elementAt(0))).toDisplayString();
+ ret = states.elementAt(0).toDisplayString();
for (int i = 1; i < states.size(); i++) {
ret = ret + ","
- + ((AccessibleState) (states.elementAt(i))).
- toDisplayString();
+ + states.elementAt(i).toDisplayString();
}
}
return ret;
--- a/jdk/src/share/classes/javax/imageio/IIOParam.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/IIOParam.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -437,7 +437,7 @@
}
}
- this.sourceBands = (int[])(sourceBands.clone());
+ this.sourceBands = (sourceBands.clone());
}
}
@@ -460,7 +460,7 @@
if (sourceBands == null) {
return null;
}
- return (int[])(sourceBands.clone());
+ return (sourceBands.clone());
}
/**
--- a/jdk/src/share/classes/javax/imageio/ImageIO.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/ImageIO.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -169,7 +169,7 @@
*/
private static String getTempDir() {
GetPropertyAction a = new GetPropertyAction("java.io.tmpdir");
- return (String)AccessController.doPrivileged(a);
+ return AccessController.doPrivileged(a);
}
/**
--- a/jdk/src/share/classes/javax/imageio/ImageReadParam.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/ImageReadParam.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -294,7 +294,7 @@
}
}
}
- this.destinationBands = (int[])destinationBands.clone();
+ this.destinationBands = destinationBands.clone();
}
}
@@ -312,7 +312,7 @@
if (destinationBands == null) {
return null;
} else {
- return (int[])(destinationBands.clone());
+ return destinationBands.clone();
}
}
--- a/jdk/src/share/classes/javax/imageio/ImageReader.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/ImageReader.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -457,7 +457,7 @@
if (availableLocales == null) {
return null;
} else {
- return (Locale[])availableLocales.clone();
+ return availableLocales.clone();
}
}
@@ -678,7 +678,7 @@
*/
public ImageTypeSpecifier getRawImageType(int imageIndex)
throws IOException {
- return (ImageTypeSpecifier)getImageTypes(imageIndex).next();
+ return getImageTypes(imageIndex).next();
}
/**
@@ -2012,7 +2012,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener =
- (IIOReadProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.sequenceStarted(this, minIndex);
}
}
@@ -2030,7 +2030,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener =
- (IIOReadProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.sequenceComplete(this);
}
}
@@ -2050,7 +2050,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener =
- (IIOReadProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.imageStarted(this, imageIndex);
}
}
@@ -2071,7 +2071,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener =
- (IIOReadProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.imageProgress(this, percentageDone);
}
}
@@ -2089,7 +2089,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener =
- (IIOReadProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.imageComplete(this);
}
}
@@ -2112,7 +2112,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener =
- (IIOReadProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.thumbnailStarted(this, imageIndex, thumbnailIndex);
}
}
@@ -2133,7 +2133,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener =
- (IIOReadProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.thumbnailProgress(this, percentageDone);
}
}
@@ -2151,7 +2151,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener =
- (IIOReadProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.thumbnailComplete(this);
}
}
@@ -2169,7 +2169,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener =
- (IIOReadProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.readAborted(this);
}
}
@@ -2205,7 +2205,7 @@
int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener =
- (IIOReadUpdateListener)updateListeners.get(i);
+ updateListeners.get(i);
listener.passStarted(this, theImage, pass,
minPass,
maxPass,
@@ -2246,7 +2246,7 @@
int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener =
- (IIOReadUpdateListener)updateListeners.get(i);
+ updateListeners.get(i);
listener.imageUpdate(this,
theImage,
minX, minY,
@@ -2271,7 +2271,7 @@
int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener =
- (IIOReadUpdateListener)updateListeners.get(i);
+ updateListeners.get(i);
listener.passComplete(this, theImage);
}
}
@@ -2308,7 +2308,7 @@
int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener =
- (IIOReadUpdateListener)updateListeners.get(i);
+ updateListeners.get(i);
listener.thumbnailPassStarted(this, theThumbnail, pass,
minPass,
maxPass,
@@ -2350,7 +2350,7 @@
int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener =
- (IIOReadUpdateListener)updateListeners.get(i);
+ updateListeners.get(i);
listener.thumbnailUpdate(this,
theThumbnail,
minX, minY,
@@ -2376,7 +2376,7 @@
int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener =
- (IIOReadUpdateListener)updateListeners.get(i);
+ updateListeners.get(i);
listener.thumbnailPassComplete(this, theThumbnail);
}
}
@@ -2402,7 +2402,7 @@
int numListeners = warningListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadWarningListener listener =
- (IIOReadWarningListener)warningListeners.get(i);
+ warningListeners.get(i);
listener.warningOccurred(this, warning);
}
@@ -2447,8 +2447,8 @@
int numListeners = warningListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadWarningListener listener =
- (IIOReadWarningListener)warningListeners.get(i);
- Locale locale = (Locale)warningLocales.get(i);
+ warningListeners.get(i);
+ Locale locale = warningLocales.get(i);
if (locale == null) {
locale = Locale.getDefault();
}
@@ -2864,7 +2864,7 @@
boolean foundIt = false;
while (imageTypes.hasNext()) {
ImageTypeSpecifier type =
- (ImageTypeSpecifier)imageTypes.next();
+ imageTypes.next();
if (type.equals(imageType)) {
foundIt = true;
break;
--- a/jdk/src/share/classes/javax/imageio/ImageTypeSpecifier.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/ImageTypeSpecifier.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -296,7 +296,7 @@
("Bad value for dataType!");
}
this.colorSpace = colorSpace;
- this.bandOffsets = (int[])bandOffsets.clone();
+ this.bandOffsets = bandOffsets.clone();
this.dataType = dataType;
this.hasAlpha = hasAlpha;
this.isAlphaPremultiplied = isAlphaPremultiplied;
@@ -449,8 +449,8 @@
}
this.colorSpace = colorSpace;
- this.bankIndices = (int[])bankIndices.clone();
- this.bandOffsets = (int[])bandOffsets.clone();
+ this.bankIndices = bankIndices.clone();
+ this.bandOffsets = bandOffsets.clone();
this.dataType = dataType;
this.hasAlpha = hasAlpha;
this.isAlphaPremultiplied = isAlphaPremultiplied;
@@ -769,11 +769,11 @@
(alphaLUT != null && alphaLUT.length != len)) {
throw new IllegalArgumentException("LUT has improper length!");
}
- this.redLUT = (byte[])redLUT.clone();
- this.greenLUT = (byte[])greenLUT.clone();
- this.blueLUT = (byte[])blueLUT.clone();
+ this.redLUT = redLUT.clone();
+ this.greenLUT = greenLUT.clone();
+ this.blueLUT = blueLUT.clone();
if (alphaLUT != null) {
- this.alphaLUT = (byte[])alphaLUT.clone();
+ this.alphaLUT = alphaLUT.clone();
}
this.bits = bits;
this.dataType = dataType;
--- a/jdk/src/share/classes/javax/imageio/ImageWriteParam.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/ImageWriteParam.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -976,7 +976,7 @@
if (compressionTypes == null) {
return null;
}
- return (String[])compressionTypes.clone();
+ return compressionTypes.clone();
}
/**
--- a/jdk/src/share/classes/javax/imageio/ImageWriter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/ImageWriter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -257,7 +257,7 @@
*/
public Locale[] getAvailableLocales() {
return (availableLocales == null) ?
- null : (Locale[])availableLocales.clone();
+ null : availableLocales.clone();
}
/**
@@ -1754,7 +1754,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener =
- (IIOWriteProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.imageStarted(this, imageIndex);
}
}
@@ -1775,7 +1775,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener =
- (IIOWriteProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.imageProgress(this, percentageDone);
}
}
@@ -1793,7 +1793,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener =
- (IIOWriteProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.imageComplete(this);
}
}
@@ -1816,7 +1816,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener =
- (IIOWriteProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.thumbnailStarted(this, imageIndex, thumbnailIndex);
}
}
@@ -1837,7 +1837,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener =
- (IIOWriteProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.thumbnailProgress(this, percentageDone);
}
}
@@ -1855,7 +1855,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener =
- (IIOWriteProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.thumbnailComplete(this);
}
}
@@ -1873,7 +1873,7 @@
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener =
- (IIOWriteProgressListener)progressListeners.get(i);
+ progressListeners.get(i);
listener.writeAborted(this);
}
}
@@ -1902,7 +1902,7 @@
int numListeners = warningListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOWriteWarningListener listener =
- (IIOWriteWarningListener)warningListeners.get(i);
+ warningListeners.get(i);
listener.warningOccurred(this, imageIndex, warning);
}
@@ -1950,8 +1950,8 @@
int numListeners = warningListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOWriteWarningListener listener =
- (IIOWriteWarningListener)warningListeners.get(i);
- Locale locale = (Locale)warningLocales.get(i);
+ warningListeners.get(i);
+ Locale locale = warningLocales.get(i);
if (locale == null) {
locale = Locale.getDefault();
}
--- a/jdk/src/share/classes/javax/imageio/metadata/IIOMetadata.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/metadata/IIOMetadata.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -191,10 +191,8 @@
throw new IllegalArgumentException
("extraMetadataFormatClassNames.length != extraMetadataFormatNames.length!");
}
- this.extraMetadataFormatNames =
- (String[]) extraMetadataFormatNames.clone();
- this.extraMetadataFormatClassNames =
- (String[]) extraMetadataFormatClassNames.clone();
+ this.extraMetadataFormatNames = extraMetadataFormatNames.clone();
+ this.extraMetadataFormatClassNames = extraMetadataFormatClassNames.clone();
} else {
if (extraMetadataFormatClassNames != null) {
throw new IllegalArgumentException
@@ -285,7 +283,7 @@
if (extraMetadataFormatNames == null) {
return null;
}
- return (String[])extraMetadataFormatNames.clone();
+ return extraMetadataFormatNames.clone();
}
/**
--- a/jdk/src/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -1181,7 +1181,7 @@
private ObjectValue getObjectValue(String elementName) {
Element element = getElement(elementName);
- ObjectValue objv = (ObjectValue)element.objectValue;
+ ObjectValue objv = element.objectValue;
if (objv == null) {
throw new IllegalArgumentException("No object within element " +
elementName + "!");
@@ -1191,7 +1191,7 @@
public int getObjectValueType(String elementName) {
Element element = getElement(elementName);
- ObjectValue objv = (ObjectValue)element.objectValue;
+ ObjectValue objv = element.objectValue;
if (objv == null) {
return VALUE_NONE;
}
--- a/jdk/src/share/classes/javax/imageio/plugins/jpeg/JPEGImageReadParam.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/plugins/jpeg/JPEGImageReadParam.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -132,9 +132,9 @@
throw new IllegalArgumentException
("Invalid JPEG table arrays");
}
- this.qTables = (JPEGQTable[])qTables.clone();
- this.DCHuffmanTables = (JPEGHuffmanTable[])DCHuffmanTables.clone();
- this.ACHuffmanTables = (JPEGHuffmanTable[])ACHuffmanTables.clone();
+ this.qTables = qTables.clone();
+ this.DCHuffmanTables = DCHuffmanTables.clone();
+ this.ACHuffmanTables = ACHuffmanTables.clone();
}
/**
@@ -160,7 +160,7 @@
* @see #setDecodeTables
*/
public JPEGQTable[] getQTables() {
- return (qTables != null) ? (JPEGQTable[])qTables.clone() : null;
+ return (qTables != null) ? qTables.clone() : null;
}
/**
@@ -175,7 +175,7 @@
*/
public JPEGHuffmanTable[] getDCHuffmanTables() {
return (DCHuffmanTables != null)
- ? (JPEGHuffmanTable[])DCHuffmanTables.clone()
+ ? DCHuffmanTables.clone()
: null;
}
@@ -191,7 +191,7 @@
*/
public JPEGHuffmanTable[] getACHuffmanTables() {
return (ACHuffmanTables != null)
- ? (JPEGHuffmanTable[])ACHuffmanTables.clone()
+ ? ACHuffmanTables.clone()
: null;
}
}
--- a/jdk/src/share/classes/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -167,7 +167,7 @@
(getCompressionType() == null)) {
throw new IllegalStateException("No compression type set!");
}
- return (String[])qualityDescs.clone();
+ return qualityDescs.clone();
}
public float[] getCompressionQualityValues() {
@@ -179,7 +179,7 @@
(getCompressionType() == null)) {
throw new IllegalStateException("No compression type set!");
}
- return (float[])qualityVals.clone();
+ return qualityVals.clone();
}
/**
* Returns <code>true</code> if tables are currently set.
@@ -222,9 +222,9 @@
(DCHuffmanTables.length != ACHuffmanTables.length)) {
throw new IllegalArgumentException("Invalid JPEG table arrays");
}
- this.qTables = (JPEGQTable[])qTables.clone();
- this.DCHuffmanTables = (JPEGHuffmanTable[])DCHuffmanTables.clone();
- this.ACHuffmanTables = (JPEGHuffmanTable[])ACHuffmanTables.clone();
+ this.qTables = qTables.clone();
+ this.DCHuffmanTables = DCHuffmanTables.clone();
+ this.ACHuffmanTables = ACHuffmanTables.clone();
}
/**
@@ -250,7 +250,7 @@
* @see #setEncodeTables
*/
public JPEGQTable[] getQTables() {
- return (qTables != null) ? (JPEGQTable[])qTables.clone() : null;
+ return (qTables != null) ? qTables.clone() : null;
}
/**
@@ -265,7 +265,7 @@
*/
public JPEGHuffmanTable[] getDCHuffmanTables() {
return (DCHuffmanTables != null)
- ? (JPEGHuffmanTable[])DCHuffmanTables.clone()
+ ? DCHuffmanTables.clone()
: null;
}
@@ -281,7 +281,7 @@
*/
public JPEGHuffmanTable[] getACHuffmanTables() {
return (ACHuffmanTables != null)
- ? (JPEGHuffmanTable[])ACHuffmanTables.clone()
+ ? ACHuffmanTables.clone()
: null;
}
--- a/jdk/src/share/classes/javax/imageio/spi/ImageReaderSpi.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/spi/ImageReaderSpi.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -237,7 +237,7 @@
// If length == 0, leave it null
if (writerSpiNames != null && writerSpiNames.length > 0) {
- this.writerSpiNames = (String[])writerSpiNames.clone();
+ this.writerSpiNames = writerSpiNames.clone();
}
}
@@ -255,7 +255,7 @@
* <code>Class</code>objects of length at least 1.
*/
public Class[] getInputTypes() {
- return (Class[])inputTypes.clone();
+ return inputTypes.clone();
}
/**
@@ -408,6 +408,6 @@
*/
public String[] getImageWriterSpiNames() {
return writerSpiNames == null ?
- null : (String[])writerSpiNames.clone();
+ null : writerSpiNames.clone();
}
}
--- a/jdk/src/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -239,14 +239,14 @@
throw new IllegalArgumentException("pluginClassName == null!");
}
- this.names = (String[])names.clone();
+ this.names = names.clone();
// If length == 0, leave it null
if (suffixes != null && suffixes.length > 0) {
- this.suffixes = (String[])suffixes.clone();
+ this.suffixes = suffixes.clone();
}
// If length == 0, leave it null
if (MIMETypes != null && MIMETypes.length > 0) {
- this.MIMETypes = (String[])MIMETypes.clone();
+ this.MIMETypes = MIMETypes.clone();
}
this.pluginClassName = pluginClassName;
@@ -259,13 +259,13 @@
if (extraStreamMetadataFormatNames != null &&
extraStreamMetadataFormatNames.length > 0) {
this.extraStreamMetadataFormatNames =
- (String[])extraStreamMetadataFormatNames.clone();
+ extraStreamMetadataFormatNames.clone();
}
// If length == 0, leave it null
if (extraStreamMetadataFormatClassNames != null &&
extraStreamMetadataFormatClassNames.length > 0) {
this.extraStreamMetadataFormatClassNames =
- (String[])extraStreamMetadataFormatClassNames.clone();
+ extraStreamMetadataFormatClassNames.clone();
}
this.supportsStandardImageMetadataFormat =
supportsStandardImageMetadataFormat;
@@ -276,13 +276,13 @@
if (extraImageMetadataFormatNames != null &&
extraImageMetadataFormatNames.length > 0) {
this.extraImageMetadataFormatNames =
- (String[])extraImageMetadataFormatNames.clone();
+ extraImageMetadataFormatNames.clone();
}
// If length == 0, leave it null
if (extraImageMetadataFormatClassNames != null &&
extraImageMetadataFormatClassNames.length > 0) {
this.extraImageMetadataFormatClassNames =
- (String[])extraImageMetadataFormatClassNames.clone();
+ extraImageMetadataFormatClassNames.clone();
}
}
@@ -308,7 +308,7 @@
* associated with this reader or writer.
*/
public String[] getFormatNames() {
- return (String[])names.clone();
+ return names.clone();
}
/**
@@ -332,7 +332,7 @@
* writer, or <code>null</code>.
*/
public String[] getFileSuffixes() {
- return suffixes == null ? null : (String[])suffixes.clone();
+ return suffixes == null ? null : suffixes.clone();
}
/**
@@ -367,7 +367,7 @@
* <code>null</code>.
*/
public String[] getMIMETypes() {
- return MIMETypes == null ? null : (String[])MIMETypes.clone();
+ return MIMETypes == null ? null : MIMETypes.clone();
}
/**
@@ -443,7 +443,7 @@
*/
public String[] getExtraStreamMetadataFormatNames() {
return extraStreamMetadataFormatNames == null ?
- null : (String[])extraStreamMetadataFormatNames.clone();
+ null : extraStreamMetadataFormatNames.clone();
}
/**
@@ -507,7 +507,7 @@
*/
public String[] getExtraImageMetadataFormatNames() {
return extraImageMetadataFormatNames == null ?
- null : (String[])extraImageMetadataFormatNames.clone();
+ null : extraImageMetadataFormatNames.clone();
}
/**
--- a/jdk/src/share/classes/javax/imageio/spi/ImageWriterSpi.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/imageio/spi/ImageWriterSpi.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -238,7 +238,7 @@
// If length == 0, leave it null
if (readerSpiNames != null && readerSpiNames.length > 0) {
- this.readerSpiNames = (String[])readerSpiNames.clone();
+ this.readerSpiNames = readerSpiNames.clone();
}
}
@@ -268,7 +268,7 @@
* <code>Class</code>objects of length at least 1.
*/
public Class[] getOutputTypes() {
- return (Class[])outputTypes.clone();
+ return outputTypes.clone();
}
/**
@@ -435,6 +435,6 @@
*/
public String[] getImageReaderSpiNames() {
return readerSpiNames == null ?
- null : (String[])readerSpiNames.clone();
+ null : readerSpiNames.clone();
}
}
--- a/jdk/src/share/classes/javax/management/remote/JMXServiceURL.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/management/remote/JMXServiceURL.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -344,7 +344,7 @@
private void readObject(ObjectInputStream inputStream) throws IOException, ClassNotFoundException {
ObjectInputStream.GetField gf = inputStream.readFields();
String h = (String)gf.get("host", null);
- int p = (int)gf.get("port", -1);
+ int p = gf.get("port", -1);
String proto = (String)gf.get("protocol", null);
String url = (String)gf.get("urlPath", null);
--- a/jdk/src/share/classes/javax/print/DocFlavor.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/DocFlavor.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -460,7 +460,7 @@
static {
hostEncoding =
- (String)java.security.AccessController.doPrivileged(
+ java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("file.encoding"));
}
--- a/jdk/src/share/classes/javax/print/attribute/HashAttributeSet.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/HashAttributeSet.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -382,7 +382,7 @@
return
attribute != null &&
attribute instanceof Attribute &&
- attribute.equals(attrMap.get(((Attribute)attribute).getCategory()));
+ attribute.equals(attrMap.get(attribute.getCategory()));
}
/**
--- a/jdk/src/share/classes/javax/print/attribute/standard/Compression.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/standard/Compression.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -94,7 +94,7 @@
* Returns the string table for class Compression.
*/
protected String[] getStringTable() {
- return (String[])myStringTable.clone();
+ return myStringTable.clone();
}
/**
--- a/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -430,7 +430,7 @@
* Returns the string table for class Finishings.
*/
protected String[] getStringTable() {
- return (String[])myStringTable.clone();
+ return myStringTable.clone();
}
/**
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobSheets.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobSheets.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -94,7 +94,7 @@
* Returns the string table for class JobSheets.
*/
protected String[] getStringTable() {
- return (String[])myStringTable.clone();
+ return myStringTable.clone();
}
/**
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobStateReason.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobStateReason.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -420,7 +420,7 @@
* Returns the string table for class JobStateReason.
*/
protected String[] getStringTable() {
- return (String[])myStringTable.clone();
+ return myStringTable.clone();
}
/**
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobStateReasons.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobStateReasons.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -149,7 +149,7 @@
if (o == null) {
throw new NullPointerException();
}
- return super.add ((JobStateReason) o);
+ return super.add(o);
}
/**
--- a/jdk/src/share/classes/javax/print/attribute/standard/MediaName.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaName.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -98,7 +98,7 @@
*/
protected String[] getStringTable()
{
- return (String[])myStringTable.clone();
+ return myStringTable.clone();
}
/**
--- a/jdk/src/share/classes/javax/print/attribute/standard/MediaSizeName.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaSizeName.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -550,7 +550,7 @@
*/
protected String[] getStringTable()
{
- return (String[])myStringTable.clone();
+ return myStringTable.clone();
}
/**
--- a/jdk/src/share/classes/javax/print/attribute/standard/MediaTray.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaTray.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -124,7 +124,7 @@
*/
protected String[] getStringTable()
{
- return (String[])myStringTable.clone();
+ return myStringTable.clone();
}
/**
--- a/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -228,7 +228,7 @@
* Returns the string table for class MultipleDocumentHandling.
*/
protected String[] getStringTable() {
- return (String[])myStringTable.clone();
+ return myStringTable.clone();
}
/**
--- a/jdk/src/share/classes/javax/print/attribute/standard/PDLOverrideSupported.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PDLOverrideSupported.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -88,7 +88,7 @@
* Returns the string table for class PDLOverrideSupported.
*/
protected String[] getStringTable() {
- return (String[])myStringTable.clone();
+ return myStringTable.clone();
}
/**
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrintQuality.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrintQuality.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -88,7 +88,7 @@
* Returns the string table for class PrintQuality.
*/
protected String[] getStringTable() {
- return (String[])myStringTable.clone();
+ return myStringTable.clone();
}
/**
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReason.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReason.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -403,7 +403,7 @@
* Returns the string table for class PrinterStateReason.
*/
protected String[] getStringTable() {
- return (String[])myStringTable.clone();
+ return myStringTable.clone();
}
/**
--- a/jdk/src/share/classes/javax/sound/midi/MidiFileFormat.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/sound/midi/MidiFileFormat.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -273,7 +273,7 @@
} else {
ret = (Map<String,Object>) (properties.clone());
}
- return (Map<String,Object>) Collections.unmodifiableMap(ret);
+ return Collections.unmodifiableMap(ret);
}
--- a/jdk/src/share/classes/javax/sound/midi/MidiSystem.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/sound/midi/MidiSystem.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -472,7 +472,7 @@
} catch (MidiUnavailableException e) {
// something went wrong with synth
if (e instanceof MidiUnavailableException) {
- mue = (MidiUnavailableException) e;
+ mue = e;
}
}
if (rec == null) {
--- a/jdk/src/share/classes/javax/sound/midi/Sequence.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/sound/midi/Sequence.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -284,7 +284,7 @@
*/
public Track[] getTracks() {
- return (Track[]) tracks.toArray(new Track[tracks.size()]);
+ return tracks.toArray(new Track[tracks.size()]);
}
@@ -312,7 +312,7 @@
synchronized(tracks) {
for(int i=0; i<tracks.size(); i++ ) {
- long temp = ((Track)tracks.elementAt(i)).ticks();
+ long temp = tracks.elementAt(i).ticks();
if( temp>length ) {
length = temp;
}
--- a/jdk/src/share/classes/javax/sound/sampled/AudioFileFormat.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioFileFormat.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -251,7 +251,7 @@
} else {
ret = (Map<String,Object>) (properties.clone());
}
- return (Map<String,Object>) Collections.unmodifiableMap(ret);
+ return Collections.unmodifiableMap(ret);
}
--- a/jdk/src/share/classes/javax/sound/sampled/AudioFormat.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioFormat.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -403,7 +403,7 @@
} else {
ret = (Map<String,Object>) (properties.clone());
}
- return (Map<String,Object>) Collections.unmodifiableMap(ret);
+ return Collections.unmodifiableMap(ret);
}
--- a/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -1609,8 +1609,7 @@
Mixer.Info[] allInfos; // for all mixers
for(int i = 0; i < providers.size(); i++ ) {
- someInfos = (Mixer.Info[])
- ((MixerProvider)providers.get(i)).getMixerInfo();
+ someInfos = ((MixerProvider)providers.get(i)).getMixerInfo();
for (int j = 0; j < someInfos.length; j++) {
infos.add(someInfos[j]);
--- a/jdk/src/share/classes/javax/swing/AbstractAction.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/AbstractAction.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -56,6 +56,7 @@
* @author Georges Saab
* @see Action
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class AbstractAction implements Action, Cloneable, Serializable
{
/**
--- a/jdk/src/share/classes/javax/swing/AbstractButton.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/AbstractButton.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -72,6 +72,7 @@
*
* @author Jeff Dinkins
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class AbstractButton extends JComponent implements ItemSelectable, SwingConstants {
// *********************************
@@ -370,7 +371,7 @@
model.setPressed(true);
paintImmediately(new Rectangle(0,0, size.width, size.height));
try {
- Thread.currentThread().sleep(pressTime);
+ Thread.sleep(pressTime);
} catch(InterruptedException ie) {
}
model.setPressed(false);
@@ -2384,6 +2385,7 @@
* Please see {@link java.beans.XMLEncoder}.
* @since 1.4
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected abstract class AccessibleAbstractButton
extends AccessibleJComponent implements AccessibleAction,
AccessibleValue, AccessibleText, AccessibleExtendedComponent {
--- a/jdk/src/share/classes/javax/swing/AbstractCellEditor.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/AbstractCellEditor.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -50,7 +50,7 @@
* @author Philip Milne
* @since 1.3
*/
-
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class AbstractCellEditor implements CellEditor, Serializable {
protected EventListenerList listenerList = new EventListenerList();
--- a/jdk/src/share/classes/javax/swing/AbstractListModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/AbstractListModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -46,6 +46,7 @@
*
* @author Hans Muller
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class AbstractListModel<E> implements ListModel<E>, Serializable
{
protected EventListenerList listenerList = new EventListenerList();
--- a/jdk/src/share/classes/javax/swing/CellRendererPane.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/CellRendererPane.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -63,6 +63,7 @@
*
* @author Hans Muller
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class CellRendererPane extends Container implements Accessible
{
/**
--- a/jdk/src/share/classes/javax/swing/DefaultBoundedRangeModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/DefaultBoundedRangeModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -45,6 +45,7 @@
* @author Hans Muller
* @see BoundedRangeModel
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultBoundedRangeModel implements BoundedRangeModel, Serializable
{
/**
--- a/jdk/src/share/classes/javax/swing/DefaultButtonModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/DefaultButtonModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -45,6 +45,7 @@
*
* @author Jeff Dinkins
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultButtonModel implements ButtonModel, Serializable {
/** The bitmask used to store the state of the button. */
--- a/jdk/src/share/classes/javax/swing/DefaultCellEditor.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/DefaultCellEditor.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -50,7 +50,7 @@
* @author Alan Chung
* @author Philip Milne
*/
-
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultCellEditor extends AbstractCellEditor
implements TableCellEditor, TreeCellEditor {
--- a/jdk/src/share/classes/javax/swing/DefaultDesktopManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/DefaultDesktopManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -185,8 +185,8 @@
if (c instanceof JLayeredPane) {
JLayeredPane lp = (JLayeredPane)c;
- int layer = lp.getLayer(f);
- lp.putLayer(desktopIcon, layer);
+ int layer = JLayeredPane.getLayer(f);
+ JLayeredPane.putLayer(desktopIcon, layer);
}
// If we are maximized we already have the normal bounds recorded
--- a/jdk/src/share/classes/javax/swing/DefaultListCellRenderer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/DefaultListCellRenderer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -70,6 +70,7 @@
* @author Philip Milne
* @author Hans Muller
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultListCellRenderer extends JLabel
implements ListCellRenderer<Object>, Serializable
{
@@ -341,6 +342,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class UIResource extends DefaultListCellRenderer
implements javax.swing.plaf.UIResource
{
--- a/jdk/src/share/classes/javax/swing/DefaultListModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/DefaultListModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -52,6 +52,7 @@
*
* @author Hans Muller
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultListModel<E> extends AbstractListModel<E>
{
private Vector<E> delegate = new Vector<E>();
--- a/jdk/src/share/classes/javax/swing/DefaultListSelectionModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/DefaultListSelectionModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -49,7 +49,7 @@
* @author Hans Muller
* @see ListSelectionModel
*/
-
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultListSelectionModel implements ListSelectionModel, Cloneable, Serializable
{
private static final int MIN = -1;
--- a/jdk/src/share/classes/javax/swing/DefaultSingleSelectionModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/DefaultSingleSelectionModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -43,6 +43,7 @@
*
* @author Dave Moore
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultSingleSelectionModel implements SingleSelectionModel,
Serializable {
/* Only one ModelChangeEvent is needed per model instance since the
--- a/jdk/src/share/classes/javax/swing/ImageIcon.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/ImageIcon.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -66,6 +66,7 @@
* @author Jeff Dinkins
* @author Lynn Monsanto
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class ImageIcon implements Icon, Serializable, Accessible {
/* Keep references to the filename and location so that
* alternate persistence schemes have the option to archive
@@ -572,6 +573,7 @@
* Please see {@link java.beans.XMLEncoder}.
* @since 1.3
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleImageIcon extends AccessibleContext
implements AccessibleIcon, Serializable {
--- a/jdk/src/share/classes/javax/swing/JApplet.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JApplet.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -90,6 +90,7 @@
*
* @author Arnaud Weber
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JApplet extends Applet implements Accessible,
RootPaneContainer,
TransferHandler.HasGetTransferHandler
--- a/jdk/src/share/classes/javax/swing/JCheckBox.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JCheckBox.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -75,6 +75,7 @@
*
* @author Jeff Dinkins
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JCheckBox extends JToggleButton implements Accessible {
/** Identifies a change to the flat property. */
@@ -334,6 +335,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJCheckBox extends AccessibleJToggleButton {
/**
--- a/jdk/src/share/classes/javax/swing/JCheckBoxMenuItem.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JCheckBoxMenuItem.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -88,6 +88,7 @@
* @author Georges Saab
* @author David Karlton
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JCheckBoxMenuItem extends JMenuItem implements SwingConstants,
Accessible
{
@@ -293,6 +294,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJCheckBoxMenuItem extends AccessibleJMenuItem {
/**
* Get the role of this object.
--- a/jdk/src/share/classes/javax/swing/JColorChooser.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JColorChooser.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -83,6 +83,7 @@
* @author Amy Fowler
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JColorChooser extends JComponent implements Accessible {
/**
--- a/jdk/src/share/classes/javax/swing/JComboBox.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JComboBox.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -78,6 +78,7 @@
* @author Arnaud Weber
* @author Mark Davidson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JComboBox<E> extends JComponent
implements ItemSelectable,ListDataListener,ActionListener, Accessible {
/**
@@ -1612,6 +1613,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJComboBox extends AccessibleJComponent
implements AccessibleAction, AccessibleSelection {
--- a/jdk/src/share/classes/javax/swing/JComponent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JComponent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -179,6 +179,7 @@
* @author Hans Muller
* @author Arnaud Weber
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class JComponent extends Container implements Serializable,
TransferHandler.HasGetTransferHandler
{
@@ -3657,6 +3658,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public abstract class AccessibleJComponent extends AccessibleAWTContainer
implements AccessibleExtendedComponent
{
--- a/jdk/src/share/classes/javax/swing/JDesktopPane.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JDesktopPane.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -86,6 +86,7 @@
*
* @author David Kloba
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JDesktopPane extends JLayeredPane implements Accessible
{
/**
@@ -616,6 +617,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJDesktopPane extends AccessibleJComponent {
/**
--- a/jdk/src/share/classes/javax/swing/JDialog.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JDialog.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -95,6 +95,7 @@
* @author James Gosling
* @author Scott Violet
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JDialog extends Dialog implements WindowConstants,
Accessible,
RootPaneContainer,
--- a/jdk/src/share/classes/javax/swing/JEditorPane.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JEditorPane.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -189,6 +189,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JEditorPane extends JTextComponent {
/**
@@ -1640,6 +1641,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJEditorPane extends AccessibleJTextComponent {
/**
@@ -1694,6 +1696,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJEditorPaneHTML extends AccessibleJEditorPane {
private AccessibleContext accessibleContext;
--- a/jdk/src/share/classes/javax/swing/JFormattedTextField.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JFormattedTextField.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -177,6 +177,7 @@
*
* @since 1.4
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JFormattedTextField extends JTextField {
private static final String uiClassID = "FormattedTextFieldUI";
private static final Action[] defaultActions =
@@ -651,7 +652,7 @@
JFormattedTextField.this.setValue(
JFormattedTextField.this.getValue(), true, true);
} catch (ParseException pe) {
- if (fb == JFormattedTextField.this.COMMIT_OR_REVERT) {
+ if (fb == JFormattedTextField.COMMIT_OR_REVERT) {
JFormattedTextField.this.setValue(
JFormattedTextField.this.getValue(), true, true);
}
--- a/jdk/src/share/classes/javax/swing/JFrame.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JFrame.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -112,6 +112,7 @@
* @author Georges Saab
* @author David Kloba
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JFrame extends Frame implements WindowConstants,
Accessible,
RootPaneContainer,
--- a/jdk/src/share/classes/javax/swing/JInternalFrame.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JInternalFrame.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -110,6 +110,7 @@
* description: A frame container which is contained within
* another window.
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JInternalFrame extends JComponent implements
Accessible, WindowConstants,
RootPaneContainer
@@ -2034,6 +2035,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJInternalFrame extends AccessibleJComponent
implements AccessibleValue {
@@ -2151,6 +2153,7 @@
*
* @author David Kloba
*/
+ @SuppressWarnings("serial") // Same-version serialization only
static public class JDesktopIcon extends JComponent implements Accessible
{
JInternalFrame internalFrame;
@@ -2323,6 +2326,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJDesktopIcon extends AccessibleJComponent
implements AccessibleValue {
--- a/jdk/src/share/classes/javax/swing/JLabel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JLabel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
--- a/jdk/src/share/classes/javax/swing/JList.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JList.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -277,6 +277,7 @@
*
* @author Hans Muller
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JList<E> extends JComponent implements Scrollable, Accessible
{
/**
@@ -2881,6 +2882,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJList extends AccessibleJComponent
implements AccessibleSelection, PropertyChangeListener,
ListSelectionListener, ListDataListener {
--- a/jdk/src/share/classes/javax/swing/JOptionPane.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JOptionPane.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -310,6 +310,7 @@
* @author James Gosling
* @author Scott Violet
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JOptionPane extends JComponent implements Accessible
{
/**
@@ -2576,6 +2577,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJOptionPane extends AccessibleJComponent {
/**
--- a/jdk/src/share/classes/javax/swing/JPanel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JPanel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -62,6 +62,7 @@
* @author Arnaud Weber
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JPanel extends JComponent implements Accessible
{
/**
@@ -233,6 +234,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJPanel extends AccessibleJComponent {
/**
--- a/jdk/src/share/classes/javax/swing/JPasswordField.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JPasswordField.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -74,6 +74,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JPasswordField extends JTextField {
/**
--- a/jdk/src/share/classes/javax/swing/JProgressBar.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JProgressBar.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -129,6 +129,7 @@
* @author Michael C. Albers
* @author Kathy Walrath
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JProgressBar extends JComponent implements SwingConstants, Accessible
{
/**
@@ -647,6 +648,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
private class ModelListener implements ChangeListener, Serializable {
public void stateChanged(ChangeEvent e) {
fireStateChanged();
@@ -1035,6 +1037,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJProgressBar extends AccessibleJComponent
implements AccessibleValue {
--- a/jdk/src/share/classes/javax/swing/JRadioButton.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JRadioButton.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -86,6 +86,7 @@
* @see JCheckBox
* @author Jeff Dinkins
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JRadioButton extends JToggleButton implements Accessible {
/**
@@ -284,6 +285,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJRadioButton extends AccessibleJToggleButton {
/**
--- a/jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -83,6 +83,7 @@
* @author David Karlton
* @see ButtonGroup
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JRadioButtonMenuItem extends JMenuItem implements Accessible {
/**
* @see #getUIClassID
@@ -266,6 +267,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJRadioButtonMenuItem extends AccessibleJMenuItem {
/**
* Get the role of this object.
--- a/jdk/src/share/classes/javax/swing/JScrollBar.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JScrollBar.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -78,6 +78,7 @@
*
* @author David Kloba
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JScrollBar extends JComponent implements Adjustable, Accessible
{
/**
@@ -842,6 +843,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJScrollBar extends AccessibleJComponent
implements AccessibleValue {
--- a/jdk/src/share/classes/javax/swing/JScrollPane.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JScrollPane.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -168,6 +168,7 @@
*
* @author Hans Muller
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JScrollPane extends JComponent implements ScrollPaneConstants, Accessible
{
private Border viewportBorder;
@@ -685,6 +686,7 @@
* @see JScrollPane#createVerticalScrollBar
* @see JScrollPane#createHorizontalScrollBar
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class ScrollBar extends JScrollBar implements UIResource
{
/**
@@ -1441,6 +1443,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJScrollPane extends AccessibleJComponent
implements ChangeListener, PropertyChangeListener {
--- a/jdk/src/share/classes/javax/swing/JSlider.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JSlider.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -78,6 +78,7 @@
*
* @author David Kloba
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JSlider extends JComponent implements SwingConstants, Accessible {
/**
* @see #getUIClassID
@@ -1429,6 +1430,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJSlider extends AccessibleJComponent
implements AccessibleValue {
--- a/jdk/src/share/classes/javax/swing/JSpinner.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JSpinner.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -126,6 +126,7 @@
* @author Lynn Monsanto (accessibility)
* @since 1.4
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JSpinner extends JComponent implements Accessible
{
/**
--- a/jdk/src/share/classes/javax/swing/JSplitPane.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JSplitPane.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -98,6 +98,7 @@
*
* @author Scott Violet
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JSplitPane extends JComponent implements Accessible
{
/**
@@ -1156,6 +1157,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJSplitPane extends AccessibleJComponent
implements AccessibleValue {
/**
--- a/jdk/src/share/classes/javax/swing/JTabbedPane.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JTabbedPane.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -106,6 +106,7 @@
*
* @see SingleSelectionModel
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JTabbedPane extends JComponent
implements Serializable, Accessible, SwingConstants {
@@ -1889,6 +1890,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJTabbedPane extends AccessibleJComponent
implements AccessibleSelection, ChangeListener {
--- a/jdk/src/share/classes/javax/swing/JTable.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JTable.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -218,6 +218,7 @@
/* The first versions of the JTable, contained in Swing-0.1 through
* Swing-0.4, were written by Alan Chung.
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JTable extends JComponent implements TableModelListener, Scrollable,
TableColumnModelListener, ListSelectionListener, CellEditorListener,
Accessible, RowSorterListener
@@ -6583,6 +6584,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJTable extends AccessibleJComponent
implements AccessibleSelection, ListSelectionListener, TableModelListener,
TableColumnModelListener, CellEditorListener, PropertyChangeListener,
--- a/jdk/src/share/classes/javax/swing/JTextArea.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JTextArea.java Tue Jan 28 11:22:25 2014 -0800
@@ -124,6 +124,7 @@
* @see JTextPane
* @see JEditorPane
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JTextArea extends JTextComponent {
/**
@@ -787,6 +788,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJTextArea extends AccessibleJTextComponent {
/**
--- a/jdk/src/share/classes/javax/swing/JTextField.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JTextField.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -161,6 +161,7 @@
* @see JPasswordField
* @see #addActionListener
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JTextField extends JTextComponent implements SwingConstants {
/**
@@ -943,6 +944,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJTextField extends AccessibleJTextComponent {
/**
--- a/jdk/src/share/classes/javax/swing/JTextPane.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JTextPane.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -79,6 +79,7 @@
* @author Timothy Prinzing
* @see javax.swing.text.StyledEditorKit
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JTextPane extends JEditorPane {
/**
--- a/jdk/src/share/classes/javax/swing/JToggleButton.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JToggleButton.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -76,6 +76,7 @@
* @see JCheckBox
* @author Jeff Dinkins
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JToggleButton extends AbstractButton implements Accessible {
/**
@@ -222,6 +223,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class ToggleButtonModel extends DefaultButtonModel {
/**
@@ -384,6 +386,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJToggleButton extends AccessibleAbstractButton
implements ItemListener {
--- a/jdk/src/share/classes/javax/swing/JToolBar.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JToolBar.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -86,6 +86,7 @@
* @author Jeff Shapiro
* @see Action
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JToolBar extends JComponent implements SwingConstants, Accessible
{
/**
--- a/jdk/src/share/classes/javax/swing/JViewport.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/JViewport.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -102,6 +102,7 @@
* @author Philip Milne
* @see JScrollPane
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JViewport extends JComponent implements Accessible
{
/**
@@ -1296,6 +1297,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class ViewListener extends ComponentAdapter implements Serializable
{
public void componentResized(ComponentEvent e) {
@@ -1765,6 +1767,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJViewport extends AccessibleJComponent {
/**
* Get the role of this object.
--- a/jdk/src/share/classes/javax/swing/KeyStroke.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/KeyStroke.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -61,6 +61,7 @@
* @author Arnaud Weber
* @author David Mendenhall
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class KeyStroke extends AWTKeyStroke {
/**
--- a/jdk/src/share/classes/javax/swing/MenuSelectionManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/MenuSelectionManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -246,7 +246,7 @@
selectionSize = tmp.size();
boolean success = false;
for (i=selectionSize - 1;i >= 0 && success == false; i--) {
- menuElement = (MenuElement) tmp.elementAt(i);
+ menuElement = tmp.elementAt(i);
subElements = menuElement.getSubElements();
path = null;
@@ -277,7 +277,7 @@
if(path == null) {
path = new MenuElement[i+2];
for(k=0;k<=i;k++)
- path[k] = (MenuElement)tmp.elementAt(k);
+ path[k] = tmp.elementAt(k);
}
path[i+1] = subElements[j];
MenuElement currentSelection[] = getSelectedPath();
@@ -388,7 +388,7 @@
tmp = (Vector<MenuElement>)selection.clone();
selectionSize = tmp.size();
for(i=selectionSize - 1 ; i >= 0 ; i--) {
- menuElement = (MenuElement) tmp.elementAt(i);
+ menuElement = tmp.elementAt(i);
subElements = menuElement.getSubElements();
for(j = 0, d = subElements.length ; j < d ; j++) {
--- a/jdk/src/share/classes/javax/swing/OverlayLayout.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/OverlayLayout.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,6 +51,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class OverlayLayout implements LayoutManager2,Serializable {
/**
--- a/jdk/src/share/classes/javax/swing/ScrollPaneLayout.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/ScrollPaneLayout.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -57,6 +57,7 @@
*
* @author Hans Muller
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class ScrollPaneLayout
implements LayoutManager, ScrollPaneConstants, Serializable
{
--- a/jdk/src/share/classes/javax/swing/SizeRequirements.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/SizeRequirements.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -93,6 +93,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class SizeRequirements implements Serializable {
/**
--- a/jdk/src/share/classes/javax/swing/Spring.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/Spring.java Tue Jan 28 11:22:25 2014 -0800
@@ -127,6 +127,7 @@
* @author Philip Milne
* @since 1.4
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class Spring {
/**
--- a/jdk/src/share/classes/javax/swing/SpringLayout.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/SpringLayout.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -184,6 +184,7 @@
* @author Joe Winchester
* @since 1.4
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class SpringLayout implements LayoutManager2 {
private Map<Component, Constraints> componentConstraints = new HashMap<Component, Constraints>();
--- a/jdk/src/share/classes/javax/swing/UIDefaults.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/UIDefaults.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -72,6 +72,7 @@
* @see UIManager
* @author Hans Muller
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class UIDefaults extends Hashtable<Object,Object>
{
private static final Object PENDING = "Pending";
--- a/jdk/src/share/classes/javax/swing/UIManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/UIManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -174,6 +174,7 @@
* @author Thomas Ball
* @author Hans Muller
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class UIManager implements Serializable
{
/**
--- a/jdk/src/share/classes/javax/swing/UnsupportedLookAndFeelException.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/UnsupportedLookAndFeelException.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -39,6 +39,7 @@
*
* @author unattributed
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class UnsupportedLookAndFeelException extends Exception
{
/**
--- a/jdk/src/share/classes/javax/swing/ViewportLayout.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/ViewportLayout.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -56,6 +56,7 @@
*
* @author Hans Muller
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class ViewportLayout implements LayoutManager, Serializable
{
// Single instance used by JViewport.
--- a/jdk/src/share/classes/javax/swing/border/BevelBorder.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/border/BevelBorder.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -44,6 +44,7 @@
*
* @author David Kloba
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BevelBorder extends AbstractBorder
{
/** Raised bevel type. */
--- a/jdk/src/share/classes/javax/swing/border/EtchedBorder.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/border/EtchedBorder.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,6 +51,7 @@
* @author David Kloba
* @author Amy Fowler
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class EtchedBorder extends AbstractBorder
{
/** Raised etched type. */
--- a/jdk/src/share/classes/javax/swing/border/LineBorder.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/border/LineBorder.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -50,6 +50,7 @@
*
* @author David Kloba
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class LineBorder extends AbstractBorder
{
private static Border blackLine;
--- a/jdk/src/share/classes/javax/swing/border/SoftBevelBorder.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/border/SoftBevelBorder.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -47,6 +47,7 @@
* @author Amy Fowler
* @author Chester Rose
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class SoftBevelBorder extends BevelBorder
{
--- a/jdk/src/share/classes/javax/swing/border/StrokeBorder.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/border/StrokeBorder.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -50,6 +50,7 @@
*
* @since 1.7
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class StrokeBorder extends AbstractBorder {
private final BasicStroke stroke;
private final Paint paint;
--- a/jdk/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -47,6 +47,7 @@
* @author Tom Santos
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class AbstractColorChooserPanel extends JPanel {
private final PropertyChangeListener enabledListener = new PropertyChangeListener() {
--- a/jdk/src/share/classes/javax/swing/colorchooser/ColorChooserComponentFactory.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/colorchooser/ColorChooserComponentFactory.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -43,6 +43,7 @@
*
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class ColorChooserComponentFactory {
private ColorChooserComponentFactory() { } // can't instantiate
--- a/jdk/src/share/classes/javax/swing/colorchooser/DefaultPreviewPanel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/colorchooser/DefaultPreviewPanel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -53,6 +53,7 @@
* @author Steve Wilson
* @see JColorChooser
*/
+@SuppressWarnings("serial") // Same-version serialization only
class DefaultPreviewPanel extends JPanel {
private int squareSize = 25;
--- a/jdk/src/share/classes/javax/swing/colorchooser/DefaultSwatchChooserPanel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/colorchooser/DefaultSwatchChooserPanel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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,6 +51,7 @@
*
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
class DefaultSwatchChooserPanel extends AbstractColorChooserPanel {
SwatchPanel swatchPanel;
--- a/jdk/src/share/classes/javax/swing/event/CaretEvent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/event/CaretEvent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -42,6 +42,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class CaretEvent extends EventObject {
/**
--- a/jdk/src/share/classes/javax/swing/event/HyperlinkEvent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/event/HyperlinkEvent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -45,6 +45,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class HyperlinkEvent extends EventObject {
/**
--- a/jdk/src/share/classes/javax/swing/event/InternalFrameEvent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/event/InternalFrameEvent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -53,6 +53,7 @@
*
* @author Thomas Ball
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class InternalFrameEvent extends AWTEvent {
/**
--- a/jdk/src/share/classes/javax/swing/event/ListSelectionEvent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/event/ListSelectionEvent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -50,6 +50,7 @@
* @author Ray Ryan
* @see ListSelectionModel
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class ListSelectionEvent extends EventObject
{
private int firstIndex;
--- a/jdk/src/share/classes/javax/swing/event/TableColumnModelEvent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/event/TableColumnModelEvent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -45,6 +45,7 @@
* @author Alan Chung
* @see TableColumnModelListener
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class TableColumnModelEvent extends java.util.EventObject
{
//
--- a/jdk/src/share/classes/javax/swing/event/TableModelEvent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/event/TableModelEvent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -65,6 +65,7 @@
* @author Philip Milne
* @see TableModel
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class TableModelEvent extends java.util.EventObject
{
/** Identifies the addition of new rows or columns. */
--- a/jdk/src/share/classes/javax/swing/event/TreeExpansionEvent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/event/TreeExpansionEvent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -48,6 +48,7 @@
*
* @author Scott Violet
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class TreeExpansionEvent extends EventObject
{
/**
--- a/jdk/src/share/classes/javax/swing/event/TreeModelEvent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/event/TreeModelEvent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -50,6 +50,7 @@
* @author Ray Ryan
* @author Scott Violet
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class TreeModelEvent extends EventObject {
/** Path to the parent of the nodes that have changed. */
protected TreePath path;
--- a/jdk/src/share/classes/javax/swing/event/UndoableEditEvent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/event/UndoableEditEvent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -41,6 +41,7 @@
*
* @author Ray Ryan
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class UndoableEditEvent extends java.util.EventObject {
private UndoableEdit myEdit;
--- a/jdk/src/share/classes/javax/swing/plaf/BorderUIResource.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/BorderUIResource.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -59,6 +59,7 @@
* @author Amy Fowler
*
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BorderUIResource implements Border, UIResource, Serializable
{
static Border etched;
--- a/jdk/src/share/classes/javax/swing/plaf/ColorUIResource.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/ColorUIResource.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -45,6 +45,7 @@
* @author Hans Muller
*
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class ColorUIResource extends Color implements UIResource
{
@ConstructorProperties({"red", "green", "blue"})
--- a/jdk/src/share/classes/javax/swing/plaf/DimensionUIResource.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/DimensionUIResource.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -48,6 +48,7 @@
* @author Amy Fowler
*
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DimensionUIResource extends Dimension implements UIResource
{
public DimensionUIResource(int width, int height) {
--- a/jdk/src/share/classes/javax/swing/plaf/FontUIResource.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/FontUIResource.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -47,6 +47,7 @@
* @author Hans Muller
*
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class FontUIResource extends Font implements UIResource
{
public FontUIResource(String name, int style, int size) {
--- a/jdk/src/share/classes/javax/swing/plaf/IconUIResource.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/IconUIResource.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -52,6 +52,7 @@
* @author Amy Fowler
*
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class IconUIResource implements Icon, UIResource, Serializable
{
private Icon delegate;
--- a/jdk/src/share/classes/javax/swing/plaf/InsetsUIResource.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/InsetsUIResource.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -47,6 +47,7 @@
* @author Amy Fowler
*
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class InsetsUIResource extends Insets implements UIResource
{
public InsetsUIResource(int top, int left, int bottom, int right) {
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicArrowButton.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicArrowButton.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -45,6 +45,7 @@
*
* @author David Kloba
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BasicArrowButton extends JButton implements SwingConstants
{
/**
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -49,6 +49,7 @@
*
* @author Jeff Dinkins
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BasicCheckBoxUI extends BasicRadioButtonUI {
private static final Object BASIC_CHECK_BOX_UI_KEY = new Object();
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -164,6 +164,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class UIResource extends BasicComboBoxEditor
implements javax.swing.plaf.UIResource {
}
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -47,6 +47,7 @@
*
* @author Arnaud Weber
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BasicComboBoxRenderer extends JLabel
implements ListCellRenderer, Serializable {
@@ -139,6 +140,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class UIResource extends BasicComboBoxRenderer implements javax.swing.plaf.UIResource {
}
}
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -60,6 +60,7 @@
* @author Tom Santos
* @author Mark Davidson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BasicComboPopup extends JPopupMenu implements ComboPopup {
// An empty ListMode, this is used when the UI changes to allow
// the JList to be gc'ed.
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicEditorPaneUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicEditorPaneUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -50,6 +50,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BasicEditorPaneUI extends BasicTextUI {
/**
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicIconFactory.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicIconFactory.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -49,6 +49,7 @@
* @author David Kloba
* @author Georges Saab
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BasicIconFactory implements Serializable
{
private static Icon frame_icon;
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -57,6 +57,7 @@
* @author David Kloba
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BasicInternalFrameTitlePane extends JComponent
{
protected JMenuBar menuBar;
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -1496,6 +1496,7 @@
* @see #installKeyboardActions
* @see #installUI
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public class MouseInputHandler implements MouseInputListener
{
public void mouseClicked(MouseEvent e) {
@@ -1600,6 +1601,7 @@
* @see #getCellBounds
* @see #installUI
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public class ListSelectionHandler implements ListSelectionListener
{
public void valueChanged(ListSelectionEvent e)
@@ -1659,6 +1661,7 @@
* @see #createListDataListener
* @see #installUI
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public class ListDataHandler implements ListDataListener
{
public void intervalAdded(ListDataEvent e) {
@@ -1725,6 +1728,7 @@
* @see #createPropertyChangeListener
* @see #installUI
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public class PropertyChangeHandler implements PropertyChangeListener
{
public void propertyChange(PropertyChangeEvent e)
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -102,6 +102,7 @@
*
* @author unattributed
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class BasicLookAndFeel extends LookAndFeel implements Serializable
{
/**
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -59,6 +59,7 @@
*
* @author Scott Violet
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BasicSplitPaneDivider extends Container
implements PropertyChangeListener
{
@@ -675,6 +676,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class DragController
{
/**
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextAreaUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextAreaUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -49,6 +49,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BasicTextAreaUI extends BasicTextUI {
/**
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,6 +51,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BasicTextFieldUI extends BasicTextUI {
/**
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextPaneUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextPaneUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -47,6 +47,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class BasicTextPaneUI extends BasicEditorPaneUI {
/**
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -100,6 +100,7 @@
* @author Timothy Prinzing
* @author Shannon Hickey (drag and drop)
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class BasicTextUI extends TextUI implements ViewFactory {
/**
--- a/jdk/src/share/classes/javax/swing/plaf/basic/ComboPopup.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/ComboPopup.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -46,6 +46,7 @@
*
* @author Tom Santos
*/
+@SuppressWarnings("serial") // Same-version serialization only
public interface ComboPopup {
/**
* Shows the popup
--- a/jdk/src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -88,6 +88,7 @@
*
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultMetalTheme extends MetalTheme {
/**
* Whether or not fonts should be plain. This is only used if
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalButtonUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalButtonUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -50,6 +50,7 @@
*
* @author Tom Santos
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalButtonUI extends BasicButtonUI {
// NOTE: These are not really needed, but at this point we can't pull
// them. Their values are updated purely for historical reasons.
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxIcon.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxIcon.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -46,6 +46,7 @@
*
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalCheckBoxIcon implements Icon, UIResource, Serializable {
protected int getControlSize() { return 13; }
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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,6 +51,7 @@
* @author Michael C. Albers
*
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalCheckBoxUI extends MetalRadioButtonUI {
// NOTE: MetalCheckBoxUI inherts from MetalRadioButtonUI instead
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxButton.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxButton.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -48,6 +48,7 @@
* @see MetalComboBoxButton
* @author Tom Santos
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalComboBoxButton extends JButton {
protected JComboBox comboBox;
protected JList listBox;
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxEditor.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxEditor.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -47,6 +47,7 @@
*
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalComboBoxEditor extends BasicComboBoxEditor {
public MetalComboBoxEditor() {
@@ -133,6 +134,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class UIResource extends MetalComboBoxEditor
implements javax.swing.plaf.UIResource {
}
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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,6 +51,7 @@
* @see MetalComboBoxButton
* @author Tom Santos
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalComboBoxUI extends BasicComboBoxUI {
public static ComponentUI createUI(JComponent c) {
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalIconFactory.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalIconFactory.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -58,6 +58,7 @@
*
* @author Michael C. Albers
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalIconFactory implements Serializable {
// List of code-drawn Icons
@@ -1554,6 +1555,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class FolderIcon16 implements Icon, Serializable {
ImageCacher imageCacher;
@@ -1636,6 +1638,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class TreeFolderIcon extends FolderIcon16 {
public int getShift() { return -1; }
public int getAdditionalHeight() { return 2; }
@@ -1655,6 +1658,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class FileIcon16 implements Icon, Serializable {
ImageCacher imageCacher;
@@ -1740,6 +1744,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class TreeControlIcon implements Icon, Serializable {
// This data member should not have been exposed. It's called
// isLight, but now it really means isCollapsed. Since we can't change
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -82,6 +82,7 @@
*
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalLookAndFeel extends BasicLookAndFeel
{
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalProgressBarUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalProgressBarUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -44,6 +44,7 @@
*
* @author Michael C. Albers
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalProgressBarUI extends BasicProgressBarUI {
private Rectangle innards;
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -53,6 +53,7 @@
* @author Michael C. Albers (Metal modifications)
* @author Jeff Dinkins (original BasicRadioButtonCode)
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalRadioButtonUI extends BasicRadioButtonUI {
private static final Object METAL_RADIO_BUTTON_UI_KEY = new Object();
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -63,6 +63,7 @@
* @author Terry Kellerman
* @since 1.4
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalRootPaneUI extends BasicRootPaneUI
{
/**
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollButton.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollButton.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -50,6 +50,7 @@
* @author Tom Santos
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalScrollButton extends BasicArrowButton
{
private static Color shadowColor;
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollPaneUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollPaneUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -50,6 +50,7 @@
*
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalScrollPaneUI extends BasicScrollPaneUI
{
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSeparatorUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSeparatorUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -50,7 +50,7 @@
*
* @author Jeff Shapiro
*/
-
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalSeparatorUI extends BasicSeparatorUI
{
public static ComponentUI createUI( JComponent c )
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -50,6 +50,7 @@
*
* @author Tom Santos
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalSliderUI extends BasicSliderUI {
protected final int TICK_BUFFER = 4;
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneDivider.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneDivider.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -46,6 +46,7 @@
* @author Steve Wilson
* @author Ralph kar
*/
+@SuppressWarnings("serial") // Same-version serialization only
class MetalSplitPaneDivider extends BasicSplitPaneDivider
{
private MetalBumps bumps = new MetalBumps(10, 10,
@@ -391,11 +392,11 @@
*/
int getOneTouchSizeFromSuper() {
- return super.ONE_TOUCH_SIZE;
+ return BasicSplitPaneDivider.ONE_TOUCH_SIZE;
}
int getOneTouchOffsetFromSuper() {
- return super.ONE_TOUCH_OFFSET;
+ return BasicSplitPaneDivider.ONE_TOUCH_OFFSET;
}
int getOrientationFromSuper() {
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -43,6 +43,7 @@
*
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalSplitPaneUI extends BasicSplitPaneUI
{
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -47,7 +47,7 @@
*
* @author Tom Santos
*/
-
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalTabbedPaneUI extends BasicTabbedPaneUI {
protected int minTabWidth = 40;
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalTextFieldUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalTextFieldUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -47,6 +47,7 @@
*
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalTextFieldUI extends BasicTextFieldUI {
public static ComponentUI createUI(JComponent c) {
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalToggleButtonUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalToggleButtonUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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,6 +55,7 @@
*
* @author Tom Santos
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalToggleButtonUI extends BasicToggleButtonUI {
private static final Object METAL_TOGGLE_BUTTON_UI_KEY = new Object();
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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,6 +51,7 @@
*
* @author Steve Wilson
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MetalToolTipUI extends BasicToolTipUI {
static MetalToolTipUI sharedInstance = new MetalToolTipUI();
--- a/jdk/src/share/classes/javax/swing/plaf/multi/MultiLookAndFeel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/multi/MultiLookAndFeel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -56,6 +56,7 @@
*
* @author Willie Walker
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MultiLookAndFeel extends LookAndFeel {
//////////////////////////////
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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,6 +51,7 @@
* @author Shannon Hickey
* @since 1.7
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class SynthTextAreaUI extends BasicTextAreaUI implements SynthUI {
private Handler handler = new Handler();
private SynthStyle style;
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -50,6 +50,7 @@
* @author Shannon Hickey
* @since 1.7
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class SynthTextFieldUI extends BasicTextFieldUI implements SynthUI {
private Handler handler = new Handler();
private SynthStyle style;
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextPaneUI.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextPaneUI.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -47,6 +47,7 @@
* @author Shannon Hickey
* @since 1.7
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class SynthTextPaneUI extends SynthEditorPaneUI {
/**
--- a/jdk/src/share/classes/javax/swing/table/AbstractTableModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/table/AbstractTableModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -57,6 +57,7 @@
* @author Alan Chung
* @author Philip Milne
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class AbstractTableModel implements TableModel, Serializable
{
//
--- a/jdk/src/share/classes/javax/swing/table/DefaultTableCellRenderer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/table/DefaultTableCellRenderer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -82,6 +82,7 @@
* @author Philip Milne
* @see JTable
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultTableCellRenderer extends JLabel
implements TableCellRenderer, Serializable
{
@@ -391,6 +392,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class UIResource extends DefaultTableCellRenderer
implements javax.swing.plaf.UIResource
{
--- a/jdk/src/share/classes/javax/swing/table/DefaultTableColumnModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/table/DefaultTableColumnModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -52,6 +52,7 @@
* @author Philip Milne
* @see JTable
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultTableColumnModel implements TableColumnModel,
PropertyChangeListener, ListSelectionListener, Serializable
{
--- a/jdk/src/share/classes/javax/swing/table/DefaultTableModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/table/DefaultTableModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -59,6 +59,7 @@
* @see TableModel
* @see #getDataVector
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultTableModel extends AbstractTableModel implements Serializable {
//
--- a/jdk/src/share/classes/javax/swing/table/JTableHeader.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/table/JTableHeader.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -60,6 +60,7 @@
* @author Philip Milne
* @see javax.swing.JTable
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class JTableHeader extends JComponent implements TableColumnModelListener, Accessible
{
/**
@@ -780,6 +781,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJTableHeader extends AccessibleJComponent {
/**
--- a/jdk/src/share/classes/javax/swing/table/TableColumn.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/table/TableColumn.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -82,6 +82,7 @@
* @see JTable#getCellRenderer(int, int)
* @see JTable#getCellEditor(int, int)
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class TableColumn extends Object implements Serializable {
/**
--- a/jdk/src/share/classes/javax/swing/text/AbstractDocument.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/AbstractDocument.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -96,6 +96,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class AbstractDocument implements Document, Serializable {
/**
@@ -1782,6 +1783,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public abstract class AbstractElement implements Element, MutableAttributeSet, Serializable, TreeNode {
/**
@@ -2251,6 +2253,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public class BranchElement extends AbstractElement {
/**
@@ -2507,6 +2510,7 @@
*
* @see Element
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public class LeafElement extends AbstractElement {
/**
--- a/jdk/src/share/classes/javax/swing/text/DateFormatter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/DateFormatter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -47,6 +47,7 @@
*
* @since 1.4
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DateFormatter extends InternationalFormatter {
/**
* This is shorthand for
--- a/jdk/src/share/classes/javax/swing/text/DefaultCaret.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/DefaultCaret.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -105,6 +105,7 @@
* @author Timothy Prinzing
* @see Caret
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultCaret extends Rectangle implements Caret, FocusListener, MouseListener, MouseMotionListener {
/**
--- a/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -849,6 +849,7 @@
* @see Keymap#setDefaultAction
* @see Keymap#getDefaultAction
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class DefaultKeyTypedAction extends TextAction {
/**
@@ -906,6 +907,7 @@
* @see DefaultEditorKit#insertContentAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class InsertContentAction extends TextAction {
/**
@@ -954,6 +956,7 @@
* @see DefaultEditorKit#insertBreakAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class InsertBreakAction extends TextAction {
/**
@@ -996,6 +999,7 @@
* @see DefaultEditorKit#insertTabAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class InsertTabAction extends TextAction {
/**
@@ -1272,6 +1276,7 @@
* @see DefaultEditorKit#cutAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class CutAction extends TextAction {
/** Create this object with the appropriate identifier. */
@@ -1308,6 +1313,7 @@
* @see DefaultEditorKit#copyAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class CopyAction extends TextAction {
/** Create this object with the appropriate identifier. */
@@ -1345,6 +1351,7 @@
* @see DefaultEditorKit#pasteAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class PasteAction extends TextAction {
/** Create this object with the appropriate identifier. */
@@ -1380,6 +1387,7 @@
* @see DefaultEditorKit#beepAction
* @see DefaultEditorKit#getActions
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class BeepAction extends TextAction {
/** Create this object with the appropriate identifier. */
--- a/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -59,6 +59,7 @@
*
* @since 1.4
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
implements Cloneable, Serializable {
/** Indicates if the value being edited must match the mask. */
--- a/jdk/src/share/classes/javax/swing/text/DefaultFormatterFactory.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/DefaultFormatterFactory.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -72,6 +72,7 @@
*
* @since 1.4
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultFormatterFactory extends JFormattedTextField.AbstractFormatterFactory implements Serializable {
/**
* Default <code>AbstractFormatter</code> to use if a more specific one has
--- a/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -69,6 +69,7 @@
* @see Document
* @see AbstractDocument
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultStyledDocument extends AbstractDocument implements StyledDocument {
/**
@@ -1128,6 +1129,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
protected class SectionElement extends BranchElement {
/**
@@ -1159,6 +1161,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class ElementSpec {
/**
@@ -1394,6 +1397,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public class ElementBuffer implements Serializable {
/**
--- a/jdk/src/share/classes/javax/swing/text/InternationalFormatter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/InternationalFormatter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -92,6 +92,7 @@
*
* @since 1.4
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class InternationalFormatter extends DefaultFormatter {
/**
* Used by <code>getFields</code>.
--- a/jdk/src/share/classes/javax/swing/text/JTextComponent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/JTextComponent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -292,6 +292,7 @@
* @see View
* @see ViewFactory
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class JTextComponent extends JComponent implements Scrollable, Accessible
{
/**
@@ -1118,6 +1119,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class KeyBinding {
/**
@@ -2535,6 +2537,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public class AccessibleJTextComponent extends AccessibleJComponent
implements AccessibleText, CaretListener, DocumentListener,
AccessibleAction, AccessibleEditableText,
--- a/jdk/src/share/classes/javax/swing/text/MaskFormatter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/MaskFormatter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -149,6 +149,7 @@
*
* @since 1.4
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class MaskFormatter extends DefaultFormatter {
// Potential values in mask.
private static final char DIGIT_KEY = '#';
--- a/jdk/src/share/classes/javax/swing/text/NumberFormatter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/NumberFormatter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -91,6 +91,7 @@
*
* @since 1.4
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class NumberFormatter extends InternationalFormatter {
/** The special characters from the Format instance. */
private String specialChars;
--- a/jdk/src/share/classes/javax/swing/text/PlainDocument.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/PlainDocument.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -56,6 +56,7 @@
* @see Document
* @see AbstractDocument
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class PlainDocument extends AbstractDocument {
/**
--- a/jdk/src/share/classes/javax/swing/text/SimpleAttributeSet.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/SimpleAttributeSet.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -48,6 +48,7 @@
*
* @author Tim Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class SimpleAttributeSet implements MutableAttributeSet, Serializable, Cloneable
{
private static final long serialVersionUID = -6631553454711782652L;
--- a/jdk/src/share/classes/javax/swing/text/StringContent.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/StringContent.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -50,6 +50,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public final class StringContent implements AbstractDocument.Content, Serializable {
/**
--- a/jdk/src/share/classes/javax/swing/text/StyleContext.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/StyleContext.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -62,6 +62,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class StyleContext implements Serializable, AbstractDocument.AttributeContext {
/**
@@ -1244,6 +1245,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public class NamedStyle implements Style, Serializable {
/**
--- a/jdk/src/share/classes/javax/swing/text/StyledEditorKit.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/StyledEditorKit.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -90,7 +90,7 @@
* @return the command list
*/
public Action[] getActions() {
- return TextAction.augmentList(super.getActions(), this.defaultActions);
+ return TextAction.augmentList(super.getActions(), defaultActions);
}
/**
@@ -375,6 +375,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public abstract static class StyledTextAction extends TextAction {
/**
@@ -494,6 +495,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class FontFamilyAction extends StyledTextAction {
/**
@@ -550,6 +552,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class FontSizeAction extends StyledTextAction {
/**
@@ -617,6 +620,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class ForegroundAction extends StyledTextAction {
/**
@@ -683,6 +687,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class AlignmentAction extends StyledTextAction {
/**
@@ -733,6 +738,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class BoldAction extends StyledTextAction {
/**
@@ -772,6 +778,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class ItalicAction extends StyledTextAction {
/**
@@ -811,6 +818,7 @@
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class UnderlineAction extends StyledTextAction {
/**
--- a/jdk/src/share/classes/javax/swing/text/TabSet.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/TabSet.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -43,6 +43,7 @@
*
* @author Scott Violet
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class TabSet implements Serializable
{
/** TabStops this TabSet contains. */
--- a/jdk/src/share/classes/javax/swing/text/TabStop.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/TabStop.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -42,6 +42,7 @@
* Please see {@link java.beans.XMLEncoder}.
*
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class TabStop implements Serializable {
/** Character following tab is positioned at location. */
--- a/jdk/src/share/classes/javax/swing/text/TextAction.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/TextAction.java Tue Jan 28 11:22:25 2014 -0800
@@ -58,6 +58,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class TextAction extends AbstractAction {
/**
--- a/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -270,6 +270,7 @@
* @author Scott Violet
* @author Sunita Mani
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class HTMLDocument extends DefaultStyledDocument {
/**
* Constructs an HTML document using the default buffer size
--- a/jdk/src/share/classes/javax/swing/text/html/HTMLEditorKit.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/html/HTMLEditorKit.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -433,7 +433,7 @@
* @return the command list
*/
public Action[] getActions() {
- return TextAction.augmentList(super.getActions(), this.defaultActions);
+ return TextAction.augmentList(super.getActions(), defaultActions);
}
/**
--- a/jdk/src/share/classes/javax/swing/text/html/Option.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/html/Option.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -44,6 +44,7 @@
*
* @author Timothy Prinzing
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class Option implements Serializable {
/**
--- a/jdk/src/share/classes/javax/swing/text/html/StyleSheet.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/html/StyleSheet.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -2079,8 +2079,8 @@
// Parent view.
View v = childView.getParent();
HTMLDocument doc = (HTMLDocument)v.getDocument();
- if (doc.matchNameAttribute(v.getElement().getAttributes(),
- HTML.Tag.OL)) {
+ if (HTMLDocument.matchNameAttribute(v.getElement().getAttributes(),
+ HTML.Tag.OL)) {
childtype = CSS.Value.DECIMAL;
} else {
childtype = CSS.Value.DISC;
@@ -2473,13 +2473,13 @@
flags |= 4;
}
else if (pos.isHorizontalPositionRelativeToSize()) {
- hPosition *= css.getFontSize(a, 12, ss);
+ hPosition *= CSS.getFontSize(a, 12, ss);
}
if (pos.isVerticalPositionRelativeToSize()) {
flags |= 8;
}
else if (pos.isVerticalPositionRelativeToFontSize()) {
- vPosition *= css.getFontSize(a, 12, ss);
+ vPosition *= CSS.getFontSize(a, 12, ss);
}
}
// Determine any repeating values.
--- a/jdk/src/share/classes/javax/swing/text/html/parser/ParserDelegator.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/html/parser/ParserDelegator.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -84,7 +84,7 @@
in = getResourceAsStream(path);
if (in != null) {
dtd.read(new DataInputStream(new BufferedInputStream(in)));
- dtd.putDTDHash(name, dtd);
+ DTD.putDTDHash(name, dtd);
}
} catch (Exception e) {
System.out.println(e);
--- a/jdk/src/share/classes/javax/swing/text/rtf/RTFReader.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/text/rtf/RTFReader.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -599,7 +599,7 @@
} catch (Exception e) {
throw new IOException("Unable to read from character set file (" + e + ")");
}
- if (ttype != in.TT_NUMBER) {
+ if (ttype != StreamTokenizer.TT_NUMBER) {
// System.out.println("Bad token: type=" + ttype + " tok=" + in.sval);
throw new IOException("Unexpected token in character set file");
// continue;
--- a/jdk/src/share/classes/javax/swing/tree/AbstractLayoutCache.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/tree/AbstractLayoutCache.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -42,7 +42,7 @@
*
* @author Scott Violet
*/
-
+@SuppressWarnings("serial") // Same-version serialization only
public abstract class AbstractLayoutCache implements RowMapper {
/** Object responsible for getting the size of a node. */
protected NodeDimensions nodeDimensions;
--- a/jdk/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -85,6 +85,7 @@
*
* @author Rob Davis
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultMutableTreeNode implements Cloneable,
MutableTreeNode, Serializable
{
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java Tue Jan 28 11:22:25 2014 -0800
@@ -60,6 +60,7 @@
*
* @author Scott Violet
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultTreeCellEditor implements ActionListener, TreeCellEditor,
TreeSelectionListener {
/** Editor handling the editing. */
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -103,6 +103,7 @@
* @author Ray Ryan
* @author Scott Violet
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultTreeCellRenderer extends JLabel implements TreeCellRenderer
{
/** Last tree the renderer was painted in. */
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -49,6 +49,7 @@
* @author Ray Ryan
* @author Scott Violet
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class DefaultTreeModel implements Serializable, TreeModel {
/** Root of the tree. */
protected TreeNode root;
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
--- a/jdk/src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -48,7 +48,7 @@
*
* @author Scott Violet
*/
-
+@SuppressWarnings("serial") // Same-version serialization only
public class FixedHeightLayoutCache extends AbstractLayoutCache {
/** Root node. */
private FHTreeStateNode root;
--- a/jdk/src/share/classes/javax/swing/tree/TreePath.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/tree/TreePath.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,6 +81,7 @@
* @author Scott Violet
* @author Philip Milne
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class TreePath extends Object implements Serializable {
/** Path representing the parent, null if lastPathComponent represents
* the root. */
--- a/jdk/src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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 @@
* @author Ray Ryan
* @author Scott Violet
*/
-
+@SuppressWarnings("serial") // Same-version serialization only
public class VariableHeightLayoutCache extends AbstractLayoutCache {
/**
* The array of nodes that are currently visible, in the order they
--- a/jdk/src/share/classes/javax/swing/undo/CannotRedoException.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/undo/CannotRedoException.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -38,5 +38,6 @@
*
* @author Ray Ryan
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class CannotRedoException extends RuntimeException {
}
--- a/jdk/src/share/classes/javax/swing/undo/CannotUndoException.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/undo/CannotUndoException.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -39,5 +39,6 @@
*
* @author Ray Ryan
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class CannotUndoException extends RuntimeException {
}
--- a/jdk/src/share/classes/javax/swing/undo/UndoManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/javax/swing/undo/UndoManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -132,6 +132,7 @@
*
* @author Ray Ryan
*/
+@SuppressWarnings("serial") // Same-version serialization only
public class UndoManager extends CompoundEdit implements UndoableEditListener {
int indexOfNextAdd;
int limit;
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMPGPData.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMPGPData.java Tue Jan 28 11:22:25 2014 -0800
@@ -85,7 +85,7 @@
}
}
}
- this.keyPacket = (byte[])keyPacket.clone();
+ this.keyPacket = keyPacket.clone();
checkKeyPacket(keyPacket);
this.keyId = null;
}
@@ -132,9 +132,9 @@
}
}
}
- this.keyId = (byte[])keyId.clone();
+ this.keyId = keyId.clone();
this.keyPacket = keyPacket == null ? null
- : (byte[])keyPacket.clone();
+ : keyPacket.clone();
if (keyPacket != null) {
checkKeyPacket(keyPacket);
}
@@ -177,11 +177,11 @@
}
public byte[] getKeyId() {
- return (keyId == null ? null : (byte[])keyId.clone());
+ return (keyId == null ? null : keyId.clone());
}
public byte[] getKeyPacket() {
- return (keyPacket == null ? null : (byte[])keyPacket.clone());
+ return (keyPacket == null ? null : keyPacket.clone());
}
public List getExternalElements() {
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java Tue Jan 28 11:22:25 2014 -0800
@@ -182,7 +182,7 @@
this.type = type;
this.id = id;
if (digestValue != null) {
- this.digestValue = (byte[])digestValue.clone();
+ this.digestValue = digestValue.clone();
this.digested = true;
}
this.appliedTransformData = result;
@@ -298,12 +298,12 @@
}
public byte[] getDigestValue() {
- return (digestValue == null ? null : (byte[])digestValue.clone());
+ return (digestValue == null ? null : digestValue.clone());
}
public byte[] getCalculatedDigestValue() {
return (calcDigestValue == null ? null
- : (byte[])calcDigestValue.clone());
+ : calcDigestValue.clone());
}
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java Tue Jan 28 11:22:25 2014 -0800
@@ -535,7 +535,7 @@
}
public byte[] getValue() {
- return (value == null) ? null : (byte[])value.clone();
+ return (value == null) ? null : value.clone();
}
public boolean validate(XMLValidateContext validateContext)
--- a/jdk/src/share/classes/sun/applet/AppletImageRef.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/applet/AppletImageRef.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -27,27 +27,71 @@
import java.awt.Toolkit;
import java.awt.Image;
+import java.lang.ref.SoftReference;
import sun.awt.image.URLImageSource;
import java.net.URL;
-class AppletImageRef extends sun.misc.Ref {
+class AppletImageRef {
+ private SoftReference<Image> soft = null;
+
URL url;
/**
+ * Returns a pointer to the object referenced by this Ref. If the object
+ * has been thrown away by the garbage collector, it will be
+ * reconstituted. This method does everything necessary to ensure that the garbage
+ * collector throws things away in Least Recently Used(LRU) order. Applications should
+ * never override this method. The get() method effectively caches calls to
+ * reconstitute().
+ */
+ public synchronized Image get() {
+ Image t = check();
+ if (t == null) {
+ t = reconstitute();
+ setThing(t);
+ }
+ return t;
+ }
+
+ /**
* Create the Ref
*/
AppletImageRef(URL url) {
this.url = url;
}
- public void flush() {
- super.flush();
+ /**
+ * Flushes the cached object. Forces the next invocation of get() to
+ * invoke reconstitute().
+ */
+ public synchronized void flush() {
+ SoftReference s = soft;
+ if (s != null) s.clear();
+ soft = null;
+ }
+
+ /**
+ * Sets the thing to the specified object.
+ * @param thing the specified object
+ */
+ public synchronized void setThing(Object thing) {
+ flush();
+ soft = new SoftReference(thing);
+ }
+
+ /**
+ * Checks to see what object is being pointed at by this Ref and returns it.
+ */
+ public synchronized Image check() {
+ SoftReference<Image> s = soft;
+ if (s == null) return null;
+ return s.get();
}
/**
* Reconsitute the image. Only called when the ref has been flushed.
*/
- public Object reconstitute() {
+ public Image reconstitute() {
Image img = Toolkit.getDefaultToolkit().createImage(new URLImageSource(url));
return img;
}
--- a/jdk/src/share/classes/sun/applet/AppletMessageHandler.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/applet/AppletMessageHandler.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 1997, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -53,11 +53,11 @@
}
String getMessage(String key) {
- return (String)rb.getString(getQualifiedKey(key));
+ return rb.getString(getQualifiedKey(key));
}
String getMessage(String key, Object arg){
- String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
+ String basemsgfmt = rb.getString(getQualifiedKey(key));
MessageFormat msgfmt = new MessageFormat(basemsgfmt);
Object msgobj[] = new Object[1];
if (arg == null) {
@@ -68,7 +68,7 @@
}
String getMessage(String key, Object arg1, Object arg2) {
- String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
+ String basemsgfmt = rb.getString(getQualifiedKey(key));
MessageFormat msgfmt = new MessageFormat(basemsgfmt);
Object msgobj[] = new Object[2];
if (arg1 == null) {
@@ -83,7 +83,7 @@
}
String getMessage(String key, Object arg1, Object arg2, Object arg3) {
- String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
+ String basemsgfmt = rb.getString(getQualifiedKey(key));
MessageFormat msgfmt = new MessageFormat(basemsgfmt);
Object msgobj[] = new Object[3];
if (arg1 == null) {
@@ -102,7 +102,7 @@
}
String getMessage(String key, Object arg[]) {
- String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
+ String basemsgfmt = rb.getString(getQualifiedKey(key));
MessageFormat msgfmt = new MessageFormat(basemsgfmt);
return msgfmt.format(arg);
}
--- a/jdk/src/share/classes/sun/applet/AppletPanel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/applet/AppletPanel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -1215,8 +1215,8 @@
synchronized(appletClass) {
// Determine if the JDK level of an applet has been
// checked before.
- Boolean jdk11Target = (Boolean) loader.isJDK11Target(appletClass);
- Boolean jdk12Target = (Boolean) loader.isJDK12Target(appletClass);
+ Boolean jdk11Target = loader.isJDK11Target(appletClass);
+ Boolean jdk12Target = loader.isJDK12Target(appletClass);
// if applet JDK level has been checked before, retrieve
// value and return.
--- a/jdk/src/share/classes/sun/applet/AppletProps.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/applet/AppletProps.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -75,12 +75,12 @@
if (security != null)
security.reset();
- String proxyhost = (String) AccessController.doPrivileged(
+ String proxyhost = AccessController.doPrivileged(
new GetPropertyAction("http.proxyHost"));
- String proxyport = (String) AccessController.doPrivileged(
+ String proxyport = AccessController.doPrivileged(
new GetPropertyAction("http.proxyPort"));
- Boolean tmp = (Boolean) AccessController.doPrivileged(
+ Boolean tmp = AccessController.doPrivileged(
new GetBooleanAction("package.restrict.access.sun"));
boolean packageRestrict = tmp.booleanValue();
--- a/jdk/src/share/classes/sun/applet/AppletResourceLoader.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/applet/AppletResourceLoader.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -27,21 +27,17 @@
import java.net.URL;
import java.awt.Image;
-import sun.misc.Ref;
/**
* Part of this class still remains only to support legacy, 100%-impure
* applications such as HotJava 1.0.1.
*/
+@Deprecated
public class AppletResourceLoader {
public static Image getImage(URL url) {
return AppletViewer.getCachedImage(url);
}
- public static Ref getImageRef(URL url) {
- return AppletViewer.getCachedImageRef(url);
- }
-
public static void flushImages() {
AppletViewer.flushImageCache();
}
--- a/jdk/src/share/classes/sun/applet/AppletViewer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/applet/AppletViewer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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,6 @@
import java.net.URL;
import java.net.MalformedURLException;
import java.net.SocketPermission;
-import sun.misc.Ref;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.lang.reflect.InvocationTargetException;
@@ -390,22 +389,18 @@
return getCachedImage(url);
}
+ /**
+ * Get an image.
+ */
static Image getCachedImage(URL url) {
// System.getSecurityManager().checkConnection(url.getHost(), url.getPort());
- return (Image)getCachedImageRef(url).get();
- }
-
- /**
- * Get an image ref.
- */
- static Ref getCachedImageRef(URL url) {
synchronized (imageRefs) {
AppletImageRef ref = (AppletImageRef)imageRefs.get(url);
if (ref == null) {
ref = new AppletImageRef(url);
imageRefs.put(url, ref);
}
- return ref;
+ return ref.get();
}
}
--- a/jdk/src/share/classes/sun/applet/Main.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/applet/Main.java Tue Jan 28 11:22:25 2014 -0800
@@ -369,7 +369,7 @@
Properties sysProps = System.getProperties();
for (Enumeration e = sysProps.propertyNames(); e.hasMoreElements(); ) {
String key = (String) e.nextElement();
- String val = (String) sysProps.getProperty(key);
+ String val = sysProps.getProperty(key);
String oldVal;
if ((oldVal = (String) avProps.setProperty(key, val)) != null)
System.err.println(lookup("main.warn.prop.overwrite", key,
--- a/jdk/src/share/classes/sun/audio/AudioStream.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/audio/AudioStream.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -133,7 +133,7 @@
ais.getFormat().getFrameSize() );
} else if ( midiformat != null ) {
- return (int) midiformat.getByteLength();
+ return midiformat.getByteLength();
} else {
return -1;
--- a/jdk/src/share/classes/sun/awt/FontConfiguration.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/FontConfiguration.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -1504,10 +1504,10 @@
printTable(table_elcIDs, 0);
System.out.println("\n----sequences-------------");
for (int ii = 0; ii< table_elcIDs.length; ii++) {
- System.out.println(" " + ii + "/" + getString((short)table_elcIDs[ii]));
+ System.out.println(" " + ii + "/" + getString(table_elcIDs[ii]));
short[] ss = getShortArray(table_sequences[ii * NUM_FONTS + 0]);
for (int jj = 0; jj < ss.length; jj++) {
- System.out.println(" " + getString((short)table_scriptIDs[ss[jj]]));
+ System.out.println(" " + getString(table_scriptIDs[ss[jj]]));
}
}
System.out.println("\n----fontfileNameIDs-------");
@@ -1533,9 +1533,9 @@
System.out.println("\n----proportionals--------");
for (int ii = 0; ii < table_proportionals.length; ii++) {
System.out.println(" "
- + getString((short)table_componentFontNameIDs[table_proportionals[ii++]])
+ + getString(table_componentFontNameIDs[table_proportionals[ii++]])
+ " -> "
- + getString((short)table_componentFontNameIDs[table_proportionals[ii]]));
+ + getString(table_componentFontNameIDs[table_proportionals[ii]]));
}
int i = 0;
System.out.println("\n----alphabeticSuffix----");
--- a/jdk/src/share/classes/sun/awt/FontDescriptor.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/FontDescriptor.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -113,7 +113,7 @@
}
static boolean isLE;
static {
- String enc = (String) java.security.AccessController.doPrivileged(
+ String enc = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("sun.io.unicode.encoding",
"UnicodeBig"));
isLE = !"UnicodeBig".equals(enc);
--- a/jdk/src/share/classes/sun/awt/IconInfo.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/IconInfo.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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
@@ -182,7 +182,7 @@
private static long[] intArrayToLongArray(int[] intData) {
long[] longData = new long[intData.length];
for (int i = 0; i < intData.length; i++) {
- longData[i] = (int)intData[i];
+ longData[i] = intData[i];
}
return longData;
}
--- a/jdk/src/share/classes/sun/awt/PlatformFont.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/PlatformFont.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, 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
@@ -270,7 +270,7 @@
currentDefaultChar = data[stringIndex];
// Note that cache sizes must be a power of two!
- cacheIndex = (int)(currentDefaultChar & this.FONTCACHEMASK);
+ cacheIndex = (currentDefaultChar & PlatformFont.FONTCACHEMASK);
theChar = (PlatformFontCache)getFontCache()[cacheIndex];
@@ -280,7 +280,7 @@
/* find a converter that can convert the current character */
currentFontDescriptor = defaultFont;
currentDefaultChar = defaultChar;
- char ch = (char)data[stringIndex];
+ char ch = data[stringIndex];
int componentCount = componentFonts.length;
for (int j = 0; j < componentCount; j++) {
@@ -309,7 +309,7 @@
theChar.bb,
true);
*/
- if (currentFontDescriptor.isLE) {
+ if (FontDescriptor.isLE) {
theChar.bb.put((byte)(input[0] & 0xff));
theChar.bb.put((byte)(input[0] >>8));
} else {
@@ -420,7 +420,7 @@
// twice or return an array which will be dereferenced and gced
// right away.
if (fontCache == null) {
- fontCache = new Object[this.FONTCACHESIZE];
+ fontCache = new Object[PlatformFont.FONTCACHESIZE];
}
return fontCache;
--- a/jdk/src/share/classes/sun/awt/datatransfer/ClipboardTransferable.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/datatransfer/ClipboardTransferable.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -97,8 +97,7 @@
fetchOneFlavor(clipboard, flavor, lFormat, cached_data);
}
- flavors = DataTransferer.getInstance().
- setToSortedDataFlavorArray(flavorsToData.keySet());
+ flavors = DataTransferer.setToSortedDataFlavorArray(flavorsToData.keySet());
}
} finally {
clipboard.closeClipboard();
@@ -145,7 +144,7 @@
}
public DataFlavor[] getTransferDataFlavors() {
- return (DataFlavor[])flavors.clone();
+ return flavors.clone();
}
public boolean isDataFlavorSupported(DataFlavor flavor) {
--- a/jdk/src/share/classes/sun/awt/dnd/SunDragSourceContextPeer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/dnd/SunDragSourceContextPeer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -130,8 +130,7 @@
SortedMap<Long,DataFlavor> formatMap = DataTransferer.getInstance().
getFormatsForTransferable(transferable, DataTransferer.adaptFlavorMap
(getTrigger().getDragSource().getFlavorMap()));
- long[] formats = DataTransferer.getInstance().
- keysToLongArray(formatMap);
+ long[] formats = DataTransferer.keysToLongArray(formatMap);
startDrag(transferable, formats, formatMap);
/*
--- a/jdk/src/share/classes/sun/awt/geom/Crossings.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/geom/Crossings.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -100,7 +100,7 @@
double xhi, double yhi)
{
Crossings cross;
- if (pi.getWindingRule() == pi.WIND_EVEN_ODD) {
+ if (pi.getWindingRule() == PathIterator.WIND_EVEN_ODD) {
cross = new EvenOdd(xlo, ylo, xhi, yhi);
} else {
cross = new NonZero(xlo, ylo, xhi, yhi);
--- a/jdk/src/share/classes/sun/awt/image/ByteBandedRaster.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/image/ByteBandedRaster.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -169,7 +169,7 @@
* of the band.
*/
public int[] getDataOffsets() {
- return (int[])dataOffsets.clone();
+ return dataOffsets.clone();
}
/**
--- a/jdk/src/share/classes/sun/awt/image/ByteComponentRaster.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/image/ByteComponentRaster.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -207,7 +207,7 @@
* band.
*/
public int[] getDataOffsets() {
- return (int[]) dataOffsets.clone();
+ return dataOffsets.clone();
}
/**
--- a/jdk/src/share/classes/sun/awt/image/ByteInterleavedRaster.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/image/ByteInterleavedRaster.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -259,7 +259,7 @@
* band.
*/
public int[] getDataOffsets() {
- return (int[]) dataOffsets.clone();
+ return dataOffsets.clone();
}
/**
--- a/jdk/src/share/classes/sun/awt/image/ImageFetcher.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/image/ImageFetcher.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -195,7 +195,7 @@
// the fetcher was interrupted, as we used to,
// because there may be other images waiting
// to be fetched (see 4789067)
- me.interrupted();
+ Thread.interrupted();
me.setPriority(HIGH_PRIORITY);
ImageFetchable src = nextImage();
if (src == null) {
--- a/jdk/src/share/classes/sun/awt/image/ImageRepresentation.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/image/ImageRepresentation.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -209,7 +209,7 @@
// Check to see if model is INT_RGB
if (model instanceof IndexColorModel) {
- if (model.getTransparency() == model.TRANSLUCENT) {
+ if (model.getTransparency() == Transparency.TRANSLUCENT) {
// REMIND:
// Probably need to composite anyway so force ARGB
cmodel = ColorModel.getRGBdefault();
@@ -586,8 +586,8 @@
}
}
else {
- if (model.getTransparency() != model.OPAQUE &&
- cmodel.getTransparency() == cmodel.OPAQUE) {
+ if (model.getTransparency() != Transparency.OPAQUE &&
+ cmodel.getTransparency() == Transparency.OPAQUE) {
convertToRGB();
}
--- a/jdk/src/share/classes/sun/awt/image/IntegerComponentRaster.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/image/IntegerComponentRaster.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -218,7 +218,7 @@
* band.
*/
public int[] getDataOffsets() {
- return (int[]) dataOffsets.clone();
+ return dataOffsets.clone();
}
/**
--- a/jdk/src/share/classes/sun/awt/image/IntegerInterleavedRaster.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/image/IntegerInterleavedRaster.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -161,7 +161,7 @@
* band.
*/
public int[] getDataOffsets() {
- return (int[]) dataOffsets.clone();
+ return dataOffsets.clone();
}
/**
--- a/jdk/src/share/classes/sun/awt/image/ShortBandedRaster.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/image/ShortBandedRaster.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -165,7 +165,7 @@
* band.
*/
public int[] getDataOffsets() {
- return (int[]) dataOffsets.clone();
+ return dataOffsets.clone();
}
/**
--- a/jdk/src/share/classes/sun/awt/image/ShortComponentRaster.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/image/ShortComponentRaster.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -207,7 +207,7 @@
* band.
*/
public int[] getDataOffsets() {
- return (int[]) dataOffsets.clone();
+ return dataOffsets.clone();
}
/**
@@ -470,7 +470,7 @@
int off = (y-minY)*scanlineStride +
(x-minX)*pixelStride;
for (int i = 0; i < numDataElements; i++) {
- data[dataOffsets[i] + off] = (short) inData[i];
+ data[dataOffsets[i] + off] = inData[i];
}
markDirty();
@@ -576,7 +576,7 @@
xoff = yoff;
for (xstart=0; xstart < w; xstart++, xoff += pixelStride) {
for (int c = 0; c < numDataElements; c++) {
- data[dataOffsets[c] + xoff] = (short) inData[off++];
+ data[dataOffsets[c] + xoff] = inData[off++];
}
}
}
--- a/jdk/src/share/classes/sun/awt/image/ShortInterleavedRaster.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/image/ShortInterleavedRaster.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -180,7 +180,7 @@
* band.
*/
public int[] getDataOffsets() {
- return (int[]) dataOffsets.clone();
+ return dataOffsets.clone();
}
/**
@@ -443,7 +443,7 @@
int off = (y-minY)*scanlineStride +
(x-minX)*pixelStride;
for (int i = 0; i < numDataElements; i++) {
- data[dataOffsets[i] + off] = (short) inData[i];
+ data[dataOffsets[i] + off] = inData[i];
}
markDirty();
}
@@ -548,7 +548,7 @@
xoff = yoff;
for (xstart=0; xstart < w; xstart++, xoff += pixelStride) {
for (int c = 0; c < numDataElements; c++) {
- data[dataOffsets[c] + xoff] = (short) inData[off++];
+ data[dataOffsets[c] + xoff] = inData[off++];
}
}
}
--- a/jdk/src/share/classes/sun/awt/image/VSyncedBSManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/awt/image/VSyncedBSManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -36,7 +36,7 @@
private static VSyncedBSManager theInstance;
private static final boolean vSyncLimit =
- Boolean.valueOf((String)java.security.AccessController.doPrivileged(
+ Boolean.valueOf(java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction(
"sun.java2d.vsynclimit", "true")));
--- a/jdk/src/share/classes/sun/font/CompositeFont.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/font/CompositeFont.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -447,7 +447,7 @@
}
public String toString() {
- String ls = (String)java.security.AccessController.doPrivileged(
+ String ls = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("line.separator"));
String componentsStr = "";
for (int i=0; i<numSlots; i++) {
--- a/jdk/src/share/classes/sun/font/Decoration.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/font/Decoration.java Tue Jan 28 11:22:25 2014 -0800
@@ -157,8 +157,8 @@
Underline stdUnderline,
Underline imUnderline) {
- fgPaint = (Paint) foreground;
- bgPaint = (Paint) background;
+ fgPaint = foreground;
+ bgPaint = background;
this.swapColors = swapColors;
this.strikethrough = strikethrough;
--- a/jdk/src/share/classes/sun/font/ExtendedTextSourceLabel.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/font/ExtendedTextSourceLabel.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -894,12 +894,12 @@
public String toString() {
if (true) {
- return source.toString(source.WITHOUT_CONTEXT);
+ return source.toString(TextSource.WITHOUT_CONTEXT);
}
StringBuffer buf = new StringBuffer();
buf.append(super.toString());
buf.append("[source:");
- buf.append(source.toString(source.WITHOUT_CONTEXT));
+ buf.append(source.toString(TextSource.WITHOUT_CONTEXT));
buf.append(", lb:");
buf.append(lb);
buf.append(", ab:");
@@ -1008,7 +1008,7 @@
// when we justify, we need to adjust the charinfo since spaces
// change their advances. preserve the existing charinfo.
- float[] newCharinfo = (float[])getCharinfo().clone();
+ float[] newCharinfo = getCharinfo().clone();
// we only push spaces, so never need to rejustify
flags[0] = false;
--- a/jdk/src/share/classes/sun/font/FileFontStrike.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/font/FileFontStrike.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -728,7 +728,7 @@
if ((desc.aaHint == INTVAL_TEXT_ANTIALIAS_LCD_HRGB ||
desc.aaHint == INTVAL_TEXT_ANTIALIAS_LCD_HBGR)
&& topLeftX <= -2.0f) {
- int minx = getGlyphImageMinX(ptr, (int)result.x);
+ int minx = getGlyphImageMinX(ptr, result.x);
if (minx > result.x) {
result.x += 1;
result.width -=1;
@@ -912,7 +912,7 @@
if (outlineMapRef != null) {
outlineMap = outlineMapRef.get();
if (outlineMap != null) {
- gp = (GeneralPath)outlineMap.get(glyphCode);
+ gp = outlineMap.get(glyphCode);
}
}
--- a/jdk/src/share/classes/sun/font/FontLineMetrics.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/font/FontLineMetrics.java Tue Jan 28 11:22:25 2014 -0800
@@ -75,7 +75,7 @@
}
public final float[] getBaselineOffsets() {
- return (float[])cm.baselineOffsets.clone();
+ return cm.baselineOffsets.clone();
}
public final float getStrikethroughOffset() {
--- a/jdk/src/share/classes/sun/font/StandardGlyphVector.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/font/StandardGlyphVector.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -727,7 +727,7 @@
result.clearCaches();
if (positions != null) {
- result.positions = (float[])positions.clone();
+ result.positions = positions.clone();
}
if (gti != null) {
@@ -775,7 +775,7 @@
throw new IllegalArgumentException("srcPositions.length != " + requiredLength);
}
- positions = (float[])srcPositions.clone();
+ positions = srcPositions.clone();
clearCaches();
addFlags(FLAG_HAS_POSITION_ADJUSTMENTS);
@@ -1391,8 +1391,8 @@
GlyphTransformInfo(StandardGlyphVector sgv, GlyphTransformInfo rhs) {
this.sgv = sgv;
- this.indices = rhs.indices == null ? null : (int[])rhs.indices.clone();
- this.transforms = rhs.transforms == null ? null : (double[])rhs.transforms.clone();
+ this.indices = rhs.indices == null ? null : rhs.indices.clone();
+ this.transforms = rhs.transforms == null ? null : rhs.transforms.clone();
this.strikesRef = null; // can't share cache, so rather than clone, we just null out
}
--- a/jdk/src/share/classes/sun/font/StrikeCache.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/font/StrikeCache.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -280,7 +280,7 @@
RenderQueue rq = null;
GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
- if (!ge.isHeadless()) {
+ if (!GraphicsEnvironment.isHeadless()) {
GraphicsConfiguration gc =
ge.getDefaultScreenDevice().getDefaultConfiguration();
if (gc instanceof AccelGraphicsConfig) {
@@ -351,7 +351,7 @@
if (gids == null) {
gids = new ArrayList<Long>();
}
- gids.add((long) glyphPtrs[i]);
+ gids.add(glyphPtrs[i]);
}
}
--- a/jdk/src/share/classes/sun/font/SunFontManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/font/SunFontManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, 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
@@ -683,8 +683,7 @@
* no effect - this is typically the case only when using the Windows
* L&F where these APIs would conflict with that L&F anyway.
*/
- Font2D oldFont = (Font2D)
- altNameCache.get(compositeName.toLowerCase(Locale.ENGLISH));
+ Font2D oldFont =altNameCache.get(compositeName.toLowerCase(Locale.ENGLISH));
if (oldFont instanceof CompositeFont) {
oldFont.handle.font2D = cf;
}
@@ -1992,7 +1991,7 @@
if (family == null || familyName == null) {
return null;
}
- String [] fontList = (String[])family.toArray(STR_ARRAY);
+ String [] fontList = family.toArray(STR_ARRAY);
if (fontList.length == 0) {
return null;
}
@@ -2085,7 +2084,7 @@
(ConcurrentHashMap<String, Font2D>)
AppContext.getAppContext().get(CompositeFont.class);
if (altNameCache != null) {
- font = (Font2D)altNameCache.get(mapName);
+ font = altNameCache.get(mapName);
} else {
font = null;
}
@@ -2628,8 +2627,7 @@
fullNameToFont.remove(oldFont.fullName.toLowerCase(Locale.ENGLISH));
FontFamily.remove(oldFont);
if (localeFullNamesToFont != null) {
- Map.Entry[] mapEntries =
- (Map.Entry[])localeFullNamesToFont.entrySet().
+ Map.Entry[] mapEntries = localeFullNamesToFont.entrySet().
toArray(new Map.Entry[0]);
/* Should I be replacing these, or just I just remove
* the names from the map?
@@ -3100,7 +3098,7 @@
if (font == null) {
return;
}
- String[] keys = (String[])(fontNameCache.keySet().toArray(STR_ARRAY));
+ String[] keys = fontNameCache.keySet().toArray(STR_ARRAY);
for (int k=0; k<keys.length;k++) {
if (fontNameCache.get(keys[k]) == font) {
fontNameCache.remove(keys[k]);
@@ -3785,7 +3783,7 @@
String[] retval = new String[familyNames.size()];
Object [] keyNames = familyNames.keySet().toArray();
for (int i=0; i < keyNames.length; i++) {
- retval[i] = (String)familyNames.get(keyNames[i]);
+ retval[i] = familyNames.get(keyNames[i]);
}
if (requestedLocale.equals(Locale.getDefault())) {
lastDefaultLocale = requestedLocale;
--- a/jdk/src/share/classes/sun/font/TrueTypeFont.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/font/TrueTypeFont.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -709,7 +709,7 @@
if (FontUtilities.isWindows) {
defaultCodePage =
- (String)java.security.AccessController.doPrivileged(
+ java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("file.encoding"));
} else {
if (languages.length != codePages.length) {
@@ -1504,7 +1504,7 @@
String key = locale.toString();
while (!"".equals(key)) {
- Short lcidObject = (Short) lcidMap.get(key);
+ Short lcidObject = lcidMap.get(key);
if (lcidObject != null) {
return lcidObject.shortValue();
}
--- a/jdk/src/share/classes/sun/font/Underline.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/font/Underline.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -299,7 +299,7 @@
return null;
}
- return (Underline) UNDERLINES.get(value);
+ return UNDERLINES.get(value);
}
static Underline getUnderline(int index) {
--- a/jdk/src/share/classes/sun/java2d/Disposer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/java2d/Disposer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -64,7 +64,7 @@
}
});
initIDs();
- String type = (String) java.security.AccessController.doPrivileged(
+ String type = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("sun.java2d.reftype"));
if (type != null) {
if (type.equals("weak")) {
--- a/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -242,7 +242,7 @@
String[] retval = new String[map.size()];
Object [] keyNames = map.keySet().toArray();
for (int i=0; i < keyNames.length; i++) {
- retval[i] = (String)map.get(keyNames[i]);
+ retval[i] = map.get(keyNames[i]);
}
return retval;
}
--- a/jdk/src/share/classes/sun/java2d/cmm/CMSManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/java2d/cmm/CMSManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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 @@
}
GetPropertyAction gpa = new GetPropertyAction("sun.java2d.cmm.trace");
- String cmmTrace = (String)AccessController.doPrivileged(gpa);
+ String cmmTrace = AccessController.doPrivileged(gpa);
if (cmmTrace != null) {
cmmImpl = new CMMTracer(cmmImpl);
}
--- a/jdk/src/share/classes/sun/java2d/loops/ProcessPath.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/java2d/loops/ProcessPath.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -280,11 +280,11 @@
/* Clipping macros for drawing and filling algorithms */
private static float CLIP(float a1, float b1, float a2, float b2,
double t) {
- return (float)(b1 + (double)(t - a1)*(b2 - b1) / (a2 - a1));
+ return (float)(b1 + (t - a1)*(b2 - b1) / (a2 - a1));
}
private static int CLIP(int a1, int b1, int a2, int b2, double t) {
- return (int)(b1 + (double)(t - a1)*(b2 - b1) / (a2 - a1));
+ return (int)(b1 + (t - a1)*(b2 - b1) / (a2 - a1));
}
--- a/jdk/src/share/classes/sun/java2d/opengl/OGLSurfaceData.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/java2d/opengl/OGLSurfaceData.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -181,25 +181,25 @@
static {
if (!GraphicsEnvironment.isHeadless()) {
// fbobject currently enabled by default; use "false" to disable
- String fbo = (String)java.security.AccessController.doPrivileged(
+ String fbo = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction(
"sun.java2d.opengl.fbobject"));
isFBObjectEnabled = !"false".equals(fbo);
// lcdshader currently enabled by default; use "false" to disable
- String lcd = (String)java.security.AccessController.doPrivileged(
+ String lcd = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction(
"sun.java2d.opengl.lcdshader"));
isLCDShaderEnabled = !"false".equals(lcd);
// biopshader currently enabled by default; use "false" to disable
- String biop = (String)java.security.AccessController.doPrivileged(
+ String biop = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction(
"sun.java2d.opengl.biopshader"));
isBIOpShaderEnabled = !"false".equals(biop);
// gradshader currently enabled by default; use "false" to disable
- String grad = (String)java.security.AccessController.doPrivileged(
+ String grad = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction(
"sun.java2d.opengl.gradshader"));
isGradShaderEnabled = !"false".equals(grad);
--- a/jdk/src/share/classes/sun/java2d/opengl/OGLUtilities.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/java2d/opengl/OGLUtilities.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -201,7 +201,7 @@
}
SunGraphics2D sg2d = (SunGraphics2D)g;
- SurfaceData sData = (SurfaceData)sg2d.surfaceData;
+ SurfaceData sData = sg2d.surfaceData;
// this is the upper-left origin of the region to be painted,
// relative to the upper-left origin of the surface
@@ -242,7 +242,7 @@
}
SunGraphics2D sg2d = (SunGraphics2D)g;
- SurfaceData sData = (SurfaceData)sg2d.surfaceData;
+ SurfaceData sData = sg2d.surfaceData;
Region r = sg2d.getCompClip();
if (!r.isRectangular()) {
// caller probably doesn't know how to handle shape clip
--- a/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -462,7 +462,7 @@
float[] tmp = new float[6];
int type = this.currentSegment(tmp);
for (int i = 0; i < 6; i++) {
- coords[i] = (float) tmp[i];
+ coords[i] = tmp[i];
}
return type;
}
--- a/jdk/src/share/classes/sun/jvmstat/perfdata/monitor/PerfDataBufferImpl.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/jvmstat/perfdata/monitor/PerfDataBufferImpl.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -206,7 +206,7 @@
if (al != null) {
for (Iterator i = al.iterator(); i.hasNext() && m == null; ) {
String alias = (String)i.next();
- m = (Monitor)monitors.get(alias);
+ m = monitors.get(alias);
}
}
}
--- a/jdk/src/share/classes/sun/misc/Cache.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/misc/Cache.java Tue Jan 28 11:22:25 2014 -0800
@@ -25,6 +25,7 @@
package sun.misc;
+import java.lang.ref.SoftReference;
import java.util.Dictionary;
import java.util.Enumeration;
import java.util.NoSuchElementException;
@@ -32,12 +33,26 @@
/**
* Caches the collision list.
*/
-class CacheEntry extends Ref {
+class CacheEntry {
int hash;
Object key;
CacheEntry next;
- public Object reconstitute() {
- return null;
+ SoftReference<Object> value;
+
+ public CacheEntry() {
+ value = null;
+ }
+
+ public CacheEntry(Object o) {
+ value = new SoftReference<>(o);
+ }
+
+ public Object get() {
+ return value.get();
+ }
+
+ public void setThing(Object thing) {
+ value = new SoftReference<>(thing);
}
}
@@ -72,7 +87,6 @@
*
* @see java.lang.Object#hashCode
* @see java.lang.Object#equals
- * @see sun.misc.Ref
* @deprecated Consider {@link java.util.LinkedHashMap} for LRU caches.
*/
@Deprecated
@@ -192,7 +206,7 @@
int index = (hash & 0x7FFFFFFF) % tab.length;
for (CacheEntry e = tab[index]; e != null; e = e.next) {
if ((e.hash == hash) && e.key.equals(key)) {
- return e.check();
+ return e.get();
}
}
return null;
@@ -220,7 +234,7 @@
for (CacheEntry old = oldTable[i]; old != null;) {
CacheEntry e = old;
old = old.next;
- if (e.check() != null) {
+ if (e.get() != null) {
int index = (e.hash & 0x7FFFFFFF) % newCapacity;
e.next = newTable[index];
newTable[index] = e;
@@ -253,10 +267,10 @@
CacheEntry ne = null;
for (CacheEntry e = tab[index]; e != null; e = e.next) {
if ((e.hash == hash) && e.key.equals(key)) {
- Object old = e.check();
+ Object old = e.get();
e.setThing(value);
return old;
- } else if (e.check() == null)
+ } else if (e.get() == null)
ne = e; /* reuse old flushed value */
}
@@ -296,7 +310,7 @@
tab[index] = e.next;
}
count--;
- return e.check();
+ return e.get();
}
}
return null;
@@ -322,7 +336,7 @@
public boolean hasMoreElements() {
while (index >= 0) {
while (entry != null)
- if (entry.check() != null)
+ if (entry.get() != null)
return true;
else
entry = entry.next;
@@ -338,8 +352,8 @@
if (entry != null) {
CacheEntry e = entry;
entry = e.next;
- if (e.check() != null)
- return keys ? e.key : e.check();
+ if (e.get() != null)
+ return keys ? e.key : e.get();
}
}
throw new NoSuchElementException("CacheEnumerator");
--- a/jdk/src/share/classes/sun/misc/Launcher.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/misc/Launcher.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -266,7 +266,7 @@
throws IOException
{
final String s = System.getProperty("java.class.path");
- final File[] path = (s == null) ? new File[0] : getClassPath(s);
+ final File[] path = (s == null) ? new File[0] : getClassPath(s, true);
// Note: on bugid 4256530
// Prior implementations of this doPrivileged() block supplied
@@ -322,7 +322,7 @@
* This class loader supports dynamic additions to the class path
* at runtime.
*
- * @see java.lang.instrument.Instrumentation#appendToSystemClassPathSearch
+ * @see java.lang.instrument.Instrumentation#appendToSystemClassLoaderSearch
*/
private void appendToClassPathForInstrumentation(String path) {
assert(Thread.holdsLock(this));
@@ -364,7 +364,8 @@
urls = AccessController.doPrivileged(
new PrivilegedAction<URL[]>() {
public URL[] run() {
- File[] classPath = getClassPath(bootClassPath);
+ // Skip empty path in boot class path i.e. not default to use CWD
+ File[] classPath = getClassPath(bootClassPath, false);
int len = classPath.length;
Set<File> seenDirs = new HashSet<File>();
for (int i = 0; i < len; i++) {
@@ -405,7 +406,7 @@
return urls;
}
- private static File[] getClassPath(String cp) {
+ private static File[] getClassPath(String cp, boolean defaultToCwd) {
File[] path;
if (cp != null) {
int count = 0, maxCount = 1;
@@ -419,9 +420,9 @@
lastPos = pos = 0;
// Now scan for each path component
while ((pos = cp.indexOf(File.pathSeparator, lastPos)) != -1) {
- if (pos - lastPos > 0) {
+ if (pos > lastPos) {
path[count++] = new File(cp.substring(lastPos, pos));
- } else {
+ } else if (defaultToCwd) {
// empty path component translates to "."
path[count++] = new File(".");
}
@@ -430,7 +431,7 @@
// Make sure we include the last path component
if (lastPos < cp.length()) {
path[count++] = new File(cp.substring(lastPos));
- } else {
+ } else if (defaultToCwd) {
path[count++] = new File(".");
}
// Trim array to correct size
--- a/jdk/src/share/classes/sun/misc/Ref.java Wed Jul 05 19:28:21 2017 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 1995, 2004, 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.
- */
-
-package sun.misc;
-import java.lang.ref.SoftReference;
-
-
-/**
- * A "Ref" is an indirect reference to an object that the garbage collector
- * knows about. An application should override the reconstitute() method with one
- * that will construct the object based on information in the Ref, often by
- * reading from a file. The get() method retains a cache of the result of the last call to
- * reconstitute() in the Ref. When space gets tight, the garbage collector
- * will clear old Ref cache entries when there are no other pointers to the
- * object. In normal usage, Ref will always be subclassed. The subclass will add the
- * instance variables necessary for the reconstitute() method to work. It will also add a
- * constructor to set them up, and write a version of reconstitute().
- *
- * @deprecated This class has been replaced by
- * <code>java.util.SoftReference</code>.
- *
- * @see java.util.SoftReference
- *
- */
-@Deprecated
-
-public abstract class Ref {
-
- private SoftReference soft = null;
-
- /**
- * Returns a pointer to the object referenced by this Ref. If the object
- * has been thrown away by the garbage collector, it will be
- * reconstituted. This method does everything necessary to ensure that the garbage
- * collector throws things away in Least Recently Used(LRU) order. Applications should
- * never override this method. The get() method effectively caches calls to
- * reconstitute().
- */
- public synchronized Object get() {
- Object t = check();
- if (t == null) {
- t = reconstitute();
- setThing(t);
- }
- return t;
- }
-
- /**
- * Returns a pointer to the object referenced by this Ref by
- * reconstituting it from some external source (such as a file). This method should not
- * bother with caching since the method get() will deal with that.
- * <p>
- * In normal usage, Ref will always be subclassed. The subclass will add
- * the instance variables necessary for reconstitute() to work. It will
- * also add a constructor to set them up, and write a version of
- * reconstitute().
- */
- public abstract Object reconstitute();
-
- /**
- * Flushes the cached object. Forces the next invocation of get() to
- * invoke reconstitute().
- */
- public synchronized void flush() {
- SoftReference s = soft;
- if (s != null) s.clear();
- soft = null;
- }
-
- /**
- * Sets the thing to the specified object.
- * @param thing the specified object
- */
- public synchronized void setThing(Object thing) {
- flush();
- soft = new SoftReference(thing);
- }
-
- /**
- * Checks to see what object is being pointed at by this Ref and returns it.
- */
- public synchronized Object check() {
- SoftReference s = soft;
- if (s == null) return null;
- return s.get();
- }
-
- /**
- * Constructs a new Ref.
- */
- public Ref() { }
-
- /**
- * Constructs a new Ref that initially points to thing.
- */
- public Ref(Object thing) {
- setThing(thing);
- }
-
-}
--- a/jdk/src/share/classes/sun/misc/VM.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/misc/VM.java Tue Jan 28 11:22:25 2014 -0800
@@ -206,32 +206,6 @@
return pageAlignDirectMemory;
}
- // A user-settable boolean to determine whether ClassLoader.loadClass should
- // accept array syntax. This value may be changed during VM initialization
- // via the system property "sun.lang.ClassLoader.allowArraySyntax".
- //
- // The default for 1.5 is "true", array syntax is allowed. In 1.6, the
- // default will be "false". The presence of this system property to
- // control array syntax allows applications the ability to preview this new
- // behaviour.
- //
- private static boolean defaultAllowArraySyntax = false;
- private static boolean allowArraySyntax = defaultAllowArraySyntax;
-
- // The allowArraySyntax boolean is initialized during system initialization
- // in the saveAndRemoveProperties method.
- //
- // It is initialized based on the value of the system property
- // "sun.lang.ClassLoader.allowArraySyntax". If the system property is not
- // provided, the default for 1.5 is "true". In 1.6, the default will be
- // "false". If the system property is provided, then the value of
- // allowArraySyntax will be equal to "true" if Boolean.parseBoolean()
- // returns "true". Otherwise, the field will be set to "false".
- //
- public static boolean allowArraySyntax() {
- return allowArraySyntax;
- }
-
/**
* Returns true if the given class loader is in the system domain
* in which all permissions are granted.
@@ -296,14 +270,6 @@
if ("true".equals(s))
pageAlignDirectMemory = true;
- // Set a boolean to determine whether ClassLoader.loadClass accepts
- // array syntax. This value is controlled by the system property
- // "sun.lang.ClassLoader.allowArraySyntax".
- s = props.getProperty("sun.lang.ClassLoader.allowArraySyntax");
- allowArraySyntax = (s == null
- ? defaultAllowArraySyntax
- : Boolean.parseBoolean(s));
-
// Remove other private system properties
// used by java.lang.Integer.IntegerCache
props.remove("java.lang.Integer.IntegerCache.high");
--- a/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java Tue Jan 28 11:22:25 2014 -0800
@@ -110,7 +110,7 @@
}
}
- nd.preClose(fd);
+ // signal any threads blocked on this channel
threads.signalAndWait();
if (parent != null) {
--- a/jdk/src/share/classes/sun/nio/ch/NativeThreadSet.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/nio/ch/NativeThreadSet.java Tue Jan 28 11:22:25 2014 -0800
@@ -82,8 +82,9 @@
// Signals all threads in this set.
//
- void signalAndWait() {
- synchronized (this) {
+ synchronized void signalAndWait() {
+ boolean interrupted = false;
+ while (used > 0) {
int u = used;
int n = elts.length;
for (int i = 0; i < n; i++) {
@@ -96,16 +97,15 @@
break;
}
waitingToEmpty = true;
- boolean interrupted = false;
- while (used > 0) {
- try {
- wait();
- } catch (InterruptedException e) {
- interrupted = true;
- }
+ try {
+ wait(50);
+ } catch (InterruptedException e) {
+ interrupted = true;
+ } finally {
+ waitingToEmpty = false;
}
- if (interrupted)
- Thread.currentThread().interrupt();
}
+ if (interrupted)
+ Thread.currentThread().interrupt();
}
}
--- a/jdk/src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java Tue Jan 28 11:22:25 2014 -0800
@@ -88,7 +88,6 @@
invalidateAllLocks();
// signal any threads blocked on this channel
- nd.preClose(fdObj);
threads.signalAndWait();
// wait until all async I/O operations have completely gracefully
--- a/jdk/src/share/classes/sun/print/PSPrinterJob.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/print/PSPrinterJob.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -900,7 +900,7 @@
/* Create a PS string big enough to hold a row of pixels.
*/
- int psBytesPerRow = 3 * (int) intSrcWidth;
+ int psBytesPerRow = 3 * intSrcWidth;
while (psBytesPerRow > MAX_PSSTR) {
psBytesPerRow /= 2;
}
--- a/jdk/src/share/classes/sun/print/RasterPrinterJob.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/print/RasterPrinterJob.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -181,8 +181,7 @@
* use a particular pipeline. Either the raster
* pipeline or the pdl pipeline can be forced.
*/
- String forceStr =
- (String)java.security.AccessController.doPrivileged(
+ String forceStr = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction(FORCE_PIPE_PROP));
if (forceStr != null) {
@@ -193,8 +192,7 @@
}
}
- String shapeTextStr =
- (String)java.security.AccessController.doPrivileged(
+ String shapeTextStr =java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction(SHAPE_TEXT_PROP));
if (shapeTextStr != null) {
@@ -512,12 +510,10 @@
} else {
// Check the list of services. This service may have been
// deleted already
- PrinterState prnState = (PrinterState)service.getAttribute(
- PrinterState.class);
+ PrinterState prnState = service.getAttribute(PrinterState.class);
if (prnState == PrinterState.STOPPED) {
PrinterStateReasons prnStateReasons =
- (PrinterStateReasons)service.getAttribute(
- PrinterStateReasons.class);
+ service.getAttribute(PrinterStateReasons.class);
if ((prnStateReasons != null) &&
(prnStateReasons.containsKey(PrinterStateReason.SHUTDOWN)))
{
@@ -1353,12 +1349,10 @@
// Check the list of services. This service may have been
// deleted already
- PrinterState prnState = (PrinterState)psvc.getAttribute(
- PrinterState.class);
+ PrinterState prnState = psvc.getAttribute(PrinterState.class);
if (prnState == PrinterState.STOPPED) {
PrinterStateReasons prnStateReasons =
- (PrinterStateReasons)psvc.getAttribute(
- PrinterStateReasons.class);
+ psvc.getAttribute(PrinterStateReasons.class);
if ((prnStateReasons != null) &&
(prnStateReasons.containsKey(PrinterStateReason.SHUTDOWN)))
{
@@ -1366,8 +1360,7 @@
}
}
- if ((PrinterIsAcceptingJobs)(psvc.getAttribute(
- PrinterIsAcceptingJobs.class)) ==
+ if ((psvc.getAttribute(PrinterIsAcceptingJobs.class)) ==
PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS) {
throw new PrinterException("Printer is not accepting job.");
}
@@ -2035,7 +2028,7 @@
* fact that we can only create 24 bit per pixel 3 byte BGR
* BufferedImages. FIX.
*/
- int bandHeight = (int)(MAX_BAND_SIZE / bandWidth / 3);
+ int bandHeight = (MAX_BAND_SIZE / bandWidth / 3);
int deviceLeft = (int)Math.rint(paper.getImageableX() * xScale);
int deviceTop = (int)Math.rint(paper.getImageableY() * yScale);
--- a/jdk/src/share/classes/sun/security/util/DerValue.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/security/util/DerValue.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2009, 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
@@ -746,29 +746,21 @@
}
/**
- * Returns true iff the other object is a DER value which
- * is bitwise equal to this one.
- *
- * @param other the object being compared with this one
- */
- public boolean equals(Object other) {
- if (other instanceof DerValue)
- return equals((DerValue)other);
- else
- return false;
- }
-
- /**
* Bitwise equality comparison. DER encoded values have a single
* encoding, so that bitwise equality of the encoded values is an
* efficient way to establish equivalence of the unencoded values.
*
* @param other the object being compared with this one
*/
- public boolean equals(DerValue other) {
- if (this == other) {
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
return true;
}
+ if (!(o instanceof DerValue)) {
+ return false;
+ }
+ DerValue other = (DerValue) o;
if (tag != other.tag) {
return false;
}
@@ -801,6 +793,7 @@
*
* @return printable representation of the value
*/
+ @Override
public String toString() {
try {
@@ -928,6 +921,7 @@
*
* @return a hashcode for this DerValue.
*/
+ @Override
public int hashCode() {
return toString().hashCode();
}
--- a/jdk/src/share/classes/sun/tools/javac/SourceClass.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/tools/javac/SourceClass.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2014, 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
@@ -154,7 +154,7 @@
// maybe define an uplevel "A.this" current instance field
if (!isTopLevel() && !isLocal()) {
- LocalMember outerArg = ((SourceClass)outerClass).getThisArgument();
+ LocalMember outerArg = outerClass.getThisArgument();
UplevelReference r = getReference(outerArg);
setOuterMember(r.getLocalField(env));
}
--- a/jdk/src/share/classes/sun/tools/jconsole/ProxyClient.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/tools/jconsole/ProxyClient.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -711,7 +711,7 @@
memoryPoolProxies = new ArrayList<MemoryPoolProxy>();
Iterator<ObjectName> iterator = mbeans.iterator();
while (iterator.hasNext()) {
- ObjectName objName = (ObjectName) iterator.next();
+ ObjectName objName = iterator.next();
MemoryPoolProxy p = new MemoryPoolProxy(this, objName);
memoryPoolProxies.add(p);
}
@@ -737,7 +737,7 @@
garbageCollectorMBeans = new ArrayList<GarbageCollectorMXBean>();
Iterator<ObjectName> iterator = mbeans.iterator();
while (iterator.hasNext()) {
- ObjectName on = (ObjectName) iterator.next();
+ ObjectName on = iterator.next();
String name = GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE +
",name=" + on.getKeyProperty("name");
--- a/jdk/src/share/classes/sun/tools/jconsole/ThreadTab.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/tools/jconsole/ThreadTab.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -311,7 +311,7 @@
ThreadJList list = (ThreadJList)ev.getSource();
final JTextArea textArea = list.textArea;
- Long selected = (Long)list.getSelectedValue();
+ Long selected = list.getSelectedValue();
if (selected == null) {
if (lastSelected != -1) {
selected = lastSelected;
--- a/jdk/src/share/classes/sun/tools/jconsole/inspector/XOpenTypeViewer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/tools/jconsole/inspector/XOpenTypeViewer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -389,7 +389,7 @@
Iterator<String> it = keys.iterator();
Object[] rowData = new Object[2];
while (it.hasNext()) {
- String key = (String) it.next();
+ String key = it.next();
Object val = data.get(key);
rowData[0] = formatKey(key);
if (val == null) {
--- a/jdk/src/share/classes/sun/tools/jconsole/inspector/XPlottingViewer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/tools/jconsole/inspector/XPlottingViewer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -76,7 +76,7 @@
//plotterCache.clear();
it = timerCache.keySet().iterator();
while(it.hasNext()) {
- String key = (String) it.next();
+ String key = it.next();
if(key.startsWith(String.valueOf(tab.hashCode()))) {
Timer t = timerCache.get(key);
t.cancel();
--- a/jdk/src/share/classes/sun/tools/tree/ConvertExpression.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/tools/tree/ConvertExpression.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2014, 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
@@ -65,7 +65,7 @@
case TC_BYTE: return new ByteExpression(right.where, (byte)value);
case TC_CHAR: return new CharExpression(right.where, (char)value);
case TC_SHORT: return new ShortExpression(right.where, (short)value);
- case TC_INT: return new IntExpression(right.where, (int)value);
+ case TC_INT: return new IntExpression(right.where, value);
case TC_LONG: return new LongExpression(right.where, (long)value);
case TC_FLOAT: return new FloatExpression(right.where, (float)value);
case TC_DOUBLE: return new DoubleExpression(right.where, (double)value);
--- a/jdk/src/share/classes/sun/tools/tree/FinallyStatement.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/tools/tree/FinallyStatement.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2014, 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
@@ -281,7 +281,7 @@
returnType,
idFinallyReturnValue);
ctx.declare(env, localfield);
- env.debugOutput("Assigning return slot to " + localfield.number);
+ Environment.debugOutput("Assigning return slot to " + localfield.number);
}
// allocate space for the exception and return address
--- a/jdk/src/share/classes/sun/tools/tree/SynchronizedStatement.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/tools/tree/SynchronizedStatement.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2014, 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
@@ -120,7 +120,7 @@
LocalMember localfield = new LocalMember(0, clazz, 0, returnType,
idFinallyReturnValue);
ctx.declare(env, localfield);
- env.debugOutput("Assigning return slot to " + localfield.number);
+ Environment.debugOutput("Assigning return slot to " + localfield.number);
}
LocalMember f1 = new LocalMember(where, clazz, 0, Type.tObject, null);
--- a/jdk/src/share/classes/sun/tools/util/CommandLine.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/classes/sun/tools/util/CommandLine.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -82,7 +82,7 @@
st.commentChar('#');
st.quoteChar('"');
st.quoteChar('\'');
- while (st.nextToken() != st.TT_EOF) {
+ while (st.nextToken() != StreamTokenizer.TT_EOF) {
args.add(st.sval);
}
r.close();
--- a/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -73,8 +73,9 @@
SWAP_BYTES(a & 0xFFFF)
#define GET_INT_HI(a) \
- SWAP_BYTES((a >> 16) & 0xFFFF);
+ SWAP_BYTES((a >> 16) & 0xFFFF)
+static const ushort jarmagic[2] = { SWAP_BYTES(0xCAFE), 0 };
void jar::init(unpacker* u_) {
BYTES_OF(*this).clear();
@@ -105,13 +106,14 @@
header[0] = (ushort)SWAP_BYTES(0x4B50);
header[1] = (ushort)SWAP_BYTES(0x0201);
- header[2] = (ushort)SWAP_BYTES(0xA);
+ header[2] = (ushort)SWAP_BYTES(( store ) ? 0x0A : 0x14);
// required version
- header[3] = (ushort)SWAP_BYTES(0xA);
+ header[3] = (ushort)SWAP_BYTES(( store ) ? 0x0A : 0x14);
- // flags 02 = maximum sub-compression flag
- header[4] = ( store ) ? 0x0 : SWAP_BYTES(0x2);
+ // Flags - UTF-8 compression and separating crc and sizes
+ // into separate headers for deflated file
+ header[4] = ( store ) ? SWAP_BYTES(0x0800) : 0x0808;
// Compression method 8=deflate.
header[5] = ( store ) ? 0x0 : SWAP_BYTES(0x08);
@@ -135,7 +137,8 @@
// Filename length
header[14] = (ushort)SWAP_BYTES(fname_length);
// So called "extra field" length.
- header[15] = 0;
+ // If it's the first record we must add JAR magic sequence
+ header[15] = ( central_directory_count ) ? 0 : (ushort)SWAP_BYTES(4);
// So called "comment" length.
header[16] = 0;
// Disk number start
@@ -155,6 +158,11 @@
// Copy the fname to the header.
central_directory.append(fname, fname_length);
+ // Add jar magic for the first record
+ if (central_directory_count == 0) {
+ central_directory.append((void *)jarmagic, sizeof(jarmagic));
+ }
+
central_directory_count++;
}
@@ -170,10 +178,10 @@
header[1] = (ushort)SWAP_BYTES(0x0403);
// Version
- header[2] = (ushort)SWAP_BYTES(0xA);
+ header[2] = (ushort)SWAP_BYTES(( store ) ? 0x0A : 0x14);
- // flags 02 = maximum sub-compression flag
- header[3] = ( store ) ? 0x0 : SWAP_BYTES(0x2);
+ // General purpose flags - same as in the Central Directory
+ header[3] = ( store ) ? SWAP_BYTES(0x0800) : 0x0808;
// Compression method = deflate
header[4] = ( store ) ? 0x0 : SWAP_BYTES(0x08);
@@ -182,28 +190,51 @@
header[5] = (ushort)GET_INT_LO(dostime);
header[6] = (ushort)GET_INT_HI(dostime);
- // CRC
- header[7] = (ushort)GET_INT_LO(crc);
- header[8] = (ushort)GET_INT_HI(crc);
+ // CRC, 0 if deflated, will come separately in extra header
+ header[7] = ( store ) ? (ushort)GET_INT_LO(crc) : 0;
+ header[8] = ( store ) ? (ushort)GET_INT_HI(crc) : 0;
- // Compressed length:
- header[9] = (ushort)GET_INT_LO(clen);
- header[10] = (ushort)GET_INT_HI(clen);
+ // Compressed length, 0 if deflated
+ header[9] = ( store ) ? (ushort)GET_INT_LO(clen) : 0;
+ header[10] = ( store ) ? (ushort)GET_INT_HI(clen) : 0;
- // Uncompressed length.
- header[11] = (ushort)GET_INT_LO(len);
- header[12] = (ushort)GET_INT_HI(len);
+ // Uncompressed length, 0 if deflated
+ header[11] = ( store ) ? (ushort)GET_INT_LO(len) : 0;
+ header[12] = ( store ) ? (ushort)GET_INT_HI(len) : 0;
// Filename length
header[13] = (ushort)SWAP_BYTES(fname_length);
// So called "extra field" length.
- header[14] = 0;
+ header[14] = ( central_directory_count - 1 ) ? 0 : (ushort)SWAP_BYTES(4);
// Write the LOC header to the output file.
write_data(header, (int)sizeof(header));
// Copy the fname to the header.
write_data((char*)fname, (int)fname_length);
+
+ if (central_directory_count == 1) {
+ // Write JAR magic sequence
+ write_data((void *)jarmagic, (int)sizeof(jarmagic));
+ }
+}
+
+void jar::write_jar_extra(int len, int clen, uint crc) {
+ ushort header[8];
+ // Extra field signature
+ header[0] = (ushort)SWAP_BYTES(0x4B50);
+ header[1] = (ushort)SWAP_BYTES(0x0807);
+ // CRC
+ header[2] = (ushort)GET_INT_LO(crc);
+ header[3] = (ushort)GET_INT_HI(crc);
+ // Compressed length
+ header[4] = (ushort)GET_INT_LO(clen);
+ header[5] = (ushort)GET_INT_HI(clen);
+ // Uncompressed length
+ header[6] = (ushort)GET_INT_LO(len);
+ header[7] = (ushort)GET_INT_HI(len);
+
+ write_data(header, sizeof(header));
}
static const char marker_comment[] = ZIP_ARCHIVE_MARKER_COMMENT;
@@ -212,6 +243,7 @@
bytes mc; mc.set(marker_comment);
ushort header[11];
+ ushort header64[38];
// Create the End of Central Directory structure.
header[0] = (ushort)SWAP_BYTES(0x4B50);
@@ -220,8 +252,8 @@
header[2] = 0;
header[3] = 0;
// Number of entries in central directory.
- header[4] = (ushort)SWAP_BYTES(central_directory_count);
- header[5] = (ushort)SWAP_BYTES(central_directory_count);
+ header[4] = ( central_directory_count >= 0xffff ) ? 0xffff : (ushort)SWAP_BYTES(central_directory_count);
+ header[5] = ( central_directory_count >= 0xffff ) ? 0xffff : (ushort)SWAP_BYTES(central_directory_count);
// Size of the central directory}
header[6] = (ushort)GET_INT_LO((int)central_directory.size());
header[7] = (ushort)GET_INT_HI((int)central_directory.size());
@@ -229,12 +261,71 @@
header[8] = (ushort)GET_INT_LO(output_file_offset);
header[9] = (ushort)GET_INT_HI(output_file_offset);
// zipfile comment length;
- header [10] = (ushort)SWAP_BYTES((int)mc.len);
+ header[10] = (ushort)SWAP_BYTES((int)mc.len);
// Write the central directory.
PRINTCR((2, "Central directory at %d\n", output_file_offset));
write_data(central_directory.b);
+ // If number of records exceeds the 0xFFFF we need to prepend extended
+ // Zip64 End of Central Directory record and its locator to the old
+ // style ECD record
+ if (central_directory_count > 0xFFFF) {
+ // Zip64 END signature
+ header64[0] = (ushort)SWAP_BYTES(0x4B50);
+ header64[1] = (ushort)0x0606;
+ // Size of header (long)
+ header64[2] = (ushort)SWAP_BYTES(44);;
+ header64[3] = 0;
+ header64[4] = 0;
+ header64[5] = 0;
+ // Version produced and required (short)
+ header64[6] = (ushort)SWAP_BYTES(45);
+ header64[7] = (ushort)SWAP_BYTES(45);
+ // Current disk number (int)
+ header64[8] = 0;
+ header64[9] = 0;
+ // Central directory start disk (int)
+ header64[10] = 0;
+ header64[11] = 0;
+ // Count of records on disk (long)
+ header64[12] = (ushort)GET_INT_LO(central_directory_count);
+ header64[13] = (ushort)GET_INT_HI(central_directory_count);
+ header64[14] = 0;
+ header64[15] = 0;
+ // Count of records totally (long)
+ header64[16] = (ushort)GET_INT_LO(central_directory_count);
+ header64[17] = (ushort)GET_INT_HI(central_directory_count);
+ header64[18] = 0;
+ header64[19] = 0;
+ // Length of the central directory (long)
+ header64[20] = header[6];
+ header64[21] = header[7];
+ header64[22] = 0;
+ header64[23] = 0;
+ // Offset of central directory (long)
+ header64[24] = header[8];
+ header64[25] = header[9];
+ header64[26] = 0;
+ header64[27] = 0;
+ // Zip64 end of central directory locator
+ // Locator signature
+ header64[28] = (ushort)SWAP_BYTES(0x4B50);
+ header64[29] = (ushort)SWAP_BYTES(0x0706);
+ // Start disk number (int)
+ header64[30] = 0;
+ header64[31] = 0;
+ // Offset of zip64 END record (long)
+ header64[32] = (ushort)GET_INT_LO(output_file_offset);
+ header64[33] = (ushort)GET_INT_HI(output_file_offset);
+ header64[34] = 0;
+ header64[35] = 0;
+ // Total number of disks (int)
+ header64[36] = (ushort)SWAP_BYTES(1);
+ header64[37] = 0;
+ write_data(header64, (int)sizeof(header64));
+ }
+
// Write the End of Central Directory structure.
PRINTCR((2, "end-of-directory at %d\n", output_file_offset));
write_data(header, (int)sizeof(header));
@@ -286,6 +377,8 @@
if (deflate) {
write_data(deflated.b);
+ // Write deflated information in extra header
+ write_jar_extra(len, clen, crc);
} else {
write_data(head);
write_data(tail);
@@ -368,7 +461,7 @@
// NOTE: the window size should always be -MAX_WBITS normally -15.
// unzip/zipup.c and java/Deflater.c
- int error = deflateInit2(&zs, Z_BEST_COMPRESSION, Z_DEFLATED,
+ int error = deflateInit2(&zs, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
-MAX_WBITS, 8, Z_DEFAULT_STRATEGY);
if (error != Z_OK) {
switch (error) {
@@ -414,7 +507,8 @@
error = deflate(&zs, Z_FINISH);
}
if (error == Z_STREAM_END) {
- if (len > (int)zs.total_out ) {
+ if ((int)zs.total_out > 0) {
+ // Even if compressed size is bigger than uncompressed, write it
PRINTCR((2, "deflate compressed data %d -> %d\n", len, zs.total_out));
deflated.b.len = zs.total_out;
deflateEnd(&zs);
--- a/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -40,7 +40,7 @@
// Private members
fillbytes central_directory;
- ushort central_directory_count;
+ uint central_directory_count;
uint output_file_offset;
fillbytes deflated; // temporary buffer
@@ -74,6 +74,7 @@
int len, int clen, uLong crc);
void write_jar_header(const char* fname, bool store, int modtime,
int len, int clen, unsigned int crc);
+ void write_jar_extra(int len, int clen, unsigned int crc);
void write_central_directory();
uLong dostime(int y, int n, int d, int h, int m, int s);
uLong get_dostime(int modtime);
--- a/jdk/src/solaris/classes/sun/awt/UNIXToolkit.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/UNIXToolkit.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -49,7 +49,7 @@
private BufferedImage tmpImage = null;
public static int getDatatransferTimeout() {
- Integer dt = (Integer)AccessController.doPrivileged(
+ Integer dt = AccessController.doPrivileged(
new GetIntegerAction("sun.awt.datatransfer.timeout"));
if (dt == null || dt <= 0) {
return DEFAULT_DATATRANSFER_TIMEOUT;
--- a/jdk/src/solaris/classes/sun/awt/X11/InfoWindow.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/InfoWindow.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2014, 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
@@ -451,7 +451,7 @@
while (true) {
Message msg = null;
try {
- msg = (Message)messageQueue.take();
+ msg = messageQueue.take();
} catch (InterruptedException e) {
return;
}
--- a/jdk/src/solaris/classes/sun/awt/X11/MotifDnDConstants.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/MotifDnDConstants.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -163,7 +163,7 @@
XlibWrapper.XGrabServer(newDisplay);
try {
- XlibWrapper.XSetCloseDownMode(newDisplay, (int)XConstants.RetainPermanent);
+ XlibWrapper.XSetCloseDownMode(newDisplay, XConstants.RetainPermanent);
XSetWindowAttributes xwa = new XSetWindowAttributes();
@@ -435,7 +435,7 @@
if (formats.length > 0) {
// Make a defensive copy.
- formats = (long[])formats.clone();
+ formats = formats.clone();
Arrays.sort(formats);
}
--- a/jdk/src/solaris/classes/sun/awt/X11/MotifDnDDragSourceProtocol.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/MotifDnDDragSourceProtocol.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -201,7 +201,7 @@
* CARD32 heap_offset B32;
* } xmDragReceiverInfoStruct;
*/
- if (status == (int)XConstants.Success && wpg.getData() != 0 &&
+ if (status == XConstants.Success && wpg.getData() != 0 &&
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
wpg.getNumberOfItems() >=
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
--- a/jdk/src/solaris/classes/sun/awt/X11/MotifDnDDropTargetProtocol.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/MotifDnDDropTargetProtocol.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -118,7 +118,7 @@
* CARD32 heap_offset B32;
* } xmDragReceiverInfoStruct;
*/
- if (status == (int)XConstants.Success && wpg.getData() != 0 &&
+ if (status == XConstants.Success && wpg.getData() != 0 &&
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
wpg.getNumberOfItems() >=
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
@@ -220,7 +220,7 @@
* CARD32 heap_offset B32;
* } xmDragReceiverInfoStruct;
*/
- if (status == (int)XConstants.Success && wpg.getData() != 0 &&
+ if (status == XConstants.Success && wpg.getData() != 0 &&
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
wpg.getNumberOfItems() >=
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
@@ -292,7 +292,7 @@
* CARD32 heap_offset B32;
* } xmDragReceiverInfoStruct;
*/
- if (status == (int)XConstants.Success && wpg.getData() != 0 &&
+ if (status == XConstants.Success && wpg.getData() != 0 &&
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
wpg.getNumberOfItems() >=
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
@@ -327,7 +327,7 @@
try {
int status = wpg.execute(XErrorHandler.IgnoreBadWindowHandler.getInstance());
- if (status == (int)XConstants.Success && wpg.getData() != 0 &&
+ if (status == XConstants.Success && wpg.getData() != 0 &&
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
wpg.getNumberOfItems() >=
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
--- a/jdk/src/solaris/classes/sun/awt/X11/XAWTFormatter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XAWTFormatter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -43,7 +43,7 @@
// Line separator string. This is the value of the line.separator
// property at the moment that the SimpleFormatter was created.
- private String lineSeparator = (String) java.security.AccessController.doPrivileged(
+ private String lineSeparator = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("line.separator"));
boolean displayFullRecord = false;
--- a/jdk/src/solaris/classes/sun/awt/X11/XAtom.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XAtom.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -681,7 +681,7 @@
return emptyList;
}
- int count = (int)getter.getNumberOfItems();
+ int count = getter.getNumberOfItems();
if (count == 0) {
return emptyList;
}
--- a/jdk/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -292,7 +292,7 @@
*/
XMenuItemPeer[] copyItems() {
synchronized(getMenuTreeLock()) {
- return (XMenuItemPeer[])items.toArray(new XMenuItemPeer[] {});
+ return items.toArray(new XMenuItemPeer[] {});
}
}
--- a/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -285,7 +285,7 @@
params.putIfNull(BOUNDS, new Rectangle(DEF_LOCATION, DEF_LOCATION, MIN_SIZE, MIN_SIZE));
params.putIfNull(DEPTH, Integer.valueOf((int)XConstants.CopyFromParent));
params.putIfNull(VISUAL, Long.valueOf(XConstants.CopyFromParent));
- params.putIfNull(VISUAL_CLASS, Integer.valueOf((int)XConstants.InputOnly));
+ params.putIfNull(VISUAL_CLASS, Integer.valueOf(XConstants.InputOnly));
params.putIfNull(VALUE_MASK, Long.valueOf(XConstants.CWEventMask));
Rectangle bounds = (Rectangle)params.get(BOUNDS);
bounds.width = Math.max(MIN_SIZE, bounds.width);
@@ -544,7 +544,7 @@
}
flags |= XUtilConstants.PWinGravity;
hints.set_flags(flags);
- hints.set_win_gravity((int)XConstants.NorthWestGravity);
+ hints.set_win_gravity(XConstants.NorthWestGravity);
if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) +
", values " + hints);
--- a/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -184,7 +184,7 @@
XWindowPeer wpeer = (XWindowPeer)(container.getPeer());
if (wpeer != null) {
return (wpeer.winAttr.visibilityState !=
- wpeer.winAttr.AWT_UNOBSCURED);
+ XWindowAttributesData.AWT_UNOBSCURED);
}
}
return true;
@@ -335,7 +335,7 @@
return rejectFocusRequestHelper("Waiting for asynchronous processing of the request");
}
return XKeyboardFocusManagerPeer.deliverFocus(lightweightChild,
- (Component)target,
+ target,
temporary,
focusedWindowChangeAllowed,
time, cause);
--- a/jdk/src/solaris/classes/sun/awt/X11/XContentWindow.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XContentWindow.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -137,7 +137,7 @@
// NOTE: This method may be called by privileged threads.
// DO NOT INVOKE CLIENT CODE ON THIS THREAD!
public void handleResize(Rectangle bounds) {
- AWTAccessor.getComponentAccessor().setSize((Component)target, bounds.width, bounds.height);
+ AWTAccessor.getComponentAccessor().setSize(target, bounds.width, bounds.height);
postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_RESIZED));
}
--- a/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -318,7 +318,7 @@
insets_corrected = true;
return;
}
- Component t = (Component)target;
+ Component t = target;
if (getDecorations() == XWindowAttributesData.AWT_DECOR_NONE) {
setReparented(true);
insets_corrected = true;
@@ -428,7 +428,7 @@
public void handleMoved(WindowDimensions dims) {
Point loc = dims.getLocation();
- AWTAccessor.getComponentAccessor().setLocation((Component)target, loc.x, loc.y);
+ AWTAccessor.getComponentAccessor().setLocation(target, loc.x, loc.y);
postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_MOVED));
}
@@ -536,8 +536,8 @@
// its location changes.
Point oldLocation = getLocation();
- Point newLocation = new Point(AWTAccessor.getComponentAccessor().getX((Component)target),
- AWTAccessor.getComponentAccessor().getY((Component)target));
+ Point newLocation = new Point(AWTAccessor.getComponentAccessor().getX(target),
+ AWTAccessor.getComponentAccessor().getY(target));
if (!newLocation.equals(oldLocation)) {
handleMoved(newDimensions);
@@ -738,7 +738,7 @@
updateChildrenSizes();
// Bounds of the window
- Rectangle targetBounds = AWTAccessor.getComponentAccessor().getBounds((Component)target);
+ Rectangle targetBounds = AWTAccessor.getComponentAccessor().getBounds(target);
Point newLocation = getNewLocation(xe, currentInsets.left, currentInsets.top);
@@ -1052,10 +1052,10 @@
final void dumpTarget() {
AWTAccessor.ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
- int getWidth = compAccessor.getWidth((Component)target);
- int getHeight = compAccessor.getHeight((Component)target);
- int getTargetX = compAccessor.getX((Component)target);
- int getTargetY = compAccessor.getY((Component)target);
+ int getWidth = compAccessor.getWidth(target);
+ int getHeight = compAccessor.getHeight(target);
+ int getTargetX = compAccessor.getX(target);
+ int getTargetY = compAccessor.getY(target);
System.err.println(">>> Target: " + getTargetX + ", " + getTargetY + ", " + getWidth + ", " + getHeight);
}
--- a/jdk/src/solaris/classes/sun/awt/X11/XDialogPeer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDialogPeer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -47,9 +47,9 @@
undecorated = Boolean.valueOf(target.isUndecorated());
winAttr.nativeDecor = !target.isUndecorated();
if (winAttr.nativeDecor) {
- winAttr.decorations = winAttr.AWT_DECOR_ALL;
+ winAttr.decorations = XWindowAttributesData.AWT_DECOR_ALL;
} else {
- winAttr.decorations = winAttr.AWT_DECOR_NONE;
+ winAttr.decorations = XWindowAttributesData.AWT_DECOR_NONE;
}
winAttr.functions = MWMConstants.MWM_FUNC_ALL;
winAttr.isResizable = true; //target.isResizable();
--- a/jdk/src/solaris/classes/sun/awt/X11/XDnDDragSourceProtocol.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDnDDragSourceProtocol.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -283,7 +283,7 @@
XClientMessageEvent msg = new XClientMessageEvent();
try {
- msg.set_type((int)XConstants.ClientMessage);
+ msg.set_type(XConstants.ClientMessage);
msg.set_window(getTargetWindow());
msg.set_format(32);
msg.set_message_type(XDnDConstants.XA_XdndEnter.getAtom());
@@ -311,7 +311,7 @@
XClientMessageEvent msg = new XClientMessageEvent();
try {
- msg.set_type((int)XConstants.ClientMessage);
+ msg.set_type(XConstants.ClientMessage);
msg.set_window(getTargetWindow());
msg.set_format(32);
msg.set_message_type(XDnDConstants.XA_XdndPosition.getAtom());
@@ -335,7 +335,7 @@
XClientMessageEvent msg = new XClientMessageEvent();
try {
- msg.set_type((int)XConstants.ClientMessage);
+ msg.set_type(XConstants.ClientMessage);
msg.set_window(getTargetWindow());
msg.set_format(32);
msg.set_message_type(XDnDConstants.XA_XdndLeave.getAtom());
@@ -361,7 +361,7 @@
XClientMessageEvent msg = new XClientMessageEvent();
try {
- msg.set_type((int)XConstants.ClientMessage);
+ msg.set_type(XConstants.ClientMessage);
msg.set_window(getTargetWindow());
msg.set_format(32);
msg.set_message_type(XDnDConstants.XA_XdndDrop.getAtom());
--- a/jdk/src/solaris/classes/sun/awt/X11/XDnDDropTargetProtocol.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDnDDropTargetProtocol.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -742,7 +742,7 @@
long data3, long data4) {
XClientMessageEvent enter = new XClientMessageEvent();
try {
- enter.set_type((int)XConstants.ClientMessage);
+ enter.set_type(XConstants.ClientMessage);
enter.set_window(toplevel);
enter.set_format(32);
enter.set_message_type(XDnDConstants.XA_XdndEnter.getAtom());
@@ -768,7 +768,7 @@
long sourceWindow) {
XClientMessageEvent leave = new XClientMessageEvent();
try {
- leave.set_type((int)XConstants.ClientMessage);
+ leave.set_type(XConstants.ClientMessage);
leave.set_window(toplevel);
leave.set_format(32);
leave.set_message_type(XDnDConstants.XA_XdndLeave.getAtom());
@@ -798,7 +798,7 @@
XClientMessageEvent msg = new XClientMessageEvent();
try {
- msg.set_type((int)XConstants.ClientMessage);
+ msg.set_type(XConstants.ClientMessage);
msg.set_window(xclient.get_data(0));
msg.set_format(32);
msg.set_message_type(XDnDConstants.XA_XdndStatus.getAtom());
@@ -886,7 +886,7 @@
XClientMessageEvent msg = new XClientMessageEvent();
try {
- msg.set_type((int)XConstants.ClientMessage);
+ msg.set_type(XConstants.ClientMessage);
msg.set_window(xclient.get_data(0));
msg.set_format(32);
msg.set_message_type(XDnDConstants.XA_XdndFinished.getAtom());
@@ -1005,6 +1005,7 @@
}
}
+ @SuppressWarnings("static")
private void notifyProtocolListener(XWindow xwindow, int x, int y,
int dropAction,
XClientMessageEvent xclient,
@@ -1147,7 +1148,7 @@
event while it still can be referenced from other Java events. */
{
XClientMessageEvent copy = new XClientMessageEvent();
- unsafe.copyMemory(xclient.pData, copy.pData, copy.getSize());
+ unsafe.copyMemory(xclient.pData, copy.pData, XClientMessageEvent.getSize());
copy.set_data(0, xclient.get_window());
--- a/jdk/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -538,7 +538,7 @@
return false;
}
- if (ev.get_type() != (int)XConstants.ClientMessage) {
+ if (ev.get_type() != XConstants.ClientMessage) {
return false;
}
@@ -612,7 +612,7 @@
xkey.get_keycode(), 0);
switch ((int)keysym) {
case (int)XKeySymConstants.XK_Escape: {
- if (ev.get_type() == (int)XConstants.KeyRelease) {
+ if (ev.get_type() == XConstants.KeyRelease) {
cleanup(xkey.get_time());
}
break;
--- a/jdk/src/solaris/classes/sun/awt/X11/XDropTargetEventProcessor.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDropTargetEventProcessor.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -43,7 +43,7 @@
private XDropTargetEventProcessor() {}
private boolean doProcessEvent(XEvent ev) {
- if (ev.get_type() == (int)XConstants.DestroyNotify &&
+ if (ev.get_type() == XConstants.DestroyNotify &&
protocol != null &&
ev.get_xany().get_window() == protocol.getSourceWindow()) {
protocol.cleanup();
@@ -51,7 +51,7 @@
return false;
}
- if (ev.get_type() == (int)XConstants.PropertyNotify) {
+ if (ev.get_type() == XConstants.PropertyNotify) {
XPropertyEvent xproperty = ev.get_xproperty();
if (xproperty.get_atom() ==
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom()) {
@@ -60,7 +60,7 @@
}
}
- if (ev.get_type() != (int)XConstants.ClientMessage) {
+ if (ev.get_type() != XConstants.ClientMessage) {
return false;
}
--- a/jdk/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -328,8 +328,7 @@
Long lToplevel = Long.valueOf(embedder);
boolean isXEmbedServer = false;
synchronized (this) {
- EmbeddedDropSiteEntry entry =
- (EmbeddedDropSiteEntry)embeddedDropSiteRegistry.get(lToplevel);
+ EmbeddedDropSiteEntry entry = embeddedDropSiteRegistry.get(lToplevel);
if (entry == null) {
return;
}
@@ -430,8 +429,7 @@
Long lToplevel = Long.valueOf(toplevel);
EmbeddedDropSiteEntry entry = null;
synchronized (this) {
- entry =
- (EmbeddedDropSiteEntry)embeddedDropSiteRegistry.get(lToplevel);
+ entry = embeddedDropSiteRegistry.get(lToplevel);
if (entry == null) {
if (peer != null) {
// Toplevel is an XEmbed server within this VM.
@@ -495,8 +493,7 @@
Long lToplevel = Long.valueOf(toplevel);
EmbeddedDropSiteEntry entry = null;
synchronized (this) {
- entry =
- (EmbeddedDropSiteEntry)embeddedDropSiteRegistry.get(lToplevel);
+ entry = embeddedDropSiteRegistry.get(lToplevel);
if (entry == null) {
return;
}
@@ -526,8 +523,7 @@
*/
public long getEmbeddedDropSite(long embedder, int x, int y) {
Long lToplevel = Long.valueOf(embedder);
- EmbeddedDropSiteEntry entry =
- (EmbeddedDropSiteEntry)embeddedDropSiteRegistry.get(lToplevel);
+ EmbeddedDropSiteEntry entry = embeddedDropSiteRegistry.get(lToplevel);
if (entry == null) {
return 0;
}
--- a/jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -654,9 +654,9 @@
if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Client message to embedder: " + msg);
}
- if (msg.get_message_type() == xembed.XEmbed.getAtom()) {
+ if (msg.get_message_type() == XEmbedHelper.XEmbed.getAtom()) {
if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
- xembedLog.fine(xembed.XEmbedMessageToString(msg));
+ xembedLog.fine(XEmbedHelper.XEmbedMessageToString(msg));
}
}
if (isXEmbedActive()) {
--- a/jdk/src/solaris/classes/sun/awt/X11/XEmbedHelper.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbedHelper.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -99,7 +99,7 @@
}
void sendMessage(long window, int message, long detail, long data1, long data2) {
XClientMessageEvent msg = new XClientMessageEvent();
- msg.set_type((int)XConstants.ClientMessage);
+ msg.set_type(XConstants.ClientMessage);
msg.set_window(window);
msg.set_message_type(XEmbed.getAtom());
msg.set_format(32);
--- a/jdk/src/solaris/classes/sun/awt/X11/XEmbedServerTester.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbedServerTester.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -647,7 +647,7 @@
public void dispatchEvent(XEvent ev) {
if (ev.get_type() == ClientMessage) {
XClientMessageEvent msg = ev.get_xclient();
- if (msg.get_message_type() == xembed.XEmbed.getAtom()) {
+ if (msg.get_message_type() == XEmbedHelper.XEmbed.getAtom()) {
if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Embedded message: " + XEmbedHelper.msgidToString((int)msg.get_data(1)));
}
@@ -689,7 +689,7 @@
}
} else {
synchronized(EVENT_LOCK) {
- int eventID = (int)ev.get_type() | SYSTEM_EVENT_MASK;
+ int eventID = ev.get_type() | SYSTEM_EVENT_MASK;
events.add(eventID);
if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
--- a/jdk/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -775,7 +775,7 @@
// 03/02/2005 b5097243 Pressing 'ESC' on a file dlg does not dispose the dlg on Xtoolkit
public void setVisible(boolean b){
if (fileDialog == null) {
- init((FileDialog)target);
+ init(target);
}
if (savedDir != null || userDir != null) {
--- a/jdk/src/solaris/classes/sun/awt/X11/XFramePeer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XFramePeer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -67,9 +67,9 @@
undecorated = Boolean.valueOf(target.isUndecorated());
winAttr.nativeDecor = !target.isUndecorated();
if (winAttr.nativeDecor) {
- winAttr.decorations = winAttr.AWT_DECOR_ALL;
+ winAttr.decorations = XWindowAttributesData.AWT_DECOR_ALL;
} else {
- winAttr.decorations = winAttr.AWT_DECOR_NONE;
+ winAttr.decorations = XWindowAttributesData.AWT_DECOR_NONE;
}
winAttr.functions = MWMConstants.MWM_FUNC_ALL;
winAttr.isResizable = true; // target.isResizable();
--- a/jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -133,8 +133,8 @@
XlibWrapper.larg6,
XlibWrapper.larg7);
- p.x = (int) XlibWrapper.unsafe.getInt(XlibWrapper.larg3);
- p.y = (int) XlibWrapper.unsafe.getInt(XlibWrapper.larg4);
+ p.x = XlibWrapper.unsafe.getInt(XlibWrapper.larg3);
+ p.y = XlibWrapper.unsafe.getInt(XlibWrapper.larg4);
} finally {
XToolkit.awtUnlock();
}
--- a/jdk/src/solaris/classes/sun/awt/X11/XIconWindow.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XIconWindow.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -301,8 +301,8 @@
}
long dst = XlibWrapper.XCreateImage(XToolkit.getDisplay(),
visInfo.get_visual(),
- (int)awtImage.get_Depth(),
- (int)XConstants.ZPixmap,
+ awtImage.get_Depth(),
+ XConstants.ZPixmap,
0,
bytes,
iconWidth,
@@ -483,7 +483,7 @@
params.add(BACKGROUND_PIXMAP, iconPixmap);
params.add(COLORMAP, adata.get_awt_cmap());
params.add(DEPTH, awtImage.get_Depth());
- params.add(VISUAL_CLASS, (int)XConstants.InputOutput);
+ params.add(VISUAL_CLASS, XConstants.InputOutput);
params.add(VISUAL, visInfo.get_visual());
params.add(VALUE_MASK, XConstants.CWBorderPixel | XConstants.CWColormap | XConstants.CWBackPixmap);
params.add(PARENT_WINDOW, XlibWrapper.RootWindow(XToolkit.getDisplay(), visInfo.get_screen()));
--- a/jdk/src/solaris/classes/sun/awt/X11/XInputMethod.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XInputMethod.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -138,7 +138,7 @@
}
long getCurrentParentWindow() {
- return (long)((XWindow)clientComponentWindow.getPeer()).getContentWindow();
+ return ((XWindow)clientComponentWindow.getPeer()).getContentWindow();
}
/*
--- a/jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -525,7 +525,7 @@
if (isEventDisabled(xev)) {
return;
}
- final Component currentSource = (Component)getEventSource();
+ final Component currentSource = getEventSource();
//This is the only difference from XWindow.handleKeyPress
//Ancestor's function can invoke handleF10KeyPress here
handleKeyPress(xkey);
--- a/jdk/src/solaris/classes/sun/awt/X11/XMenuWindow.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XMenuWindow.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -250,7 +250,7 @@
}
//Item rectangles
for (int i = 0; i < itemCnt; i++) {
- XMenuItemPeer item = (XMenuItemPeer)itemVector[i];
+ XMenuItemPeer item = itemVector[i];
XMenuItemPeer.TextMetrics metrics = itemMetrics[i];
Dimension dim = metrics.getTextDimension();
if (dim != null) {
--- a/jdk/src/solaris/classes/sun/awt/X11/XNETProtocol.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XNETProtocol.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -108,7 +108,7 @@
if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Requesting state on " + window + " for " + state);
}
- req.set_type((int)XConstants.ClientMessage);
+ req.set_type(XConstants.ClientMessage);
req.set_window(window.getWindow());
req.set_message_type(XA_NET_WM_STATE.getAtom());
req.set_format(32);
@@ -181,7 +181,7 @@
public void requestState(XWindow window, XAtom state, boolean isAdd) {
XClientMessageEvent req = new XClientMessageEvent();
try {
- req.set_type((int)XConstants.ClientMessage);
+ req.set_type(XConstants.ClientMessage);
req.set_window(window.getWindow());
req.set_message_type(XA_NET_WM_STATE.getAtom());
req.set_format(32);
--- a/jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -349,7 +349,7 @@
if (isEventDisabled(xev)) {
return;
}
- final Component currentSource = (Component)getEventSource();
+ final Component currentSource = getEventSource();
handleKeyPress(xkey);
}
--- a/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -342,7 +342,7 @@
@Override
void handleJavaInputMethodEvent(InputMethodEvent e) {
if (jtext != null)
- jtext.processInputMethodEventPublic((InputMethodEvent)e);
+ jtext.processInputMethodEventPublic(e);
}
/**
--- a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -655,8 +655,8 @@
XWindowAttributes pattr = new XWindowAttributes();
try {
XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(), XToolkit.getDefaultRootWindow(), pattr.pData);
- screenWidth = (int) pattr.get_width();
- screenHeight = (int) pattr.get_height();
+ screenWidth = pattr.get_width();
+ screenHeight = pattr.get_height();
} finally {
pattr.dispose();
}
@@ -1542,7 +1542,7 @@
*/
if (desktopProperties.get(SunToolkit.DESKTOPFONTHINTS) == null) {
if (XWM.isKDE2()) {
- Object hint = fcManager.getFontConfigAAHint();
+ Object hint = FontConfigManager.getFontConfigAAHint();
if (hint != null) {
/* set the fontconfig/KDE property so that
* getDesktopHints() below will see it
@@ -2074,7 +2074,7 @@
}
private static void setBackingStoreType() {
- String prop = (String)AccessController.doPrivileged(
+ String prop = AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("sun.awt.backingStore"));
if (prop == null) {
--- a/jdk/src/solaris/classes/sun/awt/X11/XWindow.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWindow.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -200,7 +200,7 @@
getColorModel(); // fix 4948833: this call forces the color map to be initialized
params.putIfNull(COLORMAP, gData.get_awt_cmap());
params.putIfNull(DEPTH, gData.get_awt_depth());
- params.putIfNull(VISUAL_CLASS, Integer.valueOf((int)XConstants.InputOutput));
+ params.putIfNull(VISUAL_CLASS, Integer.valueOf(XConstants.InputOutput));
params.putIfNull(VISUAL, visInfo.get_visual());
params.putIfNull(VALUE_MASK, XConstants.CWBorderPixel | XConstants.CWEventMask | XConstants.CWColormap);
Long parentWindow = (Long)params.get(PARENT_WINDOW);
@@ -350,7 +350,7 @@
Graphics getGraphics(SurfaceData surfData, Color afore, Color aback, Font afont) {
if (surfData == null) return null;
- Component target = (Component) this.target;
+ Component target = this.target;
/* Fix for bug 4746122. Color and Font shouldn't be null */
Color bgColor = aback;
@@ -548,7 +548,7 @@
int w = xe.get_width();
int h = xe.get_height();
- Component target = (Component)getEventSource();
+ Component target = getEventSource();
AWTAccessor.ComponentAccessor compAccessor = AWTAccessor.getComponentAccessor();
if (!compAccessor.getIgnoreRepaint(target)
@@ -740,7 +740,7 @@
modifiers = getModifiers(xbe.get_state(),button,0, type, wheel_mouse);
if (!wheel_mouse) {
- MouseEvent me = new MouseEvent((Component)getEventSource(),
+ MouseEvent me = new MouseEvent(getEventSource(),
type == XConstants.ButtonPress ? MouseEvent.MOUSE_PRESSED : MouseEvent.MOUSE_RELEASED,
jWhen,modifiers, x, y,
xbe.get_x_root(),
@@ -752,7 +752,7 @@
if ((type == XConstants.ButtonRelease) &&
((mouseButtonClickAllowed & XlibUtil.getButtonMask(lbutton)) != 0) ) // No up-button in the drag-state
{
- postEventToEventQueue(me = new MouseEvent((Component)getEventSource(),
+ postEventToEventQueue(me = new MouseEvent(getEventSource(),
MouseEvent.MOUSE_CLICKED,
jWhen,
modifiers,
@@ -766,7 +766,7 @@
}
else {
if (xev.get_type() == XConstants.ButtonPress) {
- MouseWheelEvent mwe = new MouseWheelEvent((Component)getEventSource(),MouseEvent.MOUSE_WHEEL, jWhen,
+ MouseWheelEvent mwe = new MouseWheelEvent(getEventSource(),MouseEvent.MOUSE_WHEEL, jWhen,
modifiers,
x, y,
xbe.get_x_root(),
@@ -837,7 +837,7 @@
int modifiers = getModifiers(xme.get_state(), 0, 0);
boolean popupTrigger = false;
- Component source = (Component)getEventSource();
+ Component source = getEventSource();
if (xme.get_window() != window) {
Point localXY = toLocal(xme.get_x_root(), xme.get_y_root());
@@ -1111,7 +1111,7 @@
unicodeKey = keysymToUnicode( keysym[0], ev.get_state() );
if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
keyEventLog.fine("--XWindow.java XIM did NOT process event, hex keysym:"+Long.toHexString(keysym[0])+"\n"+
- " unicode key:"+Integer.toHexString((int)unicodeKey));
+ " unicode key:"+Integer.toHexString(unicodeKey));
}
}
}else {
@@ -1121,7 +1121,7 @@
unicodeKey = keysymToUnicode( keysym[0], ev.get_state() );
if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
keyEventLog.fine("--XWindow.java XIM is absent; hex keysym:"+Long.toHexString(keysym[0])+"\n"+
- " unicode key:"+Integer.toHexString((int)unicodeKey));
+ " unicode key:"+Integer.toHexString(unicodeKey));
}
}
// Keysym should be converted to Unicode, if possible and necessary,
@@ -1466,7 +1466,7 @@
long jWhen = XToolkit.nowMillisUTC_offset(when);
int modifiers = getModifiers(state, 0, keyCode);
- KeyEvent ke = new KeyEvent((Component)getEventSource(), id, jWhen,
+ KeyEvent ke = new KeyEvent(getEventSource(), id, jWhen,
modifiers, keyCode, (char)keyChar, keyLocation);
if (event != 0) {
byte[] data = Native.toBytes(event, eventSize);
--- a/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, 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
@@ -291,7 +291,7 @@
public void updateIconImages() {
Window target = (Window)this.target;
- java.util.List<Image> iconImages = ((Window)target).getIconImages();
+ java.util.List<Image> iconImages = target.getIconImages();
XWindowPeer ownerPeer = getOwnerPeer();
winAttr.icons = new ArrayList<IconInfo>();
if (iconImages.size() != 0) {
@@ -463,8 +463,8 @@
public void updateMinimumSize() {
//This function only saves minimumSize value in XWindowPeer
//Setting WMSizeHints is implemented in XDecoratedPeer
- targetMinimumSize = (((Component)target).isMinimumSizeSet()) ?
- ((Component)target).getMinimumSize() : null;
+ targetMinimumSize = (target.isMinimumSizeSet()) ?
+ target.getMinimumSize() : null;
}
public Dimension getTargetMinimumSize() {
@@ -719,10 +719,10 @@
Runnable dc = new Runnable() {
public void run() {
AWTAccessor.getComponentAccessor().
- setGraphicsConfiguration((Component)target, gc);
+ setGraphicsConfiguration(target, gc);
}
};
- SunToolkit.executeOnEventHandlerThread((Component)target, dc);
+ SunToolkit.executeOnEventHandlerThread(target, dc);
}
/**
@@ -750,7 +750,7 @@
protected Point getNewLocation(XConfigureEvent xe, int leftInset, int topInset) {
// Bounds of the window
- Rectangle targetBounds = AWTAccessor.getComponentAccessor().getBounds((Component)target);
+ Rectangle targetBounds = AWTAccessor.getComponentAccessor().getBounds(target);
int runningWM = XWM.getWMID();
Point newLocation = targetBounds.getLocation();
@@ -1108,7 +1108,7 @@
XUnmapEvent unmap = new XUnmapEvent();
unmap.set_window(window);
unmap.set_event(XToolkit.getDefaultRootWindow());
- unmap.set_type((int)XConstants.UnmapNotify);
+ unmap.set_type(XConstants.UnmapNotify);
unmap.set_from_configure(false);
XlibWrapper.XSendEvent(XToolkit.getDisplay(), XToolkit.getDefaultRootWindow(),
false, XConstants.SubstructureNotifyMask | XConstants.SubstructureRedirectMask,
--- a/jdk/src/solaris/classes/sun/awt/X11FontManager.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11FontManager.java Tue Jan 28 11:22:25 2014 -0800
@@ -715,7 +715,7 @@
if (FontUtilities.isLinux) {
fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts");
}
- fontdirs = (String[])fontConfigDirs.toArray(new String[0]);
+ fontdirs = fontConfigDirs.toArray(new String[0]);
}
// Implements SunGraphicsEnvironment.createFontConfiguration.
--- a/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -232,7 +232,7 @@
return true;
}
- String isRemote = (String)java.security.AccessController.doPrivileged(
+ String isRemote = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("sun.java2d.remote"));
if (isRemote != null) {
return isRemote.equals("false");
--- a/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, 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
@@ -441,7 +441,7 @@
try {
fcVersion = Integer.parseInt(fcVersionStr);
if (fcVersion != 0 &&
- fcVersion != fcm.getFontConfigVersion()) {
+ fcVersion != FontConfigManager.getFontConfigVersion()) {
return;
}
} catch (Exception e) {
--- a/jdk/src/solaris/classes/sun/font/NativeFont.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/font/NativeFont.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -331,6 +331,7 @@
* ie to request 12 pt Times New Roman italic font, use an XLFD like :
* -monotype-times new roman-regular-i---*-120-72-72-p-*-iso8859-1
*/
+ @SuppressWarnings("cast")
byte[] getPlatformNameBytes(int ptSize) {
int[] hPos = new int[14];
int hyphenCnt = 1;
--- a/jdk/src/solaris/classes/sun/font/X11TextRenderer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/font/X11TextRenderer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -57,11 +57,11 @@
super.drawGlyphVector(sg2d, g, x, y);
return;
case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
- sg2d.surfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
+ SurfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
return;
case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
- sg2d.surfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
+ SurfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
return;
default:
}
--- a/jdk/src/solaris/classes/sun/font/XRGlyphCacheEntry.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/font/XRGlyphCacheEntry.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -48,8 +48,8 @@
this.glyphInfoPtr = glyphInfoPtr;
/* TODO: Does it make sence to cache results? */
- xOff = (int) Math.round(getXAdvance());
- yOff = (int) Math.round(getYAdvance());
+ xOff = Math.round(getXAdvance());
+ yOff = Math.round(getYAdvance());
}
public int getXOff() {
--- a/jdk/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -214,13 +214,13 @@
if (!isX11SurfaceDataInitialized() &&
!GraphicsEnvironment.isHeadless()) {
// If a screen magnifier is present, don't attempt to use DGA
- String magPresent = (String) java.security.AccessController.doPrivileged
+ String magPresent = java.security.AccessController.doPrivileged
(new sun.security.action.GetPropertyAction("javax.accessibility.screen_magnifier_present"));
boolean tryDGA = magPresent == null || !"true".equals(magPresent);
initIDs(XORComposite.class, tryDGA);
- String xtextpipe = (String) java.security.AccessController.doPrivileged
+ String xtextpipe = java.security.AccessController.doPrivileged
(new sun.security.action.GetPropertyAction("sun.java2d.xtextpipe"));
if (xtextpipe == null || "true".startsWith(xtextpipe)) {
if ("true".equals(xtextpipe)) {
@@ -264,8 +264,7 @@
if (GraphicsEnvironment.isHeadless()) {
accelerationEnabled = Boolean.FALSE;
} else {
- String prop =
- (String) java.security.AccessController.doPrivileged(
+ String prop = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("sun.java2d.pmoffscreen"));
if (prop != null) {
// true iff prop==true, false otherwise
--- a/jdk/src/solaris/classes/sun/java2d/xr/XRDrawLine.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRDrawLine.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,7 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
-
-
+ * Copyright (c) 2013, 2014, 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
@@ -249,7 +247,7 @@
if (dx < 0) {
xsteps = -xsteps;
}
- x1 = ucX1 + (int) xsteps;
+ x1 = ucX1 + xsteps;
} else if ((outcode1 & (OUTCODE_LEFT | OUTCODE_RIGHT)) != 0) {
if ((outcode1 & OUTCODE_LEFT) != 0) {
x1 = cxmin;
@@ -268,7 +266,7 @@
if (dy < 0) {
ysteps = -ysteps;
}
- y1 = ucY1 + (int) ysteps;
+ y1 = ucY1 + ysteps;
}
outcode1 = outcode(x1, y1, cxmin, cymin, cxmax, cymax);
} else {
@@ -292,7 +290,7 @@
if (dx > 0) {
xsteps = -xsteps;
}
- x2 = ucX2 + (int) xsteps;
+ x2 = ucX2 + xsteps;
} else if ((outcode2 & (OUTCODE_LEFT | OUTCODE_RIGHT)) != 0) {
if ((outcode2 & OUTCODE_LEFT) != 0) {
x2 = cxmin;
@@ -313,7 +311,7 @@
if (dy > 0) {
ysteps = -ysteps;
}
- y2 = ucY2 + (int) ysteps;
+ y2 = ucY2 + ysteps;
}
outcode2 = outcode(x2, y2, cxmin, cymin, cxmax, cymax);
}
--- a/jdk/src/solaris/classes/sun/java2d/xr/XRPMBlitLoops.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRPMBlitLoops.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -178,6 +178,7 @@
super(srcType, CompositeType.AnyAlpha, dstType);
}
+ @SuppressWarnings("cast")
public void Scale(SurfaceData src, SurfaceData dst, Composite comp, Region clip, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1,
double dx2, double dy2) {
try {
--- a/jdk/src/solaris/classes/sun/java2d/xr/XRPaints.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRPaints.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -231,7 +231,7 @@
Rectangle2D anchor = paint.getAnchorRect();
XRSurfaceData dstData = (XRSurfaceData) sg2d.surfaceData;
- XRSurfaceData srcData = (XRSurfaceData) getAccSrcSurface(dstData, bi);
+ XRSurfaceData srcData = getAccSrcSurface(dstData, bi);
AffineTransform at = new AffineTransform();
at.translate(anchor.getX(), anchor.getY());
@@ -259,7 +259,7 @@
public int colorToIntArgbPixel(Color c) {
int rgb = c.getRGB();
- int a = (int) Math.round(xrCompMan.getExtraAlpha() * (rgb >>> 24));
+ int a = Math.round(xrCompMan.getExtraAlpha() * (rgb >>> 24));
return ((a << 24) | (rgb & 0x00FFFFFF));
}
}
--- a/jdk/src/solaris/classes/sun/management/OperatingSystemImpl.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/management/OperatingSystemImpl.java Tue Jan 28 11:22:25 2014 -0800
@@ -39,19 +39,61 @@
super(vm);
}
- public native long getCommittedVirtualMemorySize();
- public native long getTotalSwapSpaceSize();
- public native long getFreeSwapSpaceSize();
- public native long getProcessCpuTime();
- public native long getFreePhysicalMemorySize();
- public native long getTotalPhysicalMemorySize();
- public native long getOpenFileDescriptorCount();
- public native long getMaxFileDescriptorCount();
- public native double getSystemCpuLoad();
- public native double getProcessCpuLoad();
+ public long getCommittedVirtualMemorySize() {
+ return getCommittedVirtualMemorySize0();
+ }
+
+ public long getTotalSwapSpaceSize() {
+ return getTotalSwapSpaceSize0();
+ }
+
+ public long getFreeSwapSpaceSize() {
+ return getFreeSwapSpaceSize0();
+ }
+
+ public long getProcessCpuTime() {
+ return getProcessCpuTime0();
+ }
+
+ public long getFreePhysicalMemorySize() {
+ return getFreePhysicalMemorySize0();
+ }
+
+ public long getTotalPhysicalMemorySize() {
+ return getTotalPhysicalMemorySize0();
+ }
+
+ public long getOpenFileDescriptorCount() {
+ return getOpenFileDescriptorCount0();
+ }
+
+ public long getMaxFileDescriptorCount() {
+ return getMaxFileDescriptorCount0();
+ }
+
+ public double getSystemCpuLoad() {
+ return getSystemCpuLoad0();
+ }
+
+ public double getProcessCpuLoad() {
+ return getProcessCpuLoad0();
+ }
+
+ /* native methods */
+ private native long getCommittedVirtualMemorySize0();
+ private native long getFreePhysicalMemorySize0();
+ private native long getFreeSwapSpaceSize0();
+ private native long getMaxFileDescriptorCount0();
+ private native long getOpenFileDescriptorCount0();
+ private native long getProcessCpuTime0();
+ private native double getProcessCpuLoad0();
+ private native double getSystemCpuLoad0();
+ private native long getTotalPhysicalMemorySize0();
+ private native long getTotalSwapSpaceSize0();
static {
- initialize();
+ initialize0();
}
- private static native void initialize();
+
+ private static native void initialize0();
}
--- a/jdk/src/solaris/classes/sun/print/AttributeClass.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/print/AttributeClass.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -274,7 +274,7 @@
}
private int unsignedByteToInt(byte b) {
- return (int) (b & 0xff);
+ return (b & 0xff);
}
private int convertToInt(byte[] buf) {
--- a/jdk/src/solaris/classes/sun/print/CUPSPrinter.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/print/CUPSPrinter.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -298,7 +298,7 @@
printerInfo[0] = UnixPrintServiceLookup.
getDefaultPrinterNameSysV();
printerInfo[1] = null;
- return (String[])printerInfo.clone();
+ return printerInfo.clone();
} else {
return null;
}
@@ -318,7 +318,7 @@
}
os.close();
urlConnection.disconnect();
- return (String [])printerInfo.clone();
+ return printerInfo.clone();
}
}
os.close();
--- a/jdk/src/solaris/classes/sun/print/IPPPrintService.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/print/IPPPrintService.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -74,8 +74,7 @@
private static final String FORCE_PIPE_PROP = "sun.print.ippdebug";
static {
- String debugStr =
- (String)java.security.AccessController.doPrivileged(
+ String debugStr = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction(FORCE_PIPE_PROP));
debugPrint = "true".equalsIgnoreCase(debugStr);
@@ -424,7 +423,7 @@
}
// use IPP to get all media,
- Media[] allMedia = (Media[])getSupportedMedia();
+ Media[] allMedia = getSupportedMedia();
ArrayList sizeList = new ArrayList();
ArrayList trayList = new ArrayList();
for (int i=0; i<allMedia.length; i++) {
@@ -934,8 +933,7 @@
return null;
}
for (int i=0; i< customMediaSizeNames.length; i++) {
- CustomMediaSizeName custom =
- (CustomMediaSizeName)customMediaSizeNames[i];
+ CustomMediaSizeName custom = customMediaSizeNames[i];
MediaSizeName msn = custom.getStandardMedia();
if (media.equals(msn)) {
return customMediaSizeNames[i];
--- a/jdk/src/solaris/classes/sun/print/UnixPrintJob.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/print/UnixPrintJob.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -315,8 +315,7 @@
}
}
- if ((PrinterIsAcceptingJobs)(service.getAttribute(
- PrinterIsAcceptingJobs.class)) ==
+ if ((service.getAttribute(PrinterIsAcceptingJobs.class)) ==
PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS) {
throw new PrintException("Printer is not accepting job.");
}
--- a/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -200,7 +200,7 @@
if (printServices == null) {
return new PrintService[0];
} else {
- return (PrintService[])printServices.clone();
+ return printServices.clone();
}
}
@@ -213,13 +213,13 @@
// information when queried using IPP. Workaround is to remove it.
// Even CUPS ignores these entries as shown in lpstat or using
// their web configuration.
- PrinterURI uri = (PrinterURI)ps.getAttribute(PrinterURI.class);
+ PrinterURI uri = ps.getAttribute(PrinterURI.class);
if (uri.getURI().getHost().equals("localhost")) {
IPPPrintService.debug_println(debugPrefix+"duplicate PrintService, ignoring the new local printer: "+ps);
return index; // Do not add this.
}
PrintService oldPS = (PrintService)(printerList.get(index));
- uri = (PrinterURI)oldPS.getAttribute(PrinterURI.class);
+ uri = oldPS.getAttribute(PrinterURI.class);
if (uri.getURI().getHost().equals("localhost")) {
IPPPrintService.debug_println(debugPrefix+"duplicate PrintService, removing existing local printer: "+oldPS);
printerList.remove(oldPS);
@@ -410,8 +410,7 @@
/* check if all printers are already available */
if (printServices != null) {
for (PrintService printService : printServices) {
- PrinterName printerName =
- (PrinterName)printService.getAttribute(PrinterName.class);
+ PrinterName printerName = printService.getAttribute(PrinterName.class);
if (printerName.getValue().equals(name)) {
return printService;
}
@@ -464,8 +463,7 @@
* initialised.
*/
- PrinterName defName =
- (PrinterName)defService.getAttribute(PrinterName.class);
+ PrinterName defName = defService.getAttribute(PrinterName.class);
if (defName != null && name.equals(defName)) {
if (matchesAttributes(defService, serviceSet)) {
--- a/jdk/src/solaris/native/common/jni_util_md.c Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/native/common/jni_util_md.c Tue Jan 28 11:22:25 2014 -0800
@@ -23,6 +23,8 @@
* questions.
*/
+#include <string.h>
+
#include "jni.h"
#include "jni_util.h"
#include "dlfcn.h"
@@ -40,7 +42,11 @@
if (procHandle != NULL) {
return procHandle;
}
+#ifdef __APPLE__
+ procHandle = (void*)dlopen(NULL, RTLD_FIRST);
+#else
procHandle = (void*)dlopen(NULL, RTLD_LAZY);
+#endif
return procHandle;
}
--- a/jdk/src/solaris/native/sun/management/LinuxOperatingSystem.c Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/native/sun/management/LinuxOperatingSystem.c Tue Jan 28 11:22:25 2014 -0800
@@ -310,7 +310,7 @@
}
JNIEXPORT jdouble JNICALL
-Java_sun_management_OperatingSystemImpl_getSystemCpuLoad
+Java_sun_management_OperatingSystemImpl_getSystemCpuLoad0
(JNIEnv *env, jobject dummy)
{
if(perfInit() == 0) {
@@ -321,7 +321,7 @@
}
JNIEXPORT jdouble JNICALL
-Java_sun_management_OperatingSystemImpl_getProcessCpuLoad
+Java_sun_management_OperatingSystemImpl_getProcessCpuLoad0
(JNIEnv *env, jobject dummy)
{
if(perfInit() == 0) {
--- a/jdk/src/solaris/native/sun/management/MacosxOperatingSystem.c Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/native/sun/management/MacosxOperatingSystem.c Tue Jan 28 11:22:25 2014 -0800
@@ -31,7 +31,7 @@
JNIEXPORT jdouble JNICALL
-Java_sun_management_OperatingSystemImpl_getSystemCpuLoad
+Java_sun_management_OperatingSystemImpl_getSystemCpuLoad0
(JNIEnv *env, jobject dummy)
{
// This code is influenced by the darwin top source
@@ -83,7 +83,7 @@
JNIEXPORT jdouble JNICALL
-Java_sun_management_OperatingSystemImpl_getProcessCpuLoad
+Java_sun_management_OperatingSystemImpl_getProcessCpuLoad0
(JNIEnv *env, jobject dummy)
{
// This code is influenced by the darwin top source
--- a/jdk/src/solaris/native/sun/management/OperatingSystemImpl.c Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/native/sun/management/OperatingSystemImpl.c Tue Jan 28 11:22:25 2014 -0800
@@ -175,14 +175,14 @@
}
JNIEXPORT void JNICALL
-Java_sun_management_OperatingSystemImpl_initialize
+Java_sun_management_OperatingSystemImpl_initialize0
(JNIEnv *env, jclass cls)
{
page_size = sysconf(_SC_PAGESIZE);
}
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getCommittedVirtualMemorySize
+Java_sun_management_OperatingSystemImpl_getCommittedVirtualMemorySize0
(JNIEnv *env, jobject mbean)
{
#ifdef __solaris__
@@ -249,21 +249,21 @@
}
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getTotalSwapSpaceSize
+Java_sun_management_OperatingSystemImpl_getTotalSwapSpaceSize0
(JNIEnv *env, jobject mbean)
{
return get_total_or_available_swap_space_size(env, JNI_FALSE);
}
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getFreeSwapSpaceSize
+Java_sun_management_OperatingSystemImpl_getFreeSwapSpaceSize0
(JNIEnv *env, jobject mbean)
{
return get_total_or_available_swap_space_size(env, JNI_TRUE);
}
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getProcessCpuTime
+Java_sun_management_OperatingSystemImpl_getProcessCpuTime0
(JNIEnv *env, jobject mbean)
{
#ifdef __APPLE__
@@ -305,7 +305,7 @@
}
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getFreePhysicalMemorySize
+Java_sun_management_OperatingSystemImpl_getFreePhysicalMemorySize0
(JNIEnv *env, jobject mbean)
{
#ifdef __APPLE__
@@ -333,7 +333,7 @@
}
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getTotalPhysicalMemorySize
+Java_sun_management_OperatingSystemImpl_getTotalPhysicalMemorySize0
(JNIEnv *env, jobject mbean)
{
#ifdef _ALLBSD_SOURCE
@@ -358,7 +358,7 @@
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getOpenFileDescriptorCount
+Java_sun_management_OperatingSystemImpl_getOpenFileDescriptorCount0
(JNIEnv *env, jobject mbean)
{
#ifdef __APPLE__
@@ -438,7 +438,7 @@
}
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getMaxFileDescriptorCount
+Java_sun_management_OperatingSystemImpl_getMaxFileDescriptorCount0
(JNIEnv *env, jobject mbean)
{
struct rlimit rlp;
--- a/jdk/src/solaris/native/sun/management/SolarisOperatingSystem.c Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/native/sun/management/SolarisOperatingSystem.c Tue Jan 28 11:22:25 2014 -0800
@@ -226,14 +226,14 @@
}
JNIEXPORT jdouble JNICALL
-Java_sun_management_OperatingSystemImpl_getSystemCpuLoad
+Java_sun_management_OperatingSystemImpl_getSystemCpuLoad0
(JNIEnv *env, jobject dummy)
{
return get_cpu_load(-1);
}
JNIEXPORT jdouble JNICALL
-Java_sun_management_OperatingSystemImpl_getProcessCpuLoad
+Java_sun_management_OperatingSystemImpl_getProcessCpuLoad0
(JNIEnv *env, jobject dummy)
{
return get_process_load();
--- a/jdk/src/solaris/native/sun/nio/ch/NativeThread.c Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/native/sun/nio/ch/NativeThread.c Tue Jan 28 11:22:25 2014 -0800
@@ -32,27 +32,32 @@
#include "sun_nio_ch_NativeThread.h"
#include "nio_util.h"
-
#ifdef __linux__
-#include <pthread.h>
-#include <sys/signal.h>
-
-/* Also defined in src/solaris/native/java/net/linux_close.c */
-#define INTERRUPT_SIGNAL (__SIGRTMAX - 2)
+ #include <pthread.h>
+ #include <sys/signal.h>
+ /* Also defined in net/linux_close.c */
+ #define INTERRUPT_SIGNAL (__SIGRTMAX - 2)
+#elif __solaris__
+ #include <thread.h>
+ #include <signal.h>
+ #define INTERRUPT_SIGNAL (SIGRTMAX - 2)
+#elif _ALLBSD_SOURCE
+ #include <pthread.h>
+ #include <signal.h>
+ /* Also defined in net/bsd_close.c */
+ #define INTERRUPT_SIGNAL SIGIO
+#else
+ #error "missing platform-specific definition here"
+#endif
static void
nullHandler(int sig)
{
}
-#endif
-
-
JNIEXPORT void JNICALL
Java_sun_nio_ch_NativeThread_init(JNIEnv *env, jclass cl)
{
-#ifdef __linux__
-
/* Install the null handler for INTERRUPT_SIGNAL. This might overwrite the
* handler previously installed by java/net/linux_close.c, but that's okay
* since neither handler actually does anything. We install our own
@@ -67,25 +72,27 @@
sigemptyset(&sa.sa_mask);
if (sigaction(INTERRUPT_SIGNAL, &sa, &osa) < 0)
JNU_ThrowIOExceptionWithLastError(env, "sigaction");
-
-#endif
}
JNIEXPORT jlong JNICALL
Java_sun_nio_ch_NativeThread_current(JNIEnv *env, jclass cl)
{
-#ifdef __linux__
- return (long)pthread_self();
+#ifdef __solaris__
+ return (jlong)thr_self();
#else
- return -1;
+ return (jlong)pthread_self();
#endif
}
JNIEXPORT void JNICALL
Java_sun_nio_ch_NativeThread_signal(JNIEnv *env, jclass cl, jlong thread)
{
-#ifdef __linux__
- if (pthread_kill((pthread_t)thread, INTERRUPT_SIGNAL))
+ int ret;
+#ifdef __solaris__
+ ret = thr_kill((thread_t)thread, INTERRUPT_SIGNAL);
+#else
+ ret = pthread_kill((pthread_t)thread, INTERRUPT_SIGNAL);
+#endif
+ if (ret != 0)
JNU_ThrowIOExceptionWithLastError(env, "Thread signal failed");
-#endif
}
--- a/jdk/src/solaris/native/sun/nio/ch/Net.c Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/solaris/native/sun/nio/ch/Net.c Tue Jan 28 11:22:25 2014 -0800
@@ -47,57 +47,20 @@
*/
#ifdef __linux__
#ifndef IP_MULTICAST_ALL
- #define IP_MULTICAST_ALL 49
+ #define IP_MULTICAST_ALL 49
#endif
#endif
-#ifdef _ALLBSD_SOURCE
-
-#ifndef IP_BLOCK_SOURCE
-
-#define IP_ADD_SOURCE_MEMBERSHIP 70 /* join a source-specific group */
-#define IP_DROP_SOURCE_MEMBERSHIP 71 /* drop a single source */
-#define IP_BLOCK_SOURCE 72 /* block a source */
-#define IP_UNBLOCK_SOURCE 73 /* unblock a source */
-
-#endif /* IP_BLOCK_SOURCE */
-
-#ifndef MCAST_BLOCK_SOURCE
-
-#define MCAST_JOIN_SOURCE_GROUP 82 /* join a source-specific group */
-#define MCAST_LEAVE_SOURCE_GROUP 83 /* leave a single source */
-#define MCAST_BLOCK_SOURCE 84 /* block a source */
-#define MCAST_UNBLOCK_SOURCE 85 /* unblock a source */
-
-#endif /* MCAST_BLOCK_SOURCE */
-
-#ifndef IPV6_ADD_MEMBERSHIP
-
-#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
-#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
-
-#endif /* IPV6_ADD_MEMBERSHIP */
-
-struct my_ip_mreq_source {
- struct in_addr imr_multiaddr;
- struct in_addr imr_interface;
- struct in_addr imr_sourceaddr;
-};
-
-struct my_group_source_req {
- uint32_t gsr_interface; /* interface index */
- struct sockaddr_storage gsr_group; /* group address */
- struct sockaddr_storage gsr_source; /* source address */
-};
-
-#else /* _ALLBSD_SOURCE */
-
-#define my_ip_mreq_source ip_mreq_source
-#define my_group_source_req group_source_req
-
+/**
+ * IPV6_ADD_MEMBERSHIP/IPV6_DROP_MEMBERSHIP may not be defined on OSX
+ */
+#ifdef __APPLE__
+ #ifndef IPV6_ADD_MEMBERSHIP
+ #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
+ #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
+ #endif
#endif
-
#define COPY_INET6_ADDRESS(env, source, target) \
(*env)->GetByteArrayRegion(env, source, 0, 16, target)
@@ -107,7 +70,7 @@
*/
#ifdef AF_INET6
static void initGroupSourceReq(JNIEnv* env, jbyteArray group, jint index,
- jbyteArray source, struct my_group_source_req* req)
+ jbyteArray source, struct group_source_req* req)
{
struct sockaddr_in6* sin6;
@@ -143,7 +106,7 @@
JNIEXPORT jboolean JNICALL
Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0(JNIEnv* env, jclass cl)
{
-#ifdef MACOSX
+#ifdef __APPLE__
/* for now IPv6 sockets cannot join IPv4 multicast groups */
return JNI_FALSE;
#else
@@ -460,7 +423,7 @@
jint group, jint interf, jint source)
{
struct ip_mreq mreq;
- struct my_ip_mreq_source mreq_source;
+ struct ip_mreq_source mreq_source;
int opt, n, optlen;
void* optval;
@@ -471,17 +434,12 @@
optval = (void*)&mreq;
optlen = sizeof(mreq);
} else {
-#ifdef MACOSX
- /* no IPv4 include-mode filtering for now */
- return IOS_UNAVAILABLE;
-#else
mreq_source.imr_multiaddr.s_addr = htonl(group);
mreq_source.imr_sourceaddr.s_addr = htonl(source);
mreq_source.imr_interface.s_addr = htonl(interf);
opt = (join) ? IP_ADD_SOURCE_MEMBERSHIP : IP_DROP_SOURCE_MEMBERSHIP;
optval = (void*)&mreq_source;
optlen = sizeof(mreq_source);
-#endif
}
n = setsockopt(fdval(env,fdo), IPPROTO_IP, opt, optval, optlen);
@@ -497,11 +455,11 @@
Java_sun_nio_ch_Net_blockOrUnblock4(JNIEnv *env, jobject this, jboolean block, jobject fdo,
jint group, jint interf, jint source)
{
-#ifdef MACOSX
+#ifdef __APPLE__
/* no IPv4 exclude-mode filtering for now */
return IOS_UNAVAILABLE;
#else
- struct my_ip_mreq_source mreq_source;
+ struct ip_mreq_source mreq_source;
int n;
int opt = (block) ? IP_BLOCK_SOURCE : IP_UNBLOCK_SOURCE;
@@ -526,7 +484,7 @@
{
#ifdef AF_INET6
struct ipv6_mreq mreq6;
- struct my_group_source_req req;
+ struct group_source_req req;
int opt, n, optlen;
void* optval;
@@ -537,7 +495,7 @@
optval = (void*)&mreq6;
optlen = sizeof(mreq6);
} else {
-#ifdef MACOSX
+#ifdef __APPLE__
/* no IPv6 include-mode filtering for now */
return IOS_UNAVAILABLE;
#else
@@ -566,11 +524,11 @@
jbyteArray group, jint index, jbyteArray source)
{
#ifdef AF_INET6
- #ifdef MACOSX
+ #ifdef __APPLE__
/* no IPv6 exclude-mode filtering for now */
return IOS_UNAVAILABLE;
#else
- struct my_group_source_req req;
+ struct group_source_req req;
int n;
int opt = (block) ? MCAST_BLOCK_SOURCE : MCAST_UNBLOCK_SOURCE;
--- a/jdk/src/windows/classes/sun/awt/Win32GraphicsDevice.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/awt/Win32GraphicsDevice.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -88,7 +88,7 @@
// is run as an NT service. To prevent the loading of ddraw.dll
// completely, sun.awt.nopixfmt should be set as well. Apps which use
// OpenGL w/ Java probably don't want to set this.
- String nopixfmt = (String)java.security.AccessController.doPrivileged(
+ String nopixfmt = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("sun.awt.nopixfmt"));
pfDisabled = (nopixfmt != null);
initIDs();
--- a/jdk/src/windows/classes/sun/awt/windows/WPathGraphics.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/awt/windows/WPathGraphics.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -94,7 +94,7 @@
private static boolean preferGDITextLayout = false;
static {
String textLayoutStr =
- (String)java.security.AccessController.doPrivileged(
+ java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction(
"sun.java2d.print.enableGDITextLayout"));
--- a/jdk/src/windows/classes/sun/io/Win32ErrorMode.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/io/Win32ErrorMode.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -67,7 +67,7 @@
*/
public static void initialize() {
if (!sun.misc.VM.isBooted()) {
- String s = (String) System.getProperty("sun.io.allowCriticalErrorMessageBox");
+ String s = System.getProperty("sun.io.allowCriticalErrorMessageBox");
if (s == null || s.equals(Boolean.FALSE.toString())) {
long mode = setErrorMode(0);
mode |= SEM_FAILCRITICALERRORS;
--- a/jdk/src/windows/classes/sun/java2d/d3d/D3DBufImgOps.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/java2d/d3d/D3DBufImgOps.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -78,12 +78,12 @@
}
SurfaceData srcData =
- dstData.getSourceSurfaceData(img, sg.TRANSFORM_ISIDENT,
+ dstData.getSourceSurfaceData(img, SunGraphics2D.TRANSFORM_ISIDENT,
CompositeType.SrcOver, null);
if (!(srcData instanceof D3DSurfaceData)) {
// REMIND: this hack tries to ensure that we have a cached texture
srcData =
- dstData.getSourceSurfaceData(img, sg.TRANSFORM_ISIDENT,
+ dstData.getSourceSurfaceData(img, SunGraphics2D.TRANSFORM_ISIDENT,
CompositeType.SrcOver, null);
if (!(srcData instanceof D3DSurfaceData)) {
return false;
--- a/jdk/src/windows/classes/sun/java2d/d3d/D3DDrawImage.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/java2d/d3d/D3DDrawImage.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -53,7 +53,7 @@
SurfaceData dstData = sg.surfaceData;
SurfaceData srcData =
dstData.getSourceSurfaceData(img,
- sg.TRANSFORM_GENERIC,
+ SunGraphics2D.TRANSFORM_GENERIC,
sg.imageComp,
bgColor);
--- a/jdk/src/windows/classes/sun/java2d/d3d/D3DGraphicsDevice.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/java2d/d3d/D3DGraphicsDevice.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -235,10 +235,12 @@
*/
private static class D3DFSWindowAdapter extends WindowAdapter {
@Override
+ @SuppressWarnings("static")
public void windowDeactivated(WindowEvent e) {
D3DRenderQueue.getInstance().restoreDevices();
}
@Override
+ @SuppressWarnings("static")
public void windowActivated(WindowEvent e) {
D3DRenderQueue.getInstance().restoreDevices();
}
--- a/jdk/src/windows/classes/sun/java2d/d3d/D3DPaints.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/java2d/d3d/D3DPaints.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -132,14 +132,14 @@
}
SurfaceData srcData =
- dstData.getSourceSurfaceData(bi, sg2d.TRANSFORM_ISIDENT,
+ dstData.getSourceSurfaceData(bi, SunGraphics2D.TRANSFORM_ISIDENT,
CompositeType.SrcOver, null);
if (!(srcData instanceof D3DSurfaceData)) {
// REMIND: this is a hack that attempts to cache the system
// memory image from the TexturePaint instance into a
// D3D texture...
srcData =
- dstData.getSourceSurfaceData(bi, sg2d.TRANSFORM_ISIDENT,
+ dstData.getSourceSurfaceData(bi, SunGraphics2D.TRANSFORM_ISIDENT,
CompositeType.SrcOver, null);
if (!(srcData instanceof D3DSurfaceData)) {
return false;
--- a/jdk/src/windows/classes/sun/java2d/d3d/D3DSurfaceData.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/java2d/d3d/D3DSurfaceData.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -542,7 +542,7 @@
// REMIND: the D3D pipeline doesn't support XOR!, more
// fixes will be needed below. For now we disable D3D rendering
// for the surface which had any XOR rendering done to.
- if (sg2d.compositeState >= sg2d.COMP_XOR) {
+ if (sg2d.compositeState >= SunGraphics2D.COMP_XOR) {
super.validatePipe(sg2d);
sg2d.imagepipe = d3dImagePipe;
disableAccelerationForSurface();
@@ -557,18 +557,18 @@
// by the CompositeType.SrcNoEa (any color) test below.)
if (/* CompositeType.SrcNoEa (any color) */
- (sg2d.compositeState <= sg2d.COMP_ISCOPY &&
- sg2d.paintState <= sg2d.PAINT_ALPHACOLOR) ||
+ (sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY &&
+ sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR) ||
/* CompositeType.SrcOver (any color) */
- (sg2d.compositeState == sg2d.COMP_ALPHA &&
- sg2d.paintState <= sg2d.PAINT_ALPHACOLOR &&
+ (sg2d.compositeState == SunGraphics2D.COMP_ALPHA &&
+ sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR &&
(((AlphaComposite)sg2d.composite).getRule() ==
AlphaComposite.SRC_OVER)) ||
/* CompositeType.Xor (any color) */
- (sg2d.compositeState == sg2d.COMP_XOR &&
- sg2d.paintState <= sg2d.PAINT_ALPHACOLOR))
+ (sg2d.compositeState == SunGraphics2D.COMP_XOR &&
+ sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR))
{
textpipe = d3dTextPipe;
} else {
@@ -583,12 +583,12 @@
D3DRenderer nonTxPipe = null;
if (sg2d.antialiasHint != SunHints.INTVAL_ANTIALIAS_ON) {
- if (sg2d.paintState <= sg2d.PAINT_ALPHACOLOR) {
- if (sg2d.compositeState <= sg2d.COMP_XOR) {
+ if (sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR) {
+ if (sg2d.compositeState <= SunGraphics2D.COMP_XOR) {
txPipe = d3dTxRenderPipe;
nonTxPipe = d3dRenderPipe;
}
- } else if (sg2d.compositeState <= sg2d.COMP_ALPHA) {
+ } else if (sg2d.compositeState <= SunGraphics2D.COMP_ALPHA) {
if (D3DPaints.isValid(sg2d)) {
txPipe = d3dTxRenderPipe;
nonTxPipe = d3dRenderPipe;
@@ -596,7 +596,7 @@
// custom paints handled by super.validatePipe() below
}
} else {
- if (sg2d.paintState <= sg2d.PAINT_ALPHACOLOR) {
+ if (sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR) {
if (graphicsDevice.isCapPresent(CAPS_AA_SHADER) &&
(sg2d.imageComp == CompositeType.SrcOverNoEa ||
sg2d.imageComp == CompositeType.SrcOver))
@@ -613,7 +613,7 @@
sg2d.drawpipe = aaConverter;
sg2d.fillpipe = aaConverter;
sg2d.shapepipe = aaConverter;
- } else if (sg2d.compositeState == sg2d.COMP_XOR) {
+ } else if (sg2d.compositeState == SunGraphics2D.COMP_XOR) {
// install the solid pipes when AA and XOR are both enabled
txPipe = d3dTxRenderPipe;
nonTxPipe = d3dRenderPipe;
@@ -623,10 +623,10 @@
}
if (txPipe != null) {
- if (sg2d.transformState >= sg2d.TRANSFORM_TRANSLATESCALE) {
+ if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
sg2d.drawpipe = txPipe;
sg2d.fillpipe = txPipe;
- } else if (sg2d.strokeState != sg2d.STROKE_THIN) {
+ } else if (sg2d.strokeState != SunGraphics2D.STROKE_THIN) {
sg2d.drawpipe = txPipe;
sg2d.fillpipe = nonTxPipe;
} else {
@@ -653,7 +653,7 @@
@Override
protected MaskFill getMaskFill(SunGraphics2D sg2d) {
- if (sg2d.paintState > sg2d.PAINT_ALPHACOLOR) {
+ if (sg2d.paintState > SunGraphics2D.PAINT_ALPHACOLOR) {
/*
* We can only accelerate non-Color MaskFill operations if
* all of the following conditions hold true:
@@ -678,8 +678,8 @@
public boolean copyArea(SunGraphics2D sg2d,
int x, int y, int w, int h, int dx, int dy)
{
- if (sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE &&
- sg2d.compositeState < sg2d.COMP_XOR)
+ if (sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE &&
+ sg2d.compositeState < SunGraphics2D.COMP_XOR)
{
x += sg2d.transX;
y += sg2d.transY;
@@ -738,7 +738,7 @@
D3DRenderQueue rq = D3DRenderQueue.getInstance();
// swapBuffers can be called from the toolkit thread by swing, we
// should detect this and prevent the deadlocks
- if (rq.isRenderQueueThread()) {
+ if (D3DRenderQueue.isRenderQueueThread()) {
if (!rq.tryLock()) {
// if we could not obtain the lock, repaint the area
// that was supposed to be swapped, and no-op this swap
--- a/jdk/src/windows/classes/sun/java2d/d3d/D3DSurfaceDataProxy.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/java2d/d3d/D3DSurfaceDataProxy.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, 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
@@ -72,7 +72,7 @@
try {
cachedData = d3dgc.createManagedSurface(w, h, transparency);
} catch (InvalidPipeException e) {
- if (!d3dgc.getD3DDevice().isD3DAvailable()) {
+ if (!D3DGraphicsDevice.isD3DAvailable()) {
invalidate();
flush();
return null;
--- a/jdk/src/windows/classes/sun/java2d/windows/GDIRenderer.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/java2d/windows/GDIRenderer.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -264,7 +264,7 @@
Path2D.Float p2df;
int transX;
int transY;
- if (sg2d.transformState <= sg2d.TRANSFORM_INT_TRANSLATE) {
+ if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) {
if (s instanceof Path2D.Float) {
p2df = (Path2D.Float)s;
} else {
@@ -308,9 +308,9 @@
}
public void draw(SunGraphics2D sg2d, Shape s) {
- if (sg2d.strokeState == sg2d.STROKE_THIN) {
+ if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) {
doShape(sg2d, s, false);
- } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) {
+ } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) {
ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s);
try {
doFillSpans(sg2d, si);
--- a/jdk/src/windows/classes/sun/java2d/windows/GDIWindowSurfaceData.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/java2d/windows/GDIWindowSurfaceData.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -153,11 +153,11 @@
public void validatePipe(SunGraphics2D sg2d) {
if (sg2d.antialiasHint != SunHints.INTVAL_ANTIALIAS_ON &&
- sg2d.paintState <= sg2d.PAINT_ALPHACOLOR &&
- (sg2d.compositeState <= sg2d.COMP_ISCOPY ||
- sg2d.compositeState == sg2d.COMP_XOR))
+ sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR &&
+ (sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY ||
+ sg2d.compositeState == SunGraphics2D.COMP_XOR))
{
- if (sg2d.clipState == sg2d.CLIP_SHAPE) {
+ if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) {
// Do this to init textpipe correctly; we will override the
// other non-text pipes below
// REMIND: we should clean this up eventually instead of
@@ -194,10 +194,10 @@
}
}
sg2d.imagepipe = imagepipe;
- if (sg2d.transformState >= sg2d.TRANSFORM_TRANSLATESCALE) {
+ if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
sg2d.drawpipe = gdiTxPipe;
sg2d.fillpipe = gdiTxPipe;
- } else if (sg2d.strokeState != sg2d.STROKE_THIN){
+ } else if (sg2d.strokeState != SunGraphics2D.STROKE_THIN){
sg2d.drawpipe = gdiTxPipe;
sg2d.fillpipe = gdiPipe;
} else {
@@ -220,8 +220,8 @@
}
public RenderLoops getRenderLoops(SunGraphics2D sg2d) {
- if (sg2d.paintState <= sg2d.PAINT_ALPHACOLOR &&
- sg2d.compositeState <= sg2d.COMP_ISCOPY)
+ if (sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR &&
+ sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY)
{
return solidloops;
}
@@ -295,8 +295,8 @@
int x, int y, int w, int h, int dx, int dy)
{
CompositeType comptype = sg2d.imageComp;
- if (sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE &&
- sg2d.clipState != sg2d.CLIP_SHAPE &&
+ if (sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE &&
+ sg2d.clipState != SunGraphics2D.CLIP_SHAPE &&
(CompositeType.SrcOverNoEa.equals(comptype) ||
CompositeType.SrcNoEa.equals(comptype)))
{
--- a/jdk/src/windows/classes/sun/management/OperatingSystemImpl.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/management/OperatingSystemImpl.java Tue Jan 28 11:22:25 2014 -0800
@@ -50,18 +50,48 @@
return getCommittedVirtualMemorySize0();
}
}
- private native long getCommittedVirtualMemorySize0();
+
+ public long getTotalSwapSpaceSize() {
+ return getTotalSwapSpaceSize0();
+ }
+
+ public long getFreeSwapSpaceSize() {
+ return getFreeSwapSpaceSize0();
+ }
+
+ public long getProcessCpuTime() {
+ return getProcessCpuTime0();
+ }
+
+ public long getFreePhysicalMemorySize() {
+ return getFreePhysicalMemorySize0();
+ }
- public native long getTotalSwapSpaceSize();
- public native long getFreeSwapSpaceSize();
- public native long getProcessCpuTime();
- public native long getFreePhysicalMemorySize();
- public native long getTotalPhysicalMemorySize();
- public native double getSystemCpuLoad();
- public native double getProcessCpuLoad();
+ public long getTotalPhysicalMemorySize() {
+ return getTotalPhysicalMemorySize0();
+ }
+
+ public double getSystemCpuLoad() {
+ return getSystemCpuLoad0();
+ }
+
+ public double getProcessCpuLoad() {
+ return getProcessCpuLoad0();
+ }
+
+ /* native methods */
+ private native long getCommittedVirtualMemorySize0();
+ private native long getFreePhysicalMemorySize0();
+ private native long getFreeSwapSpaceSize0();
+ private native double getProcessCpuLoad0();
+ private native long getProcessCpuTime0();
+ private native double getSystemCpuLoad0();
+ private native long getTotalPhysicalMemorySize0();
+ private native long getTotalSwapSpaceSize0();
static {
- initialize();
+ initialize0();
}
- private static native void initialize();
+
+ private static native void initialize0();
}
--- a/jdk/src/windows/classes/sun/print/Win32PrintJob.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/print/Win32PrintJob.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -308,12 +308,10 @@
}
}
- PrinterState prnState = (PrinterState)service.getAttribute(
- PrinterState.class);
+ PrinterState prnState = service.getAttribute(PrinterState.class);
if (prnState == PrinterState.STOPPED) {
PrinterStateReasons prnStateReasons =
- (PrinterStateReasons)service.getAttribute(
- PrinterStateReasons.class);
+ service.getAttribute(PrinterStateReasons.class);
if ((prnStateReasons != null) &&
(prnStateReasons.containsKey(PrinterStateReason.SHUTDOWN)))
{
@@ -321,9 +319,8 @@
}
}
- if ((PrinterIsAcceptingJobs)(service.getAttribute(
- PrinterIsAcceptingJobs.class)) ==
- PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS) {
+ if (service.getAttribute(PrinterIsAcceptingJobs.class) ==
+ PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS) {
throw new PrintException("Printer is not accepting job.");
}
--- a/jdk/src/windows/classes/sun/print/Win32PrintService.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/classes/sun/print/Win32PrintService.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -506,8 +506,7 @@
}
} else {
// if getting MPA failed, we use MediaSize
- MediaSize ms =
- MediaSize.getMediaSizeForName((MediaSizeName)mediaName);
+ MediaSize ms = MediaSize.getMediaSizeForName(mediaName);
if (ms != null) {
try {
--- a/jdk/src/windows/native/sun/management/OperatingSystemImpl.c Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/src/windows/native/sun/management/OperatingSystemImpl.c Tue Jan 28 11:22:25 2014 -0800
@@ -77,7 +77,7 @@
int perfiInit(void);
JNIEXPORT void JNICALL
-Java_sun_management_OperatingSystemImpl_initialize
+Java_sun_management_OperatingSystemImpl_initialize0
(JNIEnv *env, jclass cls)
{
main_process = GetCurrentProcess();
@@ -97,7 +97,7 @@
}
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getTotalSwapSpaceSize
+Java_sun_management_OperatingSystemImpl_getTotalSwapSpaceSize0
(JNIEnv *env, jobject mbean)
{
MEMORYSTATUSEX ms;
@@ -107,7 +107,7 @@
}
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getFreeSwapSpaceSize
+Java_sun_management_OperatingSystemImpl_getFreeSwapSpaceSize0
(JNIEnv *env, jobject mbean)
{
MEMORYSTATUSEX ms;
@@ -117,7 +117,7 @@
}
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getProcessCpuTime
+Java_sun_management_OperatingSystemImpl_getProcessCpuTime0
(JNIEnv *env, jobject mbean)
{
@@ -136,7 +136,7 @@
}
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getFreePhysicalMemorySize
+Java_sun_management_OperatingSystemImpl_getFreePhysicalMemorySize0
(JNIEnv *env, jobject mbean)
{
MEMORYSTATUSEX ms;
@@ -146,7 +146,7 @@
}
JNIEXPORT jlong JNICALL
-Java_sun_management_OperatingSystemImpl_getTotalPhysicalMemorySize
+Java_sun_management_OperatingSystemImpl_getTotalPhysicalMemorySize0
(JNIEnv *env, jobject mbean)
{
MEMORYSTATUSEX ms;
@@ -927,14 +927,14 @@
}
JNIEXPORT jdouble JNICALL
-Java_sun_management_OperatingSystemImpl_getSystemCpuLoad
+Java_sun_management_OperatingSystemImpl_getSystemCpuLoad0
(JNIEnv *env, jobject dummy)
{
return perfGetCPULoad(-1);
}
JNIEXPORT jdouble JNICALL
-Java_sun_management_OperatingSystemImpl_getProcessCpuLoad
+Java_sun_management_OperatingSystemImpl_getProcessCpuLoad0
(JNIEnv *env, jobject dummy)
{
return perfGetProcessLoad();
--- a/jdk/test/ProblemList.txt Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/ProblemList.txt Tue Jan 28 11:22:25 2014 -0800
@@ -173,11 +173,6 @@
# 6963118
java/nio/channels/Selector/Wakeup.java windows-all
-# 7133499, 7133497
-java/nio/channels/AsyncCloseAndInterrupt.java macosx-all
-java/nio/channels/AsynchronousFileChannel/Lock.java macosx-all
-java/nio/channels/FileChannel/Transfer.java macosx-all
-
# 7141822
java/nio/channels/DatagramChannel/ChangingAddress.java macosx-all
--- a/jdk/test/com/sun/jdi/JdbReadTwiceTest.sh Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/com/sun/jdi/JdbReadTwiceTest.sh Tue Jan 28 11:22:25 2014 -0800
@@ -213,10 +213,17 @@
# If the file exists, we try to read it. The
# read will fail.
mkFiles $HOME/jdb.ini
- chmod a-r $HOME/jdb.ini
- doit
- failIfNot 1 "open: $HOME/jdb.ini"
- clean
+ id > $HOME/jdb.ini
+ chmod a-r $HOME/jdb.ini
+ if grep -q "uid=" $HOME/jdb.ini ; then
+ echo "Unable to make file unreadable, so test will fail. chmod: $HOME/jdb.ini"
+ if grep -q "uid=0" $HOME/jdb.ini ; then
+ echo "The test is running as root. Fix infrastructure!"
+ fi
+ fi
+ doit
+ failIfNot 1 "open: $HOME/jdb.ini"
+ clean
fi
--- a/jdk/test/com/sun/jdi/ProcessAttachTest.sh Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/com/sun/jdi/ProcessAttachTest.sh Tue Jan 28 11:22:25 2014 -0800
@@ -87,7 +87,7 @@
# "java" process.
if [ "$OS" = "Windows" ]; then
sleep 2
- pid=`ps -o pid,ppid,comm|grep ${startpid}|grep "java"|cut -c1-6`
+ pid=`ps -o pid,ppid,comm | awk '/${startpid}.+java/{ print $1 }'`
fi
echo "Waiting for Debuggee to initialize..."
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/ClassLoader/getResource/GetResource.java Tue Jan 28 11:22:25 2014 -0800
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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.
+ */
+
+import java.net.URL;
+
+public class GetResource {
+ private static final String RESOURCE_NAME = "test.properties";
+ public static void main(String[] args) {
+ String expect = args[0] + "/" + RESOURCE_NAME;
+ URL url = GetResource.class.getResource(RESOURCE_NAME);
+ System.out.println("getResource found: " + url);
+ if (!url.toString().endsWith(expect)) {
+ throw new RuntimeException(url + " != expected resource " + expect);
+ }
+
+ url = ClassLoader.getSystemResource(RESOURCE_NAME);
+ System.out.println("getSystemResource found: " + url);
+ if (!url.toString().endsWith(expect)) {
+ throw new RuntimeException(url + " != expected resource " + expect);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/ClassLoader/getResource/GetResource.sh Tue Jan 28 11:22:25 2014 -0800
@@ -0,0 +1,124 @@
+#
+# Copyright (c) 2014, 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.
+#
+# 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.
+#
+
+# @test
+# @bug 6760902
+# @summary Empty path on bootclasspath is not default to current working
+# directory for both class lookup and resource lookup whereas
+# empty path on classpath is default to current working directory.
+#
+# @run shell GetResource.sh
+
+if [ "${TESTSRC}" = "" ] ; then
+ TESTSRC=`pwd`
+fi
+if [ "${TESTCLASSES}" = "" ] ; then
+ TESTCLASSES=`pwd`
+fi
+
+if [ "${TESTJAVA}" = "" ] ; then
+ echo "TESTJAVA not set. Test cannot execute."
+ echo "FAILED!!!"
+ exit 1
+fi
+
+if [ "${COMPILEJAVA}" = "" ] ; then
+ COMPILEJAVA="${TESTJAVA}"
+fi
+
+# set platform-specific variables
+OS=`uname -s`
+case "$OS" in
+ Windows*)
+ PS=";"
+ ;;
+ CYGWIN* )
+ PS=";"
+ TESTCLASSES=`/usr/bin/cygpath -a -s -m ${TESTCLASSES}`
+ ;;
+ * )
+ PS=":"
+ ;;
+esac
+
+echo TESTSRC=${TESTSRC}
+echo TESTCLASSES=${TESTCLASSES}
+echo TESTJAVA=${TESTJAVA}
+echo ""
+
+${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \
+ -d ${TESTCLASSES} \
+ ${TESTSRC}/GetResource.java || exit 10
+
+setup() {
+ dest=${TESTCLASSES}/$1
+ rm -rf $dest
+ mkdir $dest
+ cp ${TESTSRC}/test.properties $dest
+ cp ${TESTCLASSES}/GetResource.class $dest
+}
+
+
+count=0
+runTest() {
+ expected=$1;
+ vmoption=$2; shift; shift
+ count=`expr $count+1`
+ echo "Test $count : $vmoption $@"
+ ${TESTJAVA}/bin/java ${TESTVMOPTS} "$vmoption" $@ \
+ GetResource $expected || exit $count
+}
+
+# run test
+setup "a"
+setup "b"
+
+cd ${TESTCLASSES}
+DIR=`pwd`
+
+# Expected -Xbootclasspath
+# Location or -classpath
+runTest "a" "-Xbootclasspath/p:a"
+runTest "a" "-Xbootclasspath/p:a${PS}b"
+runTest "b" "-Xbootclasspath/p:b"
+runTest "b" "-Xbootclasspath/p:b${PS}a"
+runTest "a" -cp a
+runTest "a" -cp "a${PS}b"
+runTest "b" -cp b
+runTest "b" -cp "b${PS}a"
+
+cd ${DIR}/a
+
+runTest "a" "-Xbootclasspath/p:."
+runTest "b" "-Xbootclasspath/p:../b"
+
+# no -classpath
+runTest "a" -cp "${PS}"
+runTest "b" -cp "../b"
+
+# Test empty path in bootclasspath not default to current working directory
+runTest "b" "-Xbootclasspath/p:${PS}../b"
+
+# Test empty path in classpath default to current working directory
+runTest "a" -cp "${PS}../b"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/ClassLoader/getResource/test.properties Tue Jan 28 11:22:25 2014 -0800
@@ -0,0 +1,1 @@
+# empty resource
--- a/jdk/test/java/lang/management/MemoryMXBean/MemoryManagement.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/java/lang/management/MemoryMXBean/MemoryManagement.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -23,9 +23,9 @@
/*
* @test
- * @bug 4530538
+ * @bug 4530538 6980984
* @summary Basic unit test of memory management testing:
- * 1) setUsatgeThreshold() and getUsageThreshold()
+ * 1) setUsageThreshold() and getUsageThreshold()
* 2) test low memory detection on the old generation.
*
* @author Mandy Chung
@@ -40,16 +40,18 @@
import javax.management.openmbean.CompositeData;
public class MemoryManagement {
- private static MemoryMXBean mm = ManagementFactory.getMemoryMXBean();
- private static List pools = ManagementFactory.getMemoryPoolMXBeans();
- private static List managers = ManagementFactory.getMemoryManagerMXBeans();
- private static MemoryPoolMXBean mpool = null;
- private static boolean trace = false;
- private static boolean testFailed = false;
+ private static final MemoryMXBean mm = ManagementFactory.getMemoryMXBean();
+ private static final List pools =
+ Collections.synchronizedList(ManagementFactory.getMemoryPoolMXBeans());
+ private static final List managers =
+ Collections.synchronizedList(ManagementFactory.getMemoryManagerMXBeans());
+ private static volatile MemoryPoolMXBean mpool = null;
+ private static volatile boolean trace = false;
+ private static volatile boolean testFailed = false;
private static final int NUM_CHUNKS = 2;
- private static long chunkSize;
+ private static volatile long chunkSize;
+ private static volatile int listenerInvoked = 0;
- private static int listenerInvoked = 0;
static class SensorListener implements NotificationListener {
public void handleNotification(Notification notif, Object handback) {
String type = notif.getType();
@@ -101,7 +103,13 @@
// Now set threshold
MemoryUsage mu = mpool.getUsage();
- chunkSize = (mu.getMax() - mu.getUsed()) / 20;
+ long max = mu.getMax();
+ if (max != -1) {
+ chunkSize = (max - mu.getUsed()) / 20;
+ } else { // 6980984
+ System.gc();
+ chunkSize = Runtime.getRuntime().freeMemory()/20;
+ }
newThreshold = mu.getUsed() + (chunkSize * NUM_CHUNKS);
System.out.println("Setting threshold for " + mpool.getName() +
--- a/jdk/test/java/lang/management/ThreadMXBean/SynchronizationStatistics.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/java/lang/management/ThreadMXBean/SynchronizationStatistics.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -27,45 +27,28 @@
* @summary Basic unit test of the synchronization statistics support:
*
* @author Mandy Chung
+ * @author Jaroslav Bachorik
*
- * @ignore 6309226
- * @build Semaphore
* @run main/othervm SynchronizationStatistics
*/
import java.lang.management.*;
+import java.util.concurrent.Phaser;
public class SynchronizationStatistics {
- private static ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
-
- private static boolean blockedTimeCheck =
- mbean.isThreadContentionMonitoringSupported();
- private static boolean trace = false;
-
- private static Object lockA = new Object();
- private static Object lockB = new Object();
- private static Object lockC = new Object();
- private static Object lockD = new Object();
- private static Object waiter = new Object();
- private static volatile boolean testFailed = false;
-
- private static Object go = new Object();
-
- private static void goSleep(long ms) {
- try {
- Thread.sleep(ms);
- } catch (InterruptedException e) {
- e.printStackTrace();
- System.out.println("Unexpected exception.");
- testFailed = true;
+ private static class LockerThread extends Thread {
+ public LockerThread(Runnable r) {
+ super(r, "LockerThread");
}
}
+ private static final ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
+
+ private static final boolean blockedTimeCheck =
+ mbean.isThreadContentionMonitoringSupported();
+
+
public static void main(String args[]) throws Exception {
- if (args.length > 0 && args[0].equals("trace")) {
- trace = true;
- }
-
if (blockedTimeCheck) {
mbean.setThreadContentionMonitoringEnabled(true);
}
@@ -75,457 +58,317 @@
"Thread Contention Monitoring is not enabled");
}
- Examiner examiner = new Examiner("Examiner");
- BlockedThread blocked = new BlockedThread("BlockedThread");
- examiner.setThread(blocked);
-
- // Start the threads and check them in Blocked and Waiting states
- examiner.start();
-
- // wait until the examiner acquires all the locks and waiting
- // for the BlockedThread to start
- examiner.waitUntilWaiting();
-
- System.out.println("Checking the thread state for the examiner thread " +
- "is waiting to begin.");
-
- // The Examiner should be waiting to be notified by the BlockedThread
- checkThreadState(examiner, Thread.State.WAITING);
-
- System.out.println("Now starting the blocked thread");
- blocked.start();
-
- try {
- examiner.join();
- blocked.join();
- } catch (InterruptedException e) {
- e.printStackTrace();
- System.out.println("Unexpected exception.");
- testFailed = true;
- }
-
- if (testFailed)
- throw new RuntimeException("TEST FAILED.");
+ testBlockingOnSimpleMonitor();
+ testBlockingOnNestedMonitor();
+ testWaitingOnSimpleMonitor();
+ testMultiWaitingOnSimpleMonitor();
+ testWaitingOnNestedMonitor();
System.out.println("Test passed.");
}
- private static String INDENT = " ";
- private static void printStack(Thread t, StackTraceElement[] stack) {
- System.out.println(INDENT + t +
- " stack: (length = " + stack.length + ")");
- if (t != null) {
- for (int j = 0; j < stack.length; j++) {
- System.out.println(INDENT + stack[j]);
- }
- System.out.println();
- }
- }
-
- private static void checkThreadState(Thread thread, Thread.State s)
- throws Exception {
-
- ThreadInfo ti = mbean.getThreadInfo(thread.getId());
- if (ti.getThreadState() != s) {
- ThreadInfo info = mbean.getThreadInfo(thread.getId(),
- Integer.MAX_VALUE);
- System.out.println(INDENT + "TEST FAILED:");
- printStack(thread, info.getStackTrace());
- System.out.println(INDENT + "Thread state: " + info.getThreadState());
-
- throw new RuntimeException("TEST FAILED: " +
- "Thread state for " + thread + " returns " + ti.getThreadState() +
- ". Expected to be " + s);
- }
+ private static LockerThread newLockerThread(Runnable r) {
+ LockerThread t = new LockerThread(r);
+ t.setDaemon(true);
+ return t;
}
- private static void checkThreadState(Thread thread,
- Thread.State s1, Thread.State s2)
- throws Exception {
-
- ThreadInfo ti = mbean.getThreadInfo(thread.getId());
- if (ti.getThreadState() != s1 && ti.getThreadState() != s2) {
- throw new RuntimeException("TEST FAILED: " +
- "Thread state for " + thread + " returns " + ti.getThreadState() +
- ". Expected to be " + s1 + " or " + s2);
- }
- }
-
- static class StatThread extends Thread {
- private long blockingBaseTime = 0;
- private long totalWaitTime = 0;
- private long totalBlockedEnterTime = 0;
-
- StatThread(String name) {
- super(name);
- }
-
- void addWaitTime(long ns) {
- totalWaitTime = totalWaitTime + ns;
- }
- void addBlockedEnterTime(long ns) {
- totalBlockedEnterTime = totalBlockedEnterTime + ns;
- }
- void setBlockingBaseTime(long time) {
- blockingBaseTime = time;
- }
-
- long totalBlockedTimeMs() {
- return totalBlockedEnterTime / 1000000;
- }
-
- long totalBlockedTimeMs(long now) {
- long t = totalBlockedEnterTime + (now - blockingBaseTime);
- return t / 1000000;
- }
-
- long totalWaitTimeMs() {
- return totalWaitTime / 1000000;
- }
-
- long totalWaitTimeMs(long now) {
- long t = totalWaitTime + (now - blockingBaseTime);
- return t / 1000000;
+ private static void waitForThreadState(Thread t, Thread.State state) throws InterruptedException {
+ while (!t.isInterrupted() && t.getState() != state) {
+ Thread.sleep(3);
}
}
- static class BlockedThread extends StatThread {
- private Semaphore handshake = new Semaphore();
- BlockedThread(String name) {
- super(name);
- }
- void waitUntilBlocked() {
- handshake.semaP();
-
- // give a chance for the examiner thread to really wait
- goSleep(20);
- }
-
- void waitUntilWaiting() {
- waitUntilBlocked();
- }
-
- boolean hasWaitersForBlocked() {
- return (handshake.getWaiterCount() > 0);
- }
-
- private void notifyWaiter() {
- // wait until the examiner waits on the semaphore
- while (handshake.getWaiterCount() == 0) {
- goSleep(20);
- }
- handshake.semaV();
- }
-
- private void waitObj(long ms) {
- synchronized (waiter) {
- try {
- // notify examinerabout to wait on a monitor
- notifyWaiter();
-
- long base = System.nanoTime();
- setBlockingBaseTime(base);
- waiter.wait(ms);
- long now = System.nanoTime();
- addWaitTime(now - base);
- } catch (Exception e) {
- e.printStackTrace();
- System.out.println("Unexpected exception.");
- testFailed = true;
+ /**
+ * Tests that blocking on a single monitor properly increases the
+ * blocked count at least by 1. Also asserts that the correct lock name is provided.
+ */
+ private static void testBlockingOnSimpleMonitor() throws Exception {
+ System.out.println("testBlockingOnSimpleMonitor");
+ final Object lock1 = new Object();
+ final Phaser p = new Phaser(2);
+ LockerThread lt = newLockerThread(new Runnable() {
+ @Override
+ public void run() {
+ p.arriveAndAwaitAdvance(); // phase[1]
+ synchronized(lock1) {
+ System.out.println("[LockerThread obtained Lock1]");
+ p.arriveAndAwaitAdvance(); // phase[2]
}
- }
- }
-
- private void test() {
- // notify examiner about to block on lockA
- notifyWaiter();
-
- long base = System.nanoTime();
- setBlockingBaseTime(base);
- synchronized (lockA) {
- long now = System.nanoTime();
- addBlockedEnterTime(now - base);
-
- A(); // Expected blocked count = 1
- }
- E();
- }
- private void A() {
- // notify examiner about to block on lockB
- notifyWaiter();
-
- long base = System.nanoTime();
- setBlockingBaseTime(base);
- synchronized (lockB) {
- long now = System.nanoTime();
- addBlockedEnterTime(now - base);
-
- B(); // Expected blocked count = 2
+ p.arriveAndAwaitAdvance(); // phase[3]
}
- }
- private void B() {
- // notify examiner about to block on lockC
- notifyWaiter();
-
- long base = System.nanoTime();
- setBlockingBaseTime(base);
- synchronized (lockC) {
- long now = System.nanoTime();
- addBlockedEnterTime(now - base);
-
- C(); // Expected blocked count = 3
- }
- }
- private void C() {
- // notify examiner about to block on lockD
- notifyWaiter();
-
- long base = System.nanoTime();
- setBlockingBaseTime(base);
- synchronized (lockD) {
- long now = System.nanoTime();
- addBlockedEnterTime(now - base);
-
- D(); // Expected blocked count = 4
- }
- }
- private void D() {
- goSleep(50);
- }
- private void E() {
- final int WAIT = 1000;
- waitObj(WAIT);
- waitObj(WAIT);
- waitObj(WAIT);
- }
+ });
- public void run() {
- test();
- } // run()
- } // BlockedThread
-
- static int blockedCount = 0;
- static int waitedCount = 0;
- static class Examiner extends StatThread {
- private BlockedThread blockedThread;
- private Semaphore semaphore = new Semaphore();
-
- Examiner(String name) {
- super(name);
- }
-
- public void setThread(BlockedThread thread) {
- blockedThread = thread;
- }
-
- private void blockedTimeRangeCheck(StatThread t,
- long blockedTime,
- long nowNano)
- throws Exception {
- long expected = t.totalBlockedTimeMs(nowNano);
-
- // accept 5% range
- timeRangeCheck(blockedTime, expected, 5);
- }
- private void waitedTimeRangeCheck(StatThread t,
- long waitedTime,
- long nowNano)
- throws Exception {
- long expected = t.totalWaitTimeMs(nowNano);
-
- // accept 5% range
- timeRangeCheck(waitedTime, expected, 5);
+ lt.start();
+ long tid = lt.getId();
+ ThreadInfo ti = mbean.getThreadInfo(tid);
+ String lockName = null;
+ synchronized(lock1) {
+ p.arriveAndAwaitAdvance(); // phase[1]
+ waitForThreadState(lt, Thread.State.BLOCKED);
+ lockName = mbean.getThreadInfo(tid).getLockName();
}
- private void timeRangeCheck(long time, long expected, int percent)
- throws Exception {
-
- double diff = expected - time;
+ p.arriveAndAwaitAdvance(); // phase[2]
+ testBlocked(ti, mbean.getThreadInfo(tid), lockName, lock1);
+ p.arriveAndDeregister(); // phase[3]
- if (trace) {
- System.out.println(" Time = " + time +
- " expected = " + expected +
- ". Diff = " + diff);
+ lt.join();
+
+ System.out.println("OK");
+ }
- }
- // throw an exception if blockedTime and expectedTime
- // differs > percent%
- if (diff < 0) {
- diff = diff * -1;
- }
+ /**
+ * Tests that blocking on a nested monitor properly increases the
+ * blocked count at least by 1 - it is not affected by the nesting depth.
+ * Also asserts that the correct lock name is provided.
+ */
+ private static void testBlockingOnNestedMonitor() throws Exception {
+ System.out.println("testBlockingOnNestedMonitor");
+ final Object lock1 = new Object();
+ final Object lock2 = new Object();
- long range = (expected * percent) / 100;
- // minimum range = 2 ms
- if (range < 2) {
- range = 2;
+ final Phaser p = new Phaser(2);
+ LockerThread lt = newLockerThread(new Runnable() {
+ @Override
+ public void run() {
+ p.arriveAndAwaitAdvance(); // phase[1]
+ synchronized(lock1) {
+ System.out.println("[LockerThread obtained Lock1]");
+ p.arriveAndAwaitAdvance(); // phase[2]
+ p.arriveAndAwaitAdvance(); // phase[3]
+ synchronized(lock2) {
+ System.out.println("[LockerThread obtained Lock2]");
+ p.arriveAndAwaitAdvance(); // phase[4]
+ }
+ p.arriveAndAwaitAdvance(); // phase[5]
+ }
}
- if (diff > range) {
- throw new RuntimeException("TEST FAILED: " +
- "Time returned = " + time +
- " expected = " + expected + ". Diff = " + diff);
- }
+ });
+
+ lt.start();
+ long tid = lt.getId();
+ ThreadInfo ti = mbean.getThreadInfo(tid);
+ ThreadInfo ti1 = null;
+ String lockName = null;
+ synchronized(lock1) {
+ p.arriveAndAwaitAdvance(); // phase[1]
+ waitForThreadState(lt, Thread.State.BLOCKED);
+ lockName = mbean.getThreadInfo(tid).getLockName();
}
- private void checkInfo(StatThread t, Thread.State s, Object lock,
- String lockName, int bcount, int wcount)
- throws Exception {
+ p.arriveAndAwaitAdvance(); // phase[2]
+
+ ti1 = mbean.getThreadInfo(tid);
+ testBlocked(ti, ti1, lockName, lock1);
+ ti = ti1;
+
+ synchronized(lock2) {
+ p.arriveAndAwaitAdvance(); // phase [3]
+ waitForThreadState(lt, Thread.State.BLOCKED);
+ lockName = mbean.getThreadInfo(tid).getLockName();
+ }
+ p.arriveAndAwaitAdvance(); // phase [4]
+ testBlocked(ti, mbean.getThreadInfo(tid), lockName, lock2);
+ p.arriveAndDeregister();
+
+ lt.join();
+
+ System.out.println("OK");
+ }
- String action = "ERROR";
- if (s == Thread.State.WAITING || s == Thread.State.TIMED_WAITING) {
- action = "wait on ";
- } else if (s == Thread.State.BLOCKED) {
- action = "block on ";
+ /**
+ * Tests that waiting on a single monitor properly increases the waited
+ * count by 1 and the waited time by a positive number.
+ */
+ private static void testWaitingOnSimpleMonitor() throws Exception {
+ System.out.println("testWaitingOnSimpleMonitor");
+ final Object lock1 = new Object();
+ final Phaser p = new Phaser(2);
+ LockerThread lt = newLockerThread(new Runnable() {
+ @Override
+ public void run() {
+ p.arriveAndAwaitAdvance(); // phase[1]
+ synchronized(lock1) {
+ System.out.println("[LockerThread obtained Lock1]");
+ try {
+ lock1.wait(300);
+ } catch (InterruptedException ex) {
+ // ignore
+ }
+ p.arriveAndAwaitAdvance(); // phase[2]
+ }
+ p.arriveAndAwaitAdvance(); // phase[3]
}
- System.out.println(t + " expected to " + action + lockName +
- " with blocked count = " + bcount +
- " and waited count = " + wcount);
+ });
- long now = System.nanoTime();
- ThreadInfo info = mbean.getThreadInfo(t.getId());
- if (info.getThreadState() != s) {
- printStack(t, info.getStackTrace());
- throw new RuntimeException("TEST FAILED: " +
- "Thread state returned is " + info.getThreadState() +
- ". Expected to be " + s);
- }
+ lt.start();
+ ThreadInfo ti1 = mbean.getThreadInfo(lt.getId());
+ synchronized(lock1) {
+ p.arriveAndAwaitAdvance(); // phase[1]
+ waitForThreadState(lt, Thread.State.BLOCKED);
+ }
+ p.arriveAndAwaitAdvance(); // phase[2]
+
+ ThreadInfo ti2 = mbean.getThreadInfo(lt.getId());
+ p.arriveAndDeregister(); // phase[3]
+
+ lt.join();
- if (info.getLockName() == null ||
- !info.getLockName().equals(lock.toString())) {
- throw new RuntimeException("TEST FAILED: " +
- "getLockName() returned " + info.getLockName() +
- ". Expected to be " + lockName + " - " + lock.toString());
- }
+ testWaited(ti1, ti2, 1);
+ System.out.println("OK");
+ }
+
+ /**
+ * Tests that waiting multiple times on the same monitor subsequently
+ * increases the waited count by the number of subsequent calls and the
+ * waited time by a positive number.
+ */
+ private static void testMultiWaitingOnSimpleMonitor() throws Exception {
+ System.out.println("testWaitingOnMultipleMonitors");
+ final Object lock1 = new Object();
- if (info.getBlockedCount() != bcount) {
- throw new RuntimeException("TEST FAILED: " +
- "Blocked Count returned is " + info.getBlockedCount() +
- ". Expected to be " + bcount);
+ final Phaser p = new Phaser(2);
+ LockerThread lt = newLockerThread(new Runnable() {
+ @Override
+ public void run() {
+ p.arriveAndAwaitAdvance(); // phase[1]
+ synchronized(lock1) {
+ System.out.println("[LockerThread obtained Lock1]");
+ for (int i = 0; i < 3; i++) {
+ try {
+ lock1.wait(300);
+ } catch (InterruptedException ex) {
+ // ignore
+ }
+ p.arriveAndAwaitAdvance(); // phase[2-4]
+ }
+ }
+ p.arriveAndAwaitAdvance(); // phase[5]
}
- if (info.getWaitedCount() != wcount) {
- throw new RuntimeException("TEST FAILED: " +
- "Waited Count returned is " + info.getWaitedCount() +
- ". Expected to be " + wcount);
- }
+ });
- String lockObj = info.getLockName();
- if (lockObj == null || !lockObj.equals(lock.toString())) {
- throw new RuntimeException("TEST FAILED: " +
- "Object blocked on is " + lockObj +
- ". Expected to be " + lock.toString());
- }
+ lt.start();
+ ThreadInfo ti1 = mbean.getThreadInfo(lt.getId());
+ synchronized(lock1) {
+ p.arriveAndAwaitAdvance(); //phase[1]
+ waitForThreadState(lt, Thread.State.BLOCKED);
+ }
+ int phase = p.getPhase();
+ while ((p.arriveAndAwaitAdvance() - phase) < 3); // phase[2-4]
+
+ ThreadInfo ti2 = mbean.getThreadInfo(lt.getId());
+ p.arriveAndDeregister(); // phase[5]
+
+ lt.join();
+ testWaited(ti1, ti2, 3);
+ System.out.println("OK");
+ }
- if (!blockedTimeCheck) {
- return;
- }
- long blockedTime = info.getBlockedTime();
- if (blockedTime < 0) {
- throw new RuntimeException("TEST FAILED: " +
- "Blocked time returned is negative = " + blockedTime);
- }
+ /**
+ * Tests that waiting on monitors places in nested synchronized blocks
+ * properly increases the waited count by the number of times the "lock.wait()"
+ * was invoked and the waited time by a positive number.
+ */
+ private static void testWaitingOnNestedMonitor() throws Exception {
+ System.out.println("testWaitingOnNestedMonitor");
+ final Object lock1 = new Object();
+ final Object lock2 = new Object();
+ final Object lock3 = new Object();
+
+ final Phaser p = new Phaser(2);
+ LockerThread lt = newLockerThread(new Runnable() {
+ @Override
+ public void run() {
+ p.arriveAndAwaitAdvance(); // phase[1]
+ synchronized(lock1) {
+ System.out.println("[LockerThread obtained Lock1]");
+ try {
+ lock1.wait(300);
+ } catch (InterruptedException ex) {
+ // ignore
+ }
- if (s == Thread.State.BLOCKED) {
- blockedTimeRangeCheck(t, blockedTime, now);
- } else {
- timeRangeCheck(blockedTime, t.totalBlockedTimeMs(), 5);
- }
+ p.arriveAndAwaitAdvance(); // phase[2]
+ synchronized(lock2) {
+ System.out.println("[LockerThread obtained Lock2]");
+ try {
+ lock2.wait(300);
+ } catch (InterruptedException ex) {
+ // ignore
+ }
- long waitedTime = info.getWaitedTime();
- if (waitedTime < 0) {
- throw new RuntimeException("TEST FAILED: " +
- "Waited time returned is negative = " + waitedTime);
+ p.arriveAndAwaitAdvance(); // phase[3]
+ synchronized(lock3) {
+ System.out.println("[LockerThread obtained Lock3]");
+ try {
+ lock3.wait(300);
+ } catch (InterruptedException ex) {
+ // ignore
+ }
+ p.arriveAndAwaitAdvance(); // phase[4]
+ }
+ }
+ }
+ p.arriveAndAwaitAdvance(); // phase[5]
}
- if (s == Thread.State.WAITING || s == Thread.State.TIMED_WAITING) {
- waitedTimeRangeCheck(t, waitedTime, now);
- } else {
- timeRangeCheck(waitedTime, t.totalWaitTimeMs(), 5);
- }
+ });
+ lt.start();
+ ThreadInfo ti1 = mbean.getThreadInfo(lt.getId());
+ synchronized(lock1) {
+ p.arriveAndAwaitAdvance(); // phase[1]
+ waitForThreadState(lt, Thread.State.BLOCKED);
}
- private void examine() {
- try {
- synchronized (lockD) {
- synchronized (lockC) {
- synchronized (lockB) {
- synchronized (lockA) {
- // notify main thread to continue
- semaphore.semaV();
-
- // wait until BlockedThread has started
- blockedThread.waitUntilBlocked();
-
- blockedCount++;
- checkInfo(blockedThread, Thread.State.BLOCKED,
- lockA, "lockA",
- blockedCount, waitedCount);
- }
-
- // wait until BlockedThread to block on lockB
- blockedThread.waitUntilBlocked();
-
- blockedCount++;
- checkInfo(blockedThread, Thread.State.BLOCKED,
- lockB, "lockB",
- blockedCount, waitedCount);
- }
-
- // wait until BlockedThread to block on lockC
- blockedThread.waitUntilBlocked();
+ synchronized(lock2) {
+ p.arriveAndAwaitAdvance(); // phase[2]
+ waitForThreadState(lt, Thread.State.BLOCKED);
+ }
- blockedCount++;
- checkInfo(blockedThread, Thread.State.BLOCKED,
- lockC, "lockC",
- blockedCount, waitedCount);
- }
- // wait until BlockedThread to block on lockD
- blockedThread.waitUntilBlocked();
- blockedCount++;
-
- checkInfo(blockedThread, Thread.State.BLOCKED,
- lockD, "lockD",
- blockedCount, waitedCount);
- }
-
- // wait until BlockedThread about to call E()
- // BlockedThread will wait on waiter for 3 times
- blockedThread.waitUntilWaiting();
-
- waitedCount++;
- checkInfo(blockedThread, Thread.State.TIMED_WAITING,
- waiter, "waiter", blockedCount, waitedCount);
-
- blockedThread.waitUntilWaiting();
-
- waitedCount++;
- checkInfo(blockedThread, Thread.State.TIMED_WAITING,
- waiter, "waiter", blockedCount, waitedCount);
-
- blockedThread.waitUntilWaiting();
-
- waitedCount++;
- checkInfo(blockedThread, Thread.State.TIMED_WAITING,
- waiter, "waiter", blockedCount, waitedCount);
-
- } catch (Exception e) {
- e.printStackTrace();
- System.out.println("Unexpected exception.");
- testFailed = true;
- }
+ synchronized(lock3) {
+ p.arriveAndAwaitAdvance(); // phase[3]
+ waitForThreadState(lt, Thread.State.BLOCKED);
}
- public void run() {
- examine();
- } // run()
+ p.arriveAndAwaitAdvance(); // phase[4]
+ ThreadInfo ti2 = mbean.getThreadInfo(lt.getId());
+ p.arriveAndDeregister(); // phase[5]
- public void waitUntilWaiting() {
- semaphore.semaP();
+ lt.join();
+ testWaited(ti1, ti2, 3);
+ System.out.println("OK");
+ }
- // wait until the examiner is waiting for
- while (!blockedThread.hasWaitersForBlocked()) {
- goSleep(50);
- }
- // give a chance for the examiner thread to really wait
- goSleep(20);
+ private static void testWaited(ThreadInfo ti1, ThreadInfo ti2, int waited) throws Error {
+ long waitCntDiff = ti2.getWaitedCount() - ti1.getWaitedCount();
+ long waitTimeDiff = ti2.getWaitedTime() - ti1.getWaitedTime();
+ if (waitCntDiff < waited) {
+ throw new Error("Unexpected diff in waited count. Expecting at least "
+ + waited + " , got " + waitCntDiff);
+ }
+ if (waitTimeDiff <= 0) {
+ throw new Error("Unexpected diff in waited time. Expecting increasing " +
+ "value, got " + waitTimeDiff + "ms");
+ }
+ }
+ private static void testBlocked(ThreadInfo ti1, ThreadInfo ti2,
+ String lockName, final Object lock)
+ throws Error {
+ long blkCntDiff = ti2.getBlockedCount() - ti1.getBlockedCount();
+ long blkTimeDiff = ti2.getBlockedTime() - ti1.getBlockedTime();
+ if (blkCntDiff < 1) {
+ throw new Error("Unexpected diff in blocked count. Expecting at least 1, " +
+ "got " + blkCntDiff);
}
- } // Examiner
+ if (blkTimeDiff < 0) {
+ throw new Error("Unexpected diff in blocked time. Expecting a positive " +
+ "number, got " + blkTimeDiff);
+ }
+ if (!lockName.equals(lock.toString())) {
+ throw new Error("Unexpected blocked monitor name. Expecting " +
+ lock.toString() + ", got " +
+ lockName);
+ }
+ }
}
--- a/jdk/test/java/rmi/RMISecurityManager/checkPackageAccess/CheckPackageAccess.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/java/rmi/RMISecurityManager/checkPackageAccess/CheckPackageAccess.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -43,7 +43,7 @@
* access to classes in the sun.* hierarchy, which is what is specified
* in the JDK's default java.security file.
*/
- private final static String restrictedClassName = "sun.misc.Ref";
+ private final static String restrictedClassName = "sun.misc.Cache";
public static void main(String[] args) {
--- a/jdk/test/java/rmi/server/RemoteObject/notExtending/NotExtending.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/java/rmi/server/RemoteObject/notExtending/NotExtending.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -123,7 +123,7 @@
}
/**
- * Force desparate garbage collection so that all sun.misc.Ref instances
+ * Force desperate garbage collection so that soft references
* will be cleared.
*
* This method is required with the JDK 1.1.x RMI runtime so that the
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/cert/X509Certificate/X509BadCertificate.java Tue Jan 28 11:22:25 2014 -0800
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2001, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 8028431
+ * @summary Make sure that proper CertificateException is thrown
+ * when loading bad x509 certificate
+ * @author Artem Smotrakov
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.security.cert.CertificateException;
+
+public class X509BadCertificate {
+
+ public static void main(String[] args) throws Exception {
+ test("bad-cert-1.pem");
+ }
+
+ /**
+ * Parse X509 certificates.
+ */
+ static void test(String filename) throws Exception {
+ try {
+ System.out.println("Parse file " + filename);
+ File f = new File(System.getProperty("test.src", "."), filename);
+ try (FileInputStream fis = new FileInputStream(f)) {
+ CertificateFactory cf = CertificateFactory.getInstance("X509");
+ X509Certificate cert = (X509Certificate)
+ cf.generateCertificate(fis);
+ }
+ throw new Exception("Test failed: " +
+ "expected CertificateParsingException was not thrown");
+ } catch (CertificateException e) {
+ System.out.println("Test passed: expected exception was thrown: " +
+ e.toString());
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/cert/X509Certificate/bad-cert-1.pem Tue Jan 28 11:22:25 2014 -0800
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDZzCCAk+gAwIBAgIJAJYB3qu9C2kiMA0GCSqGSIb3DQEBBQUAMEoxDTALBgNV
+BAMMBFRlc3QxDTALBgNVBAsMBEphdmExDzANBgNVBAoMBk9yYWNsZTEMMAoGA1UE
+BwwDU1BCMQswCQYDVQQGEwJSVTAeFw0xMzEyMjMwNzA4MDhaFw0yMzEyMjEwNzA4
+MDhaMEoxDTALBgNVBAMMBFRlc3QxDTALBgNVBAsMBEphdmExDzANBgNVBAoMBk9y
+YWNsZTEMMAoGA1UMBwwDU1BCMQswCQYDVQQGEwJSVTCCASIwDQYJKoZIhvcNAQEB
+BQADggEPADCCAQoCggEBAOqiCN4gFxehl547Q7/VNGbGApr+wszLdanHPucAH6Wf
+LtcRhKNUSqtBAQxEpFrTpMNEqm2GElAjiPa6m48qIjLVSvOb/9w3G/yXB8zyZbIm
+/Nfp2sT4OEaa1JSEZSpolhS4FfqYzjGQp5cn4Xn4zKjDgiceHgfLls5x2dRydQZO
+Yf91qSIioZxVHUtlo8yztkieiSaqPWt3nJ4PIwhFbsu1HVmWaYZD+nBYCKgVHqrS
+cueO98Ca4Doz73O27X1dVbQBdLS0JI7qVAG8LD388iPL8qbsOkgWPzmEQ+kLRKO4
+g7RpuwlXuwaMSh95NWaxlu4Ob6GRJQmpconYoe13+7ECAwEAAaNQME4wHQYDVR0O
+BBYEFIG8TPobXcbNbDi+zKudd9whpxoNMB8GA1UdIwQYMBaAFIG8TPobXcbNbDi+
+zKudd9whpxoNMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFRQADggEBAAynN+e7
+h+ufT5SBKN/gBuJAnF1mKIPESiipuv5KoYUGZOY8ShgYLcwY+qnbuHYFUlvq6Zns
+K4/e+x/16h32vD7dEPkNvukbvER4YJQQiN6osDfXpTPzixYftWdmtX0u8xQfwb/g
+R8DS7bazz99jVXk+jTK4yWBY+gMwEat+LyNQ5cyq8Qhi1oBKUbGRbiOts19B97fn
+Rv8TsyXN3INLGYhdVxZoD7E5tyG1ydSFmOMadulAC2epBXDHOXZnz2UWauJc0XW5
+1L/YQVri47VkdHS3tisBzELEJdLmdMDb+5tAU+lItXmTXe2/PB53WIvsEIb4t+eQ
+wY0hCj9lVJlajTQ=
+-----END CERTIFICATE-----
--- a/jdk/test/sun/misc/Version/Version.java Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/misc/Version/Version.java Tue Jan 28 11:22:25 2014 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -116,10 +116,16 @@
} else if (Character.isDigit(cs.charAt(0)) &&
Character.isDigit(cs.charAt(1)) && cs.charAt(2) == '.' &&
Character.isDigit(cs.charAt(3))) {
- // HSX has nn.n (major.minor) version
+ // HSX has nn.n[n] (major.minor) version
major = Integer.valueOf(version.substring(0, 2)).intValue();
- minor = Character.digit(cs.charAt(3), 10);
- cs = cs.subSequence(4, cs.length());
+ if (Character.isDigit(cs.charAt(4))) {
+ minor = Integer.valueOf(version.substring(3, 5)).intValue();
+ cs = cs.subSequence(5, cs.length());
+ }
+ else {
+ minor = Character.digit(cs.charAt(3), 10);
+ cs = cs.subSequence(4, cs.length());
+ }
}
if (cs.charAt(0) == '_' && cs.length() >= 3 &&
Character.isDigit(cs.charAt(1)) &&
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/EntriesOrder.java Tue Jan 28 11:22:25 2014 -0800
@@ -0,0 +1,199 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 8031572
+ * @summary jarsigner -verify exits with 0 when a jar file is not properly signed
+ */
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.cert.Certificate;
+import java.util.*;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.jar.JarInputStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+public class EntriesOrder {
+
+ public static void main(String[] args) throws Exception {
+
+ String[] entries = {
+ "META-INF/",
+ "META-INF/MANIFEST.MF",
+ "META-INF/A.RSA",
+ "META-INF/A.SF",
+ "META-INF/inf",
+ "a"};
+
+ Map<String,byte[]> content = new HashMap<>();
+
+ // We will create a jar containing entries above. Try all permutations
+ // and confirm 1) When opened as a JarFile, we can always get 3 signed
+ // ones (MANIFEST, inf, a), and 2) When opened as a JarInputStream,
+ // when the order is correct (MANIFEST at beginning, followed by RSA/SF,
+ // directory ignored), we can get 2 signed ones (inf, a).
+
+ // Prepares raw files
+ Files.write(Paths.get("a"), "a".getBytes());
+ Files.createDirectory(Paths.get("META-INF/"));
+ Files.write(Paths.get("META-INF/inf"), "inf".getBytes());
+
+ // Pack, sign, and extract to get all files
+ sun.tools.jar.Main m =
+ new sun.tools.jar.Main(System.out, System.err, "jar");
+ if (!m.run("cvf a.jar a META-INF/inf".split(" "))) {
+ throw new Exception("jar creation failed");
+ }
+ sun.security.tools.keytool.Main.main(
+ ("-keystore jks -storepass changeit -keypass changeit -dname" +
+ " CN=A -alias a -genkeypair -keyalg rsa").split(" "));
+ sun.security.tools.jarsigner.Main.main(
+ "-keystore jks -storepass changeit a.jar a".split(" "));
+ m = new sun.tools.jar.Main(System.out, System.err, "jar");
+ if (!m.run("xvf a.jar".split(" "))) {
+ throw new Exception("jar extraction failed");
+ }
+
+ // Data
+ for (String s: entries) {
+ if (!s.endsWith("/")) {
+ content.put(s, Files.readAllBytes(Paths.get(s)));
+ }
+ }
+
+ // Test
+ for (List<String> perm: Permute(entries)) {
+
+ // Recreate a jar
+ try (ZipOutputStream zos
+ = new ZipOutputStream(new FileOutputStream("x.jar"))) {
+ for (String e: perm) {
+ zos.putNextEntry(new ZipEntry(e));
+ if (Paths.get(e).toFile().isDirectory()) continue;
+ zos.write(content.get(e));
+ }
+ }
+
+ // Open with JarFile, number of signed entries should be 3.
+ int cc = 0;
+ try (JarFile jf = new JarFile("x.jar")) {
+ Enumeration<JarEntry> jes = jf.entries();
+ while (jes.hasMoreElements()) {
+ JarEntry je = jes.nextElement();
+ sun.misc.IOUtils.readFully(jf.getInputStream(je), -1, true);
+ Certificate[] certs = je.getCertificates();
+ if (certs != null && certs.length > 0) {
+ cc++;
+ }
+ }
+ }
+
+ if (cc != 3) {
+ System.out.println(perm + " - jf - " + cc);
+ throw new Exception();
+ }
+
+ // Open with JarInputStream
+ int signed;
+
+ perm.remove("META-INF/");
+ if (perm.get(0).equals("META-INF/MANIFEST.MF") &&
+ perm.get(1).contains("/A.") &&
+ perm.get(2).contains("/A.")) {
+ signed = 2; // Good order
+ } else {
+ signed = 0; // Bad order. In this case, the number of signed
+ // entries is not documented. Just test impl.
+ }
+
+ cc = 0;
+ try (JarInputStream jis
+ = new JarInputStream(new FileInputStream("x.jar"))) {
+ while (true) {
+ JarEntry je = jis.getNextJarEntry();
+ if (je == null) break;
+ sun.misc.IOUtils.readFully(jis, -1, true);
+ Certificate[] certs = je.getCertificates();
+ if (certs != null && certs.length > 0) {
+ cc++;
+ }
+ }
+ }
+
+ if (cc != signed) {
+ System.out.println(perm + " - jis - " + cc + " " + signed);
+ throw new Exception();
+ }
+ }
+ }
+
+ // Helper method to return all permutations of an array. Each output can
+ // be altered without damaging the iteration process.
+ static Iterable<List<String>> Permute(String[] entries) {
+ return new Iterable<List<String>>() {
+
+ int s = entries.length;
+ long c = factorial(s) - 1; // number of permutations
+
+ private long factorial(int n) {
+ return (n == 1) ? 1: (n * factorial(n-1));
+ }
+
+ @Override
+ public Iterator<List<String>> iterator() {
+ return new Iterator<List<String>>() {
+ @Override
+ public boolean hasNext() {
+ return c >= 0;
+ }
+
+ @Override
+ public List<String> next() {
+ if (c < 0) return null;
+ List<String> result = new ArrayList<>(s);
+ LinkedList<String> source = new LinkedList<>(
+ Arrays.asList(entries));
+ // Treat c as a integer with different radixes at
+ // different digits, i.e. at digit 0, radix is s;
+ // at digit 1, radix is s-1. Thus a s-digit number
+ // is able to represent s! different values.
+ long n = c;
+ for (int i=s; i>=1; i--) {
+ int x = (int)(n % i);
+ result.add(source.remove(x));
+ n = n / i;
+ }
+ c--;
+ return result;
+ }
+ };
+ }
+ };
+ }
+}
--- a/jdk/test/sun/tools/jstat/classOutput1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/classOutput1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -21,7 +21,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/classloadOutput1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/classloadOutput1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -22,7 +22,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/compilerOutput1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/compilerOutput1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -30,7 +30,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/fileURITest1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/fileURITest1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -21,7 +21,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/gcCapacityOutput1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/gcCapacityOutput1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -22,7 +22,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/gcCauseOutput1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/gcCauseOutput1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -30,7 +30,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/gcMetaCapacityOutput1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/gcMetaCapacityOutput1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -21,7 +21,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/gcNewCapacityOutput1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/gcNewCapacityOutput1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -22,7 +22,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/gcOldCapacityOutput1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/gcOldCapacityOutput1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -21,7 +21,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/gcOldOutput1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/gcOldOutput1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -22,7 +22,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/gcOutput1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/gcOutput1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -22,7 +22,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/lineCounts1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/lineCounts1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -25,7 +25,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 5) && (totallines == 6)) {
+ if ((headerlines == 1) && (datalines == 5)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/lineCounts2.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/lineCounts2.awk Tue Jan 28 11:22:25 2014 -0800
@@ -21,7 +21,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/lineCounts3.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/lineCounts3.awk Tue Jan 28 11:22:25 2014 -0800
@@ -30,7 +30,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 10) && (totallines == 11)) {
+ if ((headerlines == 1) && (datalines == 10)) {
exit 0
} else {
exit 1
--- a/jdk/test/sun/tools/jstat/lineCounts4.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/lineCounts4.awk Tue Jan 28 11:22:25 2014 -0800
@@ -36,7 +36,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 2) && (datalines == 11) && (totallines == 13) && (datalines2 == 1)) {
+ if ((headerlines == 2) && (datalines == 11) && (datalines2 == 1)) {
exit 0
} else {
exit 1
--- a/jdk/test/sun/tools/jstat/printCompilationOutput1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/printCompilationOutput1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -25,7 +25,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- a/jdk/test/sun/tools/jstat/timeStamp1.awk Wed Jul 05 19:28:21 2017 +0200
+++ b/jdk/test/sun/tools/jstat/timeStamp1.awk Tue Jan 28 11:22:25 2014 -0800
@@ -21,7 +21,7 @@
{ totallines++; print $0 }
END {
- if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
+ if ((headerlines == 1) && (datalines == 1)) {
exit 0
}
else {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/tools/pack200/PackTestZip64.java Tue Jan 28 11:22:25 2014 -0800
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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.
+ */
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.jar.JarInputStream;
+import java.util.jar.JarOutputStream;
+import java.util.zip.ZipEntry;
+/*
+ * @test
+ * @bug 8029646
+ * @summary tests that native unpacker produces the same result as Java one
+ * @compile -XDignore.symbol.file Utils.java PackTestZip64.java
+ * @run main PackTestZip64
+ * @author kizune
+ */
+
+public class PackTestZip64 {
+ public static void main(String... args) throws Exception {
+ testPacking();
+ Utils.cleanup();
+ }
+
+ // 1KB buffer is enough to copy jar content
+ private static final byte[] BUFFER = new byte[1024];
+
+ static void testPacking() throws IOException {
+ // make a copy of the test specimen to local directory
+ File testFile = new File("tools_java.jar");
+ // Add a large number of small files to the golden jar
+ generateLargeJar(testFile, Utils.locateJar("golden.jar"));
+
+ List<String> cmdsList = new ArrayList<>();
+
+ // Repack file to get the Java-based result
+ cmdsList.add(Utils.getPack200Cmd());
+ cmdsList.add("--repack");
+ cmdsList.add(testFile.getName());
+ Utils.runExec(cmdsList);
+ cmdsList.clear();
+
+ // Pack file with pack200 and unpack in with unpack200
+ File packedFile = new File("tools.pack.gz");
+ cmdsList.add(Utils.getPack200Cmd());
+ cmdsList.add(packedFile.getName());
+ cmdsList.add(testFile.getName());
+ Utils.runExec(cmdsList);
+ cmdsList.clear();
+
+ File unpackedFile = new File("tools_native.jar");
+ cmdsList.add(Utils.getUnpack200Cmd());
+ cmdsList.add(packedFile.getName());
+ cmdsList.add(unpackedFile.getName());
+ Utils.runExec(cmdsList);
+
+ // Compare files binary
+ compareTwoFiles(testFile, unpackedFile);
+
+ // Cleaning up generated files
+ testFile.delete();
+ packedFile.delete();
+ unpackedFile.delete();
+ }
+
+ static void compareTwoFiles(File src, File dst) throws IOException {
+ if (!src.exists()) {
+ throw new IOException("File " + src.getName() + " does not exist!");
+ }
+
+ if(!dst.exists()) {
+ throw new IOException("File " + dst.getName() + " does not exist!");
+ }
+
+ BufferedInputStream srcis, dstis;
+ srcis = new BufferedInputStream(new FileInputStream(src));
+ dstis = new BufferedInputStream(new FileInputStream(dst));
+
+ int s = 0, d, pos = 0;
+ while (s != -1) { // Checking of just one result for EOF is enough
+ s = srcis.read();
+ d = dstis.read();
+
+ if (s != d) {
+ throw new IOException("Files are differ starting at position: "
+ + Integer.toHexString(pos));
+ }
+
+ pos++;
+ }
+
+ srcis.close();
+ dstis.close();
+ }
+
+ static void generateLargeJar(File result, File source) throws IOException {
+ if (result.exists()) {
+ result.delete();
+ }
+
+ try (JarOutputStream copyTo = new JarOutputStream(new FileOutputStream(result));
+ JarFile srcJar = new JarFile(source)) {
+
+ for (JarEntry je : Collections.list(srcJar.entries())) {
+ copyTo.putNextEntry(je);
+ if (!je.isDirectory()) {
+ copyStream(srcJar.getInputStream(je), copyTo);
+ }
+ copyTo.closeEntry();
+ }
+
+ int many = Short.MAX_VALUE * 2 + 2;
+
+ for (int i = 0 ; i < many ; i++) {
+ JarEntry e = new JarEntry("F-" + i + ".txt");
+ copyTo.putNextEntry(e);
+ }
+ copyTo.flush();
+ copyTo.close();
+ }
+ }
+
+ static void copyStream(InputStream in, OutputStream out) throws IOException {
+ int bytesRead;
+ while ((bytesRead = in.read(BUFFER))!= -1) {
+ out.write(BUFFER, 0, bytesRead);
+ }
+ }
+}