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 205165 - IAE: Parameter file was not normalized. Was .../CSVFile.java instead of .../CSVfile.java
Summary: IAE: Parameter file was not normalized. Was .../CSVFile.java instead of .../C...
Status: RESOLVED DUPLICATE of bug 209904
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.1
Hardware: Macintosh Mac OS X
: P4 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on: 183308
Blocks:
  Show dependency tree
 
Reported: 2011-11-15 19:01 UTC by jag
Modified: 2012-04-04 15:16 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 182398


Attachments
stacktrace (1.11 KB, text/plain)
2011-11-15 19:01 UTC, jag
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jag 2011-11-15 19:01:29 UTC
Build: NetBeans IDE Dev (Build 201111090600)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.1-b02-383, Java(TM) SE Runtime Environment, 1.6.0_26-b03-383-11A511
OS: Mac OS X

User Comments:
jag: doing a refactor/rename on a class

jag: When I did a refactor/rename it failed to rename the file as well as the class.  I got this error when I then attempted to manually rename the file from the "Files" panel.




Stacktrace: 
java.lang.IllegalArgumentException: Parameter file was not normalized. Was /Users/jag/NetBeansProjects/ExtractCSVapp/src/main/java/com/nighthacks/extractcsvapp/CSVFile.java instead of /Users/jag/NetBeansProjects/ExtractCSVapp/src/main/java/com/nighthacks/extractcsvapp/CSVfile.java
   at org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:1016)
   at org.netbeans.modules.maven.queries.MavenSharabilityQueryImpl.getSharability(MavenSharabilityQueryImpl.java:70)
   at org.netbeans.modules.projectapi.ProjectSharabilityQuery.getSharability(ProjectSharabilityQuery.java:67)
   at org.netbeans.api.queries.SharabilityQuery.getSharability(SharabilityQuery.java:122)
   at org.netbeans.spi.project.support.GenericSources$Group.contains(GenericSources.java:175)
   at org.netbeans.spi.java.project.support.ui.PackageViewChildren$NoFoldersDataFilter.acceptFileObject(PackageViewChildren.java:1232)
Comment 1 jag 2011-11-15 19:01:31 UTC
Created attachment 113238 [details]
stacktrace
Comment 2 Jesse Glick 2011-11-16 01:54:38 UTC
While I could add a call to FileUtil.normalizeFile either at the start (GenericSources.Group.contains) or the end (MavenSharabilityQueryImpl.getSharability), this seems like a filesystems bug: FileUtil.toFileObject(FileUtil.toFile(fileObject)) is throwing IAE, which is rather surprising! FU.nF is needed when obtaining a java.io.File from an external source, but ought be needed when it came right from FU.tF.

Only seems to apply to Macs, and only matters for dev builds since the IAE is not thrown in release builds with assertions off.
Comment 3 Jesse Glick 2011-11-16 14:12:04 UTC
Reporter writes:

"As an added diagnostic detail, I was doing a refactor/rename from CSVfile to CSVFile. The only change was in the 'f' going from lower to upper case. I'm sure it's getting bitten by the case-ignore property of OSX HFS"

meaning that the correct new File was actually being passed in, yet FU.nF wanted to rewrite the path to the old name?
Comment 4 Jaroslav Tulach 2011-12-15 11:15:09 UTC
Probably result of issue 183308 then! The case needs to be somehow disabled/emptied on case insensitive systems after changes on the disk.
Comment 5 Vladimir Voskresensky 2011-12-15 20:51:03 UTC
wasn't that already fixed as issue #199471? 
FileUtilTest.testLowerAndCapitalNormalization
Comment 6 Jesse Glick 2011-12-15 21:01:48 UTC
Apparently not, since the report is newer than that fix AFAICT.
Comment 7 Jaroslav Tulach 2012-04-04 15:16:55 UTC

*** This bug has been marked as a duplicate of bug 209904 ***