Skip to content

Commit

Permalink
Merge branch 'release/V2.14.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
gquerret committed Nov 29, 2021
2 parents 645d363 + edc6baf commit d80606f
Show file tree
Hide file tree
Showing 63 changed files with 807 additions and 719 deletions.
20 changes: 10 additions & 10 deletions coverage-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>coverage-report</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>

<name>JaCoCo report</name>
<description>Fake module for code coverage report in SonarQube</description>
Expand All @@ -20,37 +20,37 @@
<dependency>
<groupId>eu.rssw.openedge.rcode</groupId>
<artifactId>rcode-reader</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>
</dependency>
<dependency>
<groupId>eu.rssw.sonar.openedge</groupId>
<artifactId>sonar-openedge-plugin</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>
</dependency>
<dependency>
<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>proparse</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>
</dependency>
<dependency>
<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>profiler-parser</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>
</dependency>
<dependency>
<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>database-parser</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>
</dependency>
<dependency>
<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>listing-parser</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>
</dependency>
<dependency>
<groupId>eu.rssw.openedge.checks</groupId>
<artifactId>openedge-checks</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>
</dependency>
</dependencies>

Expand All @@ -60,7 +60,7 @@
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.7.0.1746</version>
<version>3.9.0.2155</version>
</plugin>
</plugins>
</pluginManagement>
Expand All @@ -69,7 +69,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<version>0.8.7</version>
<executions>
<execution>
<goals>
Expand Down
12 changes: 6 additions & 6 deletions database-parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>database-parser</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>

<name>OpenEdge database definition lexer and parser</name>
<description>OpenEdge dump files parser</description>
Expand Down Expand Up @@ -56,12 +56,12 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1.1-jre</version>
<version>31.0.1-jre</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<version>1.7.32</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
Expand All @@ -72,7 +72,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
<version>1.7.32</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -83,7 +83,7 @@
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.7.0.1746</version>
<version>3.9.0.2155</version>
</plugin>
</plugins>
</pluginManagement>
Expand All @@ -92,7 +92,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<version>0.8.7</version>
<executions>
<execution>
<goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ addConstraintOption:
footer:
'.' 'PSC'? ('bufpool' '=' 'yes')? (UNQUOTED_STRING '=' UNQUOTED_STRING)? ( '.' NUMBER? )?;

SINGLE_LINE_COMMENT:
'#' ~[\r\n]* -> channel(HIDDEN);

fragment INT:
('0'..'9');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import eu.rssw.antlr.database.DumpFileGrammarParser.TableAreaContext;
import eu.rssw.antlr.database.DumpFileGrammarParser.TableDescriptionContext;
import eu.rssw.antlr.database.DumpFileGrammarParser.TableDumpNameContext;
import eu.rssw.antlr.database.DumpFileGrammarParser.TableFrozenContext;
import eu.rssw.antlr.database.DumpFileGrammarParser.TableTriggerContext;
import eu.rssw.antlr.database.DumpFileGrammarParser.TableValMsgContext;
import eu.rssw.antlr.database.DumpFileGrammarParser.UpdateIndexBPContext;
Expand Down Expand Up @@ -226,6 +227,14 @@ public Void visitTableTrigger(TableTriggerContext ctx) {
return null;
}

@Override
public Void visitTableFrozen(TableFrozenContext ctx) {
if (!tables.isEmpty())
tables.peek().setFrozen(true);

return null;
}

// *************
// INDEX SECTION
// *************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class Table {
private String description;
private String dumpName;
private String valMsg;
private boolean frozen;

private Collection<Field> fields = new ArrayList<>();
private Collection<Index> indexes = new ArrayList<>();
Expand All @@ -53,6 +54,14 @@ public void setArea(String area) {
this.area = area;
}

public boolean isFrozen() {
return frozen;
}

public void setFrozen(boolean frozen) {
this.frozen = frozen;
}

public String getLabel() {
return label;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;

import java.io.ByteArrayInputStream;
Expand Down Expand Up @@ -53,6 +54,15 @@ public void testInputStream() throws IOException {
assertEquals(db2.getTable("Tbl1").getDescription(), "éç");
}

@Test
public void testComments() throws IOException {
InputStream stream = new FileInputStream("src/test/resources/comments.df");
DatabaseDescription db = DumpFileUtils.getDatabaseDescription(stream, Charset.forName("utf-8"), "sp2k");
assertNull(db.getTable("Tbl1").getDescription());
assertEquals(db.getTable("Tbl1").getArea(), "XXX");
assertTrue(db.getTable("Tbl1").isFrozen());
}

@Test
public void testSports2000() throws IOException {
DatabaseDescription db = DumpFileUtils.getDatabaseDescription(new File("src/test/resources/sp2k.df"));
Expand Down
2 changes: 1 addition & 1 deletion database-parser/src/test/resources/ascIndex.df
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ADD FIELD "Fld2" OF "Tab1" AS character
FORMAT "x(24)"
MANDATORY

ADD FIELD "Fld2" OF "Tab1" AS character
ADD FIELD "Fld3" OF "Tab1" AS character
FORMAT "x(24)"
MANDATORY

Expand Down
12 changes: 12 additions & 0 deletions database-parser/src/test/resources/comments.df
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Comment here, just make sure it doesn't break anything
# Nested (?) # comments
ADD TABLE "Tbl1"
AREA "XXX" # Comment on area name
# DESCRIPTION "xyz"
FROZEN

.
PSC
cpstream=iso8859-1
.
0000000000
12 changes: 6 additions & 6 deletions listing-parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>listing-parser</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>

<name>OpenEdge listing so-called parser</name>
<description>OpenEdge listing files parser</description>
Expand Down Expand Up @@ -49,12 +49,12 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1.1-jre</version>
<version>31.0.1-jre</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<version>1.7.32</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
Expand All @@ -65,7 +65,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
<version>1.7.32</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -76,7 +76,7 @@
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.7.0.1746</version>
<version>3.9.0.2155</version>
</plugin>
</plugins>
</pluginManagement>
Expand All @@ -85,7 +85,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<version>0.8.7</version>
<executions>
<execution>
<goals>
Expand Down
14 changes: 7 additions & 7 deletions openedge-checks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>eu.rssw.openedge.checks</groupId>
<artifactId>openedge-checks</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>

<name>OpenEdge checks</name>
<description>OpenEdge checks</description>
Expand Down Expand Up @@ -49,18 +49,18 @@
<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-plugin-api</artifactId>
<version>7.9.4</version>
<version>7.9.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>database-parser</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>
</dependency>
<dependency>
<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>proparse</artifactId>
<version>2.14.4</version>
<version>2.14.5</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
Expand All @@ -71,7 +71,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
<version>1.7.32</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -82,7 +82,7 @@
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.7.0.1746</version>
<version>3.9.0.2155</version>
</plugin>
</plugins>
</pluginManagement>
Expand All @@ -91,7 +91,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<version>0.8.7</version>
<executions>
<execution>
<goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,8 @@ public int getStoretype() {
return IConstants.ST_DBTABLE;
}

@Override
public boolean isNoUndo() {
return false;
}
}
Loading

0 comments on commit d80606f

Please sign in to comment.