Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Url regular parsing error : java.lang.IllegalArgumentException: integer expected at position 2 #515

Closed
muyuanjin opened this issue Jun 1, 2023 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@muyuanjin
Copy link
Contributor

muyuanjin commented Jun 1, 2023

Your Environment(您的使用环境)

spring-boot-web 2.7.11

  • smart-doc version: 2.6.9
  • plugin version : smart-doc-maven-plugin 2.6.9
  • build tool version(maven or gradle): maven 3.8.1

Expected Behavior(您期望的结果)

Current Behavior(当前结果)

[ERROR] 
java.lang.IllegalArgumentException: integer expected at position 2
    at dk.brics.automaton.RegExp.parseRepeatExp (Unknown Source)
    at dk.brics.automaton.RegExp.parseConcatExp (Unknown Source)
    at dk.brics.automaton.RegExp.parseInterExp (Unknown Source)
    at dk.brics.automaton.RegExp.parseUnionExp (Unknown Source)
    at dk.brics.automaton.RegExp.<init> (Unknown Source)
    at dk.brics.automaton.RegExp.<init> (Unknown Source)
    at com.mifmif.common.regex.Generex.createRegExp (Generex.java:117)
    at com.mifmif.common.regex.Generex.<init> (Generex.java:85)
    at com.mifmif.common.regex.Generex.<init> (Generex.java:76)
    at com.power.doc.utils.DocUtil.formatAndRemove (DocUtil.java:260)
    at com.power.doc.template.IRestDocTemplate.buildReqJson (IRestDocTemplate.java:774)
    at com.power.doc.template.IRestDocTemplate.buildEntryPointMethod (IRestDocTemplate.java:423)
    at com.power.doc.template.IRestDocTemplate.processApiData (IRestDocTemplate.java:65)
    at com.power.doc.template.SpringBootDocBuildTemplate.getApiData (SpringBootDocBuildTemplate.java:54)
    at com.power.doc.builder.HtmlApiDocBuilder.buildApiDoc (HtmlApiDocBuilder.java:90)
    at com.smartdoc.mojo.HtmlMojo.executeMojo (HtmlMojo.java:48)
    at com.smartdoc.mojo.BaseDocsGeneratorMojo.execute (BaseDocsGeneratorMojo.java:165)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
    at java.lang.reflect.Method.invoke (Unknown Source)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main (Launcher.java:47)

Possible Solution(bug解决建议)

Steps to Reproduce (Bug产生步骤,请尽量提供用例代码)

  1. my controller look like :
    org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController
@Controller
@RequestMapping("${server.error.path:${error.path:/error}}")
public class BasicErrorController extends AbstractErrorController {
  1. maven debug:
com.power.doc.utils.DocUtil#formatAndRemove("/demo-prototype/${server.error.path:${error.path:/error}}",emptyMap)
line 260: Generex generex =  new Generex("${error.path")

Context(Bug影响描述)

unable to output doc

@muyuanjin muyuanjin added the bug Something isn't working label Jun 1, 2023
@shalousun
Copy link
Collaborator

@muyuanjin Welcome to contribute by submitting a pull request (PR)

shalousun added a commit that referenced this issue Jun 10, 2023
@shalousun shalousun added this to the 2.7.0 milestone Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants