Menu

#61 Unnecessary extends clause for interface extending nothing

Bug
open-accepted
nobody
PDFDoclet (42)
3
2006-01-16
2006-01-16
Zhang Lei
No

For interfaces extending nothing, e.g.

/**
* Blah Blah
*/
public interface Test {
}

The produced PDF file will contain a unnecessary empty
"extends" clause:

public interface Test
extends

Blah Blah

This even occurs in the examples1.pdf example file for
the interface com.other.IOneInterface

Discussion

  • Zhang Lei

    Zhang Lei - 2006-01-16
    • milestone: --> Bug
    • priority: 5 --> 7
     
  • Marcel Schoen

    Marcel Schoen - 2006-01-16

    Logged In: YES
    user_id=485290

    Darn it... Just implemented "extends" for interfaces
    extending other interfaces, but apparently introduced a new
    bug with that. :-/ Thanx for pointing it out.

    Gonna fix that in a bugfix release sometime during the next
    few weeks.

     
  • Marcel Schoen

    Marcel Schoen - 2006-01-16
    • labels: --> PDFDoclet
    • priority: 7 --> 3
    • status: open --> open-accepted
     
  • Anonymous

    Anonymous - 2011-03-17

    This is still a problem. Seems I'm unable to add attachments so I'll put it inline.

    Index: doclet/src/main/java/com/tarsec/javadoc/pdfdoclet/Classes.java

    --- doclet/src/main/java/com/tarsec/javadoc/pdfdoclet/Classes.java (revision 1.1)
    +++ doclet/src/main/java/com/tarsec/javadoc/pdfdoclet/Classes.java (revision )
    @@ -244,7 +244,7 @@
    superClassOrInterface = new ClassDoc[] { classDoc.superclass() } ;
    }

    - if (superClassOrInterface != null) {
    + if (superClassOrInterface != null && superClassOrInterface.length != 0) {
    Paragraph extendsPara = new Paragraph((float) 14.0);
    extendsPara.add(new Chunk("extends ", Fonts.getFont(TIMES_ROMAN, 12)));
    // Contrary to classes, interfaces DO support multiple inheritance,

     

Log in to post a comment.

MongoDB Logo MongoDB