details: https://code.openbravo.com/erp/devel/pi/rev/ad9fd81dd2da
changeset: 13141:ad9fd81dd2da
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Mon Jul 11 16:59:20 2011 +0200
summary: fixed bug 14435: Don't cache maturities when there's no Internet
connection
diffstat:
src/org/openbravo/erpCommon/ad_forms/MaturityLevel.java | 7 ++++++-
src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java | 4 +++-
2 files changed, 9 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r d86da02ad095 -r ad9fd81dd2da
src/org/openbravo/erpCommon/ad_forms/MaturityLevel.java
--- a/src/org/openbravo/erpCommon/ad_forms/MaturityLevel.java Mon Jul 11
16:43:32 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/MaturityLevel.java Mon Jul 11
16:59:20 2011 +0200
@@ -37,6 +37,7 @@
private String[][] levels;
public final static int CS_MATURITY = 500;
public final static int QA_APPR_MATURITY = 200;
+ private boolean error = false;
/**
* Calls central repository webservice to obtain the list of possible
statuses. In case the
@@ -44,7 +45,7 @@
*/
public MaturityLevel() {
// Check internet availability and set proxy, to obtain maturity levels
- boolean error = !HttpsUtils.isInternetAvailable();
+ error = !HttpsUtils.isInternetAvailable();
log4j.error("Couldn't connect to Internet to obtain maturity levels");
try {
// retrieve the module details from the webservice
@@ -112,4 +113,8 @@
public String getMostMature() {
return levels[levels.length - 1][1];
}
+
+ public boolean hasInternetError() {
+ return error;
+ }
}
diff -r d86da02ad095 -r ad9fd81dd2da
src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java Mon Jul
11 16:43:32 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java Mon Jul
11 16:59:20 2011 +0200
@@ -1985,7 +1985,9 @@
MaturityLevel levels = (MaturityLevel)
vars.getSessionObject("SettingsModule|MaturityLevels");
if (levels == null) {
levels = new MaturityLevel();
- vars.setSessionObject("SettingsModule|MaturityLevels", levels);
+ if (!levels.hasInternetError()) {
+ vars.setSessionObject("SettingsModule|MaturityLevels", levels);
+ }
}
String discard[] = { "", "" };
OBError myMessage = null;
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits