Skip to content

Commit 6720c59

Browse files
Merge pull request #267 from oracle/slashednamefix
WDT-87 Allow slashes in object names, for SOA create/deploy, full fix…
2 parents 4c64142 + b2e5dc5 commit 6720c59

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

core/src/main/antlr4/oracle/weblogic/deploy/yaml/Yaml.g4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ fragment ID_START
280280
fragment ID_CONTINUE
281281
: ID_START
282282
| [0-9]
283-
| [. ()]
283+
| [. ()/]
284284
;
285285

286286
// to support variables in IDs that will need to be quoted because of the curly braces
@@ -292,7 +292,7 @@ fragment QUOTED_ID_START
292292

293293
fragment QUOTED_ID_CONTINUE
294294
: ID_CONTINUE
295-
| [@#\-(){}[\]:]
295+
| [@#\-(){}[\]:/]
296296
;
297297

298298
fragment SQUOTED_STRING_CHARS

core/src/test/java/oracle/weblogic/deploy/yaml/YamlParserTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@
2222
import org.antlr.v4.runtime.atn.PredictionMode;
2323
import org.antlr.v4.runtime.tree.ParseTree;
2424
import org.antlr.v4.runtime.tree.ParseTreeWalker;
25-
import org.antlr.v4.runtime.tree.TerminalNode;
2625
import org.junit.Assert;
2726
import org.junit.Before;
2827
import org.junit.Test;
29-
import org.python.core.PyObject;
3028

3129
public class YamlParserTest extends YamlBaseListener {
3230
private static final boolean DEBUG = System.getProperty("DEBUG") != null;
@@ -467,6 +465,7 @@ private Object getScalarValue(String name, YamlParser.ValueContext valueContext)
467465
text = nameCtx.NAME().getText();
468466
if (!StringUtils.isEmpty(text)) {
469467
value = text.trim();
468+
value = StringUtils.stripQuotes(value.toString()); // similar to AbstractYamlTranslator
470469
} else {
471470
value = null;
472471
}

0 commit comments

Comments
 (0)