related to issue 31667: incorrect about message for unlimited POS licenses
authorAsier Lostalé <asier.lostale@openbravo.com>
Wed, 09 Dec 2015 15:52:19 +0100
changeset 28097 b9e9226226ff
parent 28096 9a9e6209c555
child 28098 fd2b88269a44
related to issue 31667: incorrect about message for unlimited POS licenses

Unlimited POS licenses displayed incorrectly POS limitations: it showed -1 were
it should be "unlimited".

This was caused by incorrect Long comparsion.

Fixed by using Long.equals instead of == operator.
src/org/openbravo/erpCommon/obps/ActivationKey.java
--- a/src/org/openbravo/erpCommon/obps/ActivationKey.java	Fri Dec 04 14:56:47 2015 +0000
+++ b/src/org/openbravo/erpCommon/obps/ActivationKey.java	Wed Dec 09 15:52:19 2015 +0100
@@ -1227,9 +1227,9 @@
 
   /** Returns a message for POS Terminals limitations */
   public String getPOSTerminalsExplanation() {
-    if (posTerminals == 0) {
+    if (posTerminals == null || posTerminals.equals(0L)) {
       return OBMessageUtils.messageBD("OPSNone");
-    } else if (posTerminals == NO_LIMIT) {
+    } else if (posTerminals.equals(NO_LIMIT)) {
       return OBMessageUtils.messageBD("OPSWSUnlimited");
     } else {
       return posTerminals.toString();