Project

General

Profile

Bug #4180

integer.checkBounds(): the support for progress quirk is obsolete

Added by Vladimir Tsichevski almost 5 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:

obsolete-quirk-support.png (22.8 KB) Vladimir Tsichevski, 08/08/2019 04:00 PM

History

#1 Updated by Vladimir Tsichevski almost 5 years ago

This code:

DEF VAR big AS decimal INIT -9223372036854775808.
DEF VAR j AS INT.
j = big.

causes a meaningless error message in FWD runtime:

Here are messages both from FWD and Progress.

The problem is caused by this code in integer.java:

   @Override
   protected boolean checkBounds(long value)
   throws ErrorConditionException
   {
      if (value > Integer.MAX_VALUE || value < Integer.MIN_VALUE)
      {
         // mimic the strange quirk of how the 4GL prints the smallest int64 value
         String txt = (value == Long.MIN_VALUE) ? "-(" : String.format("%d", value);

         ErrorManager.recordOrThrowError(15747,

                                         "Value " + txt + " too large to fit in INTEGER",

                                         false);
         return false;
      }
      return true;
   }

Probably, the "quirk" support is now obsolete?

The "original" Progress message was created with OpenEdge Release 11.6.3 as of Thu Sep 8 19:01:50 EDT 2016

Also available in: Atom PDF