IDEMPIERE-4105:fix out of bound exception when don't append "comment"
This commit is contained in:
parent
03fe304d7e
commit
b811cde27a
|
@ -71,8 +71,9 @@ public class PipoDictionaryService implements IDictionaryService {
|
|||
if (versionSeparatorPos > 0) {
|
||||
int dotPos = fileName.lastIndexOf(".");
|
||||
if (dotPos > 0 && dotPos > versionSeparatorPos) {
|
||||
if (fileName.indexOf("_") != fileName.lastIndexOf("_"))
|
||||
dotPos=fileName.lastIndexOf("_");
|
||||
int extraInfoIndex = fileName.indexOf("_", versionSeparatorPos + 6);
|
||||
if (extraInfoIndex > 0)
|
||||
dotPos=extraInfoIndex;
|
||||
|
||||
String version = fileName.substring(versionSeparatorPos+"2Pack_".length(), dotPos);
|
||||
if (version.split("[.]").length == 3) {
|
||||
|
@ -123,6 +124,8 @@ public class PipoDictionaryService implements IDictionaryService {
|
|||
try {
|
||||
Trx.get(trxName, false).close();
|
||||
} catch (Exception e) {}
|
||||
|
||||
if (adPackageImp != null)
|
||||
adPackageImp.save(); // ignoring exceptions
|
||||
|
||||
if (adPackageImp != null && packIn != null) {
|
||||
|
|
Loading…
Reference in New Issue