Bryan Head
Bryan Head

Reputation: 12580

Get IntelliJ to respect multiple @throws annotations in Scala dependency from a Java project

I have a Java project which depends on a Scala project. Inside that Scala project, there is a particular method that uses two @throws(classOf[<some exception>]):

  @throws(classOf[ExtensionException])
  @throws(classOf[LogoException])
  def perform(args: Array[Argument], context: Context)

However, intellij doesn't seem to know about both when I override the method:

enter image description here

The error is that the base method does not throw ExtensionException. The code compiles fine. Note that LogoException appears to be okay when I delete ExtensionException from throws declaration.

So, is there a way I can get Intellij to respect both throws declarations? Or is this a bug?

Upvotes: 2

Views: 123

Answers (1)

Andy MacKinlay
Andy MacKinlay

Reputation: 1374

I'm pretty sure this is a bug in IntelliJ. I've run into it myself, and reported it at http://youtrack.jetbrains.com/issue/SCL-7454

Upvotes: 1

Related Questions