Skip to content

Commit 96d41c9

Browse files
committed
Use -XDignore.symbol.file to suppress warnings about sun.misc.Unsafe usage
1 parent c0c0ba6 commit 96d41c9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,8 @@
11621162
<javacArg>${java.version}</javacArg>
11631163
<javacArg>-target</javacArg>
11641164
<javacArg>${java.version}</javacArg>
1165+
<!-- This option is needed to suppress warnings from sun.misc.Unsafe usage -->
1166+
<javacArg>-XDignore.symbol.file</javacArg>
11651167
</javacArgs>
11661168
<!-- The following plugin is required to use quasiquotes in Scala 2.10 and is used
11671169
by Spark SQL for code generation. -->
@@ -1184,6 +1186,10 @@
11841186
<encoding>UTF-8</encoding>
11851187
<maxmem>1024m</maxmem>
11861188
<fork>true</fork>
1189+
<compilerArgs>
1190+
<!-- This option is needed to suppress warnings from sun.misc.Unsafe usage -->
1191+
<arg>-XDignore.symbol.file</arg>
1192+
</compilerArgs>
11871193
</configuration>
11881194
</plugin>
11891195
<!-- Surefire runs all Java tests -->

project/SparkBuild.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ object SparkBuild extends PomBuild {
140140
javacOptions in (Compile, doc) ++= {
141141
val Array(major, minor, _) = System.getProperty("java.version").split("\\.", 3)
142142
if (major.toInt >= 1 && minor.toInt >= 8) Seq("-Xdoclint:all", "-Xdoclint:-missing") else Seq.empty
143-
}
143+
},
144+
// This option is needed to suppress warnings from sun.misc.Unsafe usage
145+
javacOptions in Compile += "-XDignore.symbol.file"
144146
)
145147

146148
def enable(settings: Seq[Setting[_]])(projectRef: ProjectRef) = {

0 commit comments

Comments
 (0)