Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034479Retail ModulesStoreServerpublic2016-11-11 17:252016-11-15 11:20
AugustoMauch 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
RR17Q1 
mtaal
No
0034479: The pingservice is not always properly fetched
The following code is used to obtain the ping service in :

    String pingService = srv.getPingservice() != null ? srv.getPingservice()
        : MobileServerUtils.OBWSPATH + MobileServerStatusInformation.class.getName();

Usually the srv.getPingservice() returns either null if it is not defined or an String representing the ping service, but sometimes it returns an empty string. If this happens, then the pingService variable contains an empty String, instead of the default ping service (MobileServerStatusInformation.class.getName()).
I have not been able to reproduce it, but I have seen it reproduced in environments when this caused the store server offline->online transition to break.

Use !StringUtils.isBlank(srv.getPingservice()) instead of a null check to cover the case when the getPingservice method returns an empty string
No tags attached.
Issue History
2016-11-11 17:25AugustoMauchNew Issue
2016-11-11 17:25AugustoMauchAssigned To => AugustoMauch
2016-11-11 17:25AugustoMauchTriggers an Emergency Pack => No
2016-11-11 17:54AugustoMauchReview Assigned To => mtaal
2016-11-11 17:54hgbotCheckin
2016-11-11 17:54hgbotNote Added: 0091407
2016-11-11 17:54hgbotStatusnew => resolved
2016-11-11 17:54hgbotResolutionopen => fixed
2016-11-11 17:54hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c8499556b98e606775f9e204a7f4c39a7e8c99bf [^]
2016-11-15 11:20mtaalNote Added: 0091549
2016-11-15 11:20mtaalStatusresolved => closed
2016-11-15 11:20mtaalFixed in Version => RR17Q1

Notes
(0091407)
hgbot   
2016-11-11 17:54   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: c8499556b98e606775f9e204a7f4c39a7e8c99bf
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Nov 11 17:53:53 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c8499556b98e606775f9e204a7f4c39a7e8c99bf [^]

Fixes issue 34479: Ping service is properly set even if it is an empty String

Before this fix, if the srv.getPingservice() method returned an empty string the ping service was not properly set. Now StringUtils.isBlank is used to check if the ping service is defined, so it covers both it being null and it being an empty String.

---
M src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
---
(0091549)
mtaal   
2016-11-15 11:20   
Reviewed