Skip to content

Commit ce7f8c3

Browse files
authored
Fix deprecation warning in ScalaPBWorker (#1367)
Relates to #1364
1 parent 088c087 commit ce7f8c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scala/scripts/ScalaPBWorker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ object ScalaPBWorker extends Worker.Interface {
2929
classes(className + "$").getField("MODULE$").get(null).asInstanceOf[ProtocCodeGenerator]
3030
} catch {
3131
case _: NoSuchFieldException | _: java.lang.ClassNotFoundException =>
32-
classes(className).newInstance.asInstanceOf[ProtocCodeGenerator]
32+
classes(className).getDeclaredConstructor().newInstance().asInstanceOf[ProtocCodeGenerator]
3333
}
3434

3535
private val generators: Seq[(String, ProtocCodeGenerator)] = sys.props.toSeq.collect {

0 commit comments

Comments
 (0)