8152467: remove uses of anachronistic array declarations for method return type

Reviewed-by: shade, alanb
This commit is contained in:
Evgeny Mandrikov 2019-08-20 15:54:46 +02:00 committed by Evgeny Mandrikov
parent 605b3f051b
commit a6d6619fbb
8 changed files with 18 additions and 18 deletions

View file

@ -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.
*
* 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
* modified results are undefined.
*/
public short getIndexArray()[]
public short[] getIndexArray()
{
return indices;
}
@ -252,7 +252,7 @@ public final class CompactByteArray implements Cloneable {
/** For internal use only. Do not modify the result, the behavior of
* modified results are undefined.
*/
public byte getStringArray()[]
public byte[] getStringArray()
{
return values;
}

View file

@ -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.
*
* 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 byte getData()[] { return data; }
public byte[] getData() { return data; }
public BinaryAttribute getNextAttribute() { return next; }

View file

@ -531,7 +531,7 @@ class BinaryClass extends ClassDefinition implements Constants {
/**
* Get a class attribute
*/
public byte getAttribute(Identifier name)[] {
public byte[] getAttribute(Identifier name) {
for (BinaryAttribute att = atts ; att != null ; att = att.next) {
if (att.name.equals(name)) {
return att.data;

View file

@ -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.
*
* This code is free software; you can redistribute it and/or modify it
@ -88,11 +88,11 @@ public class BinaryCode implements Constants {
* Accessors
*/
public BinaryExceptionHandler getExceptionHandlers()[] {
public BinaryExceptionHandler[] getExceptionHandlers() {
return exceptionHandlers;
}
public byte getCode()[] { return code; }
public byte[] getCode() { return code; }
public int getMaxStack() { return maxStack; }

View file

@ -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.
*
* 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
*/
public final ClassDeclaration getInterfaces()[] {
public final ClassDeclaration[] getInterfaces() {
if (interfaces == null) throw new CompilerError("getInterfaces");
return interfaces;
}

View file

@ -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.
*
* This code is free software; you can redistribute it and/or modify it
@ -62,7 +62,7 @@ class MethodType extends Type {
return returnType;
}
public Type getArgumentTypes()[] {
public Type[] getArgumentTypes() {
return argTypes;
}

View file

@ -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.
*
* 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;
}
protected final Expression exprArgs(int index)[] {
protected final Expression[] exprArgs(int index) {
Expression e[] = new Expression[argIndex - index];
System.arraycopy(args, index, e, 0, argIndex - index);
argIndex = index;
return e;
}
protected final Statement statArgs(int index)[] {
protected final Statement[] statArgs(int index) {
Statement s[] = new Statement[argIndex - index];
System.arraycopy(args, index, s, 0, argIndex - index);
argIndex = index;

View file

@ -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.
*
* 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.
*/
public Type getArgumentTypes()[] {
public Type[] getArgumentTypes() {
throw new CompilerError("getArgumentTypes");
}