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.
Summary: | New File Wizard doesn't work well with files without extensions. | ||
---|---|---|---|
Product: | cnd | Reporter: | Thomas Preisler <thp> |
Component: | -- Other -- | Assignee: | Alexander Simon <alexvsimon> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 72318 | ||
Bug Blocks: |
Description
Thomas Preisler
2006-02-06 21:43:27 UTC
Removing CND-Preview-2 flag. This isn't a simple fix and isn't worth sliding the preview for. Reassigning because I've got too many IZs to fix by FCS. Downgraded to P3. Priority changed in error It's seems netbeans bug. File name validation is located in method: org.netbeans.modules.project.ui.SimpleTargetChooserPanel.isValid(): line 96: String errorMessage = ProjectUtilities.canUseFileName (gui.getTargetGroup().getRootFolder(), gui.getTargetFolder(), gui.getTargetName(), template.getExt (), isFolder); Look at method getExt() of org.openide.filesystems.MultiFileObject extends org.openide.filesystems.AbstractFolder.getExt(): line 111: /** period at first position is not considered as extension-separator */ return ((i <= 1) || (i == name.length())) ? "" : name.substring(i); // NOI18N Extension will be empty string or contains nonempty string Method canUseFileName() expect that extension will be null or nonempty string: org.netbeans.modules.project.ui.ProjectUtilities.canUseFileName (FileObject targetFolder, String folderName, String newObjectName, String extension, boolean allowFileSeparator): line 312: if (extension != null) { relFileName.append('.'); relFileName.append(extension); } As result file name for make file will be ended ".". File system returns: File "Makefile." doesn't exist when "Makefile" exists. Bug can be reproduced on "Other-Empty file" wizard. Downgraded to P3 Bugfix verified in CND 5.5.1_u1(Build 20070802) Since 72318 is closed and verified I can also close this bug in CND. verified in 200710310000 build |