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

Select provider with pipe separator generates an exception #5

Open
garcimouche opened this issue Apr 15, 2018 · 0 comments
Open

Select provider with pipe separator generates an exception #5

garcimouche opened this issue Apr 15, 2018 · 0 comments

Comments

@garcimouche
Copy link

Description: Using a Pipe (|) delimiter with the "select" provider raises an error

Environnement: Ubuntu Linux 16.04 Java 8 (Hotspot 1.8.0_101)

Reproduce : use this snapshot in your config:

              {
                    "name": "gender",
                    "type": "int",
                    "provider": {
                        "name": "select",
                        "props":{
                            "items":"1|2|3",
                            "delimiter":"|"
                        }
                    }
                }

Exception Stack Trace

Exception in thread "main" java.lang.NumberFormatException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:598)
	at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
	at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:720)
	at java.util.concurrent.ForkJoinPool.invoke(ForkJoinPool.java:2616)
	at com.presidentio.testdatagenerator.OneTimeGenerator.generate(OneTimeGenerator.java:34)
	at com.presidentio.testdatagenerator.AbstractGenerator.generate(AbstractGenerator.java:30)
	at com.presidentio.testdatagenerator.Starter.start(Starter.java:57)
	at com.presidentio.testdatagenerator.Starter.main(Starter.java:42)
Caused by: java.lang.NumberFormatException: For input string: "|"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.valueOf(Integer.java:766)
	at com.presidentio.testdatagenerator.provider.TypeConverter.convert(TypeConverter.java:27)
	at com.presidentio.testdatagenerator.provider.SelectProvider.nextValue(SelectProvider.java:54)
	at com.presidentio.testdatagenerator.GenerateTask.generateEntity(GenerateTask.java:47)
	at com.presidentio.testdatagenerator.GenerateTask.compute(GenerateTask.java:81)
	at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
	at java.util.concurrent.ForkJoinTask.invokeAll(ForkJoinTask.java:843)
	at com.presidentio.testdatagenerator.InitTask.compute(InitTask.java:55)
	at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant