Skip to content

Commit ea4e48b

Browse files
authored
more robust annotation retrieval (#287)
This started to fail with 2.13.6 as annotation.toString was just `deprecated` for the companion object.
1 parent a1e5b3c commit ea4e48b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/com/typesafe/genjavadoc/BasicTransform.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ trait BasicTransform { this: TransformCake =>
160160
private def deprecationInfo(d: ImplDef): Option[DeprecationInfo] = deprecationInfo(d.symbol)
161161
private def deprecationInfo(symbol: Symbol): Option[DeprecationInfo] =
162162
if (symbol.isDeprecated) {
163-
val deprec = symbol.annotations.find(_.toString contains "deprecated(").get
163+
val deprec = symbol.getAnnotation(definitions.DeprecatedAttr).get
164164
Some(DeprecationInfo(deprec.stringArg(0).getOrElse(""), deprec.stringArg(1).getOrElse("")))
165165
} else None
166166

0 commit comments

Comments
 (0)