8031326: Use Class<?> rather than Class in java.net method signatures
Reviewed-by: alanb, chegar
This commit is contained in:
parent
4541877ec0
commit
34ee8749b7
@ -1055,7 +1055,7 @@ public final class URL implements java.io.Serializable {
|
||||
/**
|
||||
* Gets the contents of this URL. This method is a shorthand for:
|
||||
* <blockquote><pre>
|
||||
* openConnection().getContent(Class[])
|
||||
* openConnection().getContent(classes)
|
||||
* </pre></blockquote>
|
||||
*
|
||||
* @param classes an array of Java types
|
||||
@ -1066,7 +1066,7 @@ public final class URL implements java.io.Serializable {
|
||||
* @see java.net.URLConnection#getContent(Class[])
|
||||
* @since 1.3
|
||||
*/
|
||||
public final Object getContent(Class[] classes)
|
||||
public final Object getContent(Class<?>[] classes)
|
||||
throws java.io.IOException {
|
||||
return openConnection().getContent(classes);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -760,7 +760,7 @@ public abstract class URLConnection {
|
||||
* @see java.net.URLConnection#setContentHandlerFactory(java.net.ContentHandlerFactory)
|
||||
* @since 1.3
|
||||
*/
|
||||
public Object getContent(Class[] classes) throws IOException {
|
||||
public Object getContent(Class<?>[] classes) throws IOException {
|
||||
// Must call getInputStream before GetHeaderField gets called
|
||||
// so that FileNotFoundException has a chance to be thrown up
|
||||
// from here without being caught.
|
||||
|
Loading…
x
Reference in New Issue
Block a user