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 212364

Summary: Malformed dot-separated identifier when artifactid contains dot separated numbers
Product: platform Reporter: anttiko
Component: NetigsoAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED FIXED    
Severity: normal CC: apireviews
Priority: P2 Keywords: API_REVIEW_FAST
Version: 7.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: More flexible code name scheme

Description anttiko 2012-05-11 08:53:35 UTC
Validation of artifactId which has dot separated numbers fails.

Example:
<dependency>
  <groupId>org.apache.servicemix.specs</groupId>
  <artifactId>org.apache.servicemix.specs.jsr-303-api-1.0.0</artifactId>
  <version>1.8.0</version>
</dependency>

This will cause exception:

java.lang.IllegalArgumentException: Malformed dot-separated identifier: org.apache.servicemix.specs.jsr303_api_1.0.0
  at org.openide.modules.Dependency.checkCodeName(Dependency.java:201)
  at org.openide.modules.Dependency.create(Dependency.java:275)
[catch] at org.netbeans.core.startup.ModuleList$ReadInitial.run(ModuleList.java:1610)
  at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:127)
  at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:607)
  at org.netbeans.core.startup.ModuleList.readInitial(ModuleList.java:171)
  at org.netbeans.core.startup.ModuleSystem.readList(ModuleSystem.java:281)
  at org.netbeans.core.startup.Main.getModuleSystem(Main.java:168)
  at org.netbeans.core.startup.Main.start(Main.java:305)
  at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
  at java.lang.Thread.run(Thread.java:722)
Comment 1 Jaroslav Tulach 2012-05-17 10:25:11 UTC
To absorb the flexibility of OSGi symbolic names, we can either invent some mangling scheme or relax our code name rules. We are already mangling "-" into "_" and it requires mangling/demangling to be spread all over the code base. Rather then doing the same in this case, I propose to relax our rules to allow parts of the code name to start with numbers.
Comment 2 Jaroslav Tulach 2012-05-17 10:25:16 UTC
Created attachment 119563 [details]
More flexible code name scheme
Comment 3 Jaroslav Tulach 2012-05-22 15:47:14 UTC
Can I integrate tomorrow?
Comment 4 Jaroslav Tulach 2012-05-24 05:49:35 UTC
ergonomics#e43740414093