8032733: Fix cast lint warnings in client libraries
8032734: Add cast lint warning to build of jdk repository
Reviewed-by: alanb, bae, tbell, wetmore
--- a/jdk/make/Setup.gmk Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/make/Setup.gmk Tue Jan 28 09:42:05 2014 -0800
@@ -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,static,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/src/macosx/classes/apple/security/KeychainStore.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/macosx/classes/apple/security/KeychainStore.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/macosx/classes/sun/font/CFontManager.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/macosx/classes/sun/java2d/CRenderer.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CPrinterJob.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/oracle/net/Sdp.java Tue Jan 28 09:42:05 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/imageio/plugins/bmp/BMPImageReader.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriter.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/common/ImageUtil.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/common/LZWStringTable.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadata.java Tue Jan 28 09:42:05 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/jpeg/DHTMarkerSegment.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/DHTMarkerSegment.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/DQTMarkerSegment.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/MarkerSegment.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/SOFMarkerSegment.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/SOSMarkerSegment.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/java/browser/dom/DOMService.java Tue Jan 28 09:42:05 2014 -0800
@@ -43,7 +43,7 @@
{
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 = Class.forName("sun.plugin.dom.DOMService");
--- a/jdk/src/share/classes/com/sun/jmx/remote/security/MBeanServerFileAccessController.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jmx/remote/security/MBeanServerFileAccessController.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/AiffFileReader.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/AiffFileWriter.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/AlawCodec.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/AuFileWriter.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/DLSSoundbank.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java Tue Jan 28 09:42:05 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/PortMixer.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/PortMixer.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/RealTimeSequencer.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/SF2Soundbank.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/SoftInstrument.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/StandardMidiFileWriter.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/Toolkit.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/UlawCodec.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/media/sound/WaveFileWriter.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/AWTKeyStroke.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/BasicStroke.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/CardLayout.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/GradientPaintContext.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/KeyboardFocusManager.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/MultipleGradientPaintContext.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/SequencedEvent.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/SystemTray.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/datatransfer/StringSelection.java Tue Jan 28 09:42:05 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/ComponentColorModel.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/ComponentColorModel.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/ComponentSampleModel.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/DataBuffer.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/DataBufferByte.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/DataBufferDouble.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/DataBufferFloat.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/DataBufferInt.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/DataBufferShort.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/DataBufferUShort.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/IndexColorModel.java Tue Jan 28 09:42:05 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/MultiPixelPackedSampleModel.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/MultiPixelPackedSampleModel.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/PackedColorModel.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/RescaleOp.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/java/awt/image/SinglePixelPackedSampleModel.java Tue Jan 28 09:42:05 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/javax/accessibility/AccessibleRelationSet.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/accessibility/AccessibleRelationSet.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/accessibility/AccessibleStateSet.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/IIOParam.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/ImageIO.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/ImageReadParam.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/ImageReader.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/ImageTypeSpecifier.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/ImageWriteParam.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/ImageWriter.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/metadata/IIOMetadata.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/plugins/jpeg/JPEGImageReadParam.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/spi/ImageReaderSpi.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/imageio/spi/ImageWriterSpi.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/management/remote/JMXServiceURL.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/DocFlavor.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/HashAttributeSet.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/standard/Compression.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobSheets.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobStateReason.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobStateReasons.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaName.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaSizeName.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaTray.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PDLOverrideSupported.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrintQuality.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReason.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/sound/midi/MidiFileFormat.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/sound/midi/MidiSystem.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/sound/midi/Sequence.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioFileFormat.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioFormat.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java Tue Jan 28 09:42:05 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/MenuSelectionManager.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/javax/swing/MenuSelectionManager.java Tue Jan 28 09:42:05 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/org/jcp/xml/dsig/internal/dom/DOMPGPData.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMPGPData.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java Tue Jan 28 09:42:05 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/AppletMessageHandler.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/applet/AppletMessageHandler.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/applet/AppletPanel.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/applet/AppletProps.java Tue Jan 28 09:42:05 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/Main.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/applet/Main.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/audio/AudioStream.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/FontConfiguration.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/FontDescriptor.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/IconInfo.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/PlatformFont.java Tue Jan 28 09:42:05 2014 -0800
@@ -270,7 +270,7 @@
currentDefaultChar = data[stringIndex];
// Note that cache sizes must be a power of two!
- cacheIndex = (int)(currentDefaultChar & PlatformFont.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++) {
--- a/jdk/src/share/classes/sun/awt/datatransfer/ClipboardTransferable.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/datatransfer/ClipboardTransferable.java Tue Jan 28 09:42:05 2014 -0800
@@ -144,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/image/ByteBandedRaster.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/image/ByteBandedRaster.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/image/ByteComponentRaster.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/image/ByteInterleavedRaster.java Tue Jan 28 09:42:05 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/IntegerComponentRaster.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/image/IntegerComponentRaster.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/image/IntegerInterleavedRaster.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/image/ShortBandedRaster.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/image/ShortComponentRaster.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/image/ShortInterleavedRaster.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/image/VSyncedBSManager.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/font/CompositeFont.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/font/Decoration.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/font/ExtendedTextSourceLabel.java Tue Jan 28 09:42:05 2014 -0800
@@ -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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/font/FileFontStrike.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/font/FontLineMetrics.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/font/StandardGlyphVector.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/font/StrikeCache.java Tue Jan 28 09:42:05 2014 -0800
@@ -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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/font/SunFontManager.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/font/TrueTypeFont.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/font/Underline.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/java2d/Disposer.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/java2d/cmm/CMSManager.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/java2d/loops/ProcessPath.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/java2d/opengl/OGLSurfaceData.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/java2d/opengl/OGLUtilities.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/jvmstat/perfdata/monitor/PerfDataBufferImpl.java Tue Jan 28 09:42:05 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/print/PSPrinterJob.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/print/PSPrinterJob.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/print/RasterPrinterJob.java Tue Jan 28 09:42:05 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/tools/javac/SourceClass.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/javac/SourceClass.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/jconsole/ProxyClient.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/jconsole/ThreadTab.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/jconsole/inspector/XOpenTypeViewer.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/jconsole/inspector/XPlottingViewer.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/ConvertExpression.java Tue Jan 28 09:42:05 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/solaris/classes/sun/awt/UNIXToolkit.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/UNIXToolkit.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/InfoWindow.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/MotifDnDConstants.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/MotifDnDDragSourceProtocol.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/MotifDnDDropTargetProtocol.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XAWTFormatter.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XAtom.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java Tue Jan 28 09:42:05 2014 -0800
@@ -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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XContentWindow.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java Tue Jan 28 09:42:05 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/XDnDDragSourceProtocol.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDnDDragSourceProtocol.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDnDDropTargetProtocol.java Tue Jan 28 09:42:05 2014 -0800
@@ -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());
--- a/jdk/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDropTargetEventProcessor.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java Tue Jan 28 09:42:05 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/XEmbedHelper.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbedHelper.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbedServerTester.java Tue Jan 28 09:42:05 2014 -0800
@@ -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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java Tue Jan 28 09:42:05 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/XGlobalCursorManager.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XIconWindow.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XInputMethod.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XMenuWindow.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XNETProtocol.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java Tue Jan 28 09:42:05 2014 -0800
@@ -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();
}
@@ -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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWindow.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11FontManager.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java Tue Jan 28 09:42:05 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/NativeFont.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/font/NativeFont.java Tue Jan 28 09:42:05 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/XRGlyphCacheEntry.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/font/XRGlyphCacheEntry.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRDrawLine.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRPMBlitLoops.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRPaints.java Tue Jan 28 09:42:05 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/print/AttributeClass.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/print/AttributeClass.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/print/CUPSPrinter.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/print/IPPPrintService.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/print/UnixPrintJob.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java Tue Jan 28 09:42:05 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/windows/classes/sun/awt/Win32GraphicsDevice.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/windows/classes/sun/awt/Win32GraphicsDevice.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/windows/classes/sun/awt/windows/WPathGraphics.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/windows/classes/sun/io/Win32ErrorMode.java Tue Jan 28 09:42:05 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/print/Win32PrintJob.java Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/windows/classes/sun/print/Win32PrintJob.java Tue Jan 28 09:42:05 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 Tue Jan 28 12:50:53 2014 +0400
+++ b/jdk/src/windows/classes/sun/print/Win32PrintService.java Tue Jan 28 09:42:05 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 {