tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject About Cobertura error on parsing
Date Fri, 24 Jan 2014 01:54:58 GMT

If you run tests with Cobertura 2.0.3 being enabled, it prints a
warning that it cannot parse the source code of ServiceProxy class:

It can be seen in Buildbot logs.

[cobertura-report] WARN   getAccumlatedCCNForSource, JavaNCSS got an
error while parsing the java file
[cobertura-report] ParseException in STDIN
[cobertura-report] Last useful checkpoint:
[cobertura-report] Encountered " "@" "@ "" at line 106, column 14.
[cobertura-report] Was expecting one of:
[cobertura-report]     "assert" ...
[cobertura-report]     "boolean" ...

The same issue has already been reported:

This is triggered by the following code in Tomcat:
        for (@SuppressWarnings("unchecked")
        Iterator<QName> ports = service.getPorts(); ports.hasNext();) {
            QName portName =;
            String portnameString = portName.getLocalPart();
            if (portnameString.equals(nameString)) {
                return service.getPort(name, serviceendpointClass);

If it bothers anyone, it is easy to move the "ports" variable out of
the loop, or move annotation to the method level.

I think there is no urge in fixing this and we can wait for a next
release of Cobertura.

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message