File tree 2 files changed +7
-4
lines changed
src/main/scala/com/fasterxml/jackson/module/scala
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ object ScalaAnnotationIntrospector extends NopAnnotationIntrospector with ValueI
168
168
}
169
169
170
170
private def _descriptorFor (clz : Class [_]): Option [BeanDescriptor ] = {
171
- if (clz.extendsScalaClass || clz.hasSignature) {
171
+ if (clz.extendsScalaClass( true ) || clz.hasSignature) {
172
172
val key = new ClassKey (clz)
173
173
Option (ScalaAnnotationIntrospectorModule ._descriptorCache.get(key)) match {
174
174
case Some (result) => Some (result)
@@ -211,7 +211,7 @@ object ScalaAnnotationIntrospector extends NopAnnotationIntrospector with ValueI
211
211
pkg.exists(_.getName.startsWith(" scala." ))
212
212
213
213
private def isMaybeScalaBeanType (cls : Class [_]): Boolean =
214
- (cls.extendsScalaClass || cls.hasSignature) &&
214
+ (cls.extendsScalaClass( true ) || cls.hasSignature) &&
215
215
! isScalaPackage(Option (cls.getPackage))
216
216
217
217
private def isScala (a : Annotated ): Boolean = {
Original file line number Diff line number Diff line change @@ -7,10 +7,13 @@ import scala.util.Try
7
7
8
8
trait ClassW extends PimpedType [Class [_]] {
9
9
10
- def extendsScalaClass : Boolean = {
10
+ @ deprecated(" use extendsScalaClass(Boolean) instead" , " 2.14.0" )
11
+ def extendsScalaClass : Boolean = extendsScalaClass(true )
12
+
13
+ def extendsScalaClass (supportScala3Classes : Boolean ): Boolean = {
11
14
ClassW .productClass.isAssignableFrom(value) ||
12
15
isScalaObject ||
13
- TastyUtil .hasTastyFile(value)
16
+ (supportScala3Classes && TastyUtil .hasTastyFile(value) )
14
17
}
15
18
16
19
def hasSignature : Boolean = {
You can’t perform that action at this time.
0 commit comments