diff options
author | schinz <schinz@epfl.ch> | 2005-03-08 09:30:58 +0000 |
---|---|---|
committer | schinz <schinz@epfl.ch> | 2005-03-08 09:30:58 +0000 |
commit | 2f69f39176bec1a8bfc0b53fcc3ce1be640d6def (patch) | |
tree | de9f8a3f6b50735cb6eba9624a24e9beed510b1c | |
parent | aa77b6d1ec06bcec09d360b9032b90a023d10c4e (diff) | |
download | scala-2f69f39176bec1a8bfc0b53fcc3ce1be640d6def.tar.gz scala-2f69f39176bec1a8bfc0b53fcc3ce1be640d6def.tar.bz2 scala-2f69f39176bec1a8bfc0b53fcc3ce1be640d6def.zip |
- fixed view methods to avoid NPEs when the wra...
- fixed view methods to avoid NPEs when the wrapped object itself is
null.
-rw-r--r-- | sources/scala/Predef.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/scala/Predef.scala b/sources/scala/Predef.scala index 938b27a59b..c29d751a7d 100644 --- a/sources/scala/Predef.scala +++ b/sources/scala/Predef.scala @@ -284,7 +284,7 @@ object Predef { def elements = Iterator.fromArray(xs); def apply(n: Int) = xs(n); override def hashCode(): Int = xs.hashCode(); - override def equals(y: Any): Boolean = xs.equals(y); + override def equals(y: Any): Boolean = (xs == y); override protected def stringPrefix: String = "Array"; } @@ -293,7 +293,7 @@ object Predef { def elements = Iterator.fromString(str); def apply(n: Int) = str.charAt(n); override def hashCode(): Int = str.hashCode(); - override def equals(y: Any): Boolean = str.equals(y); + override def equals(y: Any): Boolean = (str == y); override protected def stringPrefix: String = "String"; } } |