diff options
author | buraq <buraq@epfl.ch> | 2004-06-02 18:39:17 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2004-06-02 18:39:17 +0000 |
commit | 65518842d4963e05eb6401e6522370b8ce71d6b5 (patch) | |
tree | 9842eb95706e348495c79683ca82c36d387eac9a /sources | |
parent | a8254eef6569ab797482f76c1ae3f3ca754a5964 (diff) | |
download | scala-65518842d4963e05eb6401e6522370b8ce71d6b5.tar.gz scala-65518842d4963e05eb6401e6522370b8ce71d6b5.tar.bz2 scala-65518842d4963e05eb6401e6522370b8ce71d6b5.zip |
simplified
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/xml/BindingFactoryAdapter.scala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sources/scala/xml/BindingFactoryAdapter.scala b/sources/scala/xml/BindingFactoryAdapter.scala index 02f247ca9e..3311b01887 100644 --- a/sources/scala/xml/BindingFactoryAdapter.scala +++ b/sources/scala/xml/BindingFactoryAdapter.scala @@ -32,8 +32,7 @@ abstract class BindingFactoryAdapter extends FactoryAdapter() { val compress: boolean ; /** looks up whether an element may have text children */ - def nodeContainsText( name:java.lang.String ):boolean = - g.get( name ).match { case Some(x) => x }; + def nodeContainsText( name:java.lang.String ):boolean = g( name ); // if compress is set, used for hash-consing val cache = new HashMap[int,Node]; @@ -46,7 +45,7 @@ abstract class BindingFactoryAdapter extends FactoryAdapter() { // 2do:optimize if( !compress ) { // get constructor - val c = f.get( elemName ).match{ case Some(x) => x }; + val c = f( elemName ); c( children, attribs ); } else { // do hash-consing @@ -61,7 +60,7 @@ abstract class BindingFactoryAdapter extends FactoryAdapter() { case None => // get constructor - val c = f.get( elemName ).match{ case Some(x) => x }; + val c = f( elemName ); val el = c( children, attribs ); cache.update( h, el ); el |