mirror of https://github.com/sbt/sbt.git
classfile analyzer should pass full name to AnalysisCallback
This commit is contained in:
parent
1ed64e4d5f
commit
9414f98f2c
|
|
@ -55,19 +55,15 @@ private[sbt] object Analyze
|
|||
{
|
||||
for (url <- Option(loader.getResource(tpe.replace('.', '/') + ClassExt)); file <- IO.urlAsFile(url))
|
||||
{
|
||||
val name = {
|
||||
val lastDot = tpe.lastIndexOf('.')
|
||||
if (lastDot < 0) tpe else tpe.substring(lastDot + 1)
|
||||
}
|
||||
if(url.getProtocol == "jar")
|
||||
analysis.binaryDependency(file, name, source)
|
||||
analysis.binaryDependency(file, tpe, source)
|
||||
else
|
||||
{
|
||||
assume(url.getProtocol == "file")
|
||||
productToSource.get(file) match
|
||||
{
|
||||
case Some(dependsOn) => analysis.sourceDependency(dependsOn, source)
|
||||
case None => analysis.binaryDependency(file, name, source)
|
||||
case None => analysis.binaryDependency(file, tpe, source)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue