Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private LambdaRestrictionStrategy() {
@Override
public void apply(final Traversal.Admin<?, ?> traversal) {
for (final Step<?, ?> step : traversal.getSteps()) {
if ((step instanceof LambdaHolder || step instanceof ComparatorHolder) && step.toString().contains("lambda"))
if ((step instanceof LambdaHolder || step instanceof ComparatorHolder) && step.toString().toLowerCase().contains("lambda"))
throw new VerificationException("The provided traversal contains a lambda step: " + step, traversal);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,15 @@ public void shouldImportWildcardFields() throws Exception {
.fieldsImports(Collections.singletonList(Math.class.getCanonicalName() + "#*")).create();

final DefaultImportCustomizer customizer = (DefaultImportCustomizer) module.getCustomizers().get()[0];
assertThat(customizer.getFieldImports(), is(new HashSet<>(
Arrays.asList(Math.class.getField("PI"), Math.class.getField("E")))));
// Math.TAU was added in Java 19
final HashSet<Field> expectedFields = new HashSet<>(Arrays.asList(
Math.class.getField("PI"), Math.class.getField("E")));
try {
expectedFields.add(Math.class.getField("TAU"));
} catch (NoSuchFieldException ignored) {
// TAU not available in Java < 19
}
assertThat(customizer.getFieldImports(), is(expectedFields));
}

@Test
Expand Down
32 changes: 32 additions & 0 deletions gremlin-groovy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,38 @@ limitations under the License.
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-annotations</artifactId>
<version>${project.version}</version>
</path>
<path>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-core</artifactId>
<version>${project.version}</version>
</path>
<path>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-shaded</artifactId>
<version>${project.version}</version>
</path>
<path>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-language</artifactId>
<version>${project.version}</version>
</path>
<path>
<groupId>com.squareup</groupId>
<artifactId>javapoet</artifactId>
<version>${javapoet.version}</version>
</path>
<path>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>${antlr4.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ limitations under the License.
<commons.text.version>1.10.0</commons.text.version>
<cucumber.version>7.21.1</cucumber.version>
<exp4j.version>0.4.8</exp4j.version>
<groovy.version>4.0.25</groovy.version>
<groovy.version>4.0.30-SNAPSHOT</groovy.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be upgraded to a SNAPSHOT version in order to work? I would like to stick to fully released versions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I saw the reference to this in the PR description. I believe this PR will unfortunately remain blocked until groovy merges and releases their fix.

<guice.version>4.2.3</guice.version>
<hadoop.version>3.3.3</hadoop.version>
<hamcrest.version>3.0</hamcrest.version>
Expand Down