Skip to content

bug: bug in comment association and pretty-printing #2482

Description

@tempuser1909

Hi, I am not sure if this is a bug for printing the source code with the comments.

Original:

public final class test{

    
// ------------------------------------ //
// test / test test     //
// ------------------------------------ //

    /**
     * test2
     *
     */   
    public interface testInterface {
        /**
         * test3
         * 
         */
        public void mytest(short a, short b);
    }
    private static class myInterface implements testInterface {
        public void mytest(short a, short b){
            
        }
    }
    
}//end class test

Pretty-printed by Spoon Launcher:



public final class test {
    // ------------------------------------ //
    public interface testInterface {
        // test / test test     //
        // ------------------------------------ //
        /**
         * test2
         */
        /**
         * test3
         */
        public void mytest(short a, short b);
    }

    private static class myInterface implements test.testInterface {
        public void mytest(short a, short b) {
        }
    }
}


So the problem is:

  1. the test comment is printed inside of the interface class instead of being outside
  2. the comment that marks the end of the class is gone

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions