Bug 997415 - It is possible to create package with illegal name
It is possible to create package with illegal name
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ER4
: 6.0.0
Assigned To: manstis
Jiri Locker
Depends On:
  Show dependency treegraph
Reported: 2013-08-15 09:14 EDT by Jiri Locker
Modified: 2014-08-06 16:18 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:18:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jiri Locker 2013-08-15 09:14:52 EDT
Description of problem:
1) When creating a package through New item menu the form doesn't validate package name and accepts illegal values.

2) After creating a new project, new package is automatically generated from GroupID and ArtifactID. Legal values for GID and AID may result in illegal package name (typically hyphens in ArtifactID).

Illegal package name will cause, for example, compiler errors.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. create new project org.sample:my-project:1.0
1. in existing project create new package and enter illegal value

Actual results:
No validation, invalid package created and can be used without warning. First problem occurs when building the project.

Expected results:
- New package form should validate user input and not allow to create package with illegal name. See Data modeler input validation.
- When generating a default package for a new project its name should be automatically legalized.

Additional info:
http://docs.oracle.com/javase/specs/jls/se7/html/jls-6.html#d5e6484 :

    If the domain name contains a hyphen, or any other special character not allowed in an identifier (§3.8), convert it into an underscore.

    If any of the resulting package name components are keywords (§3.9), append an underscore to them.

    If any of the resulting package name components start with a digit, or any other character that is not allowed as an initial character of an identifier, have an underscore prefixed to the component.
Comment 5 Jiri Locker 2013-10-18 09:56:46 EDT
Fixed in ER4.

Note You need to log in before you can comment on or make changes to this bug.