clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1538366 - in /clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting: CompilerService.scala util/VirtualDirectoryWrapper.scala
Date Sun, 03 Nov 2013 13:51:51 GMT
Author: reto
Date: Sun Nov  3 13:51:51 2013
New Revision: 1538366

URL: http://svn.apache.org/r1538366
Log:
CLEREZZA-840: cleaned up things

Modified:
    clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/CompilerService.scala
    clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/VirtualDirectoryWrapper.scala

Modified: clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/CompilerService.scala
URL: http://svn.apache.org/viewvc/clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/CompilerService.scala?rev=1538366&r1=1538365&r2=1538366&view=diff
==============================================================================
--- clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/CompilerService.scala
(original)
+++ clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/CompilerService.scala
Sun Nov  3 13:51:51 2013
@@ -147,29 +147,26 @@ class CompilerService() extends BundleLi
 	def compileIsolated(sources: List[Array[Char]], outputDirectory: AbstractFile): List[Class[_]]
= {
 		AccessController.checkPermission(new CompilePermission)
 		sharedCompiler.synchronized {
-			try {
-				AccessController.doPrivileged[List[Class[_]]](
-					new PrivilegedExceptionAction[List[Class[_]]] {
-						def run() = {
-							val out = new ByteArrayOutputStream
-							val printWriter = new PrintWriter(out)
-							val compiler = createCompiler(printWriter, outputDirectory)
-							try {
-								compiler.compile(sources)
-							} catch {
-								case c: CompileErrorsException => throw new CompileErrorsException(new String(out.toByteArray,
"utf-8"), c)
-								case e: Exception => throw e
-							}
-						}
-					})
-			}
+                              AccessController.doPrivileged[List[Class[_]]](
+                                      new PrivilegedExceptionAction[List[Class[_]]] {
+                                              def run() = {
+                                                      val out = new ByteArrayOutputStream
+                                                      val printWriter = new PrintWriter(out)
+                                                      val compiler = createCompiler(printWriter,
outputDirectory)
+                                                      try {
+                                                              compiler.compile(sources)
+                                                      } catch {
+                                                              case c: CompileErrorsException
=> throw new CompileErrorsException(new String(out.toByteArray, "utf-8"), c)
+                                                              case e: Exception => throw
e
+                                                      }
+                                              }
+                                      })
 		}
 	}
 
 	def compileToDir(sources: List[Array[Char]], outputDirectory: AbstractFile): List[AbstractFile]
= {
 		AccessController.checkPermission(new CompilePermission)
 		sharedCompiler.synchronized {
-			try {
 				AccessController.doPrivileged[List[AbstractFile]](
 					new PrivilegedExceptionAction[List[AbstractFile]] {
 						def run() = {
@@ -184,7 +181,6 @@ class CompilerService() extends BundleLi
 							}
 						}
 					})
-			}
 		}
 	}
 

Modified: clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/VirtualDirectoryWrapper.scala
URL: http://svn.apache.org/viewvc/clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/VirtualDirectoryWrapper.scala?rev=1538366&r1=1538365&r2=1538366&view=diff
==============================================================================
--- clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/VirtualDirectoryWrapper.scala
(original)
+++ clerezza/trunk/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/VirtualDirectoryWrapper.scala
Sun Nov  3 13:51:51 2013
@@ -26,8 +26,8 @@
 
 package org.apache.clerezza.scala.scripting.util
 
-import scala.tools.nsc.io.AbstractFile
-import scala.tools.nsc.io.VirtualDirectory
+import scala.reflect.io.AbstractFile
+import scala.reflect.io.VirtualDirectory
 
 class VirtualDirectoryWrapper(val wrapped: AbstractFile,
 							  val childWrapper: (AbstractFile) => AbstractFile) extends VirtualDirectory(null,
None)



Mime
View raw message