Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0010429 | Openbravo ERP | A. Platform | public | 2009-08-28 18:09 | 2012-03-02 15:35 |
|
Reporter | iperdomo | |
Assigned To | guilleaer | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 20 | OS Version | 2.6.28-gentoo-r5 |
Product Version | 2.50MP3 | |
Target Version | | Fixed in Version | 3.0MP9 | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0010429: Data Package allows invalid Java package names |
Description | When you define a module with db artifacts (e.g. tables), you need to define the Java package name on 'Data Package' tab to be able to generate a Java class of that table. You can put invalid java package names like: org.openbravo.import
Note: import is a reserved word in Java |
Steps To Reproduce | * Create a module
* Define a invalid java package name in the 'Data Package' tab, e.g. org.openbravo.import
* Create a table
* Export the module: ant export.database
|
Proposed Solution | The Java package name must be checked to ensure a valid package is register |
Additional Information | |
Tags | Modularity, OB3-Reviewed |
Relationships | related to | defect | 0011520 | 2.50MP11 | closed | alostale | It's possible create a column with reserved names of java |
|
Attached Files | JavaIdentifierTest.java (633) 2009-08-31 10:05 https://issues.openbravo.com/file_download.php?file_id=1687&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2009-08-28 18:09 | iperdomo | New Issue | |
2009-08-28 18:09 | iperdomo | Assigned To | => rafaroda |
2009-08-31 08:14 | rafaroda | Assigned To | rafaroda => alostale |
2009-08-31 08:14 | rafaroda | Status | new => scheduled |
2009-08-31 08:14 | rafaroda | Tag Attached: Modularity | |
2009-08-31 10:05 | iperdomo | File Added: JavaIdentifierTest.java | |
2009-08-31 10:13 | iperdomo | Note Added: 0019319 | |
2009-12-16 09:31 | alostale | Relationship added | related to 0011520 |
2009-12-16 10:16 | alostale | Note Added: 0022852 | |
2011-11-17 10:45 | alostale | Tag Attached: OB3-Reviewed | |
2011-11-30 17:51 | iperdomo | Assigned To | alostale => guilleaer |
2011-12-02 11:49 | guilleaer | Note Added: 0043693 | |
2012-02-07 17:45 | hgbot | Checkin | |
2012-02-07 17:45 | hgbot | Note Added: 0044914 | |
2012-02-07 17:45 | hgbot | Status | scheduled => resolved |
2012-02-07 17:45 | hgbot | Resolution | open => fixed |
2012-02-07 17:45 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/8ec4eac1fac073150f9df35ad1411b11ac9c9cee [^] |
2012-02-07 17:51 | alostale | Note Added: 0044917 | |
2012-02-07 17:51 | alostale | Status | resolved => closed |
2012-02-07 17:51 | alostale | Fixed in Version | => 3.0MP9 |
2012-02-09 10:44 | AugustoMauch | Note Added: 0044949 | |
2012-02-09 11:23 | AugustoMauch | Note Added: 0044951 | |
2012-03-02 15:35 | hudsonbot | Checkin | |
2012-03-02 15:35 | hudsonbot | Note Added: 0045770 | |
Notes |
|
|
Attached you'll find a way to detect a valid java package name. I think that can be done with a callout.
Cheers,
Iván |
|
|
|
The same is applicable for ad_module.javapackage column |
|
|
|
Test plan:
1. In the module window try to create a new module with an invalid java package (e.g. org.openbravo.void) You should see an error.
2. In the tab "data package" of the module window try to add a new line with an invalid java package. You should see an error.
3. if you put a good java package in the two previous cases you should be able to continue filling the tab fields normally
No regressions detected. |
|
|
(0044914)
|
hgbot
|
2012-02-07 17:45
|
|
Repository: erp/devel/pi
Changeset: 8ec4eac1fac073150f9df35ad1411b11ac9c9cee
Author: Guillermo Álvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Tue Feb 07 16:18:38 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8ec4eac1fac073150f9df35ad1411b11ac9c9cee [^]
Fixed issue 10429: Warning is shown if wrong java package is entered.
---
M src-db/database/sourcedata/AD_CALLOUT.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
A src/org/openbravo/erpCommon/ad_callouts/JavaPackageChecker.java
---
|
|
|
|
code review and verified on pi@561e6f569f2c |
|
|
|
Maybe the text of the new message could be improved.
The current text is: "The java package could cause problems. Try to fill the field with correct one. (E.g. "org.openbravo.example")".
What could cause problems is not the java package itself, but the java package name that has been entered.
Proposed message text: "The java package name entered is invalid. Please enter a valid java package name (e.g. "org.openbravo.example") |
|
|
|
My proposal is not correct, because Guillermo has told me that clients are allowed to enter an invalid java package name, so the message shown is a warning message, not an error.
Anyway, I still think it is a good idea to refer explicitly to the java package name.
New proposal: "The entered java package name seems invalid. Please try to enter a valid java package name if possible". |
|
|
|
|