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 244031 - Lots of "Parameter file was not normalized" stack traces
Summary: Lots of "Parameter file was not normalized" stack traces
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-23 14:19 UTC by Vladimir Kvashin
Modified: 2014-07-19 10:16 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2014-04-23 14:19:50 UTC
Test logs (for at least C/C++ pack tests) have lots of "Parameter file was not normalized" stack traces:


INFO: Parameter file was not normalized. Was \Preferences\org\netbeans\modules\nativeexecution\api\util.properties(class java.io.File) instead of C:\Preferences\org\netbeans\modules\nativeexecution\api\util.properties(class java.io.File)
java.lang.IllegalArgumentException: Parameter file was not normalized. Was \Preferences\org\netbeans\modules\nativeexecution\api\util.properties(class java.io.File) instead of C:\Preferences\org\netbeans\modules\nativeexecution\api\util.properties(class java.io.File)
	at org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:881)
	at org.netbeans.core.startup.preferences.PropertiesStorage.toPropertiesFile(PropertiesStorage.java:329)
	at org.netbeans.core.startup.preferences.PropertiesStorage.outputStream(PropertiesStorage.java:263)
	at org.netbeans.core.startup.preferences.PropertiesStorage.save(PropertiesStorage.java:237)
	at org.netbeans.core.startup.preferences.NbPreferences.flushSpi(NbPreferences.java:244)
	at org.netbeans.core.startup.preferences.NbPreferences$1$1.run(NbPreferences.java:86)
	at org.netbeans.core.startup.preferences.PropertiesStorage$3.run(PropertiesStorage.java:354)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:127)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:609)
	at org.netbeans.core.startup.preferences.PropertiesStorage.runAtomic(PropertiesStorage.java:352)
	at org.netbeans.core.startup.preferences.NbPreferences$1.run(NbPreferences.java:81)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)


This is a consequence of change set 
http://hg.netbeans.org/core-main/rev/5554af903e4b
that was supposed to fix issue #235625

This change set looks for a file on disk 
that has the same path as properties storage.
But properties storage resides not on disk, but in System file system.
It seems this does not make sense.

But even if it does, it breaks the rule that FileUtil.toFileObject should be called or normalized files. So at least 
retval = FileUtil.toFileObject(new File(FileUtil.toFile(SFS_ROOT), filePath()));
should be changed to 
retval = FileUtil.toFileObject(FileUtil.normalizeFile(new File(FileUtil.toFile(SFS_ROOT), filePath())));

Pleas note that on Windows it tries to find file "\Preferences\org\netbeans\modules...", so the file object is always null.
Comment 1 Theofanis Oikonomou 2014-07-10 15:02:25 UTC
Changeset: 3e475c3d1d7d
Author:    Theofanis Oikonomou <theofanis@netbeans.org>
Date:      2014-07-10 17:05
Message:
Comment 2 Quality Engineering 2014-07-19 10:16:51 UTC
Integrated into 'main-silver', will be available in build *201407190718* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3e475c3d1d7d
User: Theofanis Oikonomou <theofanis@netbeans.org>
Log: Task #244031 - Lots of "Parameter file was not normalized" stack traces