diff --git a/core/src/test/scala/org/apache/spark/TestUtils.scala b/core/src/test/scala/org/apache/spark/TestUtils.scala index de7b2a1cb47dd..667cf84503544 100644 --- a/core/src/test/scala/org/apache/spark/TestUtils.scala +++ b/core/src/test/scala/org/apache/spark/TestUtils.scala @@ -114,7 +114,7 @@ object TestUtils { def createCompiledClassWithValue(className: String, value: Integer, destDir: File): File = { val compiler = ToolProvider.getSystemJavaCompiler val sourceFile = new JavaSourceFromString(className, - "public class " + className + " { override String toString() { return \"" + value + "\";}}") + "public class " + className + " { @Override public String toString() { return \"" + value + "\";}}") // Calling this outputs a class file in pwd. It's easier to just rename the file than // build a custom FileManager that controls the output location.