Author: sebb
Date: Sat Mar  3 19:17:42 2007
New Revision: 514343

URL: http://svn.apache.org/viewvc?view=rev&rev=514343
Log:
Remove a JDK 1.3 work-round

Modified:
    
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java

Modified: 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java?view=diff&rev=514343&r1=514342&r2=514343
==============================================================================
--- 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java
 (original)
+++ 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java
 Sat Mar  3 19:17:42 2007
@@ -22,6 +22,7 @@
 import java.util.Collection;
 import java.util.Hashtable;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
 
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.logging.LoggingManager;
@@ -63,8 +64,6 @@
        public final static String DEFAULT_PARSER = 
         "org.apache.jmeter.protocol.http.parser.HtmlParserHTMLParser"; // 
$NON-NLS-1$
 
-    private static final String JAVA_UTIL_LINKED_HASH_SET = 
"java.util.LinkedHashSet"; // $NON-NLS-1$
-
        /**
         * Protected constructor to prevent instantiation except from within
         * subclasses.
@@ -131,19 +130,7 @@
                // them roughly in order, which should be a better model of 
browser
                // behaviour.
 
-               Collection col;
-
-               // N.B. LinkedHashSet is Java 1.4
-               if (hasLinkedHashSet) {
-                       try {
-                               col = (Collection) 
Class.forName(JAVA_UTIL_LINKED_HASH_SET).newInstance();
-                       } catch (Exception e) {
-                               throw new Error("Should not happen:" + 
e.toString());
-                       }
-               } else {
-                       col = new java.util.HashSet(); // TODO: improve JDK1.3 
solution
-               }
-
+               Collection col = new LinkedHashSet();
                return getEmbeddedResourceURLs(html, baseUrl, new 
URLCollection(col));
 
                // An additional note on using HashSets to store URLs: I just
@@ -158,20 +145,6 @@
                // The above problem has now been addressed with the URLString 
and
                // URLCollection classes.
 
-       }
-
-       // See whether we can use LinkedHashSet or not:
-       private static final boolean hasLinkedHashSet;
-
-       static {
-               boolean b;
-               try {
-                       Class.forName(JAVA_UTIL_LINKED_HASH_SET);
-                       b = true;
-               } catch (ClassNotFoundException e) {
-                       b = false;
-               }
-               hasLinkedHashSet = b;
        }
 
        /**



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to