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 196740 - Invalid Module Suite Name working
Summary: Invalid Module Suite Name working
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: All All
: P4 normal with 1 vote (vote)
Assignee: Martin Kozeny
URL:
Keywords:
: 210339 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-15 18:36 UTC by ketan_barapatre
Modified: 2012-12-12 08:50 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 186431


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ketan_barapatre 2011-03-15 18:36:10 UTC
When we create New Project for NetBeans Module and If we choose Module Suite from
Projects. In Module Suite if we provide \(backslash) it accepts this. 
Whereas message dispalys as "Project Name may not contain following characters \ / * : ?"
Comment 1 Jesse Glick 2011-03-15 23:01:58 UTC
Sorry, I don't understand what the bug is. A backslash is not going to work as a character in a project directory name - this is just a user error.
Comment 2 dds.dhawal 2011-11-20 11:14:15 UTC
Environment : 

Product Version: NetBeans IDE 7.1 RC1 (Build 201111171527)
Java: 1.7.0_01; Java HotSpot(TM) Client VM 21.1-b02
System: Linux version 2.6.35-22-generic running on i386; UTF-8; en_IN (nb)
User directory: /home/dhawal/.netbeans/7.1rc1
Cache directory: /home/dhawal/.netbeans/7.1rc1/var/cache

Steps to reproduce : 
1. Create a new netbeans stand alone module.
2. Enter "*module1*:Hello" as a module name.
3. Click next
4. write "test" as code base name.
5. Click finish
6. Now try to build the project. 

There is an error while building the module. Since netbeans will try to search for the directory *module1*:Hello but its an invalid folder which is not created. So it gives an error "srcdir not found"
Comment 3 dds.dhawal 2011-11-20 11:34:12 UTC
There is a validation error. The Netbeans is proceeding in the wizard even if there is invalid input given and because of this when we try to build the system. Then error is caused.
Comment 4 Jesse Glick 2011-11-21 16:52:16 UTC
Do not use characters in project names which are obviously liable to produce filesystem-level errors.
Comment 5 aldobrucale 2012-04-10 10:18:23 UTC
*** Bug 210339 has been marked as a duplicate of this bug. ***
Comment 6 mienamoo 2012-05-28 10:42:34 UTC
This was reported as happening intermittently while running through the API Support Sanity Test [1], with 7.2 dev builds.  According to the test, the IDE should not allow the user to complete the wizard if the name is invalid.

[1] http://wiki.netbeans.org/TS_72_Apisupport_Sanity
Comment 7 mienamoo 2012-05-28 11:11:43 UTC
I found that \ (backslash) is accepted on Windows, as long as the folder can be created. So for example, take the case where if C:\Projects\Tests\a does exist. If I create a new project called a\b with project location C:\Projects\Tests, a project called b will be created at C:\Projects\Tests\a\b.

However, a project called c\d will NOT be created with the error: "Unable to create Project folder. Choose another one." Note that C:\Projects\Tests\c did not exist at the time.
Comment 8 aldobrucale 2012-06-05 10:35:45 UTC
I confirm that the problem is with the backslash. Under Linux, the backslash is accepted (as it should, because it's a legal character for file and directory name) but then an IllegalArgumentException is raised.
Comment 9 Jesse Glick 2012-06-05 17:19:20 UTC
(In reply to comment #8)
> Under Linux, the backslash is
> accepted (as it should, because it's a legal character for file and directory
> name)

The NetBeans filesystem layer will reject it to be on the conservative side. It would not work in Ant scripts anyway. Generally the wizard should politely reject any characters which are potentially dangerous.

> then an IllegalArgumentException is raised.

Is this reported? If not, please use the exception reporter.
Comment 10 aldobrucale 2012-06-06 08:13:22 UTC
It is reported but associated to issue #210339, which I have (wrongly?) marked as a duplicate of this.
Comment 11 mago_ebon 2012-09-27 16:02:04 UTC
The first time I created a project I gave it the name a"¿sfadfafa*aser_.>< . The following times I wanted to create one, then the older path (from the wrong project name) will still be shown for the creation of any new project until I deleted the first project (I even restarted the IDE). After that I couldn't reproduce the bug.

Besides that, while testing wrong names it threw a couple of assert exceptions with no major consequences.

I don't think this must be only a "user awareness thing" since we know that not all users know their OS's limitations, and for such users, using an oddly behaving product makes them think of a buggy software more than of a buggy developer.

I mean, validation exists for the sake of preventing user's mistakes.
Comment 12 mienamoo 2012-12-11 11:51:08 UTC
Fixed by the fix for bug 218964.