Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.7.1 snapshot #25

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven

on:
push:
branches: [ "v2.7.1-SNAPSHOT" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
# - name: Update dependency graph
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
23 changes: 21 additions & 2 deletions otc-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>org.otcframework</groupId>
<artifactId>otcframework</artifactId>
<version>2.7.0-SNAPSHOT</version>
<version>2.7.1-SNAPSHOT</version>
</parent>
<artifactId>otc-common</artifactId>

<name>${project.groupId}:${project.artifactId}</name>
<description>OTC Commons module</description>
<description>OTC Commons module (JDK 11)</description>

<build>
<plugins>
Expand Down Expand Up @@ -83,11 +83,25 @@
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!--
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand All @@ -96,6 +110,11 @@
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</dependency>
-->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@
/**
* The Interface OtcConstants.
*/
// TODO: Auto-generated Javadoc
public interface OtcConstants {

/**
* The Enum LogLevel.
*/
static enum LogLevel {
enum LogLevel {

/** The error. */
ERROR("error"),
Expand Down Expand Up @@ -61,10 +60,11 @@ static enum LogLevel {
*
* @return the string
*/
@Override
public String toString() {
return logLevel;
}
};
}

/**
* The Enum ALGORITHM_ID.
Expand All @@ -81,7 +81,7 @@ enum ALGORITHM_ID {
FLAT,
/** The collections. */
COLLECTIONS
};
}

/**
* The Enum TARGET_SOURCE.
Expand All @@ -92,7 +92,7 @@ enum TARGET_SOURCE {
TARGET,
/** The source. */
SOURCE
};
}

/** The execute otc converter. */
String EXECUTE_OTC_CONVERTER = "converter";
Expand All @@ -101,7 +101,7 @@ enum TARGET_SOURCE {
String EXECUTE_OTC_MODULE = "module";

/** The regex otc on dot. */
String REGEX_OTC_ON_DOT = new String("[.](?![^<]*>)(?![^\\[]*\\])(?![^\\(]*\\))");
String REGEX_OTC_ON_DOT = "[.](?![^<]*>)(?![^\\[]*\\])(?![^\\(]*\\))";

/** The regex check otcchain. */
String REGEX_CHECK_OTCCHAIN = "(?s)from:\\sobjectPath:";
Expand Down Expand Up @@ -155,7 +155,7 @@ enum TARGET_SOURCE {
String OTC_SCRIPT_EXTN = ".otcs";

/** The otc generatedcode extn. */
String OTC_GENERATEDCODE_EXTN = ".java";
String SOURCE_CODE_EXTN = ".java";

String CLASS_EXTN = ".class";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
/**
* The Class CompilationReport.
*/
// TODO: Auto-generated Javadoc
public final class CompilationReport {

/** The otc namespace. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
/**
* The Class OtcCommandContext.
*/
// TODO: Auto-generated Javadoc
public class OtcCommandContext {

/** The command id. */
Expand Down Expand Up @@ -60,10 +59,10 @@ public class OtcCommandContext {
/** The current collection token index. */
public int currentCollectionTokenIndex = 0;

public OtcCommandContext() {}
/**
* Clone.
*
* @return the otc command context
*/
@Override
public OtcCommandContext clone() {
Expand Down Expand Up @@ -92,11 +91,14 @@ public boolean isLeafParent() {
return true;
}
return false;
} else if (otcCommandDto.otcTokenIndex == otcTokens.length - 1) {
if (otcCommandDto.collectionDescriptor.isCollection() || otcCommandDto.collectionDescriptor.isMap()) {
return true;
}
// return childOCD.collectionDescriptor.isNormal();
} else if (otcCommandDto.otcTokenIndex == otcTokens.length - 1 &&
otcCommandDto.collectionDescriptor.isCollection() || otcCommandDto.collectionDescriptor.isMap()) {
return true;
}
// if (otcCommandDto.otcTokenIndex == otcTokens.length - 1) {
// return otcCommandDto.collectionDescriptor.isCollection() || otcCommandDto.collectionDescriptor.isMap();
// }
return false;
}

Expand All @@ -114,6 +116,10 @@ public boolean isLeaf() {
}
}
return false;
// return (otcCommandDto.otcTokenIndex >= otcTokens.length - 1 &&
// otcCommandDto.collectionDescriptor.isNormal() || otcCommandDto.collectionDescriptor.isMapKey()
// || otcCommandDto.collectionDescriptor.isMapValue()
// || otcCommandDto.collectionDescriptor.isCollectionMember());
}

/**
Expand Down Expand Up @@ -195,6 +201,7 @@ public boolean hasMapValueMember() {
return true;
}
return false;
// return rawOtcTokens[otcCommandDto.otcTokenIndex].contains(OtcConstants.MAP_VALUE_REF);
}

/**
Expand Down Expand Up @@ -227,6 +234,8 @@ public boolean isCurrentTokenAnchored() {
return true;
}
return false;
// String otcToken = rawOtcTokens[otcCommandDto.otcTokenIndex];
// return otcToken.contains(OtcConstants.ANCHOR);
}

/**
Expand All @@ -240,6 +249,8 @@ public boolean isPreAnchored() {
return true;
}
return false;
// String otcToken = rawOtcTokens[otcCommandDto.otcTokenIndex];
// return (otcToken.contains(OtcConstants.PRE_ANCHOR) || otcToken.contains(OtcConstants.MAP_PRE_ANCHOR));
}

/**
Expand All @@ -253,6 +264,8 @@ public boolean isPostAnchored() {
return true;
}
return false;
// String otcToken = rawOtcTokens[otcCommandDto.otcTokenIndex];
// return (otcToken.contains(OtcConstants.POST_ANCHOR) || otcToken.contains(OtcConstants.MAP_POST_ANCHOR));
}

/**
Expand Down
Loading
Loading