Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5292

Stub generation doesn't handle 'protected' multi-line String correctly.

    XMLWordPrintableJSON

Details

    Description

      When using the groovyc joint compilation feature, the generated stub is incorrect when the groovy source includes a protected (possibly affects public too, I didn't test) multi-line String 'constant'.

      For example,

      class Example {
      protected static final String CONSTANT_VALUE = """
      I am a constant value
      Thank you
      """
      }

      would generate a stub:

      public Example extends java.lang.Object implements groovy.lang.GroovyObject {
      protected static final java.lang.String CONSTANT_VALUE = "
      I am a constant value
      Thank you
      ";
      }

      This is a syntactically incorrect Java statement.

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              rumour Jay Ashworth
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: