Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2732

Collection added to itself

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Hi

      In a recent github mirro, I've found the following suspicious code.
      Branch: master
      Path: fop-core/src/main/java/org/apache/fop/afp/goca/AbstractGraphicsDrawingOrderContainer.java

      ...
       39     protected List objects = new java.util.ArrayList();
      ...
       86     public void addAll(AbstractGraphicsDrawingOrderContainer graphicsContainer) {
       87         Collection objects = graphicsContainer.getObjects();
       88         objects.addAll(objects);
       89     }
      

      In Line 88, should `objects.addAll' be `this.objects.addAll? Since this method in an abstract class, it might not be an issue if this method is overridden. However, I wanted to report this just in case.

      Thanks!

      Attachments

        Activity

          People

            Unassigned Unassigned
            lifove JC
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: