Skip to content

Commit

Permalink
Fix class name resolver for gatling-maven-plugin :
Browse files Browse the repository at this point in the history
Replace stripEnd method by substring method

With stripEnd
	45000Email.scala ==> 45000Emai (ko)
	Commit5Cx500Mailblablal ==> Commit5Cx500Mailblab (ko)
	TestScala.scala ==> TestS (ko)
	test_a.scala ==> test_ (ko)
	t123456.scala ==> t123456 (ok)
It seem to be incorrect when filename has any letter in [c, a, l, a]
  • Loading branch information
Cyril Couturier committed May 11, 2012
1 parent 8b6c894 commit 30bf5f7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ protected List<String> gatlingArgs() throws MojoExecutionException {
}

protected String fileNametoClassName(String fileName) {
return stripEnd(fileName, ".scala").replace(File.separatorChar, '.');
return fileName.substring(0, fileName.lastIndexOf('.')).replace(File.separatorChar, '.');
}

/**
Expand Down

0 comments on commit 30bf5f7

Please sign in to comment.