[icedtea-web] RFC: warning cleanup
Dr Andrew John Hughes
ahughes at redhat.com
Thu Dec 2 13:26:31 PST 2010
On 16:04 Thu 02 Dec , Deepak Bhole wrote:
> * Dr Andrew John Hughes <ahughes at redhat.com> [2010-12-02 15:46]:
> > We can delay this one until after the branch if needs be.
> > It's just a big sweep of warnings - a few left in NetX and
> > a whole host in the plugin. This takes it down to 3 for
> > the plugin and none for NetX.
> >
> > However, it seems javac misses a load of them so I'll try with
> > ecj once this is in.
> >
> > I also missed the javadoc changes out of this one as I think that
> > should definitely be in 1.0 to provide clean documentation.
> >
>
> The changes look okay to me. Some of the indentation is off, but I will
> be fixing that en-masse anyway so it is OK.
>
Yeah, I deliberately avoided doing that in this patch. Indentation should
be done in standalone changesets. There are a few necessary changes in there
which I elided by doing the diff with -w.
> Given the breadth, of the changes, I think it is best that it go in
> before branching, so as to minimize patch sizes and failures when import
> patches back into stable.
>
Ok, makes life easier for me :-)
> Cheers,
> Deepak
>
> > 2010-12-01 Andrew John Hughes <ahughes at redhat.com>
> >
> > * netx/net/sourceforge/jnlp/cache/CacheUtil.java:
> > (getCachedResource(URL,Version,UpdatePolicy)): Use
> > toURI().toURL() to avoid broken escaping.
> > * netx/net/sourceforge/jnlp/cache/ResourceTracker.java:
> > (getCacheURL(URL)): Likewise.
> > * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java:
> > (destroy()): Suppress deprecated warning from use of thread.stop().
> > Only use when interrupt() has already been tried.
> > * netx/net/sourceforge/jnlp/runtime/Boot.java:
> > (getFile()): Use toURI.toURL() to avoid broken escaping.
> > * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
> > (initializeResources()): Likewise.
> > * netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java:
> > (askUser(String,int,String,String)): Use getPassword() to retrieve
> > a character array directly. Fix overrunning line.
> > * netx/net/sourceforge/jnlp/tools/JarSigner.java:
> > Remove unused IdentityScope variable, scope.
> > * netx/net/sourceforge/nanoxml/XMLElement.java:
> > (scanWhitespace(StringBuffer)): Don't fallthrough.
> > * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc:
> > Fix warnings where std::string is used in printf
> > rather than char* by invoking c_str on these strings.
> > * plugin/icedteanp/java/netscape/javascript/JSException.java:
> > (JSException()): Mark with @Deprecated annotation.
> > (JSException(String)): Likewise.
> > (JSException(String,String,int,String,int)): Likewise.
> > * plugin/icedteanp/java/netscape/javascript/JSObject.java:
> > (JSObject(String)): Remove redundant cast.
> > (getWindow(Applet)): Likewise.
> > * plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java:
> > (contexts): Initialise properly with generic typing.
> > * plugin/icedteanp/java/sun/applet/MethodOverloadResolver.java:
> > (getMatchingMethod(Object[]): Add missing generic type to Class
> > instances.
> > (getMatchingConstructor(Object[])): Likewise.
> > (getCostAndCastedObject(Object,Class<?>)): Likewise.
> > (getMatchingMethods(Class<?>,String,int)): Likewise.
> > (getMatchingConstructors(Class<?>,int)): Likewise.
> > (getNum(String,Class<?>)): Likewise.
> > * plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java:
> > (parseCall(String,ClassLoader,Class<V>)): Use c.cast rather than (V).
> > (handleMessage(int,String,AccessControlContext,String)): Add
> > missing generic type to Class instances. Remove redundant casts.
> > (prepopulateField(int,String)): Add missing generic type to Class instance.
> > * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java:
> > (createPanel(PluginStreamHandler,int,long,URL,Hashtable<String,String>)):
> > Add missing generic types on Hashtable and PrivilegedAction.
> > (initEventQueue(AppletPanel)): Add missing generic type to PrivilegedAction.
> > (splitSeparator(String,String)): Use an ArrayList rather than Vector
> > to avoid locking and use generic types.
> > (requests): Initialise properly with generic typing.
> > (applets): Likewise.
> > (appletStateChanged(AppletEvent)): Use setSize and getPreferredSize.
> > (handleMessage(int,String)): Remove redundant casts.
> > (audioClips): Add generic types.
> > (getAudioClip): Remove redundant cast.
> > (imageRefs): Add generic types.
> > (getCachedImageRef(URL)): Remove redundant cast.
> > (appletPanels): Add generic types.
> > (getApplets()): Likewise.
> > (getStream(String)): Mark with @Override.
> > (getStreamKeys()): Likewise.
> > (systemParam): Add generic types.
> > (printTag(PrintStream,Hashtable<String,String>)): Likewise.
> > Remove redundant casts.
> > (updateAtts()): Use getSize() and getInsets(). Use Integer.valueOf().
> > (appletReload()): Add generic types to PrivilegedAction.
> > (scanIdentifier(int[],Reader)): Use StringBuilder to avoid unnecessary
> > locking.
> > (skipComment(int[],Reader)): Likewise.
> > (scanTag(int[],Reader)): Likewise. Add generic types.
> > (parse(int,long,String,String,Reader,URL)): Use PrivilegedExceptionAction
> > to avoid catching and rethrowing the exception manually. Add generic types.
> > (parse(int,long,String,String,Reader,URL,PrintStream,PluginAppletPanelFactory)):
> > Add generic types. Remove unnecessary casts. Fix overlong lines.
> > * plugin/icedteanp/java/sun/applet/PluginMain.java:
> > (init()): Add generic types. Remove unnecessary cast.
> > * plugin/icedteanp/java/sun/applet/PluginObjectStore.java:
> > (objects): Initialise properly with generic typing.
> > (counts): Likewise.
> > (identifiers): Likewise.
> > * plugin/icedteanp/java/sun/applet/PluginProxySelector.java:
> > (get(Object)): Suppress unchecked warning arising from cast to K.
> >
> > --
> > Andrew :)
> >
> > Free Java Software Engineer
> > Red Hat, Inc. (http://www.redhat.com)
> >
> > Support Free Java!
> > Contribute to GNU Classpath and IcedTea
> > http://www.gnu.org/software/classpath
> > http://icedtea.classpath.org
> > PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
> > Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
> >
> >
>
> > diff -r 6c8e9229bded netx/net/sourceforge/jnlp/cache/CacheUtil.java
> > --- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -80,7 +80,7 @@
> > rt.addResource(location, version, policy);
> > try {
> > File f = rt.getCacheFile(location);
> > - return f.toURL();
> > + return f.toURI().toURL();
> > }
> > catch (MalformedURLException ex) {
> > return location;
> > diff -r 6c8e9229bded netx/net/sourceforge/jnlp/cache/ResourceTracker.java
> > --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -331,7 +331,7 @@
> > try {
> > File f = getCacheFile(location);
> > if (f != null)
> > - return f.toURL();
> > + return f.toURI().toURL();
> > }
> > catch (MalformedURLException ex) {
> > if (JNLPRuntime.isDebug())
> > diff -r 6c8e9229bded netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java
> > --- a/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -267,6 +267,7 @@
> > /**
> > * Stop the application and destroy its resources.
> > */
> > + @SuppressWarnings("deprecation")
> > public void destroy() {
> > if (stopped)
> > return;
> > diff -r 6c8e9229bded netx/net/sourceforge/jnlp/runtime/Boot.java
> > --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -258,7 +258,7 @@
> >
> > try {
> > if (new File(location).exists())
> > - url = new File(location).toURL(); // Why use file.getCanonicalFile?
> > + url = new File(location).toURI().toURL(); // Why use file.getCanonicalFile?
> > else
> > url = new URL(ServiceUtil.getBasicService().getCodeBase(), location);
> > } catch (Exception e) {
> > diff -r 6c8e9229bded netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
> > --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -469,7 +469,7 @@
> > continue; // JAR not found. Keep going.
> > }
> >
> > - URL location = cachedFile.toURL();
> > + URL location = cachedFile.toURI().toURL();
> > SecurityDesc jarSecurity = file.getSecurity();
> >
> > if (file instanceof PluginBridge) {
> > @@ -651,7 +651,7 @@
> > try {
> > URL location = jar.getLocation(); // non-cacheable, use source location
> > if (localFile != null) {
> > - location = localFile.toURL(); // cached file
> > + location = localFile.toURI().toURL(); // cached file
> >
> > // This is really not the best way.. but we need some way for
> > // PluginAppletViewer::getCachedImageRef() to check if the image
> > diff -r 6c8e9229bded netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java
> > --- a/netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -198,7 +198,8 @@
> >
> > // This frame is reusable. So reset everything first.
> > userCancelled = true;
> > - jlInfo.setText("<html>The " + type + " server at " + host + " is requesting authentication. It says \"" + prompt + "\"</html>");
> > + jlInfo.setText("<html>The " + type + " server at " + host +
> > + " is requesting authentication. It says \"" + prompt + "\"</html>");
> >
> > try {
> > SwingUtilities.invokeAndWait( new Runnable() {
> > @@ -225,7 +226,7 @@
> > }
> >
> > if (!userCancelled) {
> > - auth = new PasswordAuthentication(jtfUserName.getText(), jpfPassword.getText().toCharArray());
> > + auth = new PasswordAuthentication(jtfUserName.getText(), jpfPassword.getPassword());
> > }
> > } catch (Exception e) {
> > e.printStackTrace();
> > diff -r 6c8e9229bded netx/net/sourceforge/jnlp/tools/JarSigner.java
> > --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -83,8 +83,6 @@
> > PrivateKey privateKey;
> > KeyStore store;
> >
> > - IdentityScope scope;
> > -
> > String keystore; // key store file
> > boolean nullStream = false; // null keystore input stream (NONE)
> > boolean token = false; // token-based keystore
> > diff -r 6c8e9229bded netx/net/sourceforge/nanoxml/XMLElement.java
> > --- a/netx/net/sourceforge/nanoxml/XMLElement.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/netx/net/sourceforge/nanoxml/XMLElement.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -674,6 +674,7 @@
> > case '\t':
> > case '\n':
> > result.append(ch);
> > + break;
> > case '\r':
> > break;
> > default:
> > diff -r 6c8e9229bded plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
> > --- a/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc Thu Dec 02 10:22:44 2010 -0500
> > +++ b/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc Thu Dec 02 19:49:46 2010 +0000
> > @@ -473,7 +473,7 @@
> > // the result we want is in result_string (assuming there was no error)
> > if (java_result->error_occurred)
> > {
> > - printf("Unable to get member name for setMember. Error occurred: %s\n", java_result->error_msg);
> > + printf("Unable to get member name for setMember. Error occurred: %s\n", java_result->error_msg->c_str());
> > //goto cleanup;
> > }
> >
> > @@ -571,7 +571,7 @@
> > // the result we want is in result_string (assuming there was no error)
> > if (java_result->error_occurred)
> > {
> > - printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg);
> > + printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
> > //goto cleanup;
> > }
> >
> > @@ -611,7 +611,7 @@
> > // the result we want is in result_string (assuming there was no error)
> > if (java_result->error_occurred)
> > {
> > - printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg);
> > + printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
> > //goto cleanup;
> > }
> >
> > @@ -628,7 +628,7 @@
> > // the result we want is in result_string (assuming there was no error)
> > if (java_result->error_occurred)
> > {
> > - printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg);
> > + printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
> > //goto cleanup;
> > }
> >
> > @@ -646,7 +646,7 @@
> > // the result we want is in result_string (assuming there was no error)
> > if (java_result->error_occurred)
> > {
> > - printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg);
> > + printf("Unable to process getMember request. Error occurred: %s\n", java_result->error_msg->c_str());
> > //goto cleanup;
> > }
> >
> > diff -r 6c8e9229bded plugin/icedteanp/java/netscape/javascript/JSException.java
> > --- a/plugin/icedteanp/java/netscape/javascript/JSException.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/plugin/icedteanp/java/netscape/javascript/JSException.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -68,6 +68,7 @@
> > *
> > * @deprecated Not for public use in future versions.
> > */
> > + @Deprecated
> > public JSException() {
> > super();
> > filename = "unknown";
> > @@ -84,6 +85,7 @@
> > *
> > * @deprecated Not for public use in future versions.
> > */
> > + @Deprecated
> > public JSException(String s) {
> > super(s);
> > filename = "unknown";
> > @@ -111,6 +113,7 @@
> > *
> > * @deprecated Not for public use in future versions.
> > */
> > + @Deprecated
> > public JSException(String s, String filename, int lineno,
> > String source, int tokenIndex) {
> > super(s);
> > diff -r 6c8e9229bded plugin/icedteanp/java/netscape/javascript/JSObject.java
> > --- a/plugin/icedteanp/java/netscape/javascript/JSObject.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/plugin/icedteanp/java/netscape/javascript/JSObject.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -114,7 +114,7 @@
> > * it is illegal to construct a JSObject manually
> > */
> > public JSObject(String jsobj_addr) {
> > - this((long) Long.parseLong(jsobj_addr));
> > + this(Long.parseLong(jsobj_addr));
> > }
> >
> > public JSObject(long jsobj_addr) {
> > @@ -269,7 +269,7 @@
> > internal = ((PluginAppletViewer)
> > applet.getAppletContext()).getWindow();
> > PluginDebug.debug ("GOT IT: " + internal);
> > - return new JSObject((long) internal);
> > + return new JSObject(internal);
> > }
> >
> >
> > diff -r 6c8e9229bded plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java
> > --- a/plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -45,7 +45,8 @@
> >
> > // Context identifier -> PluginAppletSecurityContext object.
> > // FIXME: make private
> > - private static HashMap<Integer, PluginAppletSecurityContext> contexts = new HashMap();
> > + private static HashMap<Integer, PluginAppletSecurityContext> contexts =
> > + new HashMap<Integer, PluginAppletSecurityContext>();
> >
> > public static void addContext(int identifier, PluginAppletSecurityContext context) {
> > contexts.put(identifier, context);
> > diff -r 6c8e9229bded plugin/icedteanp/java/sun/applet/MethodOverloadResolver.java
> > --- a/plugin/icedteanp/java/sun/applet/MethodOverloadResolver.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/plugin/icedteanp/java/sun/applet/MethodOverloadResolver.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -165,7 +165,7 @@
> >
> > public static Object[] getMatchingMethod(Object[] callList) {
> > Object[] ret = null;
> > - Class c = (Class) callList[0];
> > + Class<?> c = (Class<?>) callList[0];
> > String methodName = (String) callList[1];
> >
> > Method[] matchingMethods = getMatchingMethods(c, methodName, callList.length - 2);
> > @@ -187,9 +187,9 @@
> > // Figure out which of the matched methods best represents what we
> > // want
> > for (int i = 0; i < paramTypes.length; i++) {
> > - Class paramTypeClass = paramTypes[i];
> > + Class<?> paramTypeClass = paramTypes[i];
> > Object suppliedParam = callList[i + 2];
> > - Class suppliedParamClass = suppliedParam != null ? suppliedParam
> > + Class<?> suppliedParamClass = suppliedParam != null ? suppliedParam
> > .getClass()
> > : null;
> >
> > @@ -203,7 +203,7 @@
> > : paramTypeClass.cast(costAndCastedObj[1]);
> > methodAndArgs[i + 1] = castedObj;
> >
> > - Class castedObjClass = castedObj == null ? null : castedObj
> > + Class<?> castedObjClass = castedObj == null ? null : castedObj
> > .getClass();
> > Boolean castedObjIsPrim = castedObj == null ? null : castedObj
> > .getClass().isPrimitive();
> > @@ -230,7 +230,7 @@
> >
> > public static Object[] getMatchingConstructor(Object[] callList) {
> > Object[] ret = null;
> > - Class c = (Class) callList[0];
> > + Class<?> c = (Class<?>) callList[0];
> >
> > Constructor[] matchingConstructors = getMatchingConstructors(c, callList.length - 1);
> >
> > @@ -244,14 +244,14 @@
> > for (Constructor matchingConstructor : matchingConstructors) {
> >
> > int constructorCost = 0;
> > - Class[] paramTypes = matchingConstructor.getParameterTypes();
> > + Class<?>[] paramTypes = matchingConstructor.getParameterTypes();
> > Object[] constructorAndArgs = new Object[paramTypes.length + 1];
> > constructorAndArgs[0] = matchingConstructor;
> >
> > // Figure out which of the matched methods best represents what we
> > // want
> > for (int i = 0; i < paramTypes.length; i++) {
> > - Class paramTypeClass = paramTypes[i];
> > + Class<?> paramTypeClass = paramTypes[i];
> > Object suppliedParam = callList[i + 1];
> > Class suppliedParamClass = suppliedParam != null ? suppliedParam
> > .getClass()
> > @@ -267,7 +267,7 @@
> > : paramTypeClass.cast(costAndCastedObj[1]);
> > constructorAndArgs[i + 1] = castedObj;
> >
> > - Class castedObjClass = castedObj == null ? null : castedObj
> > + Class<?> castedObjClass = castedObj == null ? null : castedObj
> > .getClass();
> > Boolean castedObjIsPrim = castedObj == null ? null : castedObj
> > .getClass().isPrimitive();
> > @@ -291,13 +291,13 @@
> > return ret;
> > }
> >
> > - public static Object[] getCostAndCastedObject(Object suppliedParam, Class paramTypeClass) {
> > + public static Object[] getCostAndCastedObject(Object suppliedParam, Class<?> paramTypeClass) {
> >
> > Object[] ret = new Object[2];
> > Integer cost = new Integer(0);
> > Object castedObj;
> >
> > - Class suppliedParamClass = suppliedParam != null ? suppliedParam.getClass() : null ;
> > + Class<?> suppliedParamClass = suppliedParam != null ? suppliedParam.getClass() : null ;
> >
> > // Either both are an array, or neither are
> > boolean suppliedParamIsArray = suppliedParamClass != null && suppliedParamClass.isArray();
> > @@ -433,9 +433,9 @@
> >
> > }
> >
> > - private static Method[] getMatchingMethods(Class c, String name, int paramCount) {
> > + private static Method[] getMatchingMethods(Class<?> c, String name, int paramCount) {
> > Method[] allMethods = c.getMethods();
> > - ArrayList<Method> matchingMethods = new ArrayList(5);
> > + ArrayList<Method> matchingMethods = new ArrayList<Method>(5);
> >
> > for (Method m: allMethods) {
> > if (m.getName().equals(name) && m.getParameterTypes().length == paramCount)
> > @@ -445,7 +445,7 @@
> > return matchingMethods.toArray(new Method[0]);
> > }
> >
> > - private static Constructor[] getMatchingConstructors(Class c, int paramCount) {
> > + private static Constructor[] getMatchingConstructors(Class<?> c, int paramCount) {
> > Constructor[] allConstructors = c.getConstructors();
> > ArrayList<Constructor> matchingConstructors = new ArrayList<Constructor>(5);
> >
> > @@ -508,7 +508,7 @@
> > return false;
> > }
> >
> > - private static Number getNum (String s, Class c) throws NumberFormatException {
> > + private static Number getNum (String s, Class<?> c) throws NumberFormatException {
> >
> > Number n;
> > if (s.contains("."))
> > diff -r 6c8e9229bded plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
> > --- a/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -1,5 +1,5 @@
> > /* PluginAppletSecurityContext -- execute plugin JNI messages
> > - Copyright (C) 2008 Red Hat
> > + Copyright (C) 2008, 2010 Red Hat
> >
> > This file is part of IcedTea.
> >
> > @@ -273,11 +273,11 @@
> >
> > private static <V> V parseCall(String s, ClassLoader cl, Class<V> c) {
> > if (c == Integer.class)
> > - return (V) new Integer(s);
> > + return c.cast(new Integer(s));
> > else if (c == String.class)
> > - return (V) new String(s);
> > + return c.cast(new String(s));
> > else if (c == Signature.class)
> > - return (V) new Signature(s, cl);
> > + return c.cast(new Signature(s, cl));
> > else
> > throw new RuntimeException("Unexpected call value.");
> > }
> > @@ -375,12 +375,12 @@
> > Signature signature = parseCall(args[3], ((Class) store.getObject(classID)).getClassLoader(), Signature.class);
> > Object[] a = signature.getClassArray();
> >
> > - Class c;
> > + Class<?> c;
> >
> > if (message.startsWith("GetStaticMethodID") ||
> > methodName.equals("<init>") ||
> > methodName.equals("<clinit>"))
> > - c = (Class) store.getObject(classID);
> > + c = (Class<?>) store.getObject(classID);
> > else
> > c = store.getObject(classID).getClass();
> >
> > @@ -404,7 +404,7 @@
> > Integer fieldID = parseCall(args[2], null, Integer.class);
> > String fieldName = (String) store.getObject(fieldID);
> >
> > - Class c = (Class) store.getObject(classID);
> > + Class<?> c = (Class<?>) store.getObject(classID);
> >
> > PluginDebug.debug("GetStaticFieldID/GetFieldID got class=" + c.getName());
> >
> > @@ -420,7 +420,7 @@
> > Integer classID = parseCall(args[1], null, Integer.class);
> > Integer fieldID = parseCall(args[2], null, Integer.class);
> >
> > - final Class c = (Class) store.getObject(classID);
> > + final Class<?> c = (Class<?>) store.getObject(classID);
> > final Field f = (Field) store.getObject(fieldID);
> >
> > AccessControlContext acc = callContext != null ? callContext : getClosedAccessControlContext();
> > @@ -573,7 +573,7 @@
> > Integer arrayID = parseCall(args[1], null, Integer.class);
> >
> > //System.out.println("ARRAYID: " + arrayID);
> > - Object o = (Object) store.getObject(arrayID);
> > + Object o = store.getObject(arrayID);
> > int len = 0;
> > len = Array.getLength(o);
> > // System.out.println ("Returning array length: " + len);
> > @@ -586,7 +586,7 @@
> > Integer objectID = parseCall(args[1], null, Integer.class);
> > Integer fieldID = parseCall(args[2], null, Integer.class);
> >
> > - final Object o = (Object) store.getObject(objectID);
> > + final Object o = store.getObject(objectID);
> > final Field f = (Field) store.getObject(fieldID);
> >
> > AccessControlContext acc = callContext != null ? callContext : getClosedAccessControlContext();
> > @@ -628,7 +628,7 @@
> > int oid = Integer.parseInt(message.substring("GetObjectClass"
> > .length() + 1));
> > // System.out.println ("GETTING CLASS FOR: " + oid);
> > - Class c = store.getObject(oid).getClass();
> > + Class<?> c = store.getObject(oid).getClass();
> > // System.out.println (" OBJ: " + store.getObject(oid));
> > // System.out.println (" CLS: " + c);
> > store.reference(c);
> > @@ -640,13 +640,13 @@
> > Integer objectID = parseCall(args[1], null, Integer.class);
> > String methodName = parseCall(args[2], null, String.class);
> > Object o = null;
> > - Class c;
> > + Class<?> c;
> >
> > if (message.startsWith("CallMethod")) {
> > - o = (Object) store.getObject(objectID);
> > + o = store.getObject(objectID);
> > c = o.getClass();
> > } else {
> > - c = (Class) store.getObject(objectID);
> > + c = (Class<?>) store.getObject(objectID);
> > }
> >
> > // length -3 to discard first 3, + 2 for holding object
> > @@ -736,8 +736,8 @@
> > } else if (message.startsWith("GetSuperclass")) {
> > String[] args = message.split(" ");
> > Integer classID = parseCall(args[1], null, Integer.class);
> > - Class c = null;
> > - Class ret = null;
> > + Class<?> c = null;
> > + Class<?> ret = null;
> >
> > c = (Class) store.getObject(classID);
> > ret = c.getSuperclass();
> > @@ -750,8 +750,8 @@
> > Integer superclassID = parseCall(args[2], null, Integer.class);
> >
> > boolean result = false;
> > - Class clz = (Class) store.getObject(classID);
> > - Class sup = (Class) store.getObject(superclassID);
> > + Class<?> clz = (Class<?>) store.getObject(classID);
> > + Class<?> sup = (Class<?>) store.getObject(superclassID);
> >
> > result = sup.isAssignableFrom(clz);
> >
> > @@ -762,8 +762,8 @@
> > Integer classID = parseCall(args[2], null, Integer.class);
> >
> > boolean result = false;
> > - Object o = (Object) store.getObject(objectID);
> > - Class c = (Class) store.getObject(classID);
> > + Object o = store.getObject(objectID);
> > + Class<?> c = (Class<?>) store.getObject(classID);
> >
> > result = c.isInstance(o);
> >
> > @@ -873,7 +873,7 @@
> > } else if (type.equals("string")) {
> > c = String.class;
> > } else if (isInt(type)) {
> > - c = (Class) store.getObject(Integer.parseInt(type));
> > + c = (Class<?>) store.getObject(Integer.parseInt(type));
> > } else {
> > c = JSObject.class;
> > }
> > @@ -890,7 +890,7 @@
> > Integer classNameID = parseCall(args[1], null, Integer.class);
> > Integer methodNameID = parseCall(args[2], null, Integer.class);
> >
> > - Class c = (Class) store.getObject(classNameID);
> > + Class c = (Class<?>) store.getObject(classNameID);
> > String methodName = (String) store.getObject(methodNameID);
> >
> > Method method = null;
> > @@ -1128,7 +1128,7 @@
> > } else if (message.startsWith("GetClassName")) {
> > String[] args = message.split(" ");
> > Integer objectID = parseCall(args[1], null, Integer.class);
> > - Object o = (Object) store.getObject(objectID);
> > + Object o = store.getObject(objectID);
> > write(reference, "GetClassName " + o.getClass().getName());
> > } else if (message.startsWith("GetClassID")) {
> > String[] args = message.split(" ");
> > @@ -1272,7 +1272,7 @@
> > Signature signature = parseCall(signatureStr, ((Class) store.getObject(classID)).getClassLoader(), Signature.class);
> > Object[] a = signature.getClassArray();
> >
> > - Class c = (Class) store.getObject(classID);
> > + Class<?> c = (Class<?>) store.getObject(classID);
> > Method m = null;
> > Constructor cs = null;
> > Object o = null;
> > @@ -1296,7 +1296,7 @@
> >
> > private int prepopulateField(int classID, String fieldName) {
> >
> > - Class c = (Class) store.getObject(classID);
> > + Class<?> c = (Class<?>) store.getObject(classID);
> > Field f = null;
> > try {
> > f = c.getField(fieldName);
> > diff -r 6c8e9229bded plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
> > --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -93,10 +93,14 @@
> > import java.security.AccessController;
> > import java.security.AllPermission;
> > import java.security.PrivilegedAction;
> > +import java.security.PrivilegedActionException;
> > +import java.security.PrivilegedExceptionAction;
> > +import java.util.ArrayList;
> > import java.util.Enumeration;
> > import java.util.HashMap;
> > import java.util.Hashtable;
> > import java.util.Iterator;
> > +import java.util.List;
> > import java.util.Map;
> > import java.util.Vector;
> >
> > @@ -121,12 +125,12 @@
> > public AppletPanel createPanel(PluginStreamHandler streamhandler,
> > int identifier,
> > long handle, int x, int y,
> > - final URL doc, final Hashtable atts) {
> > -
> > - AppletViewerPanel panel = (AppletViewerPanel) AccessController.doPrivileged(new PrivilegedAction() {
> > - public Object run() {
> > + final URL doc,
> > + final Hashtable<String,String> atts) {
> > + AppletViewerPanel panel = AccessController.doPrivileged(new PrivilegedAction<AppletViewerPanel>() {
> > + public AppletViewerPanel run() {
> > try {
> > - AppletPanel panel = new NetxPanel(doc, atts, false);
> > + AppletViewerPanel panel = new NetxPanel(doc, atts, false);
> > AppletViewerPanel.debug("Using NetX panel");
> > PluginDebug.debug(atts.toString());
> > return panel;
> > @@ -151,7 +155,7 @@
> >
> > if (atts.get("codebase") != null) {
> > try {
> > - URL appletSrcURL = new URL(codeBase + (String) atts.get("codebase"));
> > + URL appletSrcURL = new URL(codeBase + atts.get("codebase"));
> > codeBase = appletSrcURL.getProtocol() + "://" + appletSrcURL.getHost();
> > } catch (MalformedURLException mfue) {
> > // do nothing
> > @@ -209,12 +213,12 @@
> > private void initEventQueue(AppletPanel panel) {
> > // appletviewer.send.event is an undocumented and unsupported system
> > // property which is used exclusively for testing purposes.
> > - PrivilegedAction pa = new PrivilegedAction() {
> > - public Object run() {
> > + PrivilegedAction<String> pa = new PrivilegedAction<String>() {
> > + public String run() {
> > return System.getProperty("appletviewer.send.event");
> > }
> > };
> > - String eventList = (String) AccessController.doPrivileged(pa);
> > + String eventList = AccessController.doPrivileged(pa);
> >
> > if (eventList == null) {
> > // Add the standard events onto the event queue.
> > @@ -273,20 +277,18 @@
> > * s. Whitespace not stripped.
> > */
> > private String [] splitSeparator(String sep, String s) {
> > - Vector v = new Vector();
> > + List<String> l = new ArrayList<String>();
> > int tokenStart = 0;
> > int tokenEnd = 0;
> >
> > while ((tokenEnd = s.indexOf(sep, tokenStart)) != -1) {
> > - v.addElement(s.substring(tokenStart, tokenEnd));
> > + l.add(s.substring(tokenStart, tokenEnd));
> > tokenStart = tokenEnd+1;
> > }
> > // Add the final element.
> > - v.addElement(s.substring(tokenStart));
> > + l.add(s.substring(tokenStart));
> >
> > - String [] retVal = new String[v.size()];
> > - v.copyInto(retVal);
> > - return retVal;
> > + return l.toArray(new String[l.size()]);
> > }
> > }
> >
> > @@ -338,11 +340,11 @@
> > int identifier;
> >
> > private static HashMap<Integer, PluginParseRequest> requests =
> > - new HashMap();
> > + new HashMap<Integer,PluginParseRequest>();
> >
> > // Instance identifier -> PluginAppletViewer object.
> > private static HashMap<Integer, PluginAppletViewer> applets =
> > - new HashMap();
> > + new HashMap<Integer,PluginAppletViewer>();
> >
> > private static PluginStreamHandler streamhandler;
> >
> > @@ -441,7 +443,7 @@
> > switch (evt.getID()) {
> > case AppletPanel.APPLET_RESIZE: {
> > if(src != null) {
> > - appletViewer.resize(appletViewer.preferredSize());
> > + appletViewer.setSize(appletViewer.getPreferredSize());
> > appletViewer.validate();
> > }
> > break;
> > @@ -734,8 +736,8 @@
> > // 0 => width, 1=> width_value, 2 => height, 3=> height_value
> > String[] dimMsg = message.split(" ");
> >
> > - final int height = (int) (Integer.parseInt(dimMsg[3]));
> > - final int width = (int) (Integer.parseInt(dimMsg[1]));
> > + final int height = Integer.parseInt(dimMsg[3]);
> > + final int width = Integer.parseInt(dimMsg[1]);
> >
> > if (panel instanceof NetxPanel)
> > ((NetxPanel) panel).updateSizeInAtts(height, width);
> > @@ -824,7 +826,7 @@
> > * Methods for java.applet.AppletContext
> > */
> >
> > - private static Map audioClips = new HashMap();
> > + private static Map<URL,AudioClip> audioClips = new HashMap<URL,AudioClip>();
> >
> > /**
> > * Get an audio clip.
> > @@ -832,7 +834,7 @@
> > public AudioClip getAudioClip(URL url) {
> > checkConnect(url);
> > synchronized (audioClips) {
> > - AudioClip clip = (AudioClip)audioClips.get(url);
> > + AudioClip clip = audioClips.get(url);
> > if (clip == null) {
> > audioClips.put(url, clip = new AppletAudioClip(url));
> > }
> > @@ -840,7 +842,7 @@
> > }
> > }
> >
> > - private static Map imageRefs = new HashMap();
> > + private static Map<URL,AppletImageRef> imageRefs = new HashMap<URL,AppletImageRef>();
> >
> > /**
> > * Get an image.
> > @@ -888,7 +890,7 @@
> > PluginDebug.debug("getCachedImageRef() getting img from URL = " + url);
> >
> > synchronized (imageRefs) {
> > - AppletImageRef ref = (AppletImageRef)imageRefs.get(url);
> > + AppletImageRef ref = imageRefs.get(url);
> > if (ref == null) {
> > ref = new AppletImageRef(url);
> > imageRefs.put(url, ref);
> > @@ -909,7 +911,7 @@
> > imageRefs.clear();
> > }
> >
> > - static Vector appletPanels = new Vector();
> > + static Vector<AppletPanel> appletPanels = new Vector<AppletPanel>();
> >
> > /**
> > * Get an applet by name.
> > @@ -942,13 +944,13 @@
> > * Return an enumeration of all the accessible
> > * applets on this page.
> > */
> > - public Enumeration getApplets() {
> > - Vector v = new Vector();
> > + public Enumeration<Applet> getApplets() {
> > + Vector<Applet> v = new Vector<Applet>();
> > SocketPermission panelSp =
> > new SocketPermission(panel.getCodeBase().getHost(), "connect");
> >
> > - for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) {
> > - AppletPanel p = (AppletPanel)e.nextElement();
> > + for (Enumeration<AppletPanel> e = appletPanels.elements() ; e.hasMoreElements() ;) {
> > + AppletPanel p = e.nextElement();
> > if (p.getDocumentBase().equals(panel.getDocumentBase())) {
> >
> > SocketPermission sp =
> > @@ -1456,12 +1458,14 @@
> > // We do nothing.
> > }
> >
> > + @Override
> > public InputStream getStream(String key){
> > // We do nothing.
> > return null;
> > }
> >
> > - public Iterator getStreamKeys(){
> > + @Override
> > + public Iterator<String> getStreamKeys(){
> > // We do nothing.
> > return null;
> > }
> > @@ -1469,7 +1473,7 @@
> > /**
> > * System parameters.
> > */
> > - static Hashtable systemParam = new Hashtable();
> > + static Hashtable<String,String> systemParam = new Hashtable<String,String>();
> >
> > static {
> > systemParam.put("codebase", "codebase");
> > @@ -1485,32 +1489,32 @@
> > /**
> > * Print the HTML tag.
> > */
> > - public static void printTag(PrintStream out, Hashtable atts) {
> > + public static void printTag(PrintStream out, Hashtable<String,String> atts) {
> > out.print("<applet");
> >
> > - String v = (String)atts.get("codebase");
> > + String v = atts.get("codebase");
> > if (v != null) {
> > out.print(" codebase=\"" + v + "\"");
> > }
> >
> > - v = (String)atts.get("code");
> > + v = atts.get("code");
> > if (v == null) {
> > v = "applet.class";
> > }
> > out.print(" code=\"" + v + "\"");
> > - v = (String)atts.get("width");
> > + v = atts.get("width");
> > if (v == null) {
> > v = "150";
> > }
> > out.print(" width=" + v);
> >
> > - v = (String)atts.get("height");
> > + v = atts.get("height");
> > if (v == null) {
> > v = "100";
> > }
> > out.print(" height=" + v);
> >
> > - v = (String)atts.get("name");
> > + v = atts.get("name");
> > if (v != null) {
> > out.print(" name=\"" + v + "\"");
> > }
> > @@ -1520,8 +1524,8 @@
> > int len = atts.size();
> > String params[] = new String[len];
> > len = 0;
> > - for (Enumeration e = atts.keys() ; e.hasMoreElements() ;) {
> > - String param = (String)e.nextElement();
> > + for (Enumeration<String> e = atts.keys() ; e.hasMoreElements() ;) {
> > + String param = e.nextElement();
> > int i = 0;
> > for (; i < len ; i++) {
> > if (params[i].compareTo(param) >= 0) {
> > @@ -1547,12 +1551,12 @@
> > * Make sure the atrributes are uptodate.
> > */
> > public void updateAtts() {
> > - Dimension d = panel.size();
> > - Insets in = panel.insets();
> > + Dimension d = panel.getSize();
> > + Insets in = panel.getInsets();
> > panel.atts.put("width",
> > - new Integer(d.width - (in.left + in.right)).toString());
> > + Integer.valueOf(d.width - (in.left + in.right)).toString());
> > panel.atts.put("height",
> > - new Integer(d.height - (in.top + in.bottom)).toString());
> > + Integer.valueOf(d.height - (in.top + in.bottom)).toString());
> > }
> >
> > /**
> > @@ -1591,8 +1595,8 @@
> > return; // abort the reload
> > }
> >
> > - AccessController.doPrivileged(new PrivilegedAction() {
> > - public Object run() {
> > + AccessController.doPrivileged(new PrivilegedAction<Void>() {
> > + public Void run() {
> > panel.createAppletThread();
> > return null;
> > }
> > @@ -1701,7 +1705,7 @@
> > * Scan identifier
> > */
> > public static String scanIdentifier(int[] c, Reader in) throws IOException {
> > - StringBuffer buf = new StringBuffer();
> > + StringBuilder buf = new StringBuilder();
> >
> > if (c[0] == '!') {
> > // Technically, we should be scanning for '!--' but we are reading
> > @@ -1725,7 +1729,7 @@
> > }
> >
> > public static void skipComment(int[] c, Reader in) throws IOException {
> > - StringBuffer buf = new StringBuffer();
> > + StringBuilder buf = new StringBuilder();
> > boolean commentHeaderPassed = false;
> > c[0] = in.read();
> > buf.append((char)c[0]);
> > @@ -1762,8 +1766,8 @@
> > /**
> > * Scan tag
> > */
> > - public static Hashtable scanTag(int[] c, Reader in) throws IOException {
> > - Hashtable atts = new Hashtable();
> > + public static Hashtable<String,String> scanTag(int[] c, Reader in) throws IOException {
> > + Hashtable<String,String> atts = new Hashtable<String,String>();
> > skipSpace(c, in);
> > while (c[0] >= 0 && c[0] != '>') {
> > String att = scanIdentifier(c, in);
> > @@ -1777,7 +1781,7 @@
> > quote = c[0];
> > c[0] = in.read();
> > }
> > - StringBuffer buf = new StringBuffer();
> > + StringBuilder buf = new StringBuilder();
> > while ((c[0] > 0) &&
> > (((quote < 0) && (c[0] != ' ') && (c[0] != '\t') &&
> > (c[0] != '\n') && (c[0] != '\r') && (c[0] != '>'))
> > @@ -1850,7 +1854,7 @@
> > }
> >
> > public static void parse(int identifier, long handle, String width, String height, Reader in, URL url)
> > - throws IOException {
> > + throws PrivilegedActionException {
> >
> > final int fIdentifier = identifier;
> > final long fHandle = handle;
> > @@ -1858,21 +1862,13 @@
> > final String fHeight = height;
> > final Reader fIn = in;
> > final URL fUrl = url;
> > - PrivilegedAction pa = new PrivilegedAction() {
> > - public Object run() {
> > - try {
> > - parse(fIdentifier, fHandle, fWidth, fHeight, fIn, fUrl, System.out, new PluginAppletPanelFactory());
> > - } catch (IOException ioe) {
> > - return ioe;
> > - }
> > + AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
> > + public Void run() throws IOException {
> > + parse(fIdentifier, fHandle, fWidth, fHeight, fIn, fUrl,
> > + System.out, new PluginAppletPanelFactory());
> > return null;
> > }
> > - };
> > -
> > - Object ret = AccessController.doPrivileged(pa);
> > - if (ret instanceof IOException) {
> > - throw (IOException) ret;
> > - }
> > + });
> > }
> >
> > public static void parse(int identifier, long handle, String width,
> > @@ -1914,7 +1910,7 @@
> > url = conn.getURL();
> >
> > int ydisp = 1;
> > - Hashtable atts = null;
> > + Hashtable<String,String> atts = null;
> >
> > while(true) {
> > c[0] = in.read();
> > @@ -1968,8 +1964,8 @@
> > else {
> > String nm = scanIdentifier(c, in);
> > if (nm.equalsIgnoreCase("param")) {
> > - Hashtable t = scanTag(c, in);
> > - String att = (String)t.get("name");
> > + Hashtable<String,String> t = scanTag(c, in);
> > + String att = t.get("name");
> >
> > if (atts.containsKey(att))
> > continue;
> > @@ -1977,7 +1973,7 @@
> > if (att == null) {
> > statusMsgStream.println(requiresNameWarning);
> > } else {
> > - String val = (String)t.get("value");
> > + String val = t.get("value");
> > if (val == null) {
> > statusMsgStream.println(requiresNameWarning);
> > } else if (atts != null) {
> > @@ -1993,13 +1989,14 @@
> > atts = scanTag(c, in);
> >
> > // If there is a classid and no code tag present, transform it to code tag
> > - if (atts.get("code") == null && atts.get("classid") != null && !((String) atts.get("classid")).startsWith("clsid:")) {
> > + if (atts.get("code") == null && atts.get("classid") != null
> > + && !(atts.get("classid")).startsWith("clsid:")) {
> > atts.put("code", atts.get("classid"));
> > }
> >
> > // remove java: from code tag
> > - if (atts.get("code") != null && ((String) atts.get("code")).startsWith("java:")) {
> > - atts.put("code", ((String) atts.get("code")).substring(5));
> > + if (atts.get("code") != null && (atts.get("code")).startsWith("java:")) {
> > + atts.put("code", (atts.get("code")).substring(5));
> > }
> >
> > if (atts.get("code") == null && atts.get("object") == null) {
> > @@ -2025,19 +2022,20 @@
> > }
> >
> > // If there is a classid and no code tag present, transform it to code tag
> > - if (atts.get("code") == null && atts.get("classid") != null && !((String) atts.get("classid")).startsWith("clsid:")) {
> > + if (atts.get("code") == null && atts.get("classid") != null
> > + && !(atts.get("classid")).startsWith("clsid:")) {
> > atts.put("code", atts.get("classid"));
> > }
> >
> > // remove java: from code tag
> > - if (atts.get("code") != null && ((String) atts.get("code")).startsWith("java:")) {
> > - atts.put("code", ((String) atts.get("code")).substring(5));
> > + if (atts.get("code") != null && (atts.get("code")).startsWith("java:")) {
> > + atts.put("code", (atts.get("code")).substring(5));
> > }
> >
> > // java_* aliases override older names:
> > // http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/using_tags.html#in-ie
> > if (atts.get("java_code") != null) {
> > - atts.put("code", ((String) atts.get("java_code")));
> > + atts.put("code", (atts.get("java_code")));
> > }
> >
> > if (atts.containsKey("code")) {
> > @@ -2045,19 +2043,19 @@
> > }
> >
> > if (atts.get("java_codebase") != null) {
> > - atts.put("codebase", ((String) atts.get("java_codebase")));
> > + atts.put("codebase", (atts.get("java_codebase")));
> > }
> >
> > if (atts.get("java_archive") != null) {
> > - atts.put("archive", ((String) atts.get("java_archive")));
> > + atts.put("archive", (atts.get("java_archive")));
> > }
> >
> > if (atts.get("java_object") != null) {
> > - atts.put("object", ((String) atts.get("java_object")));
> > + atts.put("object", (atts.get("java_object")));
> > }
> >
> > if (atts.get("java_type") != null) {
> > - atts.put("type", ((String) atts.get("java_type")));
> > + atts.put("type", (atts.get("java_type")));
> > }
> >
> > if (atts.get("width") == null || !isInt(atts.get("width"))) {
> > @@ -2073,35 +2071,36 @@
> > atts = scanTag(c, in);
> >
> > // If there is a classid and no code tag present, transform it to code tag
> > - if (atts.get("code") == null && atts.get("classid") != null && !((String) atts.get("classid")).startsWith("clsid:")) {
> > + if (atts.get("code") == null && atts.get("classid") != null
> > + && !(atts.get("classid")).startsWith("clsid:")) {
> > atts.put("code", atts.get("classid"));
> > }
> >
> > // remove java: from code tag
> > - if (atts.get("code") != null && ((String) atts.get("code")).startsWith("java:")) {
> > - atts.put("code", ((String) atts.get("code")).substring(5));
> > + if (atts.get("code") != null && (atts.get("code")).startsWith("java:")) {
> > + atts.put("code", (atts.get("code")).substring(5));
> > }
> >
> > // java_* aliases override older names:
> > // http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/using_tags.html#in-nav
> > if (atts.get("java_code") != null) {
> > - atts.put("code", ((String) atts.get("java_code")));
> > + atts.put("code", (atts.get("java_code")));
> > }
> >
> > if (atts.get("java_codebase") != null) {
> > - atts.put("codebase", ((String) atts.get("java_codebase")));
> > + atts.put("codebase", (atts.get("java_codebase")));
> > }
> >
> > if (atts.get("java_archive") != null) {
> > - atts.put("archive", ((String) atts.get("java_archive")));
> > + atts.put("archive", (atts.get("java_archive")));
> > }
> >
> > if (atts.get("java_object") != null) {
> > - atts.put("object", ((String) atts.get("java_object")));
> > + atts.put("object", (atts.get("java_object")));
> > }
> >
> > if (atts.get("java_type") != null) {
> > - atts.put("type", ((String) atts.get("java_type")));
> > + atts.put("type", (atts.get("java_type")));
> > }
> >
> > if (atts.get("code") == null && atts.get("object") == null) {
> > diff -r 6c8e9229bded plugin/icedteanp/java/sun/applet/PluginMain.java
> > --- a/plugin/icedteanp/java/sun/applet/PluginMain.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/plugin/icedteanp/java/sun/applet/PluginMain.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -190,9 +190,9 @@
> > // Read in the System properties. If something is going to be
> > // over-written, warn about it.
> > Properties sysProps = System.getProperties();
> > - for (Enumeration e = sysProps.propertyNames(); e.hasMoreElements(); ) {
> > + for (Enumeration<?> e = sysProps.propertyNames(); e.hasMoreElements(); ) {
> > String key = (String) e.nextElement();
> > - String val = (String) sysProps.getProperty(key);
> > + String val = sysProps.getProperty(key);
> > avProps.setProperty(key, val);
> > }
> >
> > diff -r 6c8e9229bded plugin/icedteanp/java/sun/applet/PluginObjectStore.java
> > --- a/plugin/icedteanp/java/sun/applet/PluginObjectStore.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/plugin/icedteanp/java/sun/applet/PluginObjectStore.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -43,9 +43,9 @@
> >
> > public class PluginObjectStore
> > {
> > - private static HashMap<Integer, Object> objects = new HashMap();
> > - private static HashMap<Integer, Integer> counts = new HashMap();
> > - private static HashMap<Object, Integer> identifiers = new HashMap();
> > + private static HashMap<Integer, Object> objects = new HashMap<Integer,Object>();
> > + private static HashMap<Integer, Integer> counts = new HashMap<Integer,Integer>();
> > + private static HashMap<Object, Integer> identifiers = new HashMap<Object,Integer>();
> > // FIXME:
> > //
> > // IF uniqueID == MAX_LONG, uniqueID =
> > diff -r 6c8e9229bded plugin/icedteanp/java/sun/applet/PluginProxySelector.java
> > --- a/plugin/icedteanp/java/sun/applet/PluginProxySelector.java Thu Dec 02 10:22:44 2010 -0500
> > +++ b/plugin/icedteanp/java/sun/applet/PluginProxySelector.java Thu Dec 02 19:49:46 2010 +0000
> > @@ -162,6 +162,7 @@
> > *
> > * @param key The key
> > */
> > + @SuppressWarnings("unchecked")
> > public V get(Object key) {
> >
> > Long now = new Date().getTime();
>
--
Andrew :)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and IcedTea
http://www.gnu.org/software/classpath
http://icedtea.classpath.org
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
More information about the distro-pkg-dev
mailing list