< prev index next >
src/java.base/share/classes/java/net/URLConnection.java
Print this page
@@ -1413,11 +1413,11 @@
*/
private String typeToPackageName(String contentType) {
// make sure we canonicalize the class name: all lower case
contentType = contentType.toLowerCase();
int len = contentType.length();
- char nm[] = new char[len];
+ char[] nm = new char[len];
contentType.getChars(0, len, nm, 0);
for (int i = 0; i < len; i++) {
char c = nm[i];
if (c == '/') {
nm[i] = '.';
@@ -1691,11 +1691,11 @@
if ((posn = skipForward(is, toSkip)) < toSkip) {
is.reset();
return false;
}
- int c[] = new int[16];
+ int[] c = new int[16];
if (readBytes(c, 2, is) < 0) {
is.reset();
return false;
}
@@ -1810,14 +1810,14 @@
/**
* Tries to read the specified number of bytes from the stream
* Returns -1, If EOF is reached before len bytes are read, returns 0
* otherwise
*/
- private static int readBytes(int c[], int len, InputStream is)
+ private static int readBytes(int[] c, int len, InputStream is)
throws IOException {
- byte buf[] = new byte[len];
+ byte[] buf = new byte[len];
if (is.read(buf, 0, len) < len) {
return -1;
}
// fill the passed in int array
< prev index next >