< prev index next >

src/java.base/share/classes/jdk/internal/util/xml/impl/Parser.java

Print this page

        

@@ -118,13 +118,13 @@
     private String mUnent;  // unresolved entity name
     private Pair mDltd;   // deleted objects for reuse
     /**
      * Default prefixes
      */
-    private static final char NONS[];
-    private static final char XML[];
-    private static final char XMLNS[];
+    private static final char[] NONS;
+    private static final char[] XML;
+    private static final char[] XMLNS;
 
     static {
         NONS = new char[1];
         NONS[0] = (char) 0;
 

@@ -152,11 +152,11 @@
      * - 'd' for any decimal digit character value;<br> - 'z' for any
      * character less than ' ' except '\t', '\n', '\r';<br> An ASCII (7 bit)
      * character which does not fall in any category listed above is mapped to
      * it self.
      */
-    private static final byte asctyp[];
+    private static final byte[] asctyp;
     /**
      * NMTOKEN character type array.
      *
      * This array maps an ASCII (7 bit) character to the character type.<br>
      * Possible character type values are:<br> - 0 for underscore ('_') or any

@@ -164,11 +164,11 @@
      * (':') character;<br> - 2 for dash ('-') and dot ('.') or any decimal
      * digit character value;<br> - 3 for any kind of white space character<br>
      * An ASCII (7 bit) character which does not fall in any category listed
      * above is mapped to 0xff.
      */
-    private static final byte nmttyp[];
+    private static final byte[] nmttyp;
 
     /**
      * Static constructor.
      *
      * Sets up the ASCII character type array which is used by

@@ -950,11 +950,11 @@
      *
      * @exception Exception is parser specific exception form panic method.
      * @exception IOException
      */
     private void dtdattl() throws Exception {
-        char elmqn[] = null;
+        char[] elmqn = null;
         Pair elm = null;
         char ch;
         for (short st = 0; st >= 0;) {
             ch = getch();
             switch (st) {

@@ -1036,11 +1036,11 @@
      * @exception Exception is parser specific exception form panic method.
      * @exception IOException
      */
     @SuppressWarnings("fallthrough")
     private void dtdatt(Pair elm) throws Exception {
-        char attqn[] = null;
+        char[] attqn = null;
         Pair att = null;
         char ch;
         for (short st = 0; st >= 0;) {
             ch = getch();
             switch (st) {

@@ -1772,11 +1772,11 @@
      */
     protected char[] qname(boolean ns)
             throws Exception {
         mBuffIdx = -1;
         bname(ns);
-        char chars[] = new char[mBuffIdx + 1];
+        char[] chars = new char[mBuffIdx + 1];
         System.arraycopy(mBuff, 0, chars, 0, mBuffIdx + 1);
         return chars;
     }
 
     /**

@@ -2708,11 +2708,11 @@
     private void bappend(char ch) {
         try {
             mBuff[++mBuffIdx] = ch;
         } catch (Exception exp) {
             //          Double the buffer size
-            char buff[] = new char[mBuff.length << 1];
+            char[] buff = new char[mBuff.length << 1];
             System.arraycopy(mBuff, 0, buff, 0, mBuff.length);
             mBuff = buff;
             mBuff[mBuffIdx] = ch;
         }
     }

@@ -2726,11 +2726,11 @@
      */
     private void bcopy(int cidx, int bidx) {
         int length = mChIdx - cidx;
         if ((bidx + length + 1) >= mBuff.length) {
             //          Expand the buffer
-            char buff[] = new char[mBuff.length + length];
+            char[] buff = new char[mBuff.length + length];
             System.arraycopy(mBuff, 0, buff, 0, mBuff.length);
             mBuff = buff;
         }
         System.arraycopy(mChars, cidx, mBuff, bidx, length);
         mBuffIdx += length;
< prev index next >