mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8152467: remove uses of anachronistic array declarations for method return type
Reviewed-by: shade, alanb
This commit is contained in:
parent
605b3f051b
commit
a6d6619fbb
8 changed files with 18 additions and 18 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1996, 2019, 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
|
||||||
|
@ -244,7 +244,7 @@ public final class CompactByteArray implements Cloneable {
|
||||||
/** For internal use only. Do not modify the result, the behavior of
|
/** For internal use only. Do not modify the result, the behavior of
|
||||||
* modified results are undefined.
|
* modified results are undefined.
|
||||||
*/
|
*/
|
||||||
public short getIndexArray()[]
|
public short[] getIndexArray()
|
||||||
{
|
{
|
||||||
return indices;
|
return indices;
|
||||||
}
|
}
|
||||||
|
@ -252,7 +252,7 @@ public final class CompactByteArray implements Cloneable {
|
||||||
/** For internal use only. Do not modify the result, the behavior of
|
/** For internal use only. Do not modify the result, the behavior of
|
||||||
* modified results are undefined.
|
* modified results are undefined.
|
||||||
*/
|
*/
|
||||||
public byte getStringArray()[]
|
public byte[] getStringArray()
|
||||||
{
|
{
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2019, 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
|
||||||
|
@ -105,7 +105,7 @@ class BinaryAttribute implements Constants {
|
||||||
|
|
||||||
public Identifier getName() { return name; }
|
public Identifier getName() { return name; }
|
||||||
|
|
||||||
public byte getData()[] { return data; }
|
public byte[] getData() { return data; }
|
||||||
|
|
||||||
public BinaryAttribute getNextAttribute() { return next; }
|
public BinaryAttribute getNextAttribute() { return next; }
|
||||||
|
|
||||||
|
|
|
@ -531,7 +531,7 @@ class BinaryClass extends ClassDefinition implements Constants {
|
||||||
/**
|
/**
|
||||||
* Get a class attribute
|
* Get a class attribute
|
||||||
*/
|
*/
|
||||||
public byte getAttribute(Identifier name)[] {
|
public byte[] getAttribute(Identifier name) {
|
||||||
for (BinaryAttribute att = atts ; att != null ; att = att.next) {
|
for (BinaryAttribute att = atts ; att != null ; att = att.next) {
|
||||||
if (att.name.equals(name)) {
|
if (att.name.equals(name)) {
|
||||||
return att.data;
|
return att.data;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1995, 2003, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1995, 2019, 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,11 +88,11 @@ public class BinaryCode implements Constants {
|
||||||
* Accessors
|
* Accessors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public BinaryExceptionHandler getExceptionHandlers()[] {
|
public BinaryExceptionHandler[] getExceptionHandlers() {
|
||||||
return exceptionHandlers;
|
return exceptionHandlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getCode()[] { return code; }
|
public byte[] getCode() { return code; }
|
||||||
|
|
||||||
public int getMaxStack() { return maxStack; }
|
public int getMaxStack() { return maxStack; }
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2019, 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
|
||||||
|
@ -224,7 +224,7 @@ class ClassDefinition implements Constants {
|
||||||
/**
|
/**
|
||||||
* Get the class' interfaces
|
* Get the class' interfaces
|
||||||
*/
|
*/
|
||||||
public final ClassDeclaration getInterfaces()[] {
|
public final ClassDeclaration[] getInterfaces() {
|
||||||
if (interfaces == null) throw new CompilerError("getInterfaces");
|
if (interfaces == null) throw new CompilerError("getInterfaces");
|
||||||
return interfaces;
|
return interfaces;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2019, 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
|
||||||
|
@ -62,7 +62,7 @@ class MethodType extends Type {
|
||||||
return returnType;
|
return returnType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type getArgumentTypes()[] {
|
public Type[] getArgumentTypes() {
|
||||||
return argTypes;
|
return argTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2004, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2019, 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
|
||||||
|
@ -282,13 +282,13 @@ class Parser extends Scanner implements ParserActions, Constants {
|
||||||
}
|
}
|
||||||
args[argIndex++] = n;
|
args[argIndex++] = n;
|
||||||
}
|
}
|
||||||
protected final Expression exprArgs(int index)[] {
|
protected final Expression[] exprArgs(int index) {
|
||||||
Expression e[] = new Expression[argIndex - index];
|
Expression e[] = new Expression[argIndex - index];
|
||||||
System.arraycopy(args, index, e, 0, argIndex - index);
|
System.arraycopy(args, index, e, 0, argIndex - index);
|
||||||
argIndex = index;
|
argIndex = index;
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
protected final Statement statArgs(int index)[] {
|
protected final Statement[] statArgs(int index) {
|
||||||
Statement s[] = new Statement[argIndex - index];
|
Statement s[] = new Statement[argIndex - index];
|
||||||
System.arraycopy(args, index, s, 0, argIndex - index);
|
System.arraycopy(args, index, s, 0, argIndex - index);
|
||||||
argIndex = index;
|
argIndex = index;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2019, 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
|
||||||
|
@ -300,7 +300,7 @@ class Type implements Constants {
|
||||||
/**
|
/**
|
||||||
* Return the argument types. Only works for method types.
|
* Return the argument types. Only works for method types.
|
||||||
*/
|
*/
|
||||||
public Type getArgumentTypes()[] {
|
public Type[] getArgumentTypes() {
|
||||||
throw new CompilerError("getArgumentTypes");
|
throw new CompilerError("getArgumentTypes");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue