# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: marian.edu@acorn.ro-20210916132201-9td9b9woh0hk83xh
# target_branch: sftp://medu@xfer.goldencode.com/opt/fwd/3821c
# testament_sha1: 0fe735a7a4cd7a68528699a22b4d284fa73de6f7
# timestamp: 2021-09-16 16:22:27 +0300
# source_branch: 3821c.4384i.patch
# base_revision_id: ias@goldencode.com-20210913124101-dybe48dc7tyc4ui6
#
# Begin patch
=== modified file 'rules/include/common-progress.rules'
--- rules/include/common-progress.rules 2021-07-26 14:20:46 +0000
+++ rules/include/common-progress.rules 2021-09-16 13:22:01 +0000
@@ -10097,6 +10097,11 @@
ovrdNames.put("core.collections.set", "LegacySet")
ovrdNames.put("core.collections.istringkeyedmap", "IStringKeyedMap")
ovrdNames.put("core.collections.istringstringmap", "IStringStringMap")
+ ovrdNames.put("core.collections.list", "LegacyList")
+ ovrdNames.put("core.collections.listiterator", "LegacyListIterator")
+ ovrdNames.put("core.collections.listnode", "LegacyListNode")
+ ovrdNames.put("core.collections.linkedlist", "LegacyLinkedList")
+ ovrdNames.put("core.collections.stack", "LegacyStack")
ovrdNames.put("core.logging.isupportlogging", "ISupportLogging")
ovrdNames.put("net.isupportencoding", "ISupportEncoding")
ovrdNames.put("net.isupportmultipartentity", "ISupportMultipartEntity")
=== modified file 'src/com/goldencode/p2j/oo/core/Assert.java'
--- src/com/goldencode/p2j/oo/core/Assert.java 2020-10-23 13:00:35 +0000
+++ src/com/goldencode/p2j/oo/core/Assert.java 2021-09-16 09:12:50 +0000
@@ -13,6 +13,7 @@
** 003 IAS 20190923 Added implementation of additional methods
** 004 CA 20191024 Added method support levels and updated the class support level.
** 005 ME 20201023 Added implementation for isType, notType.
+** ME 20210916 Delegate to AssertObject as needed.
*/
/*
@@ -298,14 +299,13 @@
final object extends com.goldencode.p2j.oo.lang._BaseObject_> _p1,
final object extends com.goldencode.p2j.oo.lang._BaseObject_> _p2)
{
- ObjectOps.load(Assert.class);
+ ObjectOps.load(AssertObject.class);
object extends com.goldencode.p2j.oo.lang._BaseObject_> p1 = TypeFactory.initInput(_p1);
object extends com.goldencode.p2j.oo.lang._BaseObject_> p2 = TypeFactory.initInput(_p2);
internalProcedure(Assert.class, "Equals", new Block((Body) () -> {
- if (!p1.ref().legacyEquals(p2).booleanValue())
- raiseError(p1, p2);
+ AssertObject.legacyEquals(p1, p2);
}));
}
@@ -1899,7 +1899,7 @@
final object extends com.goldencode.p2j.oo.lang._BaseObject_> _p1,
final object extends com.goldencode.p2j.oo.lang._BaseObject_> _p2)
{
- ObjectOps.load(Assert.class);
+ ObjectOps.load(AssertObject.class);
internalProcedure(Assert.class, "NotEqual", new Block((Body) () -> {
AssertObject.notEqual(_p1, _p2);
=== modified file 'src/com/goldencode/p2j/oo/core/ByteBucket.java'
--- src/com/goldencode/p2j/oo/core/ByteBucket.java 2021-03-25 08:48:03 +0000
+++ src/com/goldencode/p2j/oo/core/ByteBucket.java 2021-09-15 11:07:41 +0000
@@ -17,6 +17,7 @@
** signature.
** ME 20210310 Use object variables defined out of block for methods that returns objects.
** ME 20210325 Move assert inside block else initInput returns an invalid `object`.
+** ME 20210915 Fix NPE with @longValue@ on size, throw error #4391 for out of range position.
*/
/*
@@ -399,7 +400,7 @@
{
BinaryData.genIndexError();
}
- else if (pos <= size.longValue())
+ else if (pos <= getSize().longValue())
{
int nbucket = (int) ((pos - 1) / MAX_BYTES_PER_ROW);
int offset = (int) ((pos - 1) % MAX_BYTES_PER_ROW);
@@ -465,7 +466,7 @@
object extends Memptr> ret = TypeFactory.object(Memptr.class);
return function(this, "GetBytes", object.class, new Block((Body) () -> {
- if (getSize().longValue() == 0 || size.longValue() == 0)
+ if (getSize().longValue() == 0 || size.getValue() == 0)
{
ret.assign(Memptr.getEmpty());
}
@@ -788,8 +789,8 @@
if (!size.isUnknown() && size.longValue() == 0L)
return;
- Assert.isPositive(_ptr, new character("Pointer Value"));
- Assert.isPositive(_size, new character("Memptr Size"));
+ Assert.isPositive(ptr, new character("Pointer Value"));
+ Assert.isPositive(size, new character("Memptr Size"));
memptr mptr = TypeFactory.memptr();
@@ -974,6 +975,10 @@
{
Assert.isPositive(p, new character("Start position"));
+ if (CompareOps._isGreaterThan(p, this.getSize())) {
+ ErrorManager.recordOrThrowError(4391, "Unable to evaluate expression with UNKNOWN value in argument");
+ }
+
long pos = p.longValue();
long bytesLeft = data.lengthOf();
int putAt = 0;
@@ -1043,7 +1048,7 @@
int bytesLeft = Math.min(data.length, len);
int bytesWritten = 0;
int crtBucket = (int) (writePosition / MAX_BYTES_PER_ROW);
- int endBucket = (int) ((size.longValue()) / MAX_BYTES_PER_ROW);
+ int endBucket = (int) ((getSize().longValue()) / MAX_BYTES_PER_ROW);
int endOffset = (int) ((size.longValue()) % MAX_BYTES_PER_ROW);
if (writePosition + bytesLeft > Integer.MAX_VALUE)
=== modified file 'src/com/goldencode/p2j/oo/core/LegacyString.java'
--- src/com/goldencode/p2j/oo/core/LegacyString.java 2021-05-21 12:43:12 +0000
+++ src/com/goldencode/p2j/oo/core/LegacyString.java 2021-09-16 13:13:54 +0000
@@ -14,6 +14,7 @@
** 006 CA 20210221 Fixed 'qualified', 'extent' and 'returns' annotations at the legacy
** signature.
** 007 ME 20210520 Set hashCode to return the actual string hashCode.
+** ME 20210902 Return default hashCode if unknown, fix empty static method and isNullOrEmpty to use trim.
*/
/*
@@ -275,7 +276,7 @@
{
// can't get a valid reference within the static context initial value
if (empty.get().isUnknown())
- empty.set(new object(ObjectOps.newInstance(LegacyString.class)));
+ empty.get().assign(new object(ObjectOps.newInstance(LegacyString.class)));
returnNormal(empty.get());
}));
@@ -321,7 +322,20 @@
return function(LegacyString.class, "IsNullOrEmpty", logical.class, new Block((Body) () ->
{
- returnNormal(new logical(TextOps.isEmpty(p1)));
+ boolean _empty = true;
+
+ if (!p1.isUnknown())
+ {
+ long rlen = TextOps.byteLength(p1).getValue();
+
+ if (rlen > 0)
+ {
+ long len = TextOps.length(p1).getValue();
+ _empty = len == rlen && TextOps.isEmpty(TextOps.trim(p1));
+ }
+ }
+
+ returnNormal(new logical(_empty));
}));
}
@@ -684,7 +698,7 @@
@Override
public int hashCode()
{
- return this.value.toStringMessage().hashCode();
+ return !this.value.isUnknown() ? this.value.toStringMessage().hashCode() : super.hashCode();
}
}
=== added file 'src/com/goldencode/p2j/oo/core/assertion/AssertArray.java'
--- src/com/goldencode/p2j/oo/core/assertion/AssertArray.java 1970-01-01 00:00:00 +0000
+++ src/com/goldencode/p2j/oo/core/assertion/AssertArray.java 2021-09-08 12:19:24 +0000
@@ -0,0 +1,586 @@
+/*
+** Module : AssertArray.java
+** Abstract : Implementation of the builtin class.
+**
+** Copyright (c) 2019, Golden Code Development Corporation.
+**
+** -#- -I- --Date-- -------------------------------Description--------------------------------
+** 001 ME 20210908 First version, stubs taken by converting the skeleton using FWD.
+*/
+
+/*
+** This program is free software: you can redistribute it and/or modify
+** it under the terms of the GNU Affero General Public License as
+** published by the Free Software Foundation, either version 3 of the
+** License, or (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU Affero General Public License for more details.
+**
+** You may find a copy of the GNU Affero GPL version 3 at the following
+** location: https://www.gnu.org/licenses/agpl-3.0.en.html
+**
+** Additional terms under GNU Affero GPL version 3 section 7:
+**
+** Under Section 7 of the GNU Affero GPL version 3, the following additional
+** terms apply to the works covered under the License. These additional terms
+** are non-permissive additional terms allowed under Section 7 of the GNU
+** Affero GPL version 3 and may not be removed by you.
+**
+** 0. Attribution Requirement.
+**
+** You must preserve all legal notices or author attributions in the covered
+** work or Appropriate Legal Notices displayed by works containing the covered
+** work. You may not remove from the covered work any author or developer
+** credit already included within the covered work.
+**
+** 1. No License To Use Trademarks.
+**
+** This license does not grant any license or rights to use the trademarks
+** Golden Code, FWD, any Golden Code or FWD logo, or any other trademarks
+** of Golden Code Development Corporation. You are not authorized to use the
+** name Golden Code, FWD, or the names of any author or contributor, for
+** publicity purposes without written authorization.
+**
+** 2. No Misrepresentation of Affiliation.
+**
+** You may not represent yourself as Golden Code Development Corporation or FWD.
+**
+** You may not represent yourself for publicity purposes as associated with
+** Golden Code Development Corporation, FWD, or any author or contributor to
+** the covered work, without written authorization.
+**
+** 3. No Misrepresentation of Source or Origin.
+**
+** You may not represent the covered work as solely your work. All modified
+** versions of the covered work must be marked in a reasonable way to make it
+** clear that the modified work is not originating from Golden Code Development
+** Corporation or FWD. All modified versions must contain the notices of
+** attribution required in this license.
+*/
+package com.goldencode.p2j.oo.core.assertion;
+
+import com.goldencode.p2j.util.*;
+import com.goldencode.p2j.oo.lang.*;
+
+import static com.goldencode.p2j.report.ReportConstants.CVT_LVL_PARTIAL;
+import static com.goldencode.p2j.report.ReportConstants.RT_LVL_STUB;
+import static com.goldencode.p2j.util.BlockManager.*;
+import static com.goldencode.p2j.util.InternalEntry.Type;
+
+/**
+ * Business logic (converted to Java from the 4GL source code
+ * in OpenEdge/Core/Assertion/AssertArray.cls).
+ */
+@LegacyResource(resource = "OpenEdge.Core.Assertion.AssertArray")
+@LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+public class AssertArray
+extends BaseObject
+{
+ public void __core_assertion_AssertArray_execute__()
+ {
+ externalProcedure(AssertArray.class, AssertArray.this, new Block((Body) () ->
+ {
+ {
+ }
+ }));
+ }
+
+ @LegacySignature(type = Type.CONSTRUCTOR)
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public void __core_assertion_AssertArray_constructor__()
+ {
+ internalProcedure(AssertArray.class, this, "__core_assertion_AssertArray_constructor__", new Block((Body) () ->
+ {
+ __lang_BaseObject_constructor__();
+ }));
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "CHARACTER", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "CHARACTER", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final character[] _pSource, final character[] _pTarget)
+ {
+ character[] pSource[] =
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ character[] pTarget[] =
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "LONGCHAR", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "LONGCHAR", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final longchar[] _pSource, final longchar[] _pTarget)
+ {
+ longchar[] pSource[] =
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ longchar[] pTarget[] =
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "INTEGER", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "INTEGER", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final integer[] _pSource, final integer[] _pTarget)
+ {
+ integer[] pSource[] =
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ integer[] pTarget[] =
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "INT64", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "INT64", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final int64[] _pSource, final int64[] _pTarget)
+ {
+ int64[] pSource[] =
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ int64[] pTarget[] =
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "DECIMAL", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "DECIMAL", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final decimal[] _pSource, final decimal[] _pTarget)
+ {
+ decimal[] pSource[] =
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ decimal[] pTarget[] =
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "DATE", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "DATE", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final date[] _pSource, final date[] _pTarget)
+ {
+ date[] pSource[] =
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ date[] pTarget[] =
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "DATETIME", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "DATETIME", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final datetime[] _pSource, final datetime[] _pTarget)
+ {
+ datetime[] pSource[] =
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ datetime[] pTarget[] =
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "DATETIMETZ", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "DATETIMETZ", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final datetimetz[] _pSource, final datetimetz[] _pTarget)
+ {
+ datetimetz[] pSource[] =
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ datetimetz[] pTarget[] =
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "LOGICAL", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "LOGICAL", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final logical[] _pSource, final logical[] _pTarget)
+ {
+ logical[] pSource[] =
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ logical[] pTarget[] =
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "HANDLE", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "HANDLE", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final handle[] _pSource, final handle[] _pTarget)
+ {
+ handle[] pSource[] =
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ handle[] pTarget[] =
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "OBJECT", extent = -1, qualified = "progress.lang.object", mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "OBJECT", extent = -1, qualified = "progress.lang.object", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final object extends com.goldencode.p2j.oo.lang._BaseObject_>[] _pSource, final object extends com.goldencode.p2j.oo.lang._BaseObject_>[] _pTarget)
+ {
+ object extends com.goldencode.p2j.oo.lang._BaseObject_>[] pSource[] = new object[][]
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ object extends com.goldencode.p2j.oo.lang._BaseObject_>[] pTarget[] = new object[][]
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "RECID", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "RECID", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final recid[] _pSource, final recid[] _pTarget)
+ {
+ recid[] pSource[] =
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ recid[] pTarget[] =
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Equals", parameters =
+ {
+ @LegacyParameter(name = "pSource", type = "ROWID", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pTarget", type = "ROWID", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void legacyEquals(final rowid[] _pSource, final rowid[] _pTarget)
+ {
+ rowid[] pSource[] =
+ {
+ TypeFactory.initInput(_pSource)
+ };
+ rowid[] pTarget[] =
+ {
+ TypeFactory.initInput(_pTarget)
+ };
+
+ internalProcedure(AssertArray.class, "Equals", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "HasDeterminateExtent", parameters =
+ {
+ @LegacyParameter(name = "pcArgument", type = "CHARACTER", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void hasDeterminateExtent(final character[] _pcArgument, final character _pcName)
+ {
+ character[] pcArgument[] =
+ {
+ TypeFactory.initInput(_pcArgument)
+ };
+ character pcName = TypeFactory.initInput(_pcName);
+
+ internalProcedure(AssertArray.class, "HasDeterminateExtent", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "HasDeterminateExtent", parameters =
+ {
+ @LegacyParameter(name = "pcArgument", type = "CHARACTER", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void hasDeterminateExtent(final character[] _pcArgument)
+ {
+ character[] pcArgument[] =
+ {
+ TypeFactory.initInput(_pcArgument)
+ };
+
+ internalProcedure(AssertArray.class, "HasDeterminateExtent", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "IsIndeterminateArray", parameters =
+ {
+ @LegacyParameter(name = "pcArgument", type = "CHARACTER", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void isIndeterminateArray(final character[] _pcArgument, final character _pcName)
+ {
+ character[] pcArgument[] =
+ {
+ TypeFactory.initInput(_pcArgument)
+ };
+ character pcName = TypeFactory.initInput(_pcName);
+
+ internalProcedure(AssertArray.class, "IsIndeterminateArray", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "IsIndeterminateArray", parameters =
+ {
+ @LegacyParameter(name = "pcArgument", type = "CHARACTER", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void isIndeterminateArray(final character[] _pcArgument)
+ {
+ character[] pcArgument[] =
+ {
+ TypeFactory.initInput(_pcArgument)
+ };
+
+ internalProcedure(AssertArray.class, "IsIndeterminateArray", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "IsIndeterminateArray", parameters =
+ {
+ @LegacyParameter(name = "poArgument", type = "OBJECT", extent = -1, qualified = "progress.lang.object", mode = "INPUT"),
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void isIndeterminateArray(final object extends com.goldencode.p2j.oo.lang._BaseObject_>[] _poArgument, final character _pcName)
+ {
+ object extends com.goldencode.p2j.oo.lang._BaseObject_>[] poArgument[] = new object[][]
+ {
+ TypeFactory.initInput(_poArgument)
+ };
+ character pcName = TypeFactory.initInput(_pcName);
+
+ internalProcedure(AssertArray.class, "IsIndeterminateArray", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "HasDeterminateExtent", parameters =
+ {
+ @LegacyParameter(name = "poArgument", type = "OBJECT", extent = -1, qualified = "progress.lang.object", mode = "INPUT"),
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void hasDeterminateExtent(final object extends com.goldencode.p2j.oo.lang._BaseObject_>[] _poArgument, final character _pcName)
+ {
+ object extends com.goldencode.p2j.oo.lang._BaseObject_>[] poArgument[] = new object[][]
+ {
+ TypeFactory.initInput(_poArgument)
+ };
+ character pcName = TypeFactory.initInput(_pcName);
+
+ internalProcedure(AssertArray.class, "HasDeterminateExtent", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "HasDeterminateExtent", parameters =
+ {
+ @LegacyParameter(name = "piArgument", type = "INTEGER", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void hasDeterminateExtent(final integer[] _piArgument, final character _pcName)
+ {
+ integer[] piArgument[] =
+ {
+ TypeFactory.initInput(_piArgument)
+ };
+ character pcName = TypeFactory.initInput(_pcName);
+
+ internalProcedure(AssertArray.class, "HasDeterminateExtent", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "HasDeterminateExtent", parameters =
+ {
+ @LegacyParameter(name = "piArgument", type = "INTEGER", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void hasDeterminateExtent(final integer[] _piArgument)
+ {
+ integer[] piArgument[] =
+ {
+ TypeFactory.initInput(_piArgument)
+ };
+
+ internalProcedure(AssertArray.class, "HasDeterminateExtent", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "IsIndeterminateArray", parameters =
+ {
+ @LegacyParameter(name = "piArgument", type = "INTEGER", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void isIndeterminateArray(final integer[] _piArgument, final character _pcName)
+ {
+ integer[] piArgument[] =
+ {
+ TypeFactory.initInput(_piArgument)
+ };
+ character pcName = TypeFactory.initInput(_pcName);
+
+ internalProcedure(AssertArray.class, "IsIndeterminateArray", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "IsIndeterminateArray", parameters =
+ {
+ @LegacyParameter(name = "piArgument", type = "INTEGER", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void isIndeterminateArray(final integer[] _piArgument)
+ {
+ integer[] piArgument[] =
+ {
+ TypeFactory.initInput(_piArgument)
+ };
+
+ internalProcedure(AssertArray.class, "IsIndeterminateArray", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "HasDeterminateExtent", parameters =
+ {
+ @LegacyParameter(name = "piArgument", type = "INT64", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void hasDeterminateExtent(final int64[] _piArgument, final character _pcName)
+ {
+ int64[] piArgument[] =
+ {
+ TypeFactory.initInput(_piArgument)
+ };
+ character pcName = TypeFactory.initInput(_pcName);
+
+ internalProcedure(AssertArray.class, "HasDeterminateExtent", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "HasDeterminateExtent", parameters =
+ {
+ @LegacyParameter(name = "piArgument", type = "INT64", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void hasDeterminateExtent(final int64[] _piArgument)
+ {
+ int64[] piArgument[] =
+ {
+ TypeFactory.initInput(_piArgument)
+ };
+
+ internalProcedure(AssertArray.class, "HasDeterminateExtent", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "IsIndeterminateArray", parameters =
+ {
+ @LegacyParameter(name = "piArgument", type = "INT64", extent = -1, mode = "INPUT"),
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void isIndeterminateArray(final int64[] _piArgument, final character _pcName)
+ {
+ int64[] piArgument[] =
+ {
+ TypeFactory.initInput(_piArgument)
+ };
+ character pcName = TypeFactory.initInput(_pcName);
+
+ internalProcedure(AssertArray.class, "IsIndeterminateArray", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "IsIndeterminateArray", parameters =
+ {
+ @LegacyParameter(name = "piArgument", type = "INT64", extent = -1, mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void isIndeterminateArray(final int64[] _piArgument)
+ {
+ int64[] piArgument[] =
+ {
+ TypeFactory.initInput(_piArgument)
+ };
+
+ internalProcedure(AssertArray.class, "IsIndeterminateArray", new Block());
+ }
+}
=== added file 'src/com/goldencode/p2j/oo/core/assertion/AssertFile.java'
--- src/com/goldencode/p2j/oo/core/assertion/AssertFile.java 1970-01-01 00:00:00 +0000
+++ src/com/goldencode/p2j/oo/core/assertion/AssertFile.java 2021-09-08 12:19:24 +0000
@@ -0,0 +1,136 @@
+/*
+** Module : AssertFile.java
+** Abstract : Implementation of the builtin class.
+**
+** Copyright (c) 2019, Golden Code Development Corporation.
+**
+** -#- -I- --Date-- -------------------------------Description--------------------------------
+** 001 ME 20210908 First version, stubs taken by converting the skeleton using FWD.
+*/
+
+/*
+** This program is free software: you can redistribute it and/or modify
+** it under the terms of the GNU Affero General Public License as
+** published by the Free Software Foundation, either version 3 of the
+** License, or (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU Affero General Public License for more details.
+**
+** You may find a copy of the GNU Affero GPL version 3 at the following
+** location: https://www.gnu.org/licenses/agpl-3.0.en.html
+**
+** Additional terms under GNU Affero GPL version 3 section 7:
+**
+** Under Section 7 of the GNU Affero GPL version 3, the following additional
+** terms apply to the works covered under the License. These additional terms
+** are non-permissive additional terms allowed under Section 7 of the GNU
+** Affero GPL version 3 and may not be removed by you.
+**
+** 0. Attribution Requirement.
+**
+** You must preserve all legal notices or author attributions in the covered
+** work or Appropriate Legal Notices displayed by works containing the covered
+** work. You may not remove from the covered work any author or developer
+** credit already included within the covered work.
+**
+** 1. No License To Use Trademarks.
+**
+** This license does not grant any license or rights to use the trademarks
+** Golden Code, FWD, any Golden Code or FWD logo, or any other trademarks
+** of Golden Code Development Corporation. You are not authorized to use the
+** name Golden Code, FWD, or the names of any author or contributor, for
+** publicity purposes without written authorization.
+**
+** 2. No Misrepresentation of Affiliation.
+**
+** You may not represent yourself as Golden Code Development Corporation or FWD.
+**
+** You may not represent yourself for publicity purposes as associated with
+** Golden Code Development Corporation, FWD, or any author or contributor to
+** the covered work, without written authorization.
+**
+** 3. No Misrepresentation of Source or Origin.
+**
+** You may not represent the covered work as solely your work. All modified
+** versions of the covered work must be marked in a reasonable way to make it
+** clear that the modified work is not originating from Golden Code Development
+** Corporation or FWD. All modified versions must contain the notices of
+** attribution required in this license.
+*/
+package com.goldencode.p2j.oo.core.assertion;
+
+import com.goldencode.p2j.util.*;
+import com.goldencode.p2j.oo.lang.*;
+
+import static com.goldencode.p2j.report.ReportConstants.CVT_LVL_PARTIAL;
+import static com.goldencode.p2j.report.ReportConstants.RT_LVL_STUB;
+import static com.goldencode.p2j.util.BlockManager.*;
+import static com.goldencode.p2j.util.InternalEntry.Type;
+
+/**
+ * Business logic (converted to Java from the 4GL source code
+ * in OpenEdge/Core/Assertion/AssertFile.cls).
+ */
+@LegacyResource(resource = "OpenEdge.Core.Assertion.AssertFile")
+@LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+public class AssertFile
+extends BaseObject
+{
+ public void __core_assertion_AssertFile_execute__()
+ {
+ externalProcedure(AssertFile.class, AssertFile.this, new Block((Body) () ->
+ {
+ {
+ }
+ }));
+ }
+
+ @LegacySignature(type = Type.CONSTRUCTOR)
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public void __core_assertion_AssertFile_constructor__()
+ {
+ internalProcedure(AssertFile.class, this, "__core_assertion_AssertFile_constructor__", new Block((Body) () ->
+ {
+ __lang_BaseObject_constructor__();
+ }));
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "DirectoryExists", parameters =
+ {
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void directoryExists(final character _pcName)
+ {
+ character pcName = TypeFactory.initInput(_pcName);
+
+ internalProcedure(AssertFile.class, "DirectoryExists", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "FileExists", parameters =
+ {
+ @LegacyParameter(name = "fileName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void fileExists(final character _fileName)
+ {
+ character fileName = TypeFactory.initInput(_fileName);
+
+ internalProcedure(AssertFile.class, "FileExists", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "FileInPropath", parameters =
+ {
+ @LegacyParameter(name = "fileName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void fileInPropath(final character _fileName)
+ {
+ character fileName = TypeFactory.initInput(_fileName);
+
+ internalProcedure(AssertFile.class, "FileInPropath", new Block());
+ }
+}
=== added file 'src/com/goldencode/p2j/oo/core/assertion/AssertJson.java'
--- src/com/goldencode/p2j/oo/core/assertion/AssertJson.java 1970-01-01 00:00:00 +0000
+++ src/com/goldencode/p2j/oo/core/assertion/AssertJson.java 2021-09-08 12:19:24 +0000
@@ -0,0 +1,202 @@
+/*
+** Module : AssertJson.java
+** Abstract : Implementation of the builtin class.
+**
+** Copyright (c) 2019, Golden Code Development Corporation.
+**
+** -#- -I- --Date-- -------------------------------Description--------------------------------
+** 001 ME 20210908 First version, stubs taken by converting the skeleton using FWD.
+*/
+
+/*
+** This program is free software: you can redistribute it and/or modify
+** it under the terms of the GNU Affero General Public License as
+** published by the Free Software Foundation, either version 3 of the
+** License, or (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU Affero General Public License for more details.
+**
+** You may find a copy of the GNU Affero GPL version 3 at the following
+** location: https://www.gnu.org/licenses/agpl-3.0.en.html
+**
+** Additional terms under GNU Affero GPL version 3 section 7:
+**
+** Under Section 7 of the GNU Affero GPL version 3, the following additional
+** terms apply to the works covered under the License. These additional terms
+** are non-permissive additional terms allowed under Section 7 of the GNU
+** Affero GPL version 3 and may not be removed by you.
+**
+** 0. Attribution Requirement.
+**
+** You must preserve all legal notices or author attributions in the covered
+** work or Appropriate Legal Notices displayed by works containing the covered
+** work. You may not remove from the covered work any author or developer
+** credit already included within the covered work.
+**
+** 1. No License To Use Trademarks.
+**
+** This license does not grant any license or rights to use the trademarks
+** Golden Code, FWD, any Golden Code or FWD logo, or any other trademarks
+** of Golden Code Development Corporation. You are not authorized to use the
+** name Golden Code, FWD, or the names of any author or contributor, for
+** publicity purposes without written authorization.
+**
+** 2. No Misrepresentation of Affiliation.
+**
+** You may not represent yourself as Golden Code Development Corporation or FWD.
+**
+** You may not represent yourself for publicity purposes as associated with
+** Golden Code Development Corporation, FWD, or any author or contributor to
+** the covered work, without written authorization.
+**
+** 3. No Misrepresentation of Source or Origin.
+**
+** You may not represent the covered work as solely your work. All modified
+** versions of the covered work must be marked in a reasonable way to make it
+** clear that the modified work is not originating from Golden Code Development
+** Corporation or FWD. All modified versions must contain the notices of
+** attribution required in this license.
+*/
+package com.goldencode.p2j.oo.core.assertion;
+
+import com.goldencode.p2j.util.*;
+import com.goldencode.p2j.oo.lang.*;
+
+import static com.goldencode.p2j.report.ReportConstants.CVT_LVL_PARTIAL;
+import static com.goldencode.p2j.report.ReportConstants.RT_LVL_STUB;
+import static com.goldencode.p2j.util.BlockManager.*;
+import static com.goldencode.p2j.util.InternalEntry.Type;
+
+/**
+ * Business logic (converted to Java from the 4GL source code
+ * in OpenEdge/Core/Assertion/AssertJson.cls).
+ */
+@LegacyResource(resource = "OpenEdge.Core.Assertion.AssertJson")
+@LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+public class AssertJson
+extends BaseObject
+{
+ public void __core_assertion_AssertJson_execute__()
+ {
+ externalProcedure(AssertJson.class, AssertJson.this, new Block((Body) () ->
+ {
+ {
+ }
+ }));
+ }
+
+ @LegacySignature(type = Type.CONSTRUCTOR)
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public void __core_assertion_AssertJson_constructor__()
+ {
+ internalProcedure(AssertJson.class, this, "__core_assertion_AssertJson_constructor__", new Block((Body) () ->
+ {
+ __lang_BaseObject_constructor__();
+ }));
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "HasProperty", parameters =
+ {
+ @LegacyParameter(name = "poObject", type = "OBJECT", qualified = "progress.json.objectmodel.jsonobject", mode = "INPUT"),
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void hasProperty(final object extends com.goldencode.p2j.oo.json.objectmodel.JsonObject> _poObject, final character _pcName)
+ {
+ object extends com.goldencode.p2j.oo.json.objectmodel.JsonObject> poObject = TypeFactory.initInput(_poObject);
+ character pcName = TypeFactory.initInput(_pcName);
+
+ internalProcedure(AssertJson.class, "HasProperty", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "PropertyIsNull", parameters =
+ {
+ @LegacyParameter(name = "poObject", type = "OBJECT", qualified = "progress.json.objectmodel.jsonobject", mode = "INPUT"),
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void propertyIsNull(final object extends com.goldencode.p2j.oo.json.objectmodel.JsonObject> _poObject, final character _pcName)
+ {
+ object extends com.goldencode.p2j.oo.json.objectmodel.JsonObject> poObject = TypeFactory.initInput(_poObject);
+ character pcName = TypeFactory.initInput(_pcName);
+
+ internalProcedure(AssertJson.class, "PropertyIsNull", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "IndexIsNull", parameters =
+ {
+ @LegacyParameter(name = "pArray", type = "OBJECT", qualified = "progress.json.objectmodel.jsonarray", mode = "INPUT"),
+ @LegacyParameter(name = "pIdx", type = "INTEGER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void indexIsNull(final object extends com.goldencode.p2j.oo.json.objectmodel.JsonArray> _pArray, final integer _pIdx)
+ {
+ object extends com.goldencode.p2j.oo.json.objectmodel.JsonArray> pArray = TypeFactory.initInput(_pArray);
+ integer pIdx = TypeFactory.initInput(_pIdx);
+
+ internalProcedure(AssertJson.class, "IndexIsNull", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "IndexNotNull", parameters =
+ {
+ @LegacyParameter(name = "pArray", type = "OBJECT", qualified = "progress.json.objectmodel.jsonarray", mode = "INPUT"),
+ @LegacyParameter(name = "pIdx", type = "INTEGER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void indexNotNull(final object extends com.goldencode.p2j.oo.json.objectmodel.JsonArray> _pArray, final integer _pIdx)
+ {
+ object extends com.goldencode.p2j.oo.json.objectmodel.JsonArray> pArray = TypeFactory.initInput(_pArray);
+ integer pIdx = TypeFactory.initInput(_pIdx);
+
+ internalProcedure(AssertJson.class, "IndexNotNull", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "IndexIsType", parameters =
+ {
+ @LegacyParameter(name = "pArray", type = "OBJECT", qualified = "progress.json.objectmodel.jsonarray", mode = "INPUT"),
+ @LegacyParameter(name = "pIdx", type = "INTEGER", mode = "INPUT"),
+ @LegacyParameter(name = "pPropertyType", type = "OBJECT", qualified = "openedge.core.jsondatatypeenum", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void indexIsType(final object extends com.goldencode.p2j.oo.json.objectmodel.JsonArray> _pArray, final integer _pIdx, final object extends com.goldencode.p2j.oo.core.JsonDataTypeEnum> _pPropertyType)
+ {
+ object extends com.goldencode.p2j.oo.json.objectmodel.JsonArray> pArray = TypeFactory.initInput(_pArray);
+ integer pIdx = TypeFactory.initInput(_pIdx);
+ object extends com.goldencode.p2j.oo.core.JsonDataTypeEnum> pPropertyType = TypeFactory.initInput(_pPropertyType);
+
+ internalProcedure(AssertJson.class, "IndexIsType", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "PropertyNotNull", parameters =
+ {
+ @LegacyParameter(name = "poObject", type = "OBJECT", qualified = "progress.json.objectmodel.jsonobject", mode = "INPUT"),
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void propertyNotNull(final object extends com.goldencode.p2j.oo.json.objectmodel.JsonObject> _poObject, final character _pcName)
+ {
+ object extends com.goldencode.p2j.oo.json.objectmodel.JsonObject> poObject = TypeFactory.initInput(_poObject);
+ character pcName = TypeFactory.initInput(_pcName);
+
+ internalProcedure(AssertJson.class, "PropertyNotNull", new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "PropertyIsType", parameters =
+ {
+ @LegacyParameter(name = "poObject", type = "OBJECT", qualified = "progress.json.objectmodel.jsonobject", mode = "INPUT"),
+ @LegacyParameter(name = "pcName", type = "CHARACTER", mode = "INPUT"),
+ @LegacyParameter(name = "poPropertyType", type = "OBJECT", qualified = "openedge.core.jsondatatypeenum", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public static void propertyIsType(final object extends com.goldencode.p2j.oo.json.objectmodel.JsonObject> _poObject, final character _pcName, final object extends com.goldencode.p2j.oo.core.JsonDataTypeEnum> _poPropertyType)
+ {
+ object extends com.goldencode.p2j.oo.json.objectmodel.JsonObject> poObject = TypeFactory.initInput(_poObject);
+ character pcName = TypeFactory.initInput(_pcName);
+ object extends com.goldencode.p2j.oo.core.JsonDataTypeEnum> poPropertyType = TypeFactory.initInput(_poPropertyType);
+
+ internalProcedure(AssertJson.class, "PropertyIsType", new Block());
+ }
+}
=== modified file 'src/com/goldencode/p2j/oo/core/assertion/AssertObject.java'
--- src/com/goldencode/p2j/oo/core/assertion/AssertObject.java 2020-10-23 13:00:35 +0000
+++ src/com/goldencode/p2j/oo/core/assertion/AssertObject.java 2021-09-08 12:19:24 +0000
@@ -9,6 +9,7 @@
** 001 ME 20200324 Created the first version, by converting the legacy skeleton .cls file and
** using that output.
** 002 ME 20201023 Added implementation for isType, notType.
+** 20210908 Update equals method and error messages.
*/
/*
@@ -128,9 +129,9 @@
object extends com.goldencode.p2j.oo.lang._BaseObject_> p2 = TypeFactory.initInput(_p2);
internalProcedure(AssertObject.class, "Equals", new Block((Body) () -> {
- if (!CompareOps._isEqual(p1, p2))
+ if (!p1.ref().legacyEquals(p2).booleanValue())
returnError(ObjectOps.newInstance(AssertionFailedError.class, "II",
- substitute("Expected: &1 but was: &2", p1, p2), 0));
+ substitute("Expected: &1 but was: &2", character.valueOf(p1), character.valueOf(p2)), 0));
}));
}
@@ -148,9 +149,9 @@
object extends com.goldencode.p2j.oo.lang._BaseObject_> p2 = TypeFactory.initInput(_p2);
internalProcedure(AssertObject.class, "NotEqual", new Block((Body) () -> {
- if (CompareOps._isEqual(p1, p2))
+ if (p1.ref().legacyEquals(p2).booleanValue())
returnError(ObjectOps.newInstance(AssertionFailedError.class, "II",
- substitute("&1 and &2 are equal", p1, p2), 0));
+ substitute("&1 and &2 are equal", character.valueOf(p1), character.valueOf(p2)), 0));
}));
}
@@ -581,7 +582,7 @@
if (!p1.isType(p2.ref().toLegacyString().getValue()))
returnError(ObjectOps.newInstance(AssertionFailedError.class, "II",
- substitute("&1 is not of type &2", p3, p2), 0));
+ substitute("&1 is not of type &2", p3, p2.ref().toLegacyString()), 0));
}));
}
@@ -617,7 +618,7 @@
if (p1.isType(p2.ref().toLegacyString().getValue()))
returnError(ObjectOps.newInstance(AssertionFailedError.class, "II",
- substitute("&1 cannot be of type &2", p3, p2), 0));
+ substitute("&1 cannot be of type &2", p3, p2.ref().toLegacyString()), 0));
}));
}
=== modified file 'src/com/goldencode/p2j/oo/core/collections/Array.java'
--- src/com/goldencode/p2j/oo/core/collections/Array.java 2021-02-21 16:25:50 +0000
+++ src/com/goldencode/p2j/oo/core/collections/Array.java 2021-09-16 13:11:28 +0000
@@ -14,6 +14,7 @@
** 20210113 Renamed clear() to clear_(), to follow NameConverter's rules.
** 006 CA 20210221 Fixed 'qualified', 'extent' and 'returns' annotations at the legacy
** signature.
+** ME 20210916 Fix wrong method call on set (increment instead of decrement)
*/
/*
@@ -601,7 +602,7 @@
ArrayAssigner.assignSingle(value, p2, p1);
// increment reference to object
- ObjectOps.decrement(p1.ref());
+ ObjectOps.increment(p1.ref());
}));
}
=== added file 'src/com/goldencode/p2j/oo/core/collections/ClassClassMap.java'
--- src/com/goldencode/p2j/oo/core/collections/ClassClassMap.java 1970-01-01 00:00:00 +0000
+++ src/com/goldencode/p2j/oo/core/collections/ClassClassMap.java 2021-09-10 06:50:38 +0000
@@ -0,0 +1,244 @@
+/*
+** Module : ClassClassMap.java
+** Abstract : Implementation of the builtin class.
+**
+** Copyright (c) 2019, Golden Code Development Corporation.
+**
+** -#- -I- --Date-- -------------------------------Description--------------------------------
+** 001 ME 20210908 First version, stubs taken by converting the skeleton using FWD.
+*/
+
+/*
+** This program is free software: you can redistribute it and/or modify
+** it under the terms of the GNU Affero General Public License as
+** published by the Free Software Foundation, either version 3 of the
+** License, or (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU Affero General Public License for more details.
+**
+** You may find a copy of the GNU Affero GPL version 3 at the following
+** location: https://www.gnu.org/licenses/agpl-3.0.en.html
+**
+** Additional terms under GNU Affero GPL version 3 section 7:
+**
+** Under Section 7 of the GNU Affero GPL version 3, the following additional
+** terms apply to the works covered under the License. These additional terms
+** are non-permissive additional terms allowed under Section 7 of the GNU
+** Affero GPL version 3 and may not be removed by you.
+**
+** 0. Attribution Requirement.
+**
+** You must preserve all legal notices or author attributions in the covered
+** work or Appropriate Legal Notices displayed by works containing the covered
+** work. You may not remove from the covered work any author or developer
+** credit already included within the covered work.
+**
+** 1. No License To Use Trademarks.
+**
+** This license does not grant any license or rights to use the trademarks
+** Golden Code, FWD, any Golden Code or FWD logo, or any other trademarks
+** of Golden Code Development Corporation. You are not authorized to use the
+** name Golden Code, FWD, or the names of any author or contributor, for
+** publicity purposes without written authorization.
+**
+** 2. No Misrepresentation of Affiliation.
+**
+** You may not represent yourself as Golden Code Development Corporation or FWD.
+**
+** You may not represent yourself for publicity purposes as associated with
+** Golden Code Development Corporation, FWD, or any author or contributor to
+** the covered work, without written authorization.
+**
+** 3. No Misrepresentation of Source or Origin.
+**
+** You may not represent the covered work as solely your work. All modified
+** versions of the covered work must be marked in a reasonable way to make it
+** clear that the modified work is not originating from Golden Code Development
+** Corporation or FWD. All modified versions must contain the notices of
+** attribution required in this license.
+*/
+package com.goldencode.p2j.oo.core.collections;
+
+import com.goldencode.p2j.util.*;
+
+import static com.goldencode.p2j.report.ReportConstants.CVT_LVL_PARTIAL;
+import static com.goldencode.p2j.report.ReportConstants.RT_LVL_STUB;
+import static com.goldencode.p2j.util.BlockManager.*;
+import static com.goldencode.p2j.util.InternalEntry.Type;
+
+/**
+ * Business logic (converted to Java from the 4GL source code
+ * in OpenEdge/Core/Collections/ClassClassMap.cls).
+ */
+@LegacyResource(resource = "OpenEdge.Core.Collections.ClassClassMap")
+@LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+public class ClassClassMap
+extends com.goldencode.p2j.oo.core.collections.LegacyMap
+implements com.goldencode.p2j.oo.core.collections.Imap
+{
+ public void __core_collections_ClassClassMap_execute__()
+ {
+ externalProcedure(ClassClassMap.class, ClassClassMap.this, new Block((Body) () ->
+ {
+ {
+ }
+ }));
+ }
+
+ @LegacySignature(type = Type.CONSTRUCTOR, parameters =
+ {
+ @LegacyParameter(name = "poMap", type = "OBJECT", qualified = "openedge.core.collections.imap", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public void __core_collections_ClassClassMap_constructor__(final object extends com.goldencode.p2j.oo.core.collections.Imap> _poMap)
+ {
+ object extends com.goldencode.p2j.oo.core.collections.Imap> poMap = TypeFactory.initInput(_poMap);
+
+ internalProcedure(ClassClassMap.class, this, "__core_collections_ClassClassMap_constructor__", new Block((Body) () ->
+ {
+ __core_collections_LegacyMap_constructor__();
+ }));
+ }
+
+ @LegacySignature(type = Type.CONSTRUCTOR)
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public void __core_collections_ClassClassMap_constructor__()
+ {
+ internalProcedure(ClassClassMap.class, this, "__core_collections_ClassClassMap_constructor__", new Block((Body) () ->
+ {
+ __core_collections_LegacyMap_constructor__();
+ }));
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Put", returns = "OBJECT", qualified = "progress.lang.class", parameters =
+ {
+ @LegacyParameter(name = "poKey", type = "OBJECT", qualified = "progress.lang.class", mode = "INPUT"),
+ @LegacyParameter(name = "poValue", type = "OBJECT", qualified = "progress.lang.class", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public object extends com.goldencode.p2j.oo.lang.LegacyClass> put_1(final object extends com.goldencode.p2j.oo.lang.LegacyClass> _poKey, final object extends com.goldencode.p2j.oo.lang.LegacyClass> _poValue)
+ {
+ object extends com.goldencode.p2j.oo.lang.LegacyClass> poKey = TypeFactory.initInput(_poKey);
+ object extends com.goldencode.p2j.oo.lang.LegacyClass> poValue = TypeFactory.initInput(_poValue);
+
+ return function(ClassClassMap.class, this, "Put", object.class, new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Put", returns = "OBJECT", qualified = "progress.lang.object", parameters =
+ {
+ @LegacyParameter(name = "poKey", type = "OBJECT", qualified = "progress.lang.object", mode = "INPUT"),
+ @LegacyParameter(name = "poValue", type = "OBJECT", qualified = "progress.lang.object", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ @Override
+ public object extends com.goldencode.p2j.oo.lang._BaseObject_> put(final object extends com.goldencode.p2j.oo.lang._BaseObject_> _poKey, final object extends com.goldencode.p2j.oo.lang._BaseObject_> _poValue)
+ {
+ object extends com.goldencode.p2j.oo.lang._BaseObject_> poKey = TypeFactory.initInput(_poKey);
+ object extends com.goldencode.p2j.oo.lang._BaseObject_> poValue = TypeFactory.initInput(_poValue);
+
+ return function(ClassClassMap.class, this, "Put", object.class, new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Remove", returns = "OBJECT", qualified = "progress.lang.class", parameters =
+ {
+ @LegacyParameter(name = "poKey", type = "OBJECT", qualified = "progress.lang.class", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public object extends com.goldencode.p2j.oo.lang.LegacyClass> remove_1(final object extends com.goldencode.p2j.oo.lang.LegacyClass> _poKey)
+ {
+ object extends com.goldencode.p2j.oo.lang.LegacyClass> poKey = TypeFactory.initInput(_poKey);
+
+ return function(ClassClassMap.class, this, "Remove", object.class, new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Remove", returns = "OBJECT", qualified = "progress.lang.object", parameters =
+ {
+ @LegacyParameter(name = "poKey", type = "OBJECT", qualified = "progress.lang.object", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ @Override
+ public object extends com.goldencode.p2j.oo.lang._BaseObject_> remove(final object extends com.goldencode.p2j.oo.lang._BaseObject_> _poKey)
+ {
+ object extends com.goldencode.p2j.oo.lang._BaseObject_> poKey = TypeFactory.initInput(_poKey);
+
+ return function(ClassClassMap.class, this, "Remove", object.class, new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "ContainsKey", returns = "LOGICAL", parameters =
+ {
+ @LegacyParameter(name = "poKey", type = "OBJECT", qualified = "progress.lang.object", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ @Override
+ public logical containsKey(final object extends com.goldencode.p2j.oo.lang._BaseObject_> _poKey)
+ {
+ object extends com.goldencode.p2j.oo.lang._BaseObject_> poKey = TypeFactory.initInput(_poKey);
+
+ return function(ClassClassMap.class, this, "ContainsKey", logical.class, new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "ContainsKey", returns = "LOGICAL", parameters =
+ {
+ @LegacyParameter(name = "poKey", type = "OBJECT", qualified = "progress.lang.class", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public logical containsKey_1(final object extends com.goldencode.p2j.oo.lang.LegacyClass> _poKey)
+ {
+ object extends com.goldencode.p2j.oo.lang.LegacyClass> poKey = TypeFactory.initInput(_poKey);
+
+ return function(ClassClassMap.class, this, "ContainsKey", logical.class, new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "ContainsValue", returns = "LOGICAL", parameters =
+ {
+ @LegacyParameter(name = "poValue", type = "OBJECT", qualified = "progress.lang.object", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ @Override
+ public logical containsValue(final object extends com.goldencode.p2j.oo.lang._BaseObject_> _poValue)
+ {
+ object extends com.goldencode.p2j.oo.lang._BaseObject_> poValue = TypeFactory.initInput(_poValue);
+
+ return function(ClassClassMap.class, this, "ContainsValue", logical.class, new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "ContainsValue", returns = "LOGICAL", parameters =
+ {
+ @LegacyParameter(name = "poValue", type = "OBJECT", qualified = "progress.lang.class", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public logical containsValue_1(final object extends com.goldencode.p2j.oo.lang.LegacyClass> _poValue)
+ {
+ object extends com.goldencode.p2j.oo.lang.LegacyClass> poValue = TypeFactory.initInput(_poValue);
+
+ return function(ClassClassMap.class, this, "ContainsValue", logical.class, new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Get", returns = "OBJECT", qualified = "progress.lang.object", parameters =
+ {
+ @LegacyParameter(name = "poKey", type = "OBJECT", qualified = "progress.lang.object", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ @Override
+ public object extends com.goldencode.p2j.oo.lang._BaseObject_> get(final object extends com.goldencode.p2j.oo.lang._BaseObject_> _poKey)
+ {
+ object extends com.goldencode.p2j.oo.lang._BaseObject_> poKey = TypeFactory.initInput(_poKey);
+
+ return function(ClassClassMap.class, this, "Get", object.class, new Block());
+ }
+
+ @LegacySignature(type = Type.METHOD, name = "Get", returns = "OBJECT", qualified = "progress.lang.class", parameters =
+ {
+ @LegacyParameter(name = "poKey", type = "OBJECT", qualified = "progress.lang.class", mode = "INPUT")
+ })
+ @LegacyResourceSupport(supportLvl = CVT_LVL_PARTIAL|RT_LVL_STUB)
+ public object extends com.goldencode.p2j.oo.lang.LegacyClass> get_1(final object extends com.goldencode.p2j.oo.lang.LegacyClass> _poKey)
+ {
+ object extends com.goldencode.p2j.oo.lang.LegacyClass> poKey = TypeFactory.initInput(_poKey);
+
+ return function(ClassClassMap.class, this, "Get", object.class, new Block());
+ }
+}
=== modified file 'src/com/goldencode/p2j/oo/core/collections/LegacyCollection.java'
--- src/com/goldencode/p2j/oo/core/collections/LegacyCollection.java 2021-06-09 14:35:48 +0000
+++ src/com/goldencode/p2j/oo/core/collections/LegacyCollection.java 2021-09-10 06:50:38 +0000
@@ -112,7 +112,7 @@
@LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_FULL)
public void __core_collections_LegacyCollection_constructor__()
{
- internalProcedure(LegacyCollection.class, this, "__core_collections_Collection_constructor__", new Block((Body) () ->
+ internalProcedure(LegacyCollection.class, this, "__core_collections_LegacyCollection_constructor__", new Block((Body) () ->
{
__core_collections_AbstractTtcollection_constructor__();
objects = new ArrayList