Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 719411351
  • Loading branch information
Jesse-Good authored and copybara-github committed Jan 24, 2025
1 parent da1a998 commit fa98c03
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build --java_language_version=11
build --java_language_version=16
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ protected void visitHtmlCloseTagNode(HtmlCloseTagNode node) {

@Override
protected void visitSoyNode(SoyNode node) {
if (node instanceof BlockNode) {
visitBlock((BlockNode) node);
} else if (node instanceof ParentSoyNode) {
visitChildren((ParentSoyNode<?>) node);
if (node instanceof BlockNode block) {
visitBlock(block);
} else if (node instanceof ParentSoyNode<?> parent) {
visitChildren(parent);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ protected void visitLetContentNode(LetContentNode node) {

@Override
protected void visitSoyNode(SoyNode node) {
if (node instanceof ParentSoyNode) {
visitChildren((ParentSoyNode) node);
if (node instanceof ParentSoyNode<?> parent) {
visitChildren(parent);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ protected void visitHtmlCloseTagNode(HtmlCloseTagNode node) {

@Override
protected void visitSoyNode(SoyNode node) {
if (node instanceof ParentSoyNode) {
visitChildren((ParentSoyNode) node);
if (node instanceof ParentSoyNode<?> parent) {
visitChildren(parent);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions java/src/com/google/template/soy/passes/CheckSkipPass.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public void visitSkipNode(SkipNode skipNode) {

@Override
public void visitSoyNode(SoyNode node) {
if (node instanceof ParentSoyNode) {
visitChildren((ParentSoyNode<?>) node);
if (node instanceof ParentSoyNode<?> parent) {
visitChildren(parent);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ public void visitSoyNode(SoyNode node) {
visitBlockNode((ParentSoyNode) node);
return;
}
if (node instanceof ParentSoyNode) {
visitChildren((ParentSoyNode) node);
if (node instanceof ParentSoyNode<?> parent) {
visitChildren(parent);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ protected void visitTemplateElementNode(TemplateElementNode node) {

@Override
protected void visitSoyNode(SoyNode node) {
if (node instanceof ExprHolderNode) {
((ExprHolderNode) node).getExprList().forEach(exprVisitor::exec);
if (node instanceof ExprHolderNode exprHolder) {
exprHolder.getExprList().forEach(exprVisitor::exec);
}
if (node instanceof ParentSoyNode) {
visitChildren((ParentSoyNode<?>) node);
if (node instanceof ParentSoyNode<?> parent) {
visitChildren(parent);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ private void exitConditionBranch(HtmlMatcherConditionNode ifConditionNode) {

@Override
protected void visitSoyNode(SoyNode node) {
if (node instanceof ParentSoyNode) {
visitChildren((ParentSoyNode<?>) node);
if (node instanceof ParentSoyNode<?> parent) {
visitChildren(parent);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>11</java.version>
<java.version>23</java.version>
<guice.version>7.0.0</guice.version>
<guava.version>32.1.1-jre</guava.version>
<asm.version>9.5</asm.version>
Expand Down

0 comments on commit fa98c03

Please sign in to comment.