summaryrefslogtreecommitdiff
path: root/src/actors-migration
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-26 11:38:48 -0700
committerPaul Phillips <paulp@improving.org>2012-09-26 11:41:15 -0700
commit052e9b17e22de317d0dc7d3a66729b825b1eb2da (patch)
tree968f9456c73ee55f4253640da9e14408425cfaa9 /src/actors-migration
parent742cb71ec8c8205af032df609088affc12d3e1c5 (diff)
downloadscala-052e9b17e22de317d0dc7d3a66729b825b1eb2da.tar.gz
scala-052e9b17e22de317d0dc7d3a66729b825b1eb2da.tar.bz2
scala-052e9b17e22de317d0dc7d3a66729b825b1eb2da.zip
Don't write public methods with non-public parameters.
If the parameter types of a method have lower visibility than the method itself, then the method cannot be overridden because the parameter types cannot be expressed. This is a confusing and frustrating situation to expose via public API. Such methods should either have access as strong as their parameter types, or be made final.
Diffstat (limited to 'src/actors-migration')
-rw-r--r--src/actors-migration/scala/actors/migration/Props.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/actors-migration/scala/actors/migration/Props.scala b/src/actors-migration/scala/actors/migration/Props.scala
index c12384ea55..00bc9d93f8 100644
--- a/src/actors-migration/scala/actors/migration/Props.scala
+++ b/src/actors-migration/scala/actors/migration/Props.scala
@@ -10,6 +10,5 @@ case class Props(creator: () ⇒ InternalActor, dispatcher: String) {
/**
* Returns a new Props with the specified creator set
*/
- def withCreator(c: ⇒ InternalActor) = copy(creator = () ⇒ c)
-
+ final def withCreator(c: ⇒ InternalActor) = copy(creator = () ⇒ c)
}