We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b69907d commit 9fe1a18Copy full SHA for 9fe1a18
src/scala/io/bazel/rules_scala/jmh_support/BenchmarkGenerator.scala
@@ -189,17 +189,17 @@ object BenchmarkGenerator {
189
.stripSuffix(".class")
190
.replace(separator, ".")
191
192
- var index = -1
193
- do {
194
- s = s.substring(index + 1)
+ var index = 0
+ while (index != -1) {
+ s = s.substring(index)
195
try {
196
return Some(Class.forName(s, false, cl))
197
} catch {
198
case _: ClassNotFoundException =>
199
// ignore and try next one
200
index = s.indexOf('.')
201
}
202
- } while (index != -1)
+ }
203
204
log(s"Failed to find class for path $path")
205
None
0 commit comments