< prev index next >

src/java.desktop/share/classes/javax/swing/text/html/parser/DTD.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -235,11 +235,11 @@
      * @param type the type of the <code>Entity</code>
      * @param data the <code>Entity</code>'s data
      * @return the <code>Entity</code> requested or a new <code>Entity</code>
      *   if not found
      */
-    public Entity defineEntity(String name, int type, char data[]) {
+    public Entity defineEntity(String name, int type, char[] data) {
         Entity ent = entityHash.get(name);
         if (ent == null) {
             ent = new Entity(name, type, data);
             entityHash.put(name, ent);
             if (((type & GENERAL) != 0) && (data.length == 1)) {

@@ -302,11 +302,11 @@
      * @param type the entity's type
      * @param ch   the entity's value (character)
      * @return the new character <code>Entity</code>
      */
     public Entity defEntity(String name, int type, int ch) {
-        char data[] = {(char)ch};
+        char[] data = {(char)ch};
         return defineEntity(name, type, data);
     }
 
     /**
      * Creates and returns an <code>Entity</code>.

@@ -315,11 +315,11 @@
      * @param str  the entity's data section
      * @return the new <code>Entity</code>
      */
     protected Entity defEntity(String name, int type, String str) {
         int len = str.length();
-        char data[] = new char[len];
+        char[] data = new char[len];
         str.getChars(0, len, data, 0);
         return defineEntity(name, type, data);
     }
 
     /**
< prev index next >