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) {
|
if (versionSeparatorPos > 0) {
|
||||||
int dotPos = fileName.lastIndexOf(".");
|
int dotPos = fileName.lastIndexOf(".");
|
||||||
if (dotPos > 0 && dotPos > versionSeparatorPos) {
|
if (dotPos > 0 && dotPos > versionSeparatorPos) {
|
||||||
if (fileName.indexOf("_") != fileName.lastIndexOf("_"))
|
int extraInfoIndex = fileName.indexOf("_", versionSeparatorPos + 6);
|
||||||
dotPos=fileName.lastIndexOf("_");
|
if (extraInfoIndex > 0)
|
||||||
|
dotPos=extraInfoIndex;
|
||||||
|
|
||||||
String version = fileName.substring(versionSeparatorPos+"2Pack_".length(), dotPos);
|
String version = fileName.substring(versionSeparatorPos+"2Pack_".length(), dotPos);
|
||||||
if (version.split("[.]").length == 3) {
|
if (version.split("[.]").length == 3) {
|
||||||
|
@ -123,6 +124,8 @@ public class PipoDictionaryService implements IDictionaryService {
|
||||||
try {
|
try {
|
||||||
Trx.get(trxName, false).close();
|
Trx.get(trxName, false).close();
|
||||||
} catch (Exception e) {}
|
} catch (Exception e) {}
|
||||||
|
|
||||||
|
if (adPackageImp != null)
|
||||||
adPackageImp.save(); // ignoring exceptions
|
adPackageImp.save(); // ignoring exceptions
|
||||||
|
|
||||||
if (adPackageImp != null && packIn != null) {
|
if (adPackageImp != null && packIn != null) {
|
||||||
|
|
Loading…
Reference in New Issue