8032733: Fix cast lint warnings in client libraries

8032734: Add cast lint warning to build of jdk repository

Reviewed-by: alanb, bae, tbell, wetmore
This commit is contained in:
Joe Darcy 2014-01-28 09:42:05 -08:00
parent 04c87a2bbe
commit ad66e1ea2c
199 changed files with 654 additions and 692 deletions

View File

@ -27,7 +27,7 @@ DISABLE_WARNINGS := -Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-
# To build with all warnings enabled, do the following: # To build with all warnings enabled, do the following:
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000" # 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 # 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 # executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -248,7 +248,7 @@ public final class KeychainStore extends KeyStoreSpi {
if (((KeyEntry)entry).chain == null) { if (((KeyEntry)entry).chain == null) {
return null; return null;
} else { } else {
return (Certificate[])((KeyEntry)entry).chain.clone(); return ((KeyEntry)entry).chain.clone();
} }
} else { } else {
return null; return null;
@ -365,7 +365,7 @@ public final class KeychainStore extends KeyStoreSpi {
throw new KeyStoreException("Certificate chain does not validate"); throw new KeyStoreException("Certificate chain does not validate");
} }
entry.chain = (Certificate[])chain.clone(); entry.chain = chain.clone();
entry.chainRefs = new long[entry.chain.length]; entry.chainRefs = new long[entry.chain.length];
} }
@ -429,7 +429,7 @@ public final class KeychainStore extends KeyStoreSpi {
if ((chain != null) && if ((chain != null) &&
(chain.length != 0)) { (chain.length != 0)) {
entry.chain = (Certificate[])chain.clone(); entry.chain = chain.clone();
entry.chainRefs = new long[entry.chain.length]; entry.chainRefs = new long[entry.chain.length];
} }
@ -1122,7 +1122,7 @@ public final class KeychainStore extends KeyStoreSpi {
throw uke; throw uke;
} }
return ((byte[])key); return key;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -76,7 +76,7 @@ public class CFontManager extends SunFontManager {
// This is a way to register any kind of Font2D, not just files and composites. // This is a way to register any kind of Font2D, not just files and composites.
public static Font2D[] getGenericFonts() { public static Font2D[] getGenericFonts() {
return (Font2D[])genericFonts.values().toArray(new Font2D[0]); return genericFonts.values().toArray(new Font2D[0]);
} }
public Font2D registerGenericFont(Font2D f) public Font2D registerGenericFont(Font2D f)
@ -117,7 +117,7 @@ public class CFontManager extends SunFontManager {
} }
return f; return f;
} else { } else {
return (Font2D)genericFonts.get(fontName); return genericFonts.get(fontName);
} }
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -457,7 +457,7 @@ public class CRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe, D
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) { 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(); 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); surfaceData.blitImage(this, sg2d, imgSurfaceData, fliph, flipv, sx, sy, sw, sh, dx, dy, dw, dh, bgColor);
return true; return true;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -640,7 +640,7 @@ public class CPrinterJob extends RasterPrinterJob {
if (onEventThread) { if (onEventThread) {
try { EventQueue.invokeAndWait(r); try { EventQueue.invokeAndWait(r);
} catch (java.lang.reflect.InvocationTargetException ite) { } catch (java.lang.reflect.InvocationTargetException ite) {
Throwable te = (Throwable)ite.getTargetException(); Throwable te = ite.getTargetException();
if (te instanceof PrinterException) throw (PrinterException)te; if (te instanceof PrinterException) throw (PrinterException)te;
else te.printStackTrace(); else te.printStackTrace();
} catch (Exception e) { e.printStackTrace(); } } catch (Exception e) { e.printStackTrace(); }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -56,7 +56,7 @@ public final class Sdp {
private static final Constructor<ServerSocket> serverSocketCtor; private static final Constructor<ServerSocket> serverSocketCtor;
static { static {
try { try {
serverSocketCtor = (Constructor<ServerSocket>) serverSocketCtor =
ServerSocket.class.getDeclaredConstructor(SocketImpl.class); ServerSocket.class.getDeclaredConstructor(SocketImpl.class);
setAccessible(serverSocketCtor); setAccessible(serverSocketCtor);
} catch (NoSuchMethodException e) { } catch (NoSuchMethodException e) {

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -806,14 +806,11 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
// the sampleModel can be null in case of embedded image // the sampleModel can be null in case of embedded image
if (sampleModel != null) { if (sampleModel != null) {
if (sampleModel.getDataType() == DataBuffer.TYPE_BYTE) if (sampleModel.getDataType() == DataBuffer.TYPE_BYTE)
bdata = (byte[]) bdata = ((DataBufferByte)raster.getDataBuffer()).getData();
((DataBufferByte)raster.getDataBuffer()).getData();
else if (sampleModel.getDataType() == DataBuffer.TYPE_USHORT) else if (sampleModel.getDataType() == DataBuffer.TYPE_USHORT)
sdata = (short[]) sdata = ((DataBufferUShort)raster.getDataBuffer()).getData();
((DataBufferUShort)raster.getDataBuffer()).getData();
else if (sampleModel.getDataType() == DataBuffer.TYPE_INT) else if (sampleModel.getDataType() == DataBuffer.TYPE_INT)
idata = (int[]) idata = ((DataBufferInt)raster.getDataBuffer()).getData();
((DataBufferInt)raster.getDataBuffer()).getData();
} }
// There should only be one tile. // There should only be one tile.

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -574,7 +574,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
imageSize = embedded_stream.size(); imageSize = embedded_stream.size();
long endPos = stream.getStreamPosition(); long endPos = stream.getStreamPosition();
fileSize = (int)(offset + imageSize); fileSize = offset + imageSize;
stream.seek(headPos); stream.seek(headPos);
writeSize(fileSize, 2); writeSize(fileSize, 2);
stream.seek(headPos); stream.seek(headPos);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -593,16 +593,15 @@ public class ImageUtil {
int i = eltOffset; int i = eltOffset;
while(xRemaining > 24) { while(xRemaining > 24) {
data[i++] = data[i++] =
(int)(((binaryDataArray[b++] & 0xFF) << 24) | (((binaryDataArray[b++] & 0xFF) << 24) |
((binaryDataArray[b++] & 0xFF) << 16) | ((binaryDataArray[b++] & 0xFF) << 16) |
((binaryDataArray[b++] & 0xFF) << 8) | ((binaryDataArray[b++] & 0xFF) << 8) |
(binaryDataArray[b++] & 0xFF)); (binaryDataArray[b++] & 0xFF));
xRemaining -= 32; xRemaining -= 32;
} }
int shift = 24; int shift = 24;
while(xRemaining > 0) { while(xRemaining > 0) {
data[i] |= data[i] |= ((binaryDataArray[b++] & 0xFF) << shift);
(int)((binaryDataArray[b++] & 0xFF) << shift);
shift -= 8; shift -= 8;
xRemaining -= 8; xRemaining -= 8;
} }
@ -835,8 +834,7 @@ public class ImageUtil {
for(int x = 0; x < rectWidth; x++) { for(int x = 0; x < rectWidth; x++) {
if(bdata[k++] != (byte)0) { if(bdata[k++] != (byte)0) {
data[bOffset/32] |= data[bOffset/32] |=
(int)(0x00000001 << (0x00000001 << (31 - bOffset % 32));
(31 - bOffset % 32));
} }
bOffset++; bOffset++;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -143,7 +143,7 @@ public class LZWStringTable {
} }
static public int hash(short index, byte lastbyte) { static public int hash(short index, byte lastbyte) {
return ((int)((short)(lastbyte << 8) ^ index) & 0xFFFF) % HASHSIZE; return (((short)(lastbyte << 8) ^ index) & 0xFFFF) % HASHSIZE;
} }
/* /*

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -232,7 +232,7 @@ public class GIFImageMetadata extends GIFMetadata {
appExtNode.setAttribute("authenticationCode", appExtNode.setAttribute("authenticationCode",
toISO8859(authenticationCode)); toISO8859(authenticationCode));
byte[] appData = (byte[])applicationData.get(i); byte[] appData = (byte[])applicationData.get(i);
appExtNode.setUserObject((byte[])appData.clone()); appExtNode.setUserObject(appData.clone());
node.appendChild(appExtNode); node.appendChild(appExtNode);
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -211,10 +211,10 @@ class DHTMarkerSegment extends MarkerSegment {
newGuy = (Htable) super.clone(); newGuy = (Htable) super.clone();
} catch (CloneNotSupportedException e) {} // won't happen } catch (CloneNotSupportedException e) {} // won't happen
if (numCodes != null) { if (numCodes != null) {
newGuy.numCodes = (short []) numCodes.clone(); newGuy.numCodes = numCodes.clone();
} }
if (values != null) { if (values != null) {
newGuy.values = (short []) values.clone(); newGuy.values = values.clone();
} }
return newGuy; return newGuy;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -274,7 +274,7 @@ class DQTMarkerSegment extends MarkerSegment {
newGuy = (Qtable) super.clone(); newGuy = (Qtable) super.clone();
} catch (CloneNotSupportedException e) {} // won't happen } catch (CloneNotSupportedException e) {} // won't happen
if (data != null) { if (data != null) {
newGuy.data = (int []) data.clone(); newGuy.data = data.clone();
} }
return newGuy; return newGuy;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1448,7 +1448,7 @@ class JFIFMarkerSegment extends MarkerSegment {
protected Object clone () { protected Object clone () {
ICCMarkerSegment newGuy = (ICCMarkerSegment) super.clone(); ICCMarkerSegment newGuy = (ICCMarkerSegment) super.clone();
if (profile != null) { if (profile != null) {
newGuy.profile = (byte[]) profile.clone(); newGuy.profile = profile.clone();
} }
return newGuy; return newGuy;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -319,7 +319,7 @@ public class JPEGImageWriter extends ImageWriter {
IIOMetadata streamMetadata, IIOMetadata streamMetadata,
IIOMetadata imageMetadata) { IIOMetadata imageMetadata) {
if (jfifOK(imageType, param, streamMetadata, imageMetadata)) { if (jfifOK(imageType, param, streamMetadata, imageMetadata)) {
return (Dimension [])preferredThumbSizes.clone(); return preferredThumbSizes.clone();
} }
return null; return null;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -724,7 +724,7 @@ public class JPEGMetadata extends IIOMetadata implements Cloneable {
newGuy = (JPEGMetadata) super.clone(); newGuy = (JPEGMetadata) super.clone();
} catch (CloneNotSupportedException e) {} // won't happen } catch (CloneNotSupportedException e) {} // won't happen
if (markerSequence != null) { if (markerSequence != null) {
newGuy.markerSequence = (List) cloneSequence(); newGuy.markerSequence = cloneSequence();
} }
newGuy.resetSequence = null; newGuy.resetSequence = null;
return newGuy; return newGuy;
@ -2016,14 +2016,14 @@ public class JPEGMetadata extends IIOMetadata implements Cloneable {
// First approximation // First approximation
int y = 1; int y = 1;
int x = (int) Math.round(value); int x = Math.round(value);
float ratio = (float) x; float ratio = (float) x;
float delta = Math.abs(value - ratio); float delta = Math.abs(value - ratio);
while (delta > epsilon) { // not close enough while (delta > epsilon) { // not close enough
// Increment y and compute a new x // Increment y and compute a new x
y++; y++;
x = (int) Math.round(y*value); x = Math.round(y*value);
ratio = (float)x/(float)y; ratio = (float)x/(float)y;
delta = Math.abs(value - ratio); delta = Math.abs(value - ratio);
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -119,7 +119,7 @@ class MarkerSegment implements Cloneable {
newGuy = (MarkerSegment) super.clone(); newGuy = (MarkerSegment) super.clone();
} catch (CloneNotSupportedException e) {} // won't happen } catch (CloneNotSupportedException e) {} // won't happen
if (this.data != null) { if (this.data != null) {
newGuy.data = (byte[]) data.clone(); newGuy.data = data.clone();
} }
return newGuy; return newGuy;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -98,7 +98,7 @@ class SOFMarkerSegment extends MarkerSegment {
protected Object clone() { protected Object clone() {
SOFMarkerSegment newGuy = (SOFMarkerSegment) super.clone(); SOFMarkerSegment newGuy = (SOFMarkerSegment) super.clone();
if (componentSpecs != null) { if (componentSpecs != null) {
newGuy.componentSpecs = (ComponentSpec []) componentSpecs.clone(); newGuy.componentSpecs = componentSpecs.clone();
for (int i = 0; i < componentSpecs.length; i++) { for (int i = 0; i < componentSpecs.length; i++) {
newGuy.componentSpecs[i] = newGuy.componentSpecs[i] =
(ComponentSpec) componentSpecs[i].clone(); (ComponentSpec) componentSpecs[i].clone();

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -93,8 +93,7 @@ class SOSMarkerSegment extends MarkerSegment {
protected Object clone () { protected Object clone () {
SOSMarkerSegment newGuy = (SOSMarkerSegment) super.clone(); SOSMarkerSegment newGuy = (SOSMarkerSegment) super.clone();
if (componentSpecs != null) { if (componentSpecs != null) {
newGuy.componentSpecs = newGuy.componentSpecs = componentSpecs.clone();
(ScanComponentSpec []) componentSpecs.clone();
for (int i = 0; i < componentSpecs.length; i++) { for (int i = 0; i < componentSpecs.length; i++) {
newGuy.componentSpecs[i] = newGuy.componentSpecs[i] =
(ScanComponentSpec) componentSpecs[i].clone(); (ScanComponentSpec) componentSpecs[i].clone();

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -344,9 +344,9 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
IHDR_colorType = PNGImageReader.PNG_COLOR_PALETTE; IHDR_colorType = PNGImageReader.PNG_COLOR_PALETTE;
PLTE_present = true; PLTE_present = true;
PLTE_order = null; PLTE_order = null;
PLTE_red = (byte[])reds.clone(); PLTE_red = reds.clone();
PLTE_green = (byte[])greens.clone(); PLTE_green = greens.clone();
PLTE_blue = (byte[])blues.clone(); PLTE_blue = blues.clone();
if (hasAlpha) { if (hasAlpha) {
tRNS_present = true; tRNS_present = true;
@ -430,7 +430,7 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
} else { } else {
ArrayList<byte[]> list = new ArrayList<byte[]>(in.size()); ArrayList<byte[]> list = new ArrayList<byte[]>(in.size());
for (byte[] b: in) { for (byte[] b: in) {
list.add((b == null) ? null : (byte[])b.clone()); list.add((b == null) ? null : b.clone());
} }
return list; return list;
} }
@ -703,8 +703,8 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
IIOMetadataNode tEXt_parent = new IIOMetadataNode("tEXt"); IIOMetadataNode tEXt_parent = new IIOMetadataNode("tEXt");
for (int i = 0; i < tEXt_keyword.size(); i++) { for (int i = 0; i < tEXt_keyword.size(); i++) {
IIOMetadataNode tEXt_node = new IIOMetadataNode("tEXtEntry"); IIOMetadataNode tEXt_node = new IIOMetadataNode("tEXtEntry");
tEXt_node.setAttribute("keyword" , (String)tEXt_keyword.get(i)); tEXt_node.setAttribute("keyword" , tEXt_keyword.get(i));
tEXt_node.setAttribute("value" , (String)tEXt_text.get(i)); tEXt_node.setAttribute("value" , tEXt_text.get(i));
tEXt_parent.appendChild(tEXt_node); tEXt_parent.appendChild(tEXt_node);
} }
@ -759,13 +759,13 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
IIOMetadataNode zTXt_parent = new IIOMetadataNode("zTXt"); IIOMetadataNode zTXt_parent = new IIOMetadataNode("zTXt");
for (int i = 0; i < zTXt_keyword.size(); i++) { for (int i = 0; i < zTXt_keyword.size(); i++) {
IIOMetadataNode zTXt_node = new IIOMetadataNode("zTXtEntry"); 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_node.setAttribute("compressionMethod",
zTXt_compressionMethodNames[cm]); 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); zTXt_parent.appendChild(zTXt_node);
} }
@ -781,8 +781,8 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
IIOMetadataNode unknown_node = IIOMetadataNode unknown_node =
new IIOMetadataNode("UnknownChunk"); new IIOMetadataNode("UnknownChunk");
unknown_node.setAttribute("type", unknown_node.setAttribute("type",
(String)unknownChunkType.get(i)); unknownChunkType.get(i));
unknown_node.setUserObject((byte[])unknownChunkData.get(i)); unknown_node.setUserObject(unknownChunkData.get(i));
unknown_parent.appendChild(unknown_node); unknown_parent.appendChild(unknown_node);
} }
@ -1016,8 +1016,8 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
for (int i = 0; i < tEXt_keyword.size(); i++) { for (int i = 0; i < tEXt_keyword.size(); i++) {
node = new IIOMetadataNode("TextEntry"); node = new IIOMetadataNode("TextEntry");
node.setAttribute("keyword", (String)tEXt_keyword.get(i)); node.setAttribute("keyword", tEXt_keyword.get(i));
node.setAttribute("value", (String)tEXt_text.get(i)); node.setAttribute("value", tEXt_text.get(i));
node.setAttribute("encoding", "ISO-8859-1"); node.setAttribute("encoding", "ISO-8859-1");
node.setAttribute("compression", "none"); node.setAttribute("compression", "none");
@ -1041,8 +1041,8 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
for (int i = 0; i < zTXt_keyword.size(); i++) { for (int i = 0; i < zTXt_keyword.size(); i++) {
node = new IIOMetadataNode("TextEntry"); node = new IIOMetadataNode("TextEntry");
node.setAttribute("keyword", (String)zTXt_keyword.get(i)); node.setAttribute("keyword", zTXt_keyword.get(i));
node.setAttribute("value", (String)zTXt_text.get(i)); node.setAttribute("value", zTXt_text.get(i));
node.setAttribute("compression", "zip"); node.setAttribute("compression", "zip");
text_node.appendChild(node); text_node.appendChild(node);
@ -1400,8 +1400,7 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
fatal(node, "User object not a byte array!"); fatal(node, "User object not a byte array!");
} }
iCCP_compressedProfile = iCCP_compressedProfile = ((byte[])compressedProfile).clone();
(byte[])((byte[])compressedProfile).clone();
iCCP_present = true; iCCP_present = true;
} else if (name.equals("iTXt")) { } else if (name.equals("iTXt")) {

View File

@ -43,7 +43,7 @@ public abstract class DOMService
{ {
try 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")); new sun.security.action.GetPropertyAction("com.sun.java.browser.dom.DOMServiceProvider"));
Class clazz = Class.forName("sun.plugin.dom.DOMService"); Class clazz = Class.forName("sun.plugin.dom.DOMService");

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -283,7 +283,7 @@ public class MBeanServerFileAccessController
public synchronized void refresh() throws IOException { public synchronized void refresh() throws IOException {
Properties props; Properties props;
if (accessFileName == null) if (accessFileName == null)
props = (Properties) originalProps; props = originalProps;
else else
props = propertiesFromFile(accessFileName); props = propertiesFromFile(accessFileName);
parseProperties(props); parseProperties(props);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -667,7 +667,7 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
} else { } else {
if (TRACE_TRANSMITTER) Printer.println("Sending packed message to "+size+" transmitter's receivers"); if (TRACE_TRANSMITTER) Printer.println("Sending packed message to "+size+" transmitter's receivers");
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
Receiver receiver = ((Transmitter)transmitters.get(i)).getReceiver(); Receiver receiver = transmitters.get(i).getReceiver();
if (receiver != null) { if (receiver != null) {
if (optimizedReceiverCount > 0) { if (optimizedReceiverCount > 0) {
if (receiver instanceof MidiOutDevice.MidiOutReceiver) { if (receiver instanceof MidiOutDevice.MidiOutReceiver) {
@ -693,7 +693,7 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
int size = transmitters.size(); int size = transmitters.size();
if (TRACE_TRANSMITTER) Printer.println("Sending long message to "+size+" transmitter's receivers"); if (TRACE_TRANSMITTER) Printer.println("Sending long message to "+size+" transmitter's receivers");
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
Receiver receiver = ((Transmitter)transmitters.get(i)).getReceiver(); Receiver receiver = transmitters.get(i).getReceiver();
if (receiver != null) { if (receiver != null) {
//$$fb 2002-04-02: SysexMessages are mutable, so //$$fb 2002-04-02: SysexMessages are mutable, so
// an application could change the contents of this object, // an application could change the contents of this object,
@ -729,7 +729,7 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
} else { } else {
if (TRACE_TRANSMITTER) Printer.println("Sending MIDI message to "+size+" transmitter's receivers"); if (TRACE_TRANSMITTER) Printer.println("Sending MIDI message to "+size+" transmitter's receivers");
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
Receiver receiver = ((Transmitter)transmitters.get(i)).getReceiver(); Receiver receiver = transmitters.get(i).getReceiver();
if (receiver != null) { if (receiver != null) {
//$$fb 2002-04-02: ShortMessages are mutable, so //$$fb 2002-04-02: ShortMessages are mutable, so
// an application could change the contents of this object, // an application could change the contents of this object,

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -406,7 +406,7 @@ public final class AiffFileReader extends SunFileReader {
int expon = 0; int expon = 0;
long hiMant = 0, loMant = 0; long hiMant = 0, loMant = 0;
long t1, t2; long t1, t2;
double HUGE = ((double)3.40282346638528860e+38); double HUGE = 3.40282346638528860e+38;
expon = dis.readUnsignedShort(); expon = dis.readUnsignedShort();

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -239,18 +239,18 @@ public final class AiffFileWriter extends SunFileWriter {
while( (bytesRead = fileStream.read( buffer )) >= 0 ) { while( (bytesRead = fileStream.read( buffer )) >= 0 ) {
if (maxLength>0) { if (maxLength>0) {
if( bytesRead < maxLength ) { if( bytesRead < maxLength ) {
out.write( buffer, 0, (int)bytesRead ); out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead; bytesWritten += bytesRead;
maxLength -= bytesRead; maxLength -= bytesRead;
} else { } else {
out.write( buffer, 0, (int)maxLength ); out.write( buffer, 0, maxLength );
bytesWritten += maxLength; bytesWritten += maxLength;
maxLength = 0; maxLength = 0;
break; break;
} }
} else { } else {
out.write( buffer, 0, (int)bytesRead ); out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead; bytesWritten += bytesRead;
} }
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -316,7 +316,7 @@ public final class AlawCodec extends SunCodec {
// set the AudioInputStream length in frames if we know it // set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) { if (stream instanceof AudioInputStream) {
frameLength = ((AudioInputStream)stream).getFrameLength(); frameLength = stream.getFrameLength();
} }
// set framePos to zero // set framePos to zero
@ -346,7 +346,7 @@ public final class AlawCodec extends SunCodec {
public int read() throws IOException { public int read() throws IOException {
byte[] b = new byte[1]; byte[] b = new byte[1];
return (int)read(b, 0, b.length); return read(b, 0, b.length);
} }
@ -432,8 +432,8 @@ public final class AlawCodec extends SunCodec {
int readCount = super.read(b, readOffset, readLen); int readCount = super.read(b, readOffset, readLen);
for (i = off; i < (off + (readCount*2)); i+=2) { for (i = off; i < (off + (readCount*2)); i+=2) {
b[i] = (byte)tabByte1[b[readOffset] & 0xFF]; b[i] = tabByte1[b[readOffset] & 0xFF];
b[i+1] = (byte)tabByte2[b[readOffset] & 0xFF]; b[i+1] = tabByte2[b[readOffset] & 0xFF];
readOffset++; readOffset++;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -308,17 +308,17 @@ public final class AuFileWriter extends SunFileWriter {
while( (bytesRead = fileStream.read( buffer )) >= 0 ) { while( (bytesRead = fileStream.read( buffer )) >= 0 ) {
if (maxLength>0) { if (maxLength>0) {
if( bytesRead < maxLength ) { if( bytesRead < maxLength ) {
out.write( buffer, 0, (int)bytesRead ); out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead; bytesWritten += bytesRead;
maxLength -= bytesRead; maxLength -= bytesRead;
} else { } else {
out.write( buffer, 0, (int)maxLength ); out.write( buffer, 0, maxLength );
bytesWritten += maxLength; bytesWritten += maxLength;
maxLength = 0; maxLength = 0;
break; break;
} }
} else { } else {
out.write( buffer, 0, (int)bytesRead ); out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead; bytesWritten += bytesRead;
} }
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -531,7 +531,7 @@ public final class DLSSoundbank implements Soundbank {
chunk.read(); // Read Reserved byte chunk.read(); // Read Reserved byte
instrument.bank = bank; instrument.bank = bank;
instrument.preset = (int) id; instrument.preset = id;
instrument.druminstrument = (drumins & 128) > 0; instrument.druminstrument = (drumins & 128) > 0;
//System.out.println("bank="+bank+" drumkit="+drumkit //System.out.println("bank="+bank+" drumkit="+drumkit
// +" id="+id); // +" id="+id);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -495,7 +495,7 @@ final class DirectAudioDevice extends AbstractMixer {
} }
// align buffer to full frames // align buffer to full frames
bufferSize = ((int) bufferSize / format.getFrameSize()) * format.getFrameSize(); bufferSize = ( bufferSize / format.getFrameSize()) * format.getFrameSize();
id = nOpen(mixerIndex, deviceID, isSource, id = nOpen(mixerIndex, deviceID, isSource,
encoding, encoding,
@ -1381,7 +1381,7 @@ final class DirectAudioDevice extends AbstractMixer {
if (toWriteBytes > getBufferSize()) { if (toWriteBytes > getBufferSize()) {
toWriteBytes = Toolkit.align(getBufferSize(), frameSize); toWriteBytes = Toolkit.align(getBufferSize(), frameSize);
} }
int written = write(audioData, (int) clipBytePosition, toWriteBytes); // increases bytePosition int written = write(audioData, clipBytePosition, toWriteBytes); // increases bytePosition
clipBytePosition += written; clipBytePosition += written;
// make sure nobody called setFramePosition, or stop() during the write() call // make sure nobody called setFramePosition, or stop() during the write() call
if (doIO && newFramePosition < 0 && written >= 0) { if (doIO && newFramePosition < 0 && written >= 0) {

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -212,7 +212,7 @@ final class PortMixer extends AbstractMixer {
ports = new PortMixerPort[portInfos.length]; ports = new PortMixerPort[portInfos.length];
} }
if (ports[index] == null) { 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]; return ports[index];
} }
// $$fb TODO: return (Port) (ports[index].clone()); // $$fb TODO: return (Port) (ports[index].clone());

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -386,7 +386,7 @@ final class RealTimeSequencer extends AbstractMidiDevice
// last resort: return a standard tempo: 120bpm // last resort: return a standard tempo: 120bpm
return (float) MidiUtils.DEFAULT_TEMPO_MPQ; return (float) MidiUtils.DEFAULT_TEMPO_MPQ;
} }
return (float)getDataPump().getTempoMPQ(); return getDataPump().getTempoMPQ();
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -617,8 +617,8 @@ public final class SF2Soundbank implements Soundbank {
private void writeGenerators(RIFFWriter writer, Map<Integer, Short> generators) private void writeGenerators(RIFFWriter writer, Map<Integer, Short> generators)
throws IOException { throws IOException {
Short keyrange = (Short) generators.get(SF2Region.GENERATOR_KEYRANGE); Short keyrange = generators.get(SF2Region.GENERATOR_KEYRANGE);
Short velrange = (Short) generators.get(SF2Region.GENERATOR_VELRANGE); Short velrange = generators.get(SF2Region.GENERATOR_VELRANGE);
if (keyrange != null) { if (keyrange != null) {
writer.writeUnsignedShort(SF2Region.GENERATOR_KEYRANGE); writer.writeUnsignedShort(SF2Region.GENERATOR_KEYRANGE);
writer.writeShort(keyrange); writer.writeShort(keyrange);
@ -706,7 +706,7 @@ public final class SF2Soundbank implements Soundbank {
} }
for (SF2InstrumentRegion region : preset.getRegions()) { for (SF2InstrumentRegion region : preset.getRegions()) {
writeGenerators(pgen_chunk, region.getGenerators()); writeGenerators(pgen_chunk, region.getGenerators());
int ix = (int) layers.indexOf(region.layer); int ix = layers.indexOf(region.layer);
if (ix != -1) { if (ix != -1) {
pgen_chunk.writeUnsignedShort(SF2Region.GENERATOR_INSTRUMENT); pgen_chunk.writeUnsignedShort(SF2Region.GENERATOR_INSTRUMENT);
pgen_chunk.writeShort((short) ix); pgen_chunk.writeShort((short) ix);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -44,7 +44,7 @@ public final class SoftInstrument extends Instrument {
ins.getDataClass()); ins.getDataClass());
data = ins.getData(); data = ins.getData();
this.ins = ins; this.ins = ins;
initPerformers(((ModelInstrument)ins).getPerformers()); initPerformers(ins.getPerformers());
} }
public SoftInstrument(ModelInstrument ins, public SoftInstrument(ModelInstrument ins,

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -141,7 +141,7 @@ public final class StandardMidiFileWriter extends MidiFileWriter {
buffer = new byte[bufferSize]; buffer = new byte[bufferSize];
while( (bytesRead = fileStream.read( buffer )) >= 0 ) { while( (bytesRead = fileStream.read( buffer )) >= 0 ) {
out.write( buffer, 0, (int)bytesRead ); out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead; bytesWritten += bytesRead;
} }
// Done....return bytesWritten // Done....return bytesWritten

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -74,7 +74,7 @@ public final class Toolkit {
*/ */
static float linearToDB(float linear) { 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; return dB;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -301,7 +301,7 @@ public final class UlawCodec extends SunCodec {
// set the AudioInputStream length in frames if we know it // set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) { if (stream instanceof AudioInputStream) {
frameLength = ((AudioInputStream)stream).getFrameLength(); frameLength = stream.getFrameLength();
} }
// set framePos to zero // set framePos to zero
framePos = 0; framePos = 0;
@ -406,8 +406,8 @@ public final class UlawCodec extends SunCodec {
return readCount; return readCount;
} }
for (i = off; i < (off + (readCount*2)); i+=2) { for (i = off; i < (off + (readCount*2)); i+=2) {
b[i] = (byte)tabByte1[b[readOffset] & 0xFF]; b[i] = tabByte1[b[readOffset] & 0xFF];
b[i+1] = (byte)tabByte2[b[readOffset] & 0xFF]; b[i+1] = tabByte2[b[readOffset] & 0xFF];
readOffset++; readOffset++;
} }
return (i - off); return (i - off);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -240,17 +240,17 @@ public final class WaveFileWriter extends SunFileWriter {
if (maxLength>0) { if (maxLength>0) {
if( bytesRead < maxLength ) { if( bytesRead < maxLength ) {
out.write( buffer, 0, (int)bytesRead ); out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead; bytesWritten += bytesRead;
maxLength -= bytesRead; maxLength -= bytesRead;
} else { } else {
out.write( buffer, 0, (int)maxLength ); out.write( buffer, 0, maxLength );
bytesWritten += maxLength; bytesWritten += maxLength;
maxLength = 0; maxLength = 0;
break; break;
} }
} else { } else {
out.write( buffer, 0, (int)bytesRead ); out.write( buffer, 0, bytesRead );
bytesWritten += bytesRead; bytesWritten += bytesRead;
} }
} }
@ -272,7 +272,7 @@ public final class WaveFileWriter extends SunFileWriter {
short channels = (short) audioFormat.getChannels(); short channels = (short) audioFormat.getChannels();
short sampleSizeInBits = (short) audioFormat.getSampleSizeInBits(); short sampleSizeInBits = (short) audioFormat.getSampleSizeInBits();
int sampleRate = (int) audioFormat.getSampleRate(); int sampleRate = (int) audioFormat.getSampleRate();
int frameSizeInBytes = (int) audioFormat.getFrameSize(); int frameSizeInBytes = audioFormat.getFrameSize();
int frameRate = (int) audioFormat.getFrameRate(); int frameRate = (int) audioFormat.getFrameRate();
int avgBytesPerSec = channels * sampleSizeInBits * sampleRate / 8;; int avgBytesPerSec = channels * sampleSizeInBits * sampleRate / 8;;
short blockAlign = (short) ((sampleSizeInBits / 8) * channels); short blockAlign = (short) ((sampleSizeInBits / 8) * channels);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1282,7 +1282,7 @@ private int jjMoveNfa_0(int startState, int curPos)
} }
else else
{ {
int hiByte = (int)(curChar >> 8); int hiByte = (curChar >> 8);
int i1 = hiByte >> 6; int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077); long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6; int i2 = (curChar & 0xff) >> 6;

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -243,7 +243,7 @@ public class AWTKeyStroke implements Serializable {
return null; return null;
} }
}); });
return (Constructor)ctor; return ctor;
} }
private static synchronized AWTKeyStroke getCachedStroke private static synchronized AWTKeyStroke getCachedStroke
@ -275,7 +275,7 @@ public class AWTKeyStroke implements Serializable {
cacheKey.modifiers = mapNewModifiers(mapOldModifiers(modifiers)); cacheKey.modifiers = mapNewModifiers(mapOldModifiers(modifiers));
cacheKey.onKeyRelease = onKeyRelease; cacheKey.onKeyRelease = onKeyRelease;
AWTKeyStroke stroke = (AWTKeyStroke)cache.get(cacheKey); AWTKeyStroke stroke = cache.get(cacheKey);
if (stroke == null) { if (stroke == null) {
stroke = cacheKey; stroke = cacheKey;
cache.put(stroke, stroke); cache.put(stroke, stroke);
@ -581,7 +581,7 @@ public class AWTKeyStroke implements Serializable {
continue; continue;
} }
Integer tokenMask = (Integer)modifierKeywords.get(token); Integer tokenMask = modifierKeywords.get(token);
if (tokenMask != null) { if (tokenMask != null) {
mask |= tokenMask.intValue(); mask |= tokenMask.intValue();
} else { } else {
@ -879,11 +879,11 @@ class VKCollection {
public synchronized Integer findCode(String name) { public synchronized Integer findCode(String name) {
assert(name != null); assert(name != null);
return (Integer)name2code.get(name); return name2code.get(name);
} }
public synchronized String findName(Integer code) { public synchronized String findName(Integer code) {
assert(code != null); assert(code != null);
return (String)code2name.get(code); return code2name.get(code);
} }
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -225,7 +225,7 @@ public class BasicStroke implements Stroke {
this.join = join; this.join = join;
this.miterlimit = miterlimit; this.miterlimit = miterlimit;
if (dash != null) { if (dash != null) {
this.dash = (float []) dash.clone(); this.dash = dash.clone();
} }
this.dash_phase = dash_phase; this.dash_phase = dash_phase;
} }
@ -359,7 +359,7 @@ public class BasicStroke implements Stroke {
return null; return null;
} }
return (float[]) dash.clone(); return dash.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -223,8 +223,8 @@ public class CardLayout implements LayoutManager2,
comp.setVisible(false); comp.setVisible(false);
} }
for (int i=0; i < vector.size(); i++) { for (int i=0; i < vector.size(); i++) {
if (((Card)vector.get(i)).name.equals(name)) { if ((vector.get(i)).name.equals(name)) {
((Card)vector.get(i)).comp = comp; (vector.get(i)).comp = comp;
return; return;
} }
} }
@ -242,7 +242,7 @@ public class CardLayout implements LayoutManager2,
public void removeLayoutComponent(Component comp) { public void removeLayoutComponent(Component comp) {
synchronized (comp.getTreeLock()) { synchronized (comp.getTreeLock()) {
for (int i = 0; i < vector.size(); i++) { 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 we remove current component we should show next one
if (comp.isVisible() && (comp.getParent() != null)) { if (comp.isVisible() && (comp.getParent() != null)) {
next(comp.getParent()); next(comp.getParent());
@ -527,7 +527,7 @@ public class CardLayout implements LayoutManager2,
Component next = null; Component next = null;
int ncomponents = vector.size(); int ncomponents = vector.size();
for (int i = 0; i < ncomponents; i++) { for (int i = 0; i < ncomponents; i++) {
Card card = (Card)vector.get(i); Card card = vector.get(i);
if (card.name.equals(name)) { if (card.name.equals(name)) {
next = card.comp; next = card.comp;
currentCard = i; currentCard = i;
@ -574,8 +574,8 @@ public class CardLayout implements LayoutManager2,
vector = new Vector<>(); vector = new Vector<>();
if (tab != null && !tab.isEmpty()) { if (tab != null && !tab.isEmpty()) {
for (Enumeration<String> e = tab.keys() ; e.hasMoreElements() ; ) { for (Enumeration<String> e = tab.keys() ; e.hasMoreElements() ; ) {
String key = (String)e.nextElement(); String key = e.nextElement();
Component comp = (Component)tab.get(key); Component comp = tab.get(key);
vector.add(new Card(key, comp)); vector.add(new Card(key, comp));
if (comp.isVisible()) { if (comp.isVisible()) {
currentCard = vector.size() - 1; currentCard = vector.size() - 1;
@ -597,7 +597,7 @@ public class CardLayout implements LayoutManager2,
Hashtable<String, Component> tab = new Hashtable<>(); Hashtable<String, Component> tab = new Hashtable<>();
int ncomponents = vector.size(); int ncomponents = vector.size();
for (int i = 0; i < ncomponents; i++) { for (int i = 0; i < ncomponents; i++) {
Card card = (Card)vector.get(i); Card card = vector.get(i);
tab.put(card.name, card.comp); tab.put(card.name, card.comp);
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -578,7 +578,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
// newFocusOwner is not focus traversable. // newFocusOwner is not focus traversable.
dequeueKeyEvents(-1, newFocusOwner); dequeueKeyEvents(-1, newFocusOwner);
if (KeyboardFocusManager.isAutoFocusTransferEnabled()) { if (KeyboardFocusManager.isAutoFocusTransferEnabled()) {
restoreFocus(fe, (Window)newFocusedWindow); restoreFocus(fe, newFocusedWindow);
} }
break; break;
} }
@ -590,7 +590,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
// Focus change was rejected. Unlikely, but possible. // Focus change was rejected. Unlikely, but possible.
dequeueKeyEvents(-1, newFocusOwner); dequeueKeyEvents(-1, newFocusOwner);
if (KeyboardFocusManager.isAutoFocusTransferEnabled()) { if (KeyboardFocusManager.isAutoFocusTransferEnabled()) {
restoreFocus(fe, (Window)newFocusedWindow); restoreFocus(fe, newFocusedWindow);
} }
break; break;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -46,7 +46,7 @@ class GradientPaintContext implements PaintContext {
static synchronized Raster getCachedRaster(ColorModel cm, int w, int h) { static synchronized Raster getCachedRaster(ColorModel cm, int w, int h) {
if (cm == cachedModel) { if (cm == cachedModel) {
if (cached != null) { if (cached != null) {
Raster ras = (Raster) cached.get(); Raster ras = cached.get();
if (ras != null && if (ras != null &&
ras.getWidth() >= w && ras.getWidth() >= w &&
ras.getHeight() >= h) ras.getHeight() >= h)
@ -61,7 +61,7 @@ class GradientPaintContext implements PaintContext {
static synchronized void putCachedRaster(ColorModel cm, Raster ras) { static synchronized void putCachedRaster(ColorModel cm, Raster ras) {
if (cached != null) { if (cached != null) {
Raster cras = (Raster) cached.get(); Raster cras = cached.get();
if (cras != null) { if (cras != null) {
int cw = cras.getWidth(); int cw = cras.getWidth();
int ch = cras.getHeight(); int ch = cras.getHeight();

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1909,7 +1909,7 @@ public abstract class KeyboardFocusManager
static synchronized Component getMostRecentFocusOwner(Window window) { static synchronized Component getMostRecentFocusOwner(Window window) {
WeakReference<Component> weakValue = WeakReference<Component> weakValue =
(WeakReference)mostRecentFocusOwners.get(window); (WeakReference)mostRecentFocusOwners.get(window);
return weakValue == null ? null : (Component)weakValue.get(); return weakValue == null ? null : weakValue.get();
} }
/** /**
@ -2496,9 +2496,9 @@ public abstract class KeyboardFocusManager
HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER) HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER)
{ {
int size = heavyweightRequests.size(); int size = heavyweightRequests.size();
hwFocusRequest = (HeavyweightFocusRequest)((size >= 2) hwFocusRequest = (size >= 2)
? heavyweightRequests.get(size - 2) ? heavyweightRequests.get(size - 2)
: null); : null;
} }
if (focusedWindowChanged(heavyweight, if (focusedWindowChanged(heavyweight,
(hwFocusRequest != null) (hwFocusRequest != null)

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -665,7 +665,7 @@ abstract class MultipleGradientPaintContext implements PaintContext {
{ {
if (cm == cachedModel) { if (cm == cachedModel) {
if (cached != null) { if (cached != null) {
Raster ras = (Raster) cached.get(); Raster ras = cached.get();
if (ras != null && if (ras != null &&
ras.getWidth() >= w && ras.getWidth() >= w &&
ras.getHeight() >= h) ras.getHeight() >= h)
@ -687,7 +687,7 @@ abstract class MultipleGradientPaintContext implements PaintContext {
Raster ras) Raster ras)
{ {
if (cached != null) { if (cached != null) {
Raster cras = (Raster) cached.get(); Raster cras = cached.get();
if (cras != null) { if (cras != null) {
int cw = cras.getWidth(); int cw = cras.getWidth();
int ch = cras.getHeight(); int ch = cras.getHeight();

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -418,9 +418,8 @@ public class ScrollPaneAdjustable implements Adjustable, Serializable {
* @since 1.4 * @since 1.4
*/ */
public synchronized AdjustmentListener[] getAdjustmentListeners() { public synchronized AdjustmentListener[] getAdjustmentListeners() {
return (AdjustmentListener[])(AWTEventMulticaster.getListeners( return AWTEventMulticaster.getListeners(adjustmentListener,
adjustmentListener, AdjustmentListener.class);
AdjustmentListener.class));
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -160,7 +160,7 @@ class SequencedEvent extends AWTEvent implements ActiveEvent {
} }
private final synchronized static SequencedEvent getFirst() { private final synchronized static SequencedEvent getFirst() {
return (SequencedEvent)list.getFirst(); return list.getFirst();
} }
/* Disposes all events from disposed AppContext /* Disposes all events from disposed AppContext
@ -211,7 +211,7 @@ class SequencedEvent extends AWTEvent implements ActiveEvent {
list.removeFirst(); list.removeFirst();
if (!list.isEmpty()) { if (!list.isEmpty()) {
next = (SequencedEvent)list.getFirst(); next = list.getFirst();
} }
} else { } else {
list.remove(this); list.remove(this);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -337,7 +337,7 @@ public class SystemTray {
public TrayIcon[] getTrayIcons() { public TrayIcon[] getTrayIcons() {
Vector<TrayIcon> icons = (Vector<TrayIcon>)AppContext.getAppContext().get(TrayIcon.class); Vector<TrayIcon> icons = (Vector<TrayIcon>)AppContext.getAppContext().get(TrayIcon.class);
if (icons != null) { if (icons != null) {
return (TrayIcon[])icons.toArray(new TrayIcon[icons.size()]); return icons.toArray(new TrayIcon[icons.size()]);
} }
return EMPTY_TRAY_ARRAY; return EMPTY_TRAY_ARRAY;
} }

View File

@ -730,9 +730,8 @@ public class DataFlavor implements Externalizable, Cloneable {
textFlavorComparator = new TextFlavorComparator(); textFlavorComparator = new TextFlavorComparator();
} }
DataFlavor bestFlavor = DataFlavor bestFlavor = Collections.max(Arrays.asList(availableFlavors),
(DataFlavor)Collections.max(Arrays.asList(availableFlavors), textFlavorComparator);
textFlavorComparator);
if (!bestFlavor.isFlavorTextType()) { if (!bestFlavor.isFlavorTextType()) {
return null; return null;

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -76,7 +76,7 @@ public class StringSelection implements Transferable, ClipboardOwner {
public DataFlavor[] getTransferDataFlavors() { public DataFlavor[] getTransferDataFlavors() {
// returning flavors itself would allow client code to modify // returning flavors itself would allow client code to modify
// our internal behavior // our internal behavior
return (DataFlavor[])flavors.clone(); return flavors.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1514,13 +1514,13 @@ public class ComponentColorModel extends ColorModel {
intpixel[0] = (int) (red * factor * ((1<<nBits[0]) - 1) + 0.5f); intpixel[0] = (int) (red * factor * ((1<<nBits[0]) - 1) + 0.5f);
} }
if (nBits[1] == precision) { if (nBits[1] == precision) {
intpixel[1] = (int)(grn); intpixel[1] = grn;
} }
else { else {
intpixel[1] = (int) (grn * factor * ((1<<nBits[1]) - 1) + 0.5f); intpixel[1] = (int) (grn * factor * ((1<<nBits[1]) - 1) + 0.5f);
} }
if (nBits[2] == precision) { if (nBits[2] == precision) {
intpixel[2] = (int)(blu); intpixel[2] = blu;
} }
else { else {
intpixel[2] = (int) (blu * factor * ((1<<nBits[2]) - 1) + 0.5f); intpixel[2] = (int) (blu * factor * ((1<<nBits[2]) - 1) + 0.5f);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -147,7 +147,7 @@ public class ComponentSampleModel extends SampleModel
this.dataType = dataType; this.dataType = dataType;
this.pixelStride = pixelStride; this.pixelStride = pixelStride;
this.scanlineStride = scanlineStride; this.scanlineStride = scanlineStride;
this.bandOffsets = (int[])bandOffsets.clone(); this.bandOffsets = bandOffsets.clone();
numBands = this.bandOffsets.length; numBands = this.bandOffsets.length;
if (pixelStride < 0) { if (pixelStride < 0) {
throw new IllegalArgumentException("Pixel stride must be >= 0"); throw new IllegalArgumentException("Pixel stride must be >= 0");
@ -211,8 +211,8 @@ public class ComponentSampleModel extends SampleModel
this.dataType = dataType; this.dataType = dataType;
this.pixelStride = pixelStride; this.pixelStride = pixelStride;
this.scanlineStride = scanlineStride; this.scanlineStride = scanlineStride;
this.bandOffsets = (int[])bandOffsets.clone(); this.bandOffsets = bandOffsets.clone();
this.bankIndices = (int[]) bankIndices.clone(); this.bankIndices = bankIndices.clone();
if (pixelStride < 0) { if (pixelStride < 0) {
throw new IllegalArgumentException("Pixel stride must be >= 0"); throw new IllegalArgumentException("Pixel stride must be >= 0");
} }
@ -526,14 +526,14 @@ public class ComponentSampleModel extends SampleModel
* @return the bank indices for all bands. * @return the bank indices for all bands.
*/ */
public final int [] getBankIndices() { public final int [] getBankIndices() {
return (int[]) bankIndices.clone(); return bankIndices.clone();
} }
/** Returns the band offset for all bands. /** Returns the band offset for all bands.
* @return the band offsets for all bands. * @return the band offsets for all bands.
*/ */
public final int [] getBandOffsets() { public final int [] getBandOffsets() {
return (int[])bandOffsets.clone(); return bandOffsets.clone();
} }
/** Returns the scanline stride of this ComponentSampleModel. /** Returns the scanline stride of this ComponentSampleModel.

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -279,7 +279,7 @@ public abstract class DataBuffer {
this.banks = numBanks; this.banks = numBanks;
this.size = size; this.size = size;
this.offset = offsets[0]; this.offset = offsets[0];
this.offsets = (int[])offsets.clone(); this.offsets = offsets.clone();
} }
/** Returns the data type of this DataBuffer. /** Returns the data type of this DataBuffer.
@ -307,7 +307,7 @@ public abstract class DataBuffer {
* @return the offsets of all banks. * @return the offsets of all banks.
*/ */
public int[] getOffsets() { public int[] getOffsets() {
return (int[])offsets.clone(); return offsets.clone();
} }
/** Returns the number of banks in this DataBuffer. /** Returns the number of banks in this DataBuffer.

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -156,7 +156,7 @@ public final class DataBufferByte extends DataBuffer
*/ */
public DataBufferByte(byte dataArray[][], int size) { public DataBufferByte(byte dataArray[][], int size) {
super(UNTRACKABLE, TYPE_BYTE, size, dataArray.length); super(UNTRACKABLE, TYPE_BYTE, size, dataArray.length);
bankdata = (byte[][]) dataArray.clone(); bankdata = dataArray.clone();
data = bankdata[0]; data = bankdata[0];
} }
@ -181,7 +181,7 @@ public final class DataBufferByte extends DataBuffer
*/ */
public DataBufferByte(byte dataArray[][], int size, int offsets[]) { public DataBufferByte(byte dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_BYTE, size, dataArray.length, offsets); super(UNTRACKABLE, TYPE_BYTE, size, dataArray.length, offsets);
bankdata = (byte[][]) dataArray.clone(); bankdata = dataArray.clone();
data = bankdata[0]; data = bankdata[0];
} }
@ -228,7 +228,7 @@ public final class DataBufferByte extends DataBuffer
*/ */
public byte[][] getBankData() { public byte[][] getBankData() {
theTrackable.setUntrackable(); theTrackable.setUntrackable();
return (byte[][]) bankdata.clone(); return bankdata.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -154,7 +154,7 @@ public final class DataBufferDouble extends DataBuffer {
*/ */
public DataBufferDouble(double dataArray[][], int size) { public DataBufferDouble(double dataArray[][], int size) {
super(UNTRACKABLE, TYPE_DOUBLE, size, dataArray.length); super(UNTRACKABLE, TYPE_DOUBLE, size, dataArray.length);
bankdata = (double[][]) dataArray.clone(); bankdata = dataArray.clone();
data = bankdata[0]; data = bankdata[0];
} }
@ -178,7 +178,7 @@ public final class DataBufferDouble extends DataBuffer {
*/ */
public DataBufferDouble(double dataArray[][], int size, int offsets[]) { public DataBufferDouble(double dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_DOUBLE, size, dataArray.length, offsets); super(UNTRACKABLE, TYPE_DOUBLE, size, dataArray.length, offsets);
bankdata = (double[][]) dataArray.clone(); bankdata = dataArray.clone();
data = bankdata[0]; data = bankdata[0];
} }
@ -225,7 +225,7 @@ public final class DataBufferDouble extends DataBuffer {
*/ */
public double[][] getBankData() { public double[][] getBankData() {
theTrackable.setUntrackable(); theTrackable.setUntrackable();
return (double[][]) bankdata.clone(); return bankdata.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -156,7 +156,7 @@ public final class DataBufferFloat extends DataBuffer {
*/ */
public DataBufferFloat(float dataArray[][], int size) { public DataBufferFloat(float dataArray[][], int size) {
super(UNTRACKABLE, TYPE_FLOAT, size, dataArray.length); super(UNTRACKABLE, TYPE_FLOAT, size, dataArray.length);
bankdata = (float[][]) dataArray.clone(); bankdata = dataArray.clone();
data = bankdata[0]; data = bankdata[0];
} }
@ -180,7 +180,7 @@ public final class DataBufferFloat extends DataBuffer {
*/ */
public DataBufferFloat(float dataArray[][], int size, int offsets[]) { public DataBufferFloat(float dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_FLOAT, size,dataArray.length, offsets); super(UNTRACKABLE, TYPE_FLOAT, size,dataArray.length, offsets);
bankdata = (float[][]) dataArray.clone(); bankdata = dataArray.clone();
data = bankdata[0]; data = bankdata[0];
} }
@ -227,7 +227,7 @@ public final class DataBufferFloat extends DataBuffer {
*/ */
public float[][] getBankData() { public float[][] getBankData() {
theTrackable.setUntrackable(); theTrackable.setUntrackable();
return (float[][]) bankdata.clone(); return bankdata.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -154,7 +154,7 @@ public final class DataBufferInt extends DataBuffer
*/ */
public DataBufferInt(int dataArray[][], int size) { public DataBufferInt(int dataArray[][], int size) {
super(UNTRACKABLE, TYPE_INT, size, dataArray.length); super(UNTRACKABLE, TYPE_INT, size, dataArray.length);
bankdata = (int [][]) dataArray.clone(); bankdata = dataArray.clone();
data = bankdata[0]; data = bankdata[0];
} }
@ -179,7 +179,7 @@ public final class DataBufferInt extends DataBuffer
*/ */
public DataBufferInt(int dataArray[][], int size, int offsets[]) { public DataBufferInt(int dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_INT, size, dataArray.length, offsets); super(UNTRACKABLE, TYPE_INT, size, dataArray.length, offsets);
bankdata = (int [][]) dataArray.clone(); bankdata = dataArray.clone();
data = bankdata[0]; data = bankdata[0];
} }
@ -226,7 +226,7 @@ public final class DataBufferInt extends DataBuffer
*/ */
public int[][] getBankData() { public int[][] getBankData() {
theTrackable.setUntrackable(); theTrackable.setUntrackable();
return (int [][]) bankdata.clone(); return bankdata.clone();
} }
/** /**
@ -278,7 +278,7 @@ public final class DataBufferInt extends DataBuffer
* @see #getElem(int, int) * @see #getElem(int, int)
*/ */
public void setElem(int bank, int i, int val) { public void setElem(int bank, int i, int val) {
bankdata[bank][i+offsets[bank]] = (int)val; bankdata[bank][i+offsets[bank]] = val;
theTrackable.markDirty(); theTrackable.markDirty();
} }
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -153,7 +153,7 @@ public final class DataBufferShort extends DataBuffer
*/ */
public DataBufferShort(short dataArray[][], int size) { public DataBufferShort(short dataArray[][], int size) {
super(UNTRACKABLE, TYPE_SHORT, size, dataArray.length); super(UNTRACKABLE, TYPE_SHORT, size, dataArray.length);
bankdata = (short[][]) dataArray.clone(); bankdata = dataArray.clone();
data = bankdata[0]; data = bankdata[0];
} }
@ -178,7 +178,7 @@ public final class DataBufferShort extends DataBuffer
*/ */
public DataBufferShort(short dataArray[][], int size, int offsets[]) { public DataBufferShort(short dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_SHORT, size, dataArray.length, offsets); super(UNTRACKABLE, TYPE_SHORT, size, dataArray.length, offsets);
bankdata = (short[][]) dataArray.clone(); bankdata = dataArray.clone();
data = bankdata[0]; data = bankdata[0];
} }
@ -225,7 +225,7 @@ public final class DataBufferShort extends DataBuffer
*/ */
public short[][] getBankData() { public short[][] getBankData() {
theTrackable.setUntrackable(); theTrackable.setUntrackable();
return (short[][]) bankdata.clone(); return bankdata.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -174,7 +174,7 @@ public final class DataBufferUShort extends DataBuffer
} }
} }
bankdata = (short[][]) dataArray.clone(); bankdata = dataArray.clone();
data = bankdata[0]; data = bankdata[0];
} }
@ -213,7 +213,7 @@ public final class DataBufferUShort extends DataBuffer
} }
} }
bankdata = (short[][]) dataArray.clone(); bankdata = dataArray.clone();
data = bankdata[0]; data = bankdata[0];
} }
@ -260,7 +260,7 @@ public final class DataBufferUShort extends DataBuffer
*/ */
public short[][] getBankData() { public short[][] getBankData() {
theTrackable.setUntrackable(); theTrackable.setUntrackable();
return (short[][]) bankdata.clone(); return bankdata.clone();
} }
/** /**
@ -272,7 +272,7 @@ public final class DataBufferUShort extends DataBuffer
* @see #setElem(int, int, int) * @see #setElem(int, int, int)
*/ */
public int getElem(int i) { public int getElem(int i) {
return (int)(data[i+offset]&0xffff); return data[i+offset]&0xffff;
} }
/** /**
@ -285,7 +285,7 @@ public final class DataBufferUShort extends DataBuffer
* @see #setElem(int, int, int) * @see #setElem(int, int, int)
*/ */
public int getElem(int bank, int i) { public int getElem(int bank, int i) {
return (int)(bankdata[bank][i+offsets[bank]]&0xffff); return bankdata[bank][i+offsets[bank]]&0xffff;
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -909,7 +909,7 @@ public class IndexColorModel extends ColorModel {
int minDist = 256; int minDist = 256;
int d; 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++) { for (int i = 0; i < map_size; i++) {
if (this.rgb[i] == 0x0) { if (this.rgb[i] == 0x0) {

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -198,7 +198,7 @@ public class MultiPixelPackedSampleModel extends SampleModel
public DataBuffer createDataBuffer() { public DataBuffer createDataBuffer() {
DataBuffer dataBuffer = null; DataBuffer dataBuffer = null;
int size = (int)scanlineStride*height; int size = scanlineStride*height;
switch (dataType) { switch (dataType) {
case DataBuffer.TYPE_BYTE: case DataBuffer.TYPE_BYTE:
dataBuffer = new DataBufferByte(size+(dataBitOffset+7)/8); dataBuffer = new DataBufferByte(size+(dataBitOffset+7)/8);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -252,7 +252,7 @@ public abstract class PackedColorModel extends ColorModel {
* representation contain the color or alpha samples. * representation contain the color or alpha samples.
*/ */
final public int[] getMasks() { final public int[] getMasks() {
return (int[]) maskArray.clone(); return maskArray.clone();
} }
/* /*

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -144,7 +144,7 @@ public class RescaleOp implements BufferedImageOp, RasterOp {
*/ */
final public float[] getScaleFactors (float scaleFactors[]) { final public float[] getScaleFactors (float scaleFactors[]) {
if (scaleFactors == null) { if (scaleFactors == null) {
return (float[]) this.scaleFactors.clone(); return this.scaleFactors.clone();
} }
System.arraycopy (this.scaleFactors, 0, scaleFactors, 0, System.arraycopy (this.scaleFactors, 0, scaleFactors, 0,
Math.min(this.scaleFactors.length, Math.min(this.scaleFactors.length,
@ -162,7 +162,7 @@ public class RescaleOp implements BufferedImageOp, RasterOp {
*/ */
final public float[] getOffsets(float offsets[]) { final public float[] getOffsets(float offsets[]) {
if (offsets == null) { if (offsets == null) {
return (float[]) this.offsets.clone(); return this.offsets.clone();
} }
System.arraycopy (this.offsets, 0, offsets, 0, System.arraycopy (this.offsets, 0, offsets, 0,

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -149,7 +149,7 @@ public class SinglePixelPackedSampleModel extends SampleModel
dataType); dataType);
} }
this.dataType = dataType; this.dataType = dataType;
this.bitMasks = (int[]) bitMasks.clone(); this.bitMasks = bitMasks.clone();
this.scanlineStride = scanlineStride; this.scanlineStride = scanlineStride;
this.bitOffsets = new int[numBands]; this.bitOffsets = new int[numBands];
@ -276,14 +276,14 @@ public class SinglePixelPackedSampleModel extends SampleModel
* @return the bit offsets representing a pixel for all bands. * @return the bit offsets representing a pixel for all bands.
*/ */
public int [] getBitOffsets() { public int [] getBitOffsets() {
return (int[])bitOffsets.clone(); return bitOffsets.clone();
} }
/** Returns the bit masks for all bands. /** Returns the bit masks for all bands.
* @return the bit masks for all bands. * @return the bit masks for all bands.
*/ */
public int [] getBitMasks() { public int [] getBitMasks() {
return (int[])bitMasks.clone(); return bitMasks.clone();
} }
/** Returns the scanline stride of this SinglePixelPackedSampleModel. /** Returns the scanline stride of this SinglePixelPackedSampleModel.
@ -746,7 +746,7 @@ public class SinglePixelPackedSampleModel extends SampleModel
int value = data.getElem(lineOffset+j); int value = data.getElem(lineOffset+j);
value &= ~bitMasks[b]; value &= ~bitMasks[b];
int sample = iArray[srcOffset++]; int sample = iArray[srcOffset++];
value |= ((int)sample << bitOffsets[b]) & bitMasks[b]; value |= (sample << bitOffsets[b]) & bitMasks[b];
data.setElem(lineOffset+j,value); data.setElem(lineOffset+j,value);
} }
lineOffset += scanlineStride; lineOffset += scanlineStride;

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -195,8 +195,7 @@ public class AccessibleRelationSet {
} else { } else {
int len = relations.size(); int len = relations.size();
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
AccessibleRelation relation = AccessibleRelation relation = relations.elementAt(i);
(AccessibleRelation)relations.elementAt(i);
if (relation != null && relation.getKey().equals(key)) { if (relation != null && relation.getKey().equals(key)) {
return relation; return relation;
} }
@ -216,7 +215,7 @@ public class AccessibleRelationSet {
AccessibleRelation[] relationArray AccessibleRelation[] relationArray
= new AccessibleRelation[relations.size()]; = new AccessibleRelation[relations.size()];
for (int i = 0; i < relationArray.length; i++) { for (int i = 0; i < relationArray.length; i++) {
relationArray[i] = (AccessibleRelation) relations.elementAt(i); relationArray[i] = relations.elementAt(i);
} }
return relationArray; return relationArray;
} }
@ -232,11 +231,10 @@ public class AccessibleRelationSet {
public String toString() { public String toString() {
String ret = ""; String ret = "";
if ((relations != null) && (relations.size() > 0)) { 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++) { for (int i = 1; i < relations.size(); i++) {
ret = ret + "," ret = ret + ","
+ ((AccessibleRelation) (relations.elementAt(i))). + (relations.elementAt(i)).toDisplayString();
toDisplayString();
} }
} }
return ret; return ret;

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -171,7 +171,7 @@ public class AccessibleStateSet {
} else { } else {
AccessibleState[] stateArray = new AccessibleState[states.size()]; AccessibleState[] stateArray = new AccessibleState[states.size()];
for (int i = 0; i < stateArray.length; i++) { for (int i = 0; i < stateArray.length; i++) {
stateArray[i] = (AccessibleState) states.elementAt(i); stateArray[i] = states.elementAt(i);
} }
return stateArray; return stateArray;
} }
@ -187,11 +187,10 @@ public class AccessibleStateSet {
public String toString() { public String toString() {
String ret = null; String ret = null;
if ((states != null) && (states.size() > 0)) { 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++) { for (int i = 1; i < states.size(); i++) {
ret = ret + "," ret = ret + ","
+ ((AccessibleState) (states.elementAt(i))). + states.elementAt(i).toDisplayString();
toDisplayString();
} }
} }
return ret; return ret;

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -437,7 +437,7 @@ public abstract class IIOParam {
} }
} }
this.sourceBands = (int[])(sourceBands.clone()); this.sourceBands = (sourceBands.clone());
} }
} }
@ -460,7 +460,7 @@ public abstract class IIOParam {
if (sourceBands == null) { if (sourceBands == null) {
return null; return null;
} }
return (int[])(sourceBands.clone()); return (sourceBands.clone());
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -169,7 +169,7 @@ public final class ImageIO {
*/ */
private static String getTempDir() { private static String getTempDir() {
GetPropertyAction a = new GetPropertyAction("java.io.tmpdir"); GetPropertyAction a = new GetPropertyAction("java.io.tmpdir");
return (String)AccessController.doPrivileged(a); return AccessController.doPrivileged(a);
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -294,7 +294,7 @@ public class ImageReadParam extends IIOParam {
} }
} }
} }
this.destinationBands = (int[])destinationBands.clone(); this.destinationBands = destinationBands.clone();
} }
} }
@ -312,7 +312,7 @@ public class ImageReadParam extends IIOParam {
if (destinationBands == null) { if (destinationBands == null) {
return null; return null;
} else { } else {
return (int[])(destinationBands.clone()); return destinationBands.clone();
} }
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -457,7 +457,7 @@ public abstract class ImageReader {
if (availableLocales == null) { if (availableLocales == null) {
return null; return null;
} else { } else {
return (Locale[])availableLocales.clone(); return availableLocales.clone();
} }
} }
@ -678,7 +678,7 @@ public abstract class ImageReader {
*/ */
public ImageTypeSpecifier getRawImageType(int imageIndex) public ImageTypeSpecifier getRawImageType(int imageIndex)
throws IOException { throws IOException {
return (ImageTypeSpecifier)getImageTypes(imageIndex).next(); return getImageTypes(imageIndex).next();
} }
/** /**
@ -2012,7 +2012,7 @@ public abstract class ImageReader {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener = IIOReadProgressListener listener =
(IIOReadProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.sequenceStarted(this, minIndex); listener.sequenceStarted(this, minIndex);
} }
} }
@ -2030,7 +2030,7 @@ public abstract class ImageReader {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener = IIOReadProgressListener listener =
(IIOReadProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.sequenceComplete(this); listener.sequenceComplete(this);
} }
} }
@ -2050,7 +2050,7 @@ public abstract class ImageReader {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener = IIOReadProgressListener listener =
(IIOReadProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.imageStarted(this, imageIndex); listener.imageStarted(this, imageIndex);
} }
} }
@ -2071,7 +2071,7 @@ public abstract class ImageReader {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener = IIOReadProgressListener listener =
(IIOReadProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.imageProgress(this, percentageDone); listener.imageProgress(this, percentageDone);
} }
} }
@ -2089,7 +2089,7 @@ public abstract class ImageReader {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener = IIOReadProgressListener listener =
(IIOReadProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.imageComplete(this); listener.imageComplete(this);
} }
} }
@ -2112,7 +2112,7 @@ public abstract class ImageReader {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener = IIOReadProgressListener listener =
(IIOReadProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.thumbnailStarted(this, imageIndex, thumbnailIndex); listener.thumbnailStarted(this, imageIndex, thumbnailIndex);
} }
} }
@ -2133,7 +2133,7 @@ public abstract class ImageReader {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener = IIOReadProgressListener listener =
(IIOReadProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.thumbnailProgress(this, percentageDone); listener.thumbnailProgress(this, percentageDone);
} }
} }
@ -2151,7 +2151,7 @@ public abstract class ImageReader {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener = IIOReadProgressListener listener =
(IIOReadProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.thumbnailComplete(this); listener.thumbnailComplete(this);
} }
} }
@ -2169,7 +2169,7 @@ public abstract class ImageReader {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener = IIOReadProgressListener listener =
(IIOReadProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.readAborted(this); listener.readAborted(this);
} }
} }
@ -2205,7 +2205,7 @@ public abstract class ImageReader {
int numListeners = updateListeners.size(); int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener = IIOReadUpdateListener listener =
(IIOReadUpdateListener)updateListeners.get(i); updateListeners.get(i);
listener.passStarted(this, theImage, pass, listener.passStarted(this, theImage, pass,
minPass, minPass,
maxPass, maxPass,
@ -2246,7 +2246,7 @@ public abstract class ImageReader {
int numListeners = updateListeners.size(); int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener = IIOReadUpdateListener listener =
(IIOReadUpdateListener)updateListeners.get(i); updateListeners.get(i);
listener.imageUpdate(this, listener.imageUpdate(this,
theImage, theImage,
minX, minY, minX, minY,
@ -2271,7 +2271,7 @@ public abstract class ImageReader {
int numListeners = updateListeners.size(); int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener = IIOReadUpdateListener listener =
(IIOReadUpdateListener)updateListeners.get(i); updateListeners.get(i);
listener.passComplete(this, theImage); listener.passComplete(this, theImage);
} }
} }
@ -2308,7 +2308,7 @@ public abstract class ImageReader {
int numListeners = updateListeners.size(); int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener = IIOReadUpdateListener listener =
(IIOReadUpdateListener)updateListeners.get(i); updateListeners.get(i);
listener.thumbnailPassStarted(this, theThumbnail, pass, listener.thumbnailPassStarted(this, theThumbnail, pass,
minPass, minPass,
maxPass, maxPass,
@ -2350,7 +2350,7 @@ public abstract class ImageReader {
int numListeners = updateListeners.size(); int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener = IIOReadUpdateListener listener =
(IIOReadUpdateListener)updateListeners.get(i); updateListeners.get(i);
listener.thumbnailUpdate(this, listener.thumbnailUpdate(this,
theThumbnail, theThumbnail,
minX, minY, minX, minY,
@ -2376,7 +2376,7 @@ public abstract class ImageReader {
int numListeners = updateListeners.size(); int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener = IIOReadUpdateListener listener =
(IIOReadUpdateListener)updateListeners.get(i); updateListeners.get(i);
listener.thumbnailPassComplete(this, theThumbnail); listener.thumbnailPassComplete(this, theThumbnail);
} }
} }
@ -2402,7 +2402,7 @@ public abstract class ImageReader {
int numListeners = warningListeners.size(); int numListeners = warningListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadWarningListener listener = IIOReadWarningListener listener =
(IIOReadWarningListener)warningListeners.get(i); warningListeners.get(i);
listener.warningOccurred(this, warning); listener.warningOccurred(this, warning);
} }
@ -2447,8 +2447,8 @@ public abstract class ImageReader {
int numListeners = warningListeners.size(); int numListeners = warningListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOReadWarningListener listener = IIOReadWarningListener listener =
(IIOReadWarningListener)warningListeners.get(i); warningListeners.get(i);
Locale locale = (Locale)warningLocales.get(i); Locale locale = warningLocales.get(i);
if (locale == null) { if (locale == null) {
locale = Locale.getDefault(); locale = Locale.getDefault();
} }
@ -2864,7 +2864,7 @@ public abstract class ImageReader {
boolean foundIt = false; boolean foundIt = false;
while (imageTypes.hasNext()) { while (imageTypes.hasNext()) {
ImageTypeSpecifier type = ImageTypeSpecifier type =
(ImageTypeSpecifier)imageTypes.next(); imageTypes.next();
if (type.equals(imageType)) { if (type.equals(imageType)) {
foundIt = true; foundIt = true;
break; break;

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -296,7 +296,7 @@ public class ImageTypeSpecifier {
("Bad value for dataType!"); ("Bad value for dataType!");
} }
this.colorSpace = colorSpace; this.colorSpace = colorSpace;
this.bandOffsets = (int[])bandOffsets.clone(); this.bandOffsets = bandOffsets.clone();
this.dataType = dataType; this.dataType = dataType;
this.hasAlpha = hasAlpha; this.hasAlpha = hasAlpha;
this.isAlphaPremultiplied = isAlphaPremultiplied; this.isAlphaPremultiplied = isAlphaPremultiplied;
@ -449,8 +449,8 @@ public class ImageTypeSpecifier {
} }
this.colorSpace = colorSpace; this.colorSpace = colorSpace;
this.bankIndices = (int[])bankIndices.clone(); this.bankIndices = bankIndices.clone();
this.bandOffsets = (int[])bandOffsets.clone(); this.bandOffsets = bandOffsets.clone();
this.dataType = dataType; this.dataType = dataType;
this.hasAlpha = hasAlpha; this.hasAlpha = hasAlpha;
this.isAlphaPremultiplied = isAlphaPremultiplied; this.isAlphaPremultiplied = isAlphaPremultiplied;
@ -769,11 +769,11 @@ public class ImageTypeSpecifier {
(alphaLUT != null && alphaLUT.length != len)) { (alphaLUT != null && alphaLUT.length != len)) {
throw new IllegalArgumentException("LUT has improper length!"); throw new IllegalArgumentException("LUT has improper length!");
} }
this.redLUT = (byte[])redLUT.clone(); this.redLUT = redLUT.clone();
this.greenLUT = (byte[])greenLUT.clone(); this.greenLUT = greenLUT.clone();
this.blueLUT = (byte[])blueLUT.clone(); this.blueLUT = blueLUT.clone();
if (alphaLUT != null) { if (alphaLUT != null) {
this.alphaLUT = (byte[])alphaLUT.clone(); this.alphaLUT = alphaLUT.clone();
} }
this.bits = bits; this.bits = bits;
this.dataType = dataType; this.dataType = dataType;

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -976,7 +976,7 @@ public class ImageWriteParam extends IIOParam {
if (compressionTypes == null) { if (compressionTypes == null) {
return null; return null;
} }
return (String[])compressionTypes.clone(); return compressionTypes.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -257,7 +257,7 @@ public abstract class ImageWriter implements ImageTranscoder {
*/ */
public Locale[] getAvailableLocales() { public Locale[] getAvailableLocales() {
return (availableLocales == null) ? return (availableLocales == null) ?
null : (Locale[])availableLocales.clone(); null : availableLocales.clone();
} }
/** /**
@ -1754,7 +1754,7 @@ public abstract class ImageWriter implements ImageTranscoder {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener = IIOWriteProgressListener listener =
(IIOWriteProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.imageStarted(this, imageIndex); listener.imageStarted(this, imageIndex);
} }
} }
@ -1775,7 +1775,7 @@ public abstract class ImageWriter implements ImageTranscoder {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener = IIOWriteProgressListener listener =
(IIOWriteProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.imageProgress(this, percentageDone); listener.imageProgress(this, percentageDone);
} }
} }
@ -1793,7 +1793,7 @@ public abstract class ImageWriter implements ImageTranscoder {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener = IIOWriteProgressListener listener =
(IIOWriteProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.imageComplete(this); listener.imageComplete(this);
} }
} }
@ -1816,7 +1816,7 @@ public abstract class ImageWriter implements ImageTranscoder {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener = IIOWriteProgressListener listener =
(IIOWriteProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.thumbnailStarted(this, imageIndex, thumbnailIndex); listener.thumbnailStarted(this, imageIndex, thumbnailIndex);
} }
} }
@ -1837,7 +1837,7 @@ public abstract class ImageWriter implements ImageTranscoder {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener = IIOWriteProgressListener listener =
(IIOWriteProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.thumbnailProgress(this, percentageDone); listener.thumbnailProgress(this, percentageDone);
} }
} }
@ -1855,7 +1855,7 @@ public abstract class ImageWriter implements ImageTranscoder {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener = IIOWriteProgressListener listener =
(IIOWriteProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.thumbnailComplete(this); listener.thumbnailComplete(this);
} }
} }
@ -1873,7 +1873,7 @@ public abstract class ImageWriter implements ImageTranscoder {
int numListeners = progressListeners.size(); int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener = IIOWriteProgressListener listener =
(IIOWriteProgressListener)progressListeners.get(i); progressListeners.get(i);
listener.writeAborted(this); listener.writeAborted(this);
} }
} }
@ -1902,7 +1902,7 @@ public abstract class ImageWriter implements ImageTranscoder {
int numListeners = warningListeners.size(); int numListeners = warningListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOWriteWarningListener listener = IIOWriteWarningListener listener =
(IIOWriteWarningListener)warningListeners.get(i); warningListeners.get(i);
listener.warningOccurred(this, imageIndex, warning); listener.warningOccurred(this, imageIndex, warning);
} }
@ -1950,8 +1950,8 @@ public abstract class ImageWriter implements ImageTranscoder {
int numListeners = warningListeners.size(); int numListeners = warningListeners.size();
for (int i = 0; i < numListeners; i++) { for (int i = 0; i < numListeners; i++) {
IIOWriteWarningListener listener = IIOWriteWarningListener listener =
(IIOWriteWarningListener)warningListeners.get(i); warningListeners.get(i);
Locale locale = (Locale)warningLocales.get(i); Locale locale = warningLocales.get(i);
if (locale == null) { if (locale == null) {
locale = Locale.getDefault(); locale = Locale.getDefault();
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -191,10 +191,8 @@ public abstract class IIOMetadata {
throw new IllegalArgumentException throw new IllegalArgumentException
("extraMetadataFormatClassNames.length != extraMetadataFormatNames.length!"); ("extraMetadataFormatClassNames.length != extraMetadataFormatNames.length!");
} }
this.extraMetadataFormatNames = this.extraMetadataFormatNames = extraMetadataFormatNames.clone();
(String[]) extraMetadataFormatNames.clone(); this.extraMetadataFormatClassNames = extraMetadataFormatClassNames.clone();
this.extraMetadataFormatClassNames =
(String[]) extraMetadataFormatClassNames.clone();
} else { } else {
if (extraMetadataFormatClassNames != null) { if (extraMetadataFormatClassNames != null) {
throw new IllegalArgumentException throw new IllegalArgumentException
@ -285,7 +283,7 @@ public abstract class IIOMetadata {
if (extraMetadataFormatNames == null) { if (extraMetadataFormatNames == null) {
return null; return null;
} }
return (String[])extraMetadataFormatNames.clone(); return extraMetadataFormatNames.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1181,7 +1181,7 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat {
private ObjectValue getObjectValue(String elementName) { private ObjectValue getObjectValue(String elementName) {
Element element = getElement(elementName); Element element = getElement(elementName);
ObjectValue objv = (ObjectValue)element.objectValue; ObjectValue objv = element.objectValue;
if (objv == null) { if (objv == null) {
throw new IllegalArgumentException("No object within element " + throw new IllegalArgumentException("No object within element " +
elementName + "!"); elementName + "!");
@ -1191,7 +1191,7 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat {
public int getObjectValueType(String elementName) { public int getObjectValueType(String elementName) {
Element element = getElement(elementName); Element element = getElement(elementName);
ObjectValue objv = (ObjectValue)element.objectValue; ObjectValue objv = element.objectValue;
if (objv == null) { if (objv == null) {
return VALUE_NONE; return VALUE_NONE;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -132,9 +132,9 @@ public class JPEGImageReadParam extends ImageReadParam {
throw new IllegalArgumentException throw new IllegalArgumentException
("Invalid JPEG table arrays"); ("Invalid JPEG table arrays");
} }
this.qTables = (JPEGQTable[])qTables.clone(); this.qTables = qTables.clone();
this.DCHuffmanTables = (JPEGHuffmanTable[])DCHuffmanTables.clone(); this.DCHuffmanTables = DCHuffmanTables.clone();
this.ACHuffmanTables = (JPEGHuffmanTable[])ACHuffmanTables.clone(); this.ACHuffmanTables = ACHuffmanTables.clone();
} }
/** /**
@ -160,7 +160,7 @@ public class JPEGImageReadParam extends ImageReadParam {
* @see #setDecodeTables * @see #setDecodeTables
*/ */
public JPEGQTable[] getQTables() { public JPEGQTable[] getQTables() {
return (qTables != null) ? (JPEGQTable[])qTables.clone() : null; return (qTables != null) ? qTables.clone() : null;
} }
/** /**
@ -175,7 +175,7 @@ public class JPEGImageReadParam extends ImageReadParam {
*/ */
public JPEGHuffmanTable[] getDCHuffmanTables() { public JPEGHuffmanTable[] getDCHuffmanTables() {
return (DCHuffmanTables != null) return (DCHuffmanTables != null)
? (JPEGHuffmanTable[])DCHuffmanTables.clone() ? DCHuffmanTables.clone()
: null; : null;
} }
@ -191,7 +191,7 @@ public class JPEGImageReadParam extends ImageReadParam {
*/ */
public JPEGHuffmanTable[] getACHuffmanTables() { public JPEGHuffmanTable[] getACHuffmanTables() {
return (ACHuffmanTables != null) return (ACHuffmanTables != null)
? (JPEGHuffmanTable[])ACHuffmanTables.clone() ? ACHuffmanTables.clone()
: null; : null;
} }
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -167,7 +167,7 @@ public class JPEGImageWriteParam extends ImageWriteParam {
(getCompressionType() == null)) { (getCompressionType() == null)) {
throw new IllegalStateException("No compression type set!"); throw new IllegalStateException("No compression type set!");
} }
return (String[])qualityDescs.clone(); return qualityDescs.clone();
} }
public float[] getCompressionQualityValues() { public float[] getCompressionQualityValues() {
@ -179,7 +179,7 @@ public class JPEGImageWriteParam extends ImageWriteParam {
(getCompressionType() == null)) { (getCompressionType() == null)) {
throw new IllegalStateException("No compression type set!"); throw new IllegalStateException("No compression type set!");
} }
return (float[])qualityVals.clone(); return qualityVals.clone();
} }
/** /**
* Returns <code>true</code> if tables are currently set. * Returns <code>true</code> if tables are currently set.
@ -222,9 +222,9 @@ public class JPEGImageWriteParam extends ImageWriteParam {
(DCHuffmanTables.length != ACHuffmanTables.length)) { (DCHuffmanTables.length != ACHuffmanTables.length)) {
throw new IllegalArgumentException("Invalid JPEG table arrays"); throw new IllegalArgumentException("Invalid JPEG table arrays");
} }
this.qTables = (JPEGQTable[])qTables.clone(); this.qTables = qTables.clone();
this.DCHuffmanTables = (JPEGHuffmanTable[])DCHuffmanTables.clone(); this.DCHuffmanTables = DCHuffmanTables.clone();
this.ACHuffmanTables = (JPEGHuffmanTable[])ACHuffmanTables.clone(); this.ACHuffmanTables = ACHuffmanTables.clone();
} }
/** /**
@ -250,7 +250,7 @@ public class JPEGImageWriteParam extends ImageWriteParam {
* @see #setEncodeTables * @see #setEncodeTables
*/ */
public JPEGQTable[] getQTables() { public JPEGQTable[] getQTables() {
return (qTables != null) ? (JPEGQTable[])qTables.clone() : null; return (qTables != null) ? qTables.clone() : null;
} }
/** /**
@ -265,7 +265,7 @@ public class JPEGImageWriteParam extends ImageWriteParam {
*/ */
public JPEGHuffmanTable[] getDCHuffmanTables() { public JPEGHuffmanTable[] getDCHuffmanTables() {
return (DCHuffmanTables != null) return (DCHuffmanTables != null)
? (JPEGHuffmanTable[])DCHuffmanTables.clone() ? DCHuffmanTables.clone()
: null; : null;
} }
@ -281,7 +281,7 @@ public class JPEGImageWriteParam extends ImageWriteParam {
*/ */
public JPEGHuffmanTable[] getACHuffmanTables() { public JPEGHuffmanTable[] getACHuffmanTables() {
return (ACHuffmanTables != null) return (ACHuffmanTables != null)
? (JPEGHuffmanTable[])ACHuffmanTables.clone() ? ACHuffmanTables.clone()
: null; : null;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -237,7 +237,7 @@ public abstract class ImageReaderSpi extends ImageReaderWriterSpi {
// If length == 0, leave it null // If length == 0, leave it null
if (writerSpiNames != null && writerSpiNames.length > 0) { if (writerSpiNames != null && writerSpiNames.length > 0) {
this.writerSpiNames = (String[])writerSpiNames.clone(); this.writerSpiNames = writerSpiNames.clone();
} }
} }
@ -255,7 +255,7 @@ public abstract class ImageReaderSpi extends ImageReaderWriterSpi {
* <code>Class</code>objects of length at least 1. * <code>Class</code>objects of length at least 1.
*/ */
public Class[] getInputTypes() { public Class[] getInputTypes() {
return (Class[])inputTypes.clone(); return inputTypes.clone();
} }
/** /**
@ -408,6 +408,6 @@ public abstract class ImageReaderSpi extends ImageReaderWriterSpi {
*/ */
public String[] getImageWriterSpiNames() { public String[] getImageWriterSpiNames() {
return writerSpiNames == null ? return writerSpiNames == null ?
null : (String[])writerSpiNames.clone(); null : writerSpiNames.clone();
} }
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -239,14 +239,14 @@ public abstract class ImageReaderWriterSpi extends IIOServiceProvider {
throw new IllegalArgumentException("pluginClassName == null!"); throw new IllegalArgumentException("pluginClassName == null!");
} }
this.names = (String[])names.clone(); this.names = names.clone();
// If length == 0, leave it null // If length == 0, leave it null
if (suffixes != null && suffixes.length > 0) { if (suffixes != null && suffixes.length > 0) {
this.suffixes = (String[])suffixes.clone(); this.suffixes = suffixes.clone();
} }
// If length == 0, leave it null // If length == 0, leave it null
if (MIMETypes != null && MIMETypes.length > 0) { if (MIMETypes != null && MIMETypes.length > 0) {
this.MIMETypes = (String[])MIMETypes.clone(); this.MIMETypes = MIMETypes.clone();
} }
this.pluginClassName = pluginClassName; this.pluginClassName = pluginClassName;
@ -259,13 +259,13 @@ public abstract class ImageReaderWriterSpi extends IIOServiceProvider {
if (extraStreamMetadataFormatNames != null && if (extraStreamMetadataFormatNames != null &&
extraStreamMetadataFormatNames.length > 0) { extraStreamMetadataFormatNames.length > 0) {
this.extraStreamMetadataFormatNames = this.extraStreamMetadataFormatNames =
(String[])extraStreamMetadataFormatNames.clone(); extraStreamMetadataFormatNames.clone();
} }
// If length == 0, leave it null // If length == 0, leave it null
if (extraStreamMetadataFormatClassNames != null && if (extraStreamMetadataFormatClassNames != null &&
extraStreamMetadataFormatClassNames.length > 0) { extraStreamMetadataFormatClassNames.length > 0) {
this.extraStreamMetadataFormatClassNames = this.extraStreamMetadataFormatClassNames =
(String[])extraStreamMetadataFormatClassNames.clone(); extraStreamMetadataFormatClassNames.clone();
} }
this.supportsStandardImageMetadataFormat = this.supportsStandardImageMetadataFormat =
supportsStandardImageMetadataFormat; supportsStandardImageMetadataFormat;
@ -276,13 +276,13 @@ public abstract class ImageReaderWriterSpi extends IIOServiceProvider {
if (extraImageMetadataFormatNames != null && if (extraImageMetadataFormatNames != null &&
extraImageMetadataFormatNames.length > 0) { extraImageMetadataFormatNames.length > 0) {
this.extraImageMetadataFormatNames = this.extraImageMetadataFormatNames =
(String[])extraImageMetadataFormatNames.clone(); extraImageMetadataFormatNames.clone();
} }
// If length == 0, leave it null // If length == 0, leave it null
if (extraImageMetadataFormatClassNames != null && if (extraImageMetadataFormatClassNames != null &&
extraImageMetadataFormatClassNames.length > 0) { extraImageMetadataFormatClassNames.length > 0) {
this.extraImageMetadataFormatClassNames = this.extraImageMetadataFormatClassNames =
(String[])extraImageMetadataFormatClassNames.clone(); extraImageMetadataFormatClassNames.clone();
} }
} }
@ -308,7 +308,7 @@ public abstract class ImageReaderWriterSpi extends IIOServiceProvider {
* associated with this reader or writer. * associated with this reader or writer.
*/ */
public String[] getFormatNames() { public String[] getFormatNames() {
return (String[])names.clone(); return names.clone();
} }
/** /**
@ -332,7 +332,7 @@ public abstract class ImageReaderWriterSpi extends IIOServiceProvider {
* writer, or <code>null</code>. * writer, or <code>null</code>.
*/ */
public String[] getFileSuffixes() { public String[] getFileSuffixes() {
return suffixes == null ? null : (String[])suffixes.clone(); return suffixes == null ? null : suffixes.clone();
} }
/** /**
@ -367,7 +367,7 @@ public abstract class ImageReaderWriterSpi extends IIOServiceProvider {
* <code>null</code>. * <code>null</code>.
*/ */
public String[] getMIMETypes() { public String[] getMIMETypes() {
return MIMETypes == null ? null : (String[])MIMETypes.clone(); return MIMETypes == null ? null : MIMETypes.clone();
} }
/** /**
@ -443,7 +443,7 @@ public abstract class ImageReaderWriterSpi extends IIOServiceProvider {
*/ */
public String[] getExtraStreamMetadataFormatNames() { public String[] getExtraStreamMetadataFormatNames() {
return extraStreamMetadataFormatNames == null ? return extraStreamMetadataFormatNames == null ?
null : (String[])extraStreamMetadataFormatNames.clone(); null : extraStreamMetadataFormatNames.clone();
} }
/** /**
@ -507,7 +507,7 @@ public abstract class ImageReaderWriterSpi extends IIOServiceProvider {
*/ */
public String[] getExtraImageMetadataFormatNames() { public String[] getExtraImageMetadataFormatNames() {
return extraImageMetadataFormatNames == null ? return extraImageMetadataFormatNames == null ?
null : (String[])extraImageMetadataFormatNames.clone(); null : extraImageMetadataFormatNames.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -238,7 +238,7 @@ public abstract class ImageWriterSpi extends ImageReaderWriterSpi {
// If length == 0, leave it null // If length == 0, leave it null
if (readerSpiNames != null && readerSpiNames.length > 0) { if (readerSpiNames != null && readerSpiNames.length > 0) {
this.readerSpiNames = (String[])readerSpiNames.clone(); this.readerSpiNames = readerSpiNames.clone();
} }
} }
@ -268,7 +268,7 @@ public abstract class ImageWriterSpi extends ImageReaderWriterSpi {
* <code>Class</code>objects of length at least 1. * <code>Class</code>objects of length at least 1.
*/ */
public Class[] getOutputTypes() { public Class[] getOutputTypes() {
return (Class[])outputTypes.clone(); return outputTypes.clone();
} }
/** /**
@ -435,6 +435,6 @@ public abstract class ImageWriterSpi extends ImageReaderWriterSpi {
*/ */
public String[] getImageReaderSpiNames() { public String[] getImageReaderSpiNames() {
return readerSpiNames == null ? return readerSpiNames == null ?
null : (String[])readerSpiNames.clone(); null : readerSpiNames.clone();
} }
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -344,7 +344,7 @@ public class JMXServiceURL implements Serializable {
private void readObject(ObjectInputStream inputStream) throws IOException, ClassNotFoundException { private void readObject(ObjectInputStream inputStream) throws IOException, ClassNotFoundException {
ObjectInputStream.GetField gf = inputStream.readFields(); ObjectInputStream.GetField gf = inputStream.readFields();
String h = (String)gf.get("host", null); 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 proto = (String)gf.get("protocol", null);
String url = (String)gf.get("urlPath", null); String url = (String)gf.get("urlPath", null);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -460,7 +460,7 @@ public class DocFlavor implements Serializable, Cloneable {
static { static {
hostEncoding = hostEncoding =
(String)java.security.AccessController.doPrivileged( java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("file.encoding")); new sun.security.action.GetPropertyAction("file.encoding"));
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -382,7 +382,7 @@ public class HashAttributeSet implements AttributeSet, Serializable {
return return
attribute != null && attribute != null &&
attribute instanceof Attribute && attribute instanceof Attribute &&
attribute.equals(attrMap.get(((Attribute)attribute).getCategory())); attribute.equals(attrMap.get(attribute.getCategory()));
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -94,7 +94,7 @@ public class Compression extends EnumSyntax implements DocAttribute {
* Returns the string table for class Compression. * Returns the string table for class Compression.
*/ */
protected String[] getStringTable() { protected String[] getStringTable() {
return (String[])myStringTable.clone(); return myStringTable.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -430,7 +430,7 @@ public class Finishings extends EnumSyntax
* Returns the string table for class Finishings. * Returns the string table for class Finishings.
*/ */
protected String[] getStringTable() { protected String[] getStringTable() {
return (String[])myStringTable.clone(); return myStringTable.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -94,7 +94,7 @@ public class JobSheets extends EnumSyntax
* Returns the string table for class JobSheets. * Returns the string table for class JobSheets.
*/ */
protected String[] getStringTable() { protected String[] getStringTable() {
return (String[])myStringTable.clone(); return myStringTable.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -420,7 +420,7 @@ public class JobStateReason extends EnumSyntax implements Attribute {
* Returns the string table for class JobStateReason. * Returns the string table for class JobStateReason.
*/ */
protected String[] getStringTable() { protected String[] getStringTable() {
return (String[])myStringTable.clone(); return myStringTable.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -149,7 +149,7 @@ public final class JobStateReasons
if (o == null) { if (o == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
return super.add ((JobStateReason) o); return super.add(o);
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -98,7 +98,7 @@ public class MediaName extends Media implements Attribute {
*/ */
protected String[] getStringTable() protected String[] getStringTable()
{ {
return (String[])myStringTable.clone(); return myStringTable.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -550,7 +550,7 @@ public class MediaSizeName extends Media {
*/ */
protected String[] getStringTable() protected String[] getStringTable()
{ {
return (String[])myStringTable.clone(); return myStringTable.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -124,7 +124,7 @@ public class MediaTray extends Media implements Attribute {
*/ */
protected String[] getStringTable() protected String[] getStringTable()
{ {
return (String[])myStringTable.clone(); return myStringTable.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -228,7 +228,7 @@ public class MultipleDocumentHandling extends EnumSyntax
* Returns the string table for class MultipleDocumentHandling. * Returns the string table for class MultipleDocumentHandling.
*/ */
protected String[] getStringTable() { protected String[] getStringTable() {
return (String[])myStringTable.clone(); return myStringTable.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -88,7 +88,7 @@ public class PDLOverrideSupported extends EnumSyntax
* Returns the string table for class PDLOverrideSupported. * Returns the string table for class PDLOverrideSupported.
*/ */
protected String[] getStringTable() { protected String[] getStringTable() {
return (String[])myStringTable.clone(); return myStringTable.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -88,7 +88,7 @@ public class PrintQuality extends EnumSyntax
* Returns the string table for class PrintQuality. * Returns the string table for class PrintQuality.
*/ */
protected String[] getStringTable() { protected String[] getStringTable() {
return (String[])myStringTable.clone(); return myStringTable.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -403,7 +403,7 @@ public class PrinterStateReason extends EnumSyntax implements Attribute {
* Returns the string table for class PrinterStateReason. * Returns the string table for class PrinterStateReason.
*/ */
protected String[] getStringTable() { protected String[] getStringTable() {
return (String[])myStringTable.clone(); return myStringTable.clone();
} }
/** /**

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -273,7 +273,7 @@ public class MidiFileFormat {
} else { } else {
ret = (Map<String,Object>) (properties.clone()); ret = (Map<String,Object>) (properties.clone());
} }
return (Map<String,Object>) Collections.unmodifiableMap(ret); return Collections.unmodifiableMap(ret);
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -472,7 +472,7 @@ public class MidiSystem {
} catch (MidiUnavailableException e) { } catch (MidiUnavailableException e) {
// something went wrong with synth // something went wrong with synth
if (e instanceof MidiUnavailableException) { if (e instanceof MidiUnavailableException) {
mue = (MidiUnavailableException) e; mue = e;
} }
} }
if (rec == null) { if (rec == null) {

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -284,7 +284,7 @@ public class Sequence {
*/ */
public Track[] getTracks() { public Track[] getTracks() {
return (Track[]) tracks.toArray(new Track[tracks.size()]); return tracks.toArray(new Track[tracks.size()]);
} }
@ -312,7 +312,7 @@ public class Sequence {
synchronized(tracks) { synchronized(tracks) {
for(int i=0; i<tracks.size(); i++ ) { for(int i=0; i<tracks.size(); i++ ) {
long temp = ((Track)tracks.elementAt(i)).ticks(); long temp = tracks.elementAt(i).ticks();
if( temp>length ) { if( temp>length ) {
length = temp; length = temp;
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -251,7 +251,7 @@ public class AudioFileFormat {
} else { } else {
ret = (Map<String,Object>) (properties.clone()); ret = (Map<String,Object>) (properties.clone());
} }
return (Map<String,Object>) Collections.unmodifiableMap(ret); return Collections.unmodifiableMap(ret);
} }

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -403,7 +403,7 @@ public class AudioFormat {
} else { } else {
ret = (Map<String,Object>) (properties.clone()); ret = (Map<String,Object>) (properties.clone());
} }
return (Map<String,Object>) Collections.unmodifiableMap(ret); return Collections.unmodifiableMap(ret);
} }

Some files were not shown because too many files have changed in this diff Show More