Browse Source

LIVY-363. Method toURL in Utils.scala is deprecated

[https://issues.cloudera.org/browse/LIVY-363](https://issues.cloudera.org/browse/LIVY-363)
Method toURL in Utils.scala is deprecated. The toURL() method of File does not properly escape characters that aren't valid in a URL.

Author: davidxdh <xu.donghui@zte.com.cn>

Closes #9 from davidxdh/dev363.
davidxdh 7 years ago
parent
commit
c591fcce6e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/src/main/scala/com/cloudera/livy/Utils.scala

+ 1 - 1
core/src/main/scala/com/cloudera/livy/Utils.scala

@@ -30,7 +30,7 @@ import scala.concurrent.duration.Duration
 
 object Utils {
   def getPropertiesFromFile(file: File): Map[String, String] = {
-    loadProperties(file.toURL())
+    loadProperties(file.toURI().toURL())
   }
 
   def loadProperties(url: URL): Map[String, String] = {