[ nice-Bugs-1037192 ] StringIndexOutOfBoundsException running nicec

"SourceForge.net" <[email protected]> Thu, 30 Sep 2004 11:37:28 -0700
Newsgroups gmane.comp.lang.nice.devel
Message-ID <[email protected]>
Bugs item #1037192, was opened at 2004-09-29 20:26
Message generated for change (Comment added) made by arjanb
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1037192&group_id=12788

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Daniel Serodio (dserodio)
Assigned to: Nobody/Anonymous (nobody)
Summary: StringIndexOutOfBoundsException running nicec

Initial Comment:
I just read the Nice user's manual, and tried to
compile the "Coin" enumeration example.

Nice compiler version 0.9.9 (build 2004.09.22, 00:40:25
UTC)
Compiled using JDK 1.4.2_04

I created an empty directory, and created Coin.nice
(attached).

Then I ran cd'ed into this directory and ran "nicec ."

The OS is Windows XP Home SP1, and I tried two versions
of the JDK:
Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.2_05-b04)
Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0-rc-b63)


Exception in thread "main"
java.lang.StringIndexOutOfBoundsException: String index
out of range: -1
        at java.lang.String.substring(String.java:1444)
        at
nice.tools.repository.fun.parseRepoURL(main.nice:95)
        at
nice.tools.repository.dispatch.parseRepoURL(dispatch.nice)
        at
nice.tools.repository.fun.openConnection(main.nice:69)
        at
nice.tools.repository.VersionTracker.openConnection(main.nice)
        at java.net.URL.openConnection(URL.java:896)
        at nice.tools.locator.fun.get(locator.nice:26)
        at nice.tools.locator.Locator.get(main.nice)
        at bossa.modules.Locator.find(Locator.java:64)
        at bossa.modules.Package.<init>(Package.java:75)
        at bossa.modules.Package.make(Package.java:58)
        at
bossa.modules.fun.setMainPackage(Compilation.nice:89)
        at
bossa.modules.Compilation.setMainPackage(Compilation.nice)
        at
nice.tools.compiler.fun.compile(interface.nice:38)
        at
bossa.modules.Compilation.compile(Compilation.nice)
        at
nice.tools.compiler.console.fun.compile(main.nice:165)
        at
nice.tools.compiler.console.dispatch.compile(dispatch.nice)
        at
nice.tools.compiler.console.fun.main(main.nice:181)
        at
nice.tools.compiler.console.dispatch.main(dispatch.nice)

----------------------------------------------------------------------

>Comment By: Arjan Boeijink (arjanb)
Date: 2004-09-30 20:37

Message:
Logged In: YES 
user_id=688815

Nicec shouldn't crash on this but give an error message 
instead.

Nice doesn't work on individual source files but on packages.
So when you have created a directory with the sourcefiles 
don't cd into it. Run nicec as "nicec packagename" where the 
packagename must the same as the directory.
See also: http://nice.sourceforge.net/compilation.html

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1037192&group_id=12788


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl