changeset 56032:699b8ef42f30

8152467: remove uses of anachronistic array declarations for method return type Reviewed-by: shade, alanb Contributed-by: Evgeny Mandrikov <mandrikov@gmail.com>
author godin
date Tue, 20 Aug 2019 15:54:46 +0200
parents 80fad5f39a42
children 348f7933e2cc
files src/java.base/share/classes/sun/text/CompactByteArray.java src/jdk.rmic/share/classes/sun/tools/java/BinaryAttribute.java src/jdk.rmic/share/classes/sun/tools/java/BinaryClass.java src/jdk.rmic/share/classes/sun/tools/java/BinaryCode.java src/jdk.rmic/share/classes/sun/tools/java/ClassDefinition.java src/jdk.rmic/share/classes/sun/tools/java/MethodType.java src/jdk.rmic/share/classes/sun/tools/java/Parser.java src/jdk.rmic/share/classes/sun/tools/java/Type.java
diffstat 8 files changed, 18 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/sun/text/CompactByteArray.java	Tue Jul 02 12:28:41 2019 +0200
+++ b/src/java.base/share/classes/sun/text/CompactByteArray.java	Tue Aug 20 15:54:46 2019 +0200
@@ -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 @@
     /** 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 @@
     /** For internal use only.  Do not modify the result, the behavior of
       * modified results are undefined.
       */
-    public byte getStringArray()[]
+    public byte[] getStringArray()
     {
         return values;
     }
--- a/src/jdk.rmic/share/classes/sun/tools/java/BinaryAttribute.java	Tue Jul 02 12:28:41 2019 +0200
+++ b/src/jdk.rmic/share/classes/sun/tools/java/BinaryAttribute.java	Tue Aug 20 15:54:46 2019 +0200
@@ -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 @@
 
     public Identifier getName() { return name; }
 
-    public byte getData()[] { return data; }
+    public byte[] getData() { return data; }
 
     public BinaryAttribute getNextAttribute() { return next; }
 
--- a/src/jdk.rmic/share/classes/sun/tools/java/BinaryClass.java	Tue Jul 02 12:28:41 2019 +0200
+++ b/src/jdk.rmic/share/classes/sun/tools/java/BinaryClass.java	Tue Aug 20 15:54:46 2019 +0200
@@ -531,7 +531,7 @@
     /**
      * 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;
--- a/src/jdk.rmic/share/classes/sun/tools/java/BinaryCode.java	Tue Jul 02 12:28:41 2019 +0200
+++ b/src/jdk.rmic/share/classes/sun/tools/java/BinaryCode.java	Tue Aug 20 15:54:46 2019 +0200
@@ -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 @@
      * Accessors
      */
 
-    public BinaryExceptionHandler getExceptionHandlers()[] {
+    public BinaryExceptionHandler[] getExceptionHandlers() {
         return exceptionHandlers;
     }
 
-    public byte getCode()[] { return code; }
+    public byte[] getCode() { return code; }
 
     public int getMaxStack() { return maxStack; }
 
--- a/src/jdk.rmic/share/classes/sun/tools/java/ClassDefinition.java	Tue Jul 02 12:28:41 2019 +0200
+++ b/src/jdk.rmic/share/classes/sun/tools/java/ClassDefinition.java	Tue Aug 20 15:54:46 2019 +0200
@@ -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 @@
     /**
      * Get the class' interfaces
      */
-    public final ClassDeclaration getInterfaces()[] {
+    public final ClassDeclaration[] getInterfaces() {
         if (interfaces == null)  throw new CompilerError("getInterfaces");
         return interfaces;
     }
--- a/src/jdk.rmic/share/classes/sun/tools/java/MethodType.java	Tue Jul 02 12:28:41 2019 +0200
+++ b/src/jdk.rmic/share/classes/sun/tools/java/MethodType.java	Tue Aug 20 15:54:46 2019 +0200
@@ -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 @@
         return returnType;
     }
 
-    public Type getArgumentTypes()[] {
+    public Type[] getArgumentTypes() {
         return argTypes;
     }
 
--- a/src/jdk.rmic/share/classes/sun/tools/java/Parser.java	Tue Jul 02 12:28:41 2019 +0200
+++ b/src/jdk.rmic/share/classes/sun/tools/java/Parser.java	Tue Aug 20 15:54:46 2019 +0200
@@ -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 @@
         }
         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;
--- a/src/jdk.rmic/share/classes/sun/tools/java/Type.java	Tue Jul 02 12:28:41 2019 +0200
+++ b/src/jdk.rmic/share/classes/sun/tools/java/Type.java	Tue Aug 20 15:54:46 2019 +0200
@@ -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 @@
     /**
      * Return the argument types. Only works for method types.
      */
-    public Type getArgumentTypes()[] {
+    public Type[] getArgumentTypes() {
         throw new CompilerError("getArgumentTypes");
     }