Actually check branding token syntax.
1.1 --- a/openide.util/src/org/openide/util/NbBundle.java Fri Jul 22 09:42:22 2005 +0000
1.2 +++ b/openide.util/src/org/openide/util/NbBundle.java Fri Jul 22 19:24:19 2005 +0000
1.3 @@ -86,7 +86,7 @@
1.4
1.5 /** Set the current branding token.
1.6 * The permitted format, as a regular expression:
1.7 - * <pre>/^[a-z][a-z0-9]*(_[a-z][a-z0-9]*)*$/</pre>
1.8 + * <pre>[a-z][a-z0-9]*(_[a-z][a-z0-9]*)*</pre>
1.9 * <p class="nonnormative">
1.10 * This is normally only called by NetBeans startup code and unit tests.
1.11 * Currently the branding may be specified by passing the <code>--branding</code>
1.12 @@ -96,7 +96,9 @@
1.13 * @throws IllegalArgumentException if in an incorrect format
1.14 */
1.15 public static void setBranding(String bt) throws IllegalArgumentException {
1.16 - // [PENDING] check its format here acc. to above regex
1.17 + if (bt != null && !bt.matches("[a-z][a-z0-9]*(_[a-z][a-z0-9]*)*")) { // NOI18N
1.18 + throw new IllegalArgumentException("Malformed branding token: " + bt); // NOI18N
1.19 + }
1.20 brandingToken = bt;
1.21 }
1.22