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.
Move class tests sometimes fail because of new import statement is appended with different format (mostly on windows): implicit format: [old imports....] <new line> is transformed into: [old imports....] import .... - new appended import statement <new line> ********************************************* but it looks sometimes: [old imports....] <new line> import ... - new appended import <new line> or [old imports....] <new line> import ... - new appended import
Strange. Are you able to reproduce it manually? Pavle, please look at it.
Probably no, it is random.
I've reproduced it manualy on windows XP, project 'default2' from nbcvs:/refactoring/test/qa-functional/data/projects. Moved class abc.A to abc.def When the file was opened in editor moved file was equels as on unix. But when the file wasn't opened in editor added import statement of original package (import abc.*;) was moved one line down - a new line was appended before this import statement.
It corrupts test results on windows. I'd like to know if it will be fixed soon or if I should change all tests to use diff ignoring empty lines.
Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v <-- ResourceImpl.java new revision: 1.60; previous revision: 1.59 done Processing log script arguments...
Tests are still failing because of redundant newlines.
Second attempt. Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/MetadataElement.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/MetadataElement.java,v <-- MetadataElement.java new revision: 1.44; previous revision: 1.43 done
no change
Last attempt. Now there should be no difference on windows and linux platforms. Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v <-- ResourceImpl.java new revision: 1.63; previous revision: 1.62 done Processing log script arguments...
it looks better but some tests still failing by this reason
I just tried to run qa-functional tests on my machine and did not see any problem with newlines. (I tried it 3 times on Linux box) Is there still any problem on Windows? -- Are the problems exactly same in different runs or they differ? Is there any possibility to get incorrectly generated files or create some unified diff to exactly see what is wrong?
The results are different only between unix and windows platforms. The results of one platform are always the same. I changed a test code to leave tested files in xtest workdir. Run tests on windows and check tested files with golden files (made on unix). Typical tests with this behaviour are qa-functional - jdk15 - move and rename.
We made some changes in line endings recently and expect that this problem is not reproducible anymore. When tests will run again, please, check the results and reopen if recent change did not help.
v