harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r912422 - in /harmony/enhanced/classlib/branches/java6: ./ depends/libs/ make/ modules/concurrent/src/main/java/java/util/concurrent/atomic/ modules/concurrent/src/main/java/java/util/concurrent/locks/ modules/instrument/src/test/java/org/a...
Date Sun, 21 Feb 2010 22:33:39 GMT
Author: hindessm
Date: Sun Feb 21 22:33:38 2010
New Revision: 912422

URL: http://svn.apache.org/viewvc?rev=912422&view=rev
Log:
Merge updates from trunk@912351.

Modified:
    harmony/enhanced/classlib/branches/java6/   (props changed)
    harmony/enhanced/classlib/branches/java6/LICENSE
    harmony/enhanced/classlib/branches/java6/depends/libs/   (props changed)
    harmony/enhanced/classlib/branches/java6/make/depends-common.xml   (props changed)
    harmony/enhanced/classlib/branches/java6/modules/concurrent/src/main/java/java/util/concurrent/atomic/
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/concurrent/src/main/java/java/util/concurrent/locks/
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/HelloWorldTest.java
    harmony/enhanced/classlib/branches/java6/modules/jmx/META-INF/   (props changed)
    harmony/enhanced/classlib/branches/java6/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/util/logging/
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/fdlibm.h
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/gp.h   (props
changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/hymagic.h
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/hysocket.h
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/hyvmls.h
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/jni.h  
(props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/jni_types.h
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/jvmpi.h
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/jvmri.h
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/jvmti.h
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/jvmti_types.h
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/vmi.h  
(props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/vmizip.h
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/HttpURLConnectionTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/resources/net.resources/
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/pack200/depends/manifests/asm-3.1/  
(props changed)
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200Adapter.java
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200PackerAdapter.java
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/FocusManager.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JComponent.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JTable.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/ScrollPaneLayout.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/SwingUtilities.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameUI.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/LabelView.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/parser/AttributeList.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java
  (props changed)
    harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/text/parser/
  (props changed)

Propchange: harmony/enhanced/classlib/branches/java6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1,2 +1,2 @@
-/harmony/enhanced/classlib/trunk:713674-735919,765923-910508
+/harmony/enhanced/classlib/trunk:713674-735919,765923-912351
 /harmony/enhanced/classlib/trunk/working_classlib:884014-884286

Modified: harmony/enhanced/classlib/branches/java6/LICENSE
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/LICENSE?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/LICENSE (original)
+++ harmony/enhanced/classlib/branches/java6/LICENSE Sun Feb 21 22:33:38 2010
@@ -644,6 +644,17 @@
 included in source code comments for reference, and in accordance with
 the licensing terms, the licenses are reproduced here:
 
+RFC 1779 -  A String Representation of Distinguished Names
+
+RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of 
+           Internet Message Bodies
+
+RFC 2251 - Lightweight Directory Access Protocol (v3)
+           Copyright (C) The Internet Society (1997).  All Rights Reserved.
+
+RFC 2253 - Lightweight Directory Access Protocol (v3): UTF-8 String 
+           Representation of Distinguished Names
+           Copyright (C) The Internet Society (1997).  All Rights Reserved.
 
 RFC 2313 - PKCS #1: RSA Encryption
            Copyright (C) The Internet Society (1998).  All Rights Reserved.
@@ -651,6 +662,12 @@
 RFC 2315 - PKCS #7: Cryptographic Message Syntax
            Copyright (C) The Internet Society (1998).  All Rights Reserved.
 
+RFC 2459 - Internet X.509 Public Key Infrastructure Certificate and CRL Profile
+           Copyright (C) The Internet Society (1999).  All Rights Reserved.
+
+RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1
+           Copyright (C) The Internet Society (1999). All Rights Reserved.
+
 RFC 2781 - UTF-16, an encoding of ISO 10646
            Copyright (C) The Internet Society (2000).  All Rights Reserved.
 
@@ -667,6 +684,9 @@
            Certificate Revocation List (CRL) Profile
            Copyright (C) The Internet Society (2002).  All Rights Reserved.
 
+INTERNET-DRAFT - Persistent Search: A Simple LDAP Change Notification Mechanism
+           <draft-ietf-ldapext-psearch-03.txt>
+           Copyright (C) The Internet Society (1997-2000). All Rights Reserved.
 
 The following statement applies to each RFC:
 

Propchange: harmony/enhanced/classlib/branches/java6/depends/libs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/depends/libs:544451-910508
+/harmony/enhanced/classlib/trunk/depends/libs:544451-912351

Propchange: harmony/enhanced/classlib/branches/java6/make/depends-common.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/make/depends-common.xml:768152-910508
+/harmony/enhanced/classlib/trunk/make/depends-common.xml:768152-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/concurrent/src/main/java/java/util/concurrent/atomic/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/atomic:765923-910508
+/harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/atomic:765923-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/concurrent/src/main/java/java/util/concurrent/locks/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/locks:765923-910508
+/harmony/enhanced/classlib/trunk/modules/concurrent/src/main/java/java/util/concurrent/locks:765923-912351

Modified: harmony/enhanced/classlib/branches/java6/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/HelloWorldTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/HelloWorldTest.java?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/HelloWorldTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/HelloWorldTest.java
Sun Feb 21 22:33:38 2010
@@ -53,7 +53,13 @@
 
         helper.run();
 
-        assertEquals(0, helper.getExitCode());
+        if (helper.getExitCode() != 0) {
+            System.out.println("std err:");
+            System.out.println(helper.getStdErr());
+            System.out.println("std out:");
+            System.out.println(helper.getStdOut());
+            fail("helper exit code was non-zero");
+        }
         assertEquals("Hello World" + LINE_SEPARATOR, helper.getStdOut());
         assertEquals("", helper.getStdErr());
     }
@@ -72,7 +78,13 @@
 
         helper.run();
 
-        assertEquals(0, helper.getExitCode());
+        if (helper.getExitCode() != 0) {
+            System.out.println("std err:");
+            System.out.println(helper.getStdErr());
+            System.out.println("std out:");
+            System.out.println(helper.getStdOut());
+            fail("helper exit code was non-zero");
+        }
         assertEquals("Hello World" + LINE_SEPARATOR, helper.getStdOut());
         assertEquals("", helper.getStdErr());
     }
@@ -91,8 +103,20 @@
 
         helper.run();
 
-        assertTrue(0 != helper.getExitCode());
-        assertTrue(helper.getStdErr().contains(
-                ClassNotFoundException.class.getName()));
-    }
+        if (helper.getExitCode() == 0) {
+            System.out.println("std err:");
+            System.out.println(helper.getStdErr());
+            System.out.println("std out:");
+            System.out.println(helper.getStdOut());
+            fail("helper exit code was zero");
+        }
+        if (!(helper.getStdErr().contains(
+                  ClassNotFoundException.class.getName()))) {
+            System.out.println("std err:");
+            System.out.println(helper.getStdErr());
+            System.out.println("std out:");
+            System.out.println(helper.getStdOut());
+            fail("helper should have thrown ClassNotFoundException");
+        }
+     }
 }

Propchange: harmony/enhanced/classlib/branches/java6/modules/jmx/META-INF/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/jmx/META-INF:768152-910508
+/harmony/enhanced/classlib/trunk/modules/jmx/META-INF:768152-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/util/logging/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/util/logging:768152-910508
+/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/util/logging:768152-912351

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java
Sun Feb 21 22:33:38 2010
@@ -19,6 +19,8 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.SortedMap;
+import java.util.TreeMap;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
@@ -31,12 +33,12 @@
  */
 public class Header implements Cloneable {
     /*
-     * we use the non-synchronized ArrayList and HashMap instead of the
+     * we use the non-synchronized ArrayList and TreehMap instead of the
      * synchronized Vector and Hashtable
      */
     private ArrayList<String> props;
 
-    private HashMap<String, LinkedList<String>> keyTable;
+    private SortedMap<String, LinkedList<String>> keyTable;
 
     private String statusLine;
 
@@ -48,7 +50,8 @@
     public Header() {
         super();
         this.props = new ArrayList<String>(20);
-        this.keyTable = new HashMap<String, LinkedList<String>>(20);
+        this.keyTable = new TreeMap<String, LinkedList<String>>(
+                                String.CASE_INSENSITIVE_ORDER);
     }
 
     /**
@@ -62,11 +65,11 @@
         this(); // initialize fields
         for (Entry<String, List<String>> next : map.entrySet()) {
             String key = next.getKey();
-            props.add(key);
             List<String> value = next.getValue();
             LinkedList<String> linkedList = new LinkedList<String>();
             for (String element : value) {
                 linkedList.add(element);
+                props.add(key);
                 props.add(element);
             }
             keyTable.put(key, linkedList);
@@ -79,7 +82,8 @@
         try {
             Header clone = (Header) super.clone();
             clone.props = (ArrayList<String>) props.clone();
-            clone.keyTable = new HashMap<String, LinkedList<String>>(20);
+            clone.keyTable = new TreeMap<String, LinkedList<String>>(
+                                     String.CASE_INSENSITIVE_ORDER);
             for (Map.Entry<String, LinkedList<String>> next : this.keyTable
                     .entrySet()) {
                 LinkedList<String> v = (LinkedList<String>) next.getValue()
@@ -105,7 +109,7 @@
         LinkedList<String> list = keyTable.get(key);
         if (list == null) {
             list = new LinkedList<String>();
-            keyTable.put(key.toLowerCase(), list);
+            keyTable.put(key, list);
         }
         list.add(value);
         props.add(key);
@@ -197,7 +201,7 @@
      *         such key exists.
      */
     public String get(String key) {
-        LinkedList<String> result = keyTable.get(key.toLowerCase());
+        LinkedList<String> result = keyTable.get(key);
         if (result == null) {
             return null;
         }

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/fdlibm.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/fdlibm.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/fdlibm.h:803062-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/gp.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/gp.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/gp.h:803062-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/hymagic.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/hymagic.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/hymagic.h:803062-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/hysocket.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/hysocket.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/hysocket.h:803062-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/hyvmls.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/hyvmls.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/hyvmls.h:803062-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/jni.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/jni.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/jni.h:803062-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/jni_types.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/jni_types.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/jni_types.h:803062-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/jvmpi.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/jvmpi.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/jvmpi.h:803062-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/jvmri.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/jvmri.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/jvmri.h:803062-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/jvmti.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/jvmti.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/jvmti.h:803062-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/jvmti_types.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/jvmti_types.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/jvmti_types.h:803062-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/vmi.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/vmi.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/vmi.h:803062-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/vmizip.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/vmizip.h:803062-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/vmizip.h:803062-912351

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/HttpURLConnectionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/HttpURLConnectionTest.java?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/HttpURLConnectionTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/HttpURLConnectionTest.java
Sun Feb 21 22:33:38 2010
@@ -551,6 +551,14 @@
         assertFalse(isPutCalled);
         assertEquals(mockHeaderMap, headerMap);
         assertEquals(uc.getInputStream(), mockIs);
+
+        // REGRESSION for HARMONY-6542 item 1 in descriptions.txt attachement
+        assertEquals("value1", uc.getHeaderField(0));
+        assertEquals("value2", uc.getHeaderField(1));
+        assertEquals("value1", uc.getHeaderField(2));
+        assertEquals("value2", uc.getHeaderField(3));
+        assertNull(uc.getHeaderField(4));
+
         uc.disconnect();
     }
 
@@ -789,6 +797,7 @@
         mockHeaderMap = new Hashtable<String, List<String>>();
         List<String> valueList = new ArrayList<String>();
         valueList.add("value1");
+        valueList.add("value2");
         mockHeaderMap.put("field1", valueList);
         mockHeaderMap.put("field2", valueList);
         isGetCalled = false;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java
Sun Feb 21 22:33:38 2010
@@ -141,6 +141,105 @@
     }
 
     /**
+     * Regression test for HARMONY-6452
+     */
+    public void test_RequestProperty_case_insensitivity() 
+            throws MalformedURLException, IOException {
+
+        URLConnection u =
+            (URLConnection)(new URL("http://example.org/").openConnection());
+        u.setRequestProperty("KEY", "upper");
+        u.setRequestProperty("key", "lower");
+        assertEquals("set for \"KEY\" is overwritten by set for \"key\"",
+                     "lower", u.getRequestProperty("KEY"));
+        assertEquals("value can be retrieved by either key case",
+                     "lower", u.getRequestProperty("key"));
+        assertEquals("value can be retrieved by arbitrary key case",
+                     "lower", u.getRequestProperty("kEy"));
+
+        Map<String, List<String>> props = u.getRequestProperties();
+        List<String> values = props.get("KEY");
+        assertNotNull("first key does have an entry", values);
+        assertNull("second key does not have an entry", props.get("key"));
+
+        assertEquals("returned value list is correct size", 1, values.size());
+        assertTrue("returned value list contains expected value",
+                   values.contains("lower"));
+
+
+        // repeat the above with the case of keys reversed to confirm
+        // that first key is significant one
+        u = (URLConnection)(new URL("http://example.org/").openConnection());
+        u.setRequestProperty("key", "lower");
+        u.setRequestProperty("KEY", "upper");
+        assertEquals("set for \"key\" is overwritten by set for \"KEY\"",
+                     "upper", u.getRequestProperty("KEY"));
+        assertEquals("value can be retrieved by either key case",
+                     "upper", u.getRequestProperty("key"));
+        assertEquals("value can be retrieved by arbitrary key case",
+                     "upper", u.getRequestProperty("kEy"));
+
+        props = u.getRequestProperties();
+        values = props.get("key");
+        assertNotNull("first key does have an entry", values);
+        assertNull("second key does not have an entry", props.get("KEY"));
+
+        assertEquals("returned value list is correct size", 1, values.size());
+        assertTrue("returned value list contains expected value",
+                   values.contains("upper"));
+
+
+        // repeat the first test with set and add methods
+        u = (URLConnection)(new URL("http://example.org/").openConnection());
+        u.setRequestProperty("KEY", "value1");
+        u.addRequestProperty("key", "value2");
+        assertEquals("value for \"KEY\" is the last one added",
+                     "value2", u.getRequestProperty("KEY"));
+        assertEquals("value can be retrieved by either key case",
+                     "value2", u.getRequestProperty("key"));
+        assertEquals("value can be retrieved by arbitrary key case",
+                     "value2", u.getRequestProperty("kEy"));
+
+        props = u.getRequestProperties();
+        values = props.get("KEY");
+        assertNotNull("first key does have an entry", values);
+        assertNull("second key does not have an entry", props.get("key"));
+
+        assertEquals("returned value list is correct size", 2, values.size());
+        assertTrue("returned value list contains first value",
+                   values.contains("value1"));
+        assertTrue("returned value list contains second value",
+                   values.contains("value2"));
+
+
+        // repeat the previous test with only add methods
+        u = (URLConnection)(new URL("http://example.org/").openConnection());
+        u.addRequestProperty("KEY", "value1");
+        u.addRequestProperty("key", "value2");
+        u.addRequestProperty("Key", "value3");
+        assertEquals("value for \"KEY\" is the last one added",
+                     "value3", u.getRequestProperty("KEY"));
+        assertEquals("value can be retrieved by another key case",
+                     "value3", u.getRequestProperty("key"));
+        assertEquals("value can be retrieved by arbitrary key case",
+                     "value3", u.getRequestProperty("kEy"));
+
+        props = u.getRequestProperties();
+        values = props.get("KEY");
+        assertNotNull("first key does have an entry", values);
+        assertNull("second key does not have an entry", props.get("key"));
+        assertNull("third key does not have an entry", props.get("Key"));
+
+        assertEquals("returned value list is correct size", 3, values.size());
+        assertTrue("returned value list contains first value",
+                   values.contains("value1"));
+        assertTrue("returned value list contains second value",
+                   values.contains("value2"));
+        assertTrue("returned value list contains second value",
+                   values.contains("value3"));
+    }
+
+    /**
      * @tests java.net.URLConnection#addRequestProperty(java.lang.String,java.lang.String)
      */
     public void test_addRequestPropertyLjava_lang_StringLjava_lang_String()
@@ -274,13 +373,13 @@
      */
     public void test_getContentType_regression() throws IOException {
         // Regression for HARMONY-4699
-        assertEquals(getContentType("test.rtf"), "application/rtf");
-        assertEquals(getContentType("test.java"), "text/plain");
+        assertEquals("application/rtf", getContentType("test.rtf"));
+        assertEquals("text/plain", getContentType("test.java"));
         // RI would return "content/unknown"
-        assertEquals(getContentType("test.doc"), "application/msword");
-        assertEquals(getContentType("test.htx"), "text/html");
-        assertEquals(getContentType("test.xml"), "application/xml");
-        assertEquals(getContentType("."), "text/plain");
+        assertEquals("application/msword", getContentType("test.doc"));
+        assertEquals("text/html", getContentType("test.htx"));
+        assertEquals("application/xml", getContentType("test.xml"));
+        assertEquals("text/plain", getContentType("."));
     }
 
     /**

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/resources/net.resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/net.resources:790472-910508
+/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/net.resources:790472-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/pack200/depends/manifests/asm-3.1/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/pack200/depends/manifests/asm-3.1:785554-910508
+/harmony/enhanced/classlib/trunk/modules/pack200/depends/manifests/asm-3.1:785554-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200Adapter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200Adapter.java:782694-910508
+/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200Adapter.java:782694-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200PackerAdapter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200PackerAdapter.java:782694-910508
+/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200PackerAdapter.java:782694-912351

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/FocusManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/FocusManager.java?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/FocusManager.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/FocusManager.java
Sun Feb 21 22:33:38 2010
@@ -26,6 +26,7 @@
 
     private static boolean focusManagerEnabled = true;
 
+    @Deprecated
     public static void disableSwingFocusManager() {
         KeyboardFocusManager.getCurrentKeyboardFocusManager().setDefaultFocusTraversalPolicy(new
DefaultFocusTraversalPolicy());
         focusManagerEnabled = false;
@@ -43,6 +44,7 @@
         KeyboardFocusManager.setCurrentKeyboardFocusManager(focusManager);
     }
 
+    @Deprecated
     public static boolean isFocusManagerEnabled() {
         return focusManagerEnabled;
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JComponent.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JComponent.java?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JComponent.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JComponent.java
Sun Feb 21 22:33:38 2010
@@ -1098,6 +1098,7 @@
         return result;
     }
 
+    @Deprecated
     public void setNextFocusableComponent(Component component) {
         Component oldComponent = nextFocusableComponent;
         nextFocusableComponent = component;
@@ -1111,6 +1112,7 @@
         focusCycleRoot.setFocusTraversalPolicy(newFocusTraversalPolicy);
     }
 
+    @Deprecated
     public Component getNextFocusableComponent() {
         return nextFocusableComponent;
     }
@@ -1184,6 +1186,7 @@
         return super.requestFocusInWindow(temporary);
     }
 
+    @Deprecated
     public boolean requestDefaultFocus() {
         Component defaultComponent = null;
         Container cycleRoot = isFocusCycleRoot() ? this : getFocusCycleRootAncestor();
@@ -1197,6 +1200,7 @@
         return true;
     }
 
+    @Deprecated
     public boolean isManagingFocus() {
         return false;
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JTable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JTable.java?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JTable.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JTable.java
Sun Feb 21 22:33:38 2010
@@ -782,6 +782,7 @@
 
     private static final String UI_CLASS_ID = "TableUI";
 
+    @Deprecated
     public static JScrollPane createScrollPaneForTable(JTable table) {
         return new JScrollPane(table);
     }
@@ -1322,6 +1323,7 @@
         return result;
     }
 
+    @Deprecated
     public void sizeColumnsToFit(boolean lastColumnOnly) {
         int previousSetting = getAutoResizeMode();
         if (lastColumnOnly) {

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/ScrollPaneLayout.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/ScrollPaneLayout.java?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/ScrollPaneLayout.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/ScrollPaneLayout.java
Sun Feb 21 22:33:38 2010
@@ -282,6 +282,7 @@
         setLowerRightBounds(pane, verticalSBWidth, horizontalSBHeight, rowHeadWidth, colHeadHeight,
rowHeadHeight);
     }
 
+    @Deprecated
     public Rectangle getViewportBorderBounds(final JScrollPane scrollpane) {
         return scrollpane.getViewportBorderBounds();
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/SwingUtilities.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/SwingUtilities.java?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/SwingUtilities.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/SwingUtilities.java
Sun Feb 21 22:33:38 2010
@@ -418,6 +418,7 @@
         return result;
     }
 
+    @Deprecated
     public static Component findFocusOwner(final Component component) {
         return KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameUI.java?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameUI.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameUI.java
Sun Feb 21 22:33:38 2010
@@ -460,7 +460,10 @@
     }
 
     protected JInternalFrame frame;
+
+    @Deprecated
     protected KeyStroke openMenuKey;
+
     protected BasicInternalFrameTitlePane titlePane;
     protected ComponentListener componentListener;
     protected MouseInputListener glassPaneDispatcher;

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/LabelView.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/LabelView.java?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/LabelView.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/LabelView.java
Sun Feb 21 22:33:38 2010
@@ -85,6 +85,7 @@
         return background;
     }
 
+    @Deprecated
     protected FontMetrics getFontMetrics() {
         lazySync();
         Component component = getComponent();

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/parser/AttributeList.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/parser/AttributeList.java?rev=912422&r1=912421&r2=912422&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/parser/AttributeList.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/parser/AttributeList.java
Sun Feb 21 22:33:38 2010
@@ -25,7 +25,7 @@
 
     public int type;
 
-    public Vector values;
+    public Vector<?> values;
 
     public int modifier;
 
@@ -38,7 +38,7 @@
                          final int type,
                          final int modifier,
                          final String value,
-                         final Vector values,
+                         final Vector<?> values,
                          final AttributeList next) {
         this.name = name;
         this.type = type;
@@ -128,7 +128,7 @@
         return value;
     }
 
-    public Enumeration getValues() {
+    public Enumeration<?> getValues() {
         // avoids a NullPointerException if values is null (same as RI)
         return values == null ? null : values.elements();
     }

Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java:768152-910508
+/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java:768152-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java:768152-910508
+/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java:768152-912351

Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/text/parser/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 21 22:33:38 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/parser:768152-910508
+/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/parser:768152-912351



Mime
View raw message