Skip to content

java8 type annotations missing in bytecode #11295

Open
@scf37

Description

@scf37

Given following code:

import javax.validation.valueextraction.ExtractedValue
import javax.validation.valueextraction.ValueExtractor
import javax.validation.valueextraction.ValueExtractor.ValueReceiver

class OptionValueExtractor extends ValueExtractor[Option[_@ExtractedValue]] {

  override def extractValues(originalValue: Option[_], receiver: ValueReceiver) = {
    receiver.value( null, originalValue.orNull)
  }
}

I expect @ExtractedValue annotation to be present in bytecode.
But it seems it is not there.

another example:

import javax.validation.constraints.NotNull
case class OptionData(
  option: Option[String @NotNull(message = "NotNull on Option value")]
)

Annotation is missing from bytecode as well

Scala 2.12.7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions