groovy

Add compiler warning for imported classes that can no be found on the classpath

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0-JSR-5
  • Fix Version/s: 1.0-JSR-6
  • Labels:
    None
  • Number of attachments :
    0

Description

It would be useful for the groovy compiler to generate a warning if an imported class can not be found on the classpath. In particular this would help diagnose the following problem:

import java.util.Date
import org.groovyco.IsoDateFormat

class SomeClass {
    def doSomething() {
        // ...
        IsoDateFormat.format(new Date())
    }
}

If IsoDateFormat is not available on the classpath at compile time, the above class will compile fine, but it will fail at runtime with a "MissingPropertyException: IsoDateFormat".

Activity

Hide
blackdrag blackdrag added a comment -

it gives an error now

Show
blackdrag blackdrag added a comment - it gives an error now

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: