Skip to content

Commit 7fe7116

Browse files
buraqadriaanm
buraq
authored andcommitted
modified xml parsing
1 parent e70ca0a commit 7fe7116

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

sources/scala/xml/AttributeSeq.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99

1010
package scala.xml ;
1111

12-
import scala.collection.mutable.HashMap ;
12+
import scala.collection.Map ;
1313
import scala.collection.immutable.TreeSet ;
1414

1515
object AttributeSeq {
1616
final val Empty = new AttributeSeq { final def sortedSeq = new TreeSet[Attribute] }
1717

18-
final def fromHashMap(as:HashMap[Pair[String,String],String]) = {
18+
final def fromMap(as:Map[Pair[String,String],String]) = {
1919
AttributeSeq.fromAttrs( {
2020
for( val a <- as.keys.toList )
2121
yield Attribute(a._1,a._2.intern(), as(a))
2222
}:_* )
2323
}
2424

25-
final def fromHashMap(ns:String, as:HashMap[Pair[String,String],String]) = {
25+
final def fromMap(ns:String, as:Map[Pair[String,String],String]) = {
2626
AttributeSeq.fromAttrs( {
2727
for( val a <- as.keys.toList )
2828
yield {

sources/scala/xml/BindingFactoryAdapter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ abstract class BindingFactoryAdapter extends FactoryAdapter() {
4545
children:List[Node] ):Node = {
4646

4747
val uri$ = uri.intern();
48-
val attribs1 = AttributeSeq.fromHashMap(attribs);
48+
val attribs1 = AttributeSeq.fromMap(attribs);
4949
// 2do:optimize
5050
if( !compress ) {
5151
// get constructor

sources/scala/xml/nobinding/NoBindingFactoryAdapter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class NoBindingFactoryAdapter extends FactoryAdapter {
4040
} else {
4141
uri.intern();
4242
}
43-
val attrSeq = AttributeSeq.fromHashMap( uri$, attrs );
43+
val attrSeq = AttributeSeq.fromMap( uri$, attrs );
4444
val elHashCode =
4545
Utility.hashCode( uri$, label, attrSeq.hashCode(), children ) ;
4646
cache.get( elHashCode ).match{

0 commit comments

Comments
 (0)