Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
jchambers-ln committed Mar 28, 2024
1 parent ff67127 commit 18cec2f
Showing 1 changed file with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ else if (currentrec != null)


@Override
public void enterSetdefaultvalall(EclRecordParser.SetdefaultvalallContext ctx) {
public void enterSetdefaultvalall(EclRecordParser.SetdefaultvalallContext ctx)
{
String val = ctx.getChild(2).getText();
val = val.replace("'", "");

Expand All @@ -424,23 +425,30 @@ else if (currentrec != null)
public void enterSetdefaultval(EclRecordParser.SetdefaultvalContext ctx)
{
String val = ctx.getChild(2).getText();
if(val.length() >= 2){
if(val.substring(0, 2).equals("['")) {
if(val.length() >= 2)
{
if(val.substring(0, 2).equals("['"))
{
val = val.substring(2, val.length());
}
}
if(val.length() >= 2){
if(val.substring(val.length()-2, val.length()).equals("']")) {
if(val.length() >= 2)
{
if(val.substring(val.length()-2, val.length()).equals("']"))
{
val = val.substring(0, val.length() - 2);
}
}
val = val.replace("']", "");

if(val.contains("','")){
if(!val.startsWith("'")) {
if(val.contains("','"))
{
if(!val.startsWith("'"))
{
val = "'" + val;
}
if(!val.endsWith("'")){
if(!val.endsWith("'"))
{
val = val + "'";
}
}
Expand All @@ -452,8 +460,6 @@ else if (currentrec != null)
{
currentrec.setColumnValue(val);
}


}

/**
Expand All @@ -467,10 +473,12 @@ else if (currentrec != null)
public void enterXpath(EclRecordParser.XpathContext ctx)
{
String val = ctx.getChild(2).getText();
if (val.startsWith("'")) {
if (val.startsWith("'"))
{
val=val.substring(1);
}
if (val.endsWith("'")) {
if (val.endsWith("'"))
{
val=val.substring(0,val.length()-1);
}
if (currentfield != null)
Expand Down

0 comments on commit 18cec2f

Please sign in to comment.