jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • groovy
  • GROOVY-1173

When importing a class that's not on the classpath, the import fails silently.

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-JSR-4
  • Fix Version/s: 1.1-beta-1
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP, Java 1.5.0_06

Description

The script:

import does.not.exist

new Foo()

produces the error:

CommandLine.groovy: 3: unable to resolve class Foo
@ line 3, column 1.

It would be helpful if it mentioned that the package/class in the import line couldn't be found, for the case where Foo() is imported from there.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Martin C. Martin added a comment - 08/Dec/05 7:39 AM

It's more useful when you import with wildcards:

import a.b.*

new Foo()

If the error is on the "new Foo()" line, you may think that it imported the package ok, and check for spelling errors in Foo or check which package Foo is really in.

Show
Martin C. Martin added a comment - 08/Dec/05 7:39 AM It's more useful when you import with wildcards: import a.b.* new Foo() If the error is on the "new Foo()" line, you may think that it imported the package ok, and check for spelling errors in Foo or check which package Foo is really in.
Hide
Permalink
Arjumand Bonhomme added a comment - 16/Mar/06 4:31 PM

This issue caused me to think my custom classpath wasn't being recognized. I agonized over this for a week. I thought I was experiencing a different JIRA bug: http://jira.codehaus.org/browse/GROOVY-1227

Show
Arjumand Bonhomme added a comment - 16/Mar/06 4:31 PM This issue caused me to think my custom classpath wasn't being recognized. I agonized over this for a week. I thought I was experiencing a different JIRA bug: http://jira.codehaus.org/browse/GROOVY-1227
Hide
Permalink
blackdrag blackdrag added a comment - 12/Apr/07 5:37 PM

looks like we forgot to close this one... his is implemented a long time now

Show
blackdrag blackdrag added a comment - 12/Apr/07 5:37 PM looks like we forgot to close this one... his is implemented a long time now

People

  • Assignee:
    blackdrag blackdrag
    Reporter:
    Martin C. Martin
Vote (1)
Watch (0)

Dates

  • Created:
    06/Dec/05 12:45 PM
    Updated:
    12/Apr/07 5:37 PM
    Resolved:
    12/Apr/07 5:37 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.