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.
<apidef name="modules">Modules API</apidef>
</apidefs>
<changes>
<change id="allow.numbers">
<api name="modules"/>
<summary>Less restrictive check of code names of modules and OSGi bundles</summary>
<version major="7" minor="32"/>
<date day="24" month="5" year="2012"/>
<author login="jtulach"/>
<compatibility addition="yes" binary="compatible" semantic="compatible" source="compatible">
</compatibility>
<description>
<p>
<a href="@TOP@/org/openide/modules/Dependency.html#create(int,%20java.lang.String)">Dependency.create</a>
now allows code name base where dot is followed by number
(like <em>org.apache.servicemix.specs.jsr303_api_1.0.0</em>).
This increases the inter-operability with OSGi bundles
using such naming style.
</p>
</description>
<class package="org.openide.modules" name="Dependency"/>
<issue number="212364"/>
</change>
<change id="provide.cnb">
<summary>By default each module provides its code name base as a token</summary>
Manifest-Version: 1.0
OpenIDE-Module: org.openide.modules
OpenIDE-Module-Localizing-Bundle: org/openide/modules/Bundle.properties
OpenIDE-Module-Specification-Version: 7.31
OpenIDE-Module-Specification-Version: 7.32
throw new IllegalArgumentException("Malformed dot-separated identifier: " + base);
}
private static final String IDENTIFIER = "(?:\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*)"; // NOI18N
private static final Pattern FQN = Pattern.compile(
private static final Pattern FQN = Pattern.compile(IDENTIFIER + "(?:[.]" + IDENTIFIER + ")*"); // NOI18N
"(?:\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*)(?:[.]\\p{javaJavaIdentifierPart}+)*" // NOI18N
);
/** Parse dependencies from tags.
/** Parse dependencies from tags. Since version 7.32 it can parse
* code names that contain numbers like
* <code>org.apache.servicemix.specs.jsr303_api_1.0.0</code>.
*
* @param type like Dependency.type
* @param body actual text of tag body; if <code>null</code>, returns nothing
* @return a set of dependencies
misparse(Dependency.TYPE_JAVA, "Java > 1.4.0, Java = 1.4.0_01");
public void testMisparseNumbers() throws Exception {
public void testAllowNumbers() throws Exception {
misparse(Dependency.TYPE_MODULE, "acme.2.webapp.importing");
Dependency.create(Dependency.TYPE_MODULE, "acme.2.webapp.importing");
misparse(Dependency.TYPE_MODULE, "acme.2xyz.webapp.importing");
Dependency.create(Dependency.TYPE_MODULE, "acme.2xyz.webapp.importing");
Dependency.create(Dependency.TYPE_MODULE, "org.apache.servicemix.specs.jsr303_api_1.0.0");
public void testConstants() throws Exception {