Darren Sargent created KAFKA-796: ------------------------------------ Summary: Kafka Scala classes should declare thrown checked exceptions to be Java friendly Key: KAFKA-796 URL: https://issues.apache.org/jira/browse/KAFKA-796 Project: Kafka Issue Type: Bug Components: core Reporter: Darren Sargent Priority: Minor
For example, ConsumerIterator makeNext() method calls BlockingQueue.take() which declares it throws InterruptedException. However, since makeNext() fails to redeclare this exception, Java client code will be unable to catch it -- javac will complain that InterruptedException cannot be thrown. Workaround - in the Java client code, catch Exception then check if instanceof InterruptedException and respond accordingly. But really the Scala method should redeclare checked exceptions for Java's benefit, even though it's not required for Scala since there are no checked exceptions. There may be other classes where this needs to be done as well. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira