Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-963

Instrumentation failed when import statement has extra semicolon (works under javac)

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Low Low
    • long term roadmap
    • 2.6.3
    • Instrumentation
    • None
    • Clover 2.6.3 for Ant
      Java 1.6.0_20
      Linux

    • Severity 3 - Minor

        • Error(s) occurred and the instrumentation process can't continue.
          [18:15:19]: [javac] com.cenqua.clover.CloverException: /path/to/my/test/src/some/package/MyTest.java:21:1:expecting EOF, found 'import'

      It turns out that one of the import statements had an extra semi-colon, for example:
      import java.util.Collections;;
      ^

      I had not noticed this because javac accepted it and the test executed/passed locally without error. However, Clover's instrumentation crashed and failed on the build server.

        1. java.g.diff
          1 kB
        2. java.g.diff2
          0.5 kB
        3. java.g.diff3
          0.6 kB

            [CLOV-963] Instrumentation failed when import statement has extra semicolon (works under javac)

            Marek Parfianowicz added a comment - - edited

            Instrumentation fails for fixes as attached. We'll have a look at this bug after upgrading ANTLR to 4.x (see CLOV-1258)

            Marek Parfianowicz added a comment - - edited Instrumentation fails for fixes as attached. We'll have a look at this bug after upgrading ANTLR to 4.x (see CLOV-1258 )

            Marek Parfianowicz added a comment - http://stackoverflow.com/questions/9344066/spurious-nondeterminism-warnings-from-antlr-2-7-6

            A simple attempt to modify importDefinition in java.g to add multiple semicolons ends with an ANTLR warning:

            warning: nondeterminism upon
             k==1:SEMI
             k==2:EOF,"final","abstract","strictfp",SEMI,...
            between alt 2 and exit branch block
            

            Marek Parfianowicz added a comment - A simple attempt to modify importDefinition in java.g to add multiple semicolons ends with an ANTLR warning: warning: nondeterminism upon k==1:SEMI k==2:EOF,"final","abstract","strictfp",SEMI,... between alt 2 and exit branch block

              Unassigned Unassigned
              1279dd9ac894 William Price
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: