You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Steve Lam (JIRA)" <ji...@apache.org> on 2015/02/01 00:22:34 UTC

[jira] [Created] (CB-8392) Valid Java package names are marked as invalid when trying to add android platform

Steve Lam created CB-8392:
-----------------------------

             Summary: Valid Java package names are marked as invalid when trying to add android platform
                 Key: CB-8392
                 URL: https://issues.apache.org/jira/browse/CB-8392
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
         Environment: cordova-android 3.6.4
            Reporter: Steve Lam
            Priority: Minor


cordova-android 3.6.4 is reporting "com._123abc.MyApp" as invalid Java package while allowing "com.123abc.MyApp" which is an actual invalid Java package name (http://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html).

In bin/lib/create.js, line 150:
{noformat}
if (!/^[a-zA-Z]+(\.[a-zA-Z0-9][a-zA-Z0-9_]*)+$/.test(package_name)) {
    return Q.reject('Package name must look like: com.company.Name');
}
{noformat}

Should be changed to:

{noformat}
if (!/^[a-zA-Z]+(\.[a-zA-Z_][a-zA-Z0-9_]*)+$/.test(package_name) ) {
{noformat}

Thus allowing for valid Java package names such as:

com._123abc.MyApp



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org