Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0010429
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2009-08-28 18:092012-03-02 15:35
ReporteriperdomoView Statuspublic 
Assigned Toguilleaer 
PrioritynormalResolutionfixedFixed in Version3.0MP9
StatusclosedFix in branchFixed in SCM revision8ec4eac1fac0
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_13
OS Version2.6.28-gentoo-r5Database version8.3.7Ant version1.7.1
Product Version2.50MP3SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0010429: Data Package allows invalid Java package names

DescriptionWhen 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 SolutionThe Java package name must be checked to ensure a valid package is register
TagsModularity, OB3-Reviewed
Attached Files? file icon JavaIdentifierTest.java [^] (633 bytes) 2009-08-31 10:05

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00115202.50MP11 closedalostale It's possible create a column with reserved names of java 

-  Notes
(0019319)
iperdomo (reporter)
2009-08-31 10:13

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
(0022852)
alostale (manager)
2009-12-16 10:16

The same is applicable for ad_module.javapackage column
(0043693)
guilleaer (developer)
2011-12-02 11:49

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 (developer)
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
---
(0044917)
alostale (manager)
2012-02-07 17:51

code review and verified on pi@561e6f569f2c
(0044949)
AugustoMauch (manager)
2012-02-09 10:44

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")
(0044951)
AugustoMauch (manager)
2012-02-09 11:23

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".
(0045770)
hudsonbot (developer)
2012-03-02 15:35

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/544d64e0c159 [^]

Maturity status: Test

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker