Skip to content

Java: JavadocElement location is off by one #5816

@Marcono1234

Description

@Marcono1234

Version

CodeQL CLI v.2.5.2

Description

It appears for every JavadocElement the location within the Java source is off by one, and this adds up for every subsequent element.

Example

Java source:

/**
 * test1234567890
 * test1234567890
 * test1234567890
 * test1234567890
 * test1234567890
 * @author test1234567890
 * @author test1234567890
 * @author test1234567890
 * @author test1234567890
 * @author test1234567890
 */
class Test {
}

Code QL query:

import java

from JavadocElement j
select j, j.getLocation().getStartColumn()

Run the query for example in VSCode and click on each of the results
❌ Each JavadocElement is shifted to the left by one (in addition to the offset of previous elements):
VSCode extension screenshot

Metadata

Metadata

Assignees

No one assigned

    Labels

    JavaquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions