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.

View | Details | Raw Unified | Return to bug 212364
Collapse All | Expand All

(-)a/openide.modules/apichanges.xml (+20 lines)
Lines 50-55 Link Here
50
  	<apidef name="modules">Modules API</apidef>
50
  	<apidef name="modules">Modules API</apidef>
51
  </apidefs>
51
  </apidefs>
52
<changes>
52
<changes>
53
    <change id="allow.numbers">
54
        <api name="modules"/>
55
        <summary>Less restrictive check of code names of modules and OSGi bundles</summary>
56
        <version major="7" minor="32"/>
57
        <date day="24" month="5" year="2012"/>
58
        <author login="jtulach"/>
59
        <compatibility addition="yes" binary="compatible" semantic="compatible" source="compatible">
60
        </compatibility>
61
        <description>
62
            <p>
63
                <a href="@TOP@/org/openide/modules/Dependency.html#create(int,%20java.lang.String)">Dependency.create</a>
64
                now allows code name base where dot is followed by number
65
                (like <em>org.apache.servicemix.specs.jsr303_api_1.0.0</em>).
66
                This increases the inter-operability with OSGi bundles
67
                using such naming style.
68
            </p>
69
        </description>
70
        <class package="org.openide.modules" name="Dependency"/>
71
        <issue number="212364"/>
72
    </change>
53
    <change id="provide.cnb">
73
    <change id="provide.cnb">
54
        <api name="modules"/>
74
        <api name="modules"/>
55
        <summary>By default each module provides its code name base as a token</summary>
75
        <summary>By default each module provides its code name base as a token</summary>
(-)a/openide.modules/manifest.mf (-1 / +1 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.openide.modules
2
OpenIDE-Module: org.openide.modules
3
OpenIDE-Module-Localizing-Bundle: org/openide/modules/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/openide/modules/Bundle.properties
4
OpenIDE-Module-Specification-Version: 7.31
4
OpenIDE-Module-Specification-Version: 7.32
5
5
(-)a/openide.modules/src/org/openide/modules/Dependency.java (-3 / +7 lines)
Lines 201-210 Link Here
201
            throw new IllegalArgumentException("Malformed dot-separated identifier: " + base);
201
            throw new IllegalArgumentException("Malformed dot-separated identifier: " + base);
202
        }
202
        }
203
    }
203
    }
204
    private static final String IDENTIFIER = "(?:\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*)"; // NOI18N
204
    private static final Pattern FQN = Pattern.compile(
205
    private static final Pattern FQN = Pattern.compile(IDENTIFIER + "(?:[.]" + IDENTIFIER + ")*"); // NOI18N
205
        "(?:\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*)(?:[.]\\p{javaJavaIdentifierPart}+)*" // NOI18N
206
    ); 
206
    
207
    
207
    /** Parse dependencies from tags.
208
    /** Parse dependencies from tags. Since version 7.32 it can parse
209
    * code names that contain numbers like 
210
    * <code>org.apache.servicemix.specs.jsr303_api_1.0.0</code>.
211
    * 
208
    * @param type like Dependency.type
212
    * @param type like Dependency.type
209
    * @param body actual text of tag body; if <code>null</code>, returns nothing
213
    * @param body actual text of tag body; if <code>null</code>, returns nothing
210
    * @return a set of dependencies
214
    * @return a set of dependencies
(-)a/openide.modules/test/unit/src/org/openide/modules/DependencyTest.java (-3 / +4 lines)
Lines 227-235 Link Here
227
        misparse(Dependency.TYPE_JAVA, "Java > 1.4.0, Java = 1.4.0_01");
227
        misparse(Dependency.TYPE_JAVA, "Java > 1.4.0, Java = 1.4.0_01");
228
    }
228
    }
229
    
229
    
230
    public void testMisparseNumbers() throws Exception {
230
    public void testAllowNumbers() throws Exception {
231
        misparse(Dependency.TYPE_MODULE, "acme.2.webapp.importing");
231
        Dependency.create(Dependency.TYPE_MODULE, "acme.2.webapp.importing");
232
        misparse(Dependency.TYPE_MODULE, "acme.2xyz.webapp.importing");
232
        Dependency.create(Dependency.TYPE_MODULE, "acme.2xyz.webapp.importing");
233
        Dependency.create(Dependency.TYPE_MODULE, "org.apache.servicemix.specs.jsr303_api_1.0.0");
233
    }
234
    }
234
    
235
    
235
    public void testConstants() throws Exception {
236
    public void testConstants() throws Exception {

Return to bug 212364