Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

ghusta/demo-rewrite-spring-sec-custom-dsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo for issue with recipe org.openrewrite.java.spring.security6.ApplyToWithLambdaDsl

Demo for issue with OpenRewrite’s recipe ApplyToWithLambdaDsl, present in module rewrite-spring.

Original request for recipe : openrewrite/rewrite-spring#449

Reproduce the problem

Run:

mvn rewrite:run

Got:

Error while visiting src\main\java\com\example\demorewritespringseccustomdsl\SecurityConfig.java: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "org.openrewrite.java.tree.JavaType$Method.getName()" is null
  org.openrewrite.java.tree.J$MethodInvocation.withName(J.java:3837)
  org.openrewrite.java.spring.boot2.ConvertToSecurityDslVisitor.lambda$computeAndMarkChain$2(ConvertToSecurityDslVisitor.java:241)
  java.base/java.util.Optional.ifPresent(Optional.java:178)
  org.openrewrite.java.spring.boot2.ConvertToSecurityDslVisitor.computeAndMarkChain(ConvertToSecurityDslVisitor.java:239)
  org.openrewrite.java.spring.boot2.ConvertToSecurityDslVisitor.lambda$visitMethodInvocation$0(ConvertToSecurityDslVisitor.java:87)
  java.base/java.util.Optional.map(Optional.java:260)
  org.openrewrite.java.spring.boot2.ConvertToSecurityDslVisitor.visitMethodInvocation(ConvertToSecurityDslVisitor.java:86)
  org.openrewrite.java.spring.boot2.ConvertToSecurityDslVisitor.visitMethodInvocation(ConvertToSecurityDslVisitor.java:34)
  ...

Additional context

Spring Security’s documentation:

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Languages