summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2007-09-14 09:36:17 +0000
committerPhilipp Haller <hallerp@gmail.com>2007-09-14 09:36:17 +0000
commit9f996ddaf6ecda1ba270041a7c70a70121510647 (patch)
treed6a8d80831f76be607270a511e6fe29bcee8bc12
parentd2671e65de1b8bc681a7a644db7aeb1570fa467c (diff)
downloadscala-9f996ddaf6ecda1ba270041a7c70a70121510647.tar.gz
scala-9f996ddaf6ecda1ba270041a7c70a70121510647.tar.bz2
scala-9f996ddaf6ecda1ba270041a7c70a70121510647.zip
Handle AccessControlException when initializing...
Handle AccessControlException when initializing actor library.
-rw-r--r--src/actors/scala/actors/FJTaskScheduler2.scala17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/actors/scala/actors/FJTaskScheduler2.scala b/src/actors/scala/actors/FJTaskScheduler2.scala
index a724d8987c..0600f4d7b2 100644
--- a/src/actors/scala/actors/FJTaskScheduler2.scala
+++ b/src/actors/scala/actors/FJTaskScheduler2.scala
@@ -20,7 +20,7 @@ import scala.collection.mutable.{ArrayBuffer, Buffer, HashMap, Queue, Stack, Has
/**
* FJTaskScheduler2
*
- * @version 0.9.9
+ * @version 0.9.10
* @author Philipp Haller
*/
class FJTaskScheduler2 extends Thread with IScheduler {
@@ -30,8 +30,19 @@ class FJTaskScheduler2 extends Thread with IScheduler {
val printStats = false
//val printStats = true
- val coreProp = System.getProperty("actors.corePoolSize")
- val maxProp = System.getProperty("actors.maxPoolSize")
+ val coreProp = try {
+ System.getProperty("actors.corePoolSize")
+ } catch {
+ case ace: java.security.AccessControlException =>
+ null
+ }
+ val maxProp =
+ try {
+ System.getProperty("actors.maxPoolSize")
+ } catch {
+ case ace: java.security.AccessControlException =>
+ null
+ }
val initCoreSize =
if (null ne coreProp) Integer.parseInt(coreProp)