< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java

Print this page
*** 920,15 ***
      }
  
      /** Write "PermittedSubclasses" attribute.
       */
      int writePermittedSubclassesIfNeeded(ClassSymbol csym) {
!         if (csym.permitted.nonEmpty()) {
              int alenIdx = writeAttr(names.PermittedSubclasses);
!             databuf.appendChar(csym.permitted.size());
!             for (Symbol c : csym.permitted) {
!                 databuf.appendChar(poolWriter.putClass((ClassSymbol) c));
              }
              endAttr(alenIdx);
              return 1;
          }
          return 0;
--- 920,15 ---
      }
  
      /** Write "PermittedSubclasses" attribute.
       */
      int writePermittedSubclassesIfNeeded(ClassSymbol csym) {
!         if (csym.getPermittedSubclasses().nonEmpty()) {
              int alenIdx = writeAttr(names.PermittedSubclasses);
!             databuf.appendChar(csym.getPermittedSubclasses().size());
!             for (Type t : csym.getPermittedSubclasses()) {
!                 databuf.appendChar(poolWriter.putClass((ClassSymbol) t.tsym));
              }
              endAttr(alenIdx);
              return 1;
          }
          return 0;
< prev index next >