This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 254561 - Incorrect file name GruntFile.js causes AssertionError: Need to normalize
Summary: Incorrect file name GruntFile.js causes AssertionError: Need to normalize
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Tools (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-20 18:29 UTC by Exceptions Reporter
Modified: 2015-08-26 01:23 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 217454


Attachments
stacktrace (4.26 KB, text/plain)
2015-08-20 18:29 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2015-08-20 18:29:03 UTC
Build: NetBeans IDE 8.1 Beta (Build 201508041349)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.45-b02, Java(TM) SE Runtime Environment, 1.8.0_45-b14
OS: Mac OS X

User Comments:
rweaver: Accidentally clicked on another project

rweaver: Same right-click problem on a Maven web project

GUEST: h

GUEST: asd

rweaver: Right clicking on a maven project trying to get to "resolve project problems" to run priming build.

GUEST: To reproduce just run a node server using express generator




Stacktrace: 
java.lang.AssertionError: Need to normalize /Users/agupta020c/Downloads/xview-stbclient224/Gruntfile.js(class java.io.File) was /Users/agupta020c/Downloads/xview-stbclient224/GruntFile.js(class java.io.File)
   at org.openide.filesystems.FileUtil.assertNormalized(FileUtil.java:157)
   at org.openide.filesystems.FileUtil.assertNormalized(FileUtil.java:141)
   at org.openide.filesystems.FileChangeImpl.addFileChangeListenerImpl(FileChangeImpl.java:220)
   at org.openide.filesystems.FileUtil.addFileChangeListener(FileUtil.java:298)
   at org.netbeans.modules.web.clientproject.api.util.WatchedFile.getWatchedFile(WatchedFile.java:148)
   at org.netbeans.modules.web.clientproject.api.util.WatchedFile.getFile(WatchedFile.java:121)
Comment 1 Exceptions Reporter 2015-08-20 18:29:05 UTC
Created attachment 155499 [details]
stacktrace
Comment 2 Jaroslav Havlin 2015-08-25 12:42:41 UTC
Incorrect letter case in file name GruntFile.js.

Correct name (Grunfile.js) is hardcoded, incorrect name (GruntFile.js) exists on the disk, so when FileObject for correct name is created, it is not normalized and the exception is thrown.

I think that this should be handled in class o.n.m.javascript.grunt.file.Gruntfile, e.g. check the real name of file on disk (normalize the file name), or show a warning if the file is not correct (as it would probably cause problems if the project is used on platform with case sensitive filesystem).

Reassigning to javascript/Tools, please evaluate. Thank you.
Comment 3 Tomas Mysik 2015-08-25 14:56:30 UTC
Should be fixed now. Thanks.

http://hg.netbeans.org/web-main/rev/c81439e40440
Comment 4 Quality Engineering 2015-08-26 01:23:19 UTC
Integrated into 'main-silver', will be available in build *201508260002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c81439e40440
User: Tomas Mysik <tmysik@netbeans.org>
Log: #254561 - Incorrect file name GruntFile.js causes AssertionError: Need to normalize