harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r903199 [1/4] - in /harmony/enhanced/classlib/branches/java6: ./ depends/libs/ make/ modules/accessibility/src/test/api/java/common/javax/accessibility/ modules/archive/src/main/java/java/util/jar/ modules/archive/src/main/java/java/util/zi...
Date Tue, 26 Jan 2010 12:40:40 GMT
Author: hindessm
Date: Tue Jan 26 12:40:37 2010
New Revision: 903199

URL: http://svn.apache.org/viewvc?rev=903199&view=rev
Log:
Merge updates from classlnk r889062 through to r901560.

Added:
    harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleAttributeSequenceTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleAttributeSequenceTest.java
    harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleHyperlinkTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleHyperlinkTest.java
    harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleTextSequenceTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleTextSequenceTest.java
    harmony/enhanced/classlib/branches/java6/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/HelloWorldTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/HelloWorldTest.java
    harmony/enhanced/classlib/branches/java6/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/InstrumentTestHelper.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/InstrumentTestHelper.java
    harmony/enhanced/classlib/branches/java6/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/agents/
      - copied from r901560, harmony/enhanced/classlib/trunk/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/agents/
    harmony/enhanced/classlib/branches/java6/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/agents/HelloWorldAgent.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/agents/HelloWorldAgent.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/util/InputStreamHelper.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/InputStreamHelper.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ClassCircularityErrorTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ClassCircularityErrorTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ClassFormatErrorTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ClassFormatErrorTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/UnsupportedClassVersionErrorTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/UnsupportedClassVersionErrorTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/MalformedParameterizedTypeExceptionTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/MalformedParameterizedTypeExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/UndeclaredThrowableExceptionTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/UndeclaredThrowableExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/security/src/test/resources/policyTest2.txt
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/security/src/test/resources/policyTest2.txt
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/AbstractRowSetImplTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/AbstractRowSetImplTest.java
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/RowSetWarningTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/RowSetWarningTest.java
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/spi/
      - copied from r901560, harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/spi/
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/spi/SyncFactoryExceptionTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/spi/SyncFactoryExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/spi/SyncFactoryTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/spi/SyncFactoryTest.java
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/spi/SyncProviderExceptionTest.java
      - copied unchanged from r901560, harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/spi/SyncProviderExceptionTest.java
Removed:
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/util/ExposedByteArrayInputStream.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/util/InputStreamExposer.java
Modified:
    harmony/enhanced/classlib/branches/java6/   (props changed)
    harmony/enhanced/classlib/branches/java6/depends/libs/   (props changed)
    harmony/enhanced/classlib/branches/java6/make/build-test.xml
    harmony/enhanced/classlib/branches/java6/make/depends-common.xml   (props changed)
    harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleBundleTest.java
    harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleRelationSetTest.java
    harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleRelationTest.java
    harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/jar/JarFile.java
    harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/jar/Manifest.java
    harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/zip/ZipFile.java
    harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/zlib/unix/makefile
    harmony/enhanced/classlib/branches/java6/modules/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArrayList.java
    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/main/native/instrument/shared/inst_agt.c
    harmony/enhanced/classlib/branches/java6/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/IllegalClassFormatExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/UnmodifiableClassExceptionTest.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/logging/src/main/java/java/util/logging/LogManager.java
    harmony/enhanced/classlib/branches/java6/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni-kernel/src/main/java/org/apache/harmony/kernel/vm/VM.java
    harmony/enhanced/classlib/branches/java6/modules/luni/META-INF/MANIFEST.MF
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/String.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/AbstractList.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/AbstractMap.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/AbstractSet.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Arrays.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Collections.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/EnumSet.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/HugeEnumSet.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/MiniEnumSet.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Properties.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/TreeSet.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/io/FileCanonPathCache.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/main/native/luni/shared/netif.c
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ClassNotFoundExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/StringTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/InvocationTargetExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ModifierTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ProxyTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/AbstractListTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/AbstractMapTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ArraysTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/EnumSetTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/InvalidPropertiesFormatExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ListResourceBundleTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/PropertiesTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/PropertyResourceBundleTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/TimeZoneTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/unix/org/apache/harmony/luni/tests/java/io/UnixFileTest.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/impl/common/org/apache/harmony/luni/tests/java/io/FileCanonPathCacheTest.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/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
    harmony/enhanced/classlib/branches/java6/modules/rmi/META-INF/MANIFEST.MF
    harmony/enhanced/classlib/branches/java6/modules/rmi/src/main/java/java/rmi/server/RMIClassLoader.java
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/DefaultPolicyScanner.java
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/UnresolvedPrincipal.java
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/utils/JarUtils.java
    harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/AccessController2Test.java
    harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/SecureClassLoader2Test.java
    harmony/enhanced/classlib/branches/java6/modules/sound/src/main/java/org/apache/harmony/sound/utils/ProviderService.java
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/SQLExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/SQLWarningTest.java
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/BaseRowSetTest.java
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/TransactionRequiredExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/transaction/TransactionRolledbackExceptionTest.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)
    harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/javax/net/ssl/KeyStoreBuilderParameters.java

Propchange: harmony/enhanced/classlib/branches/java6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 26 12:40:37 2010
@@ -1,2 +1,2 @@
-/harmony/enhanced/classlib/trunk:713674-735919,765923-885602
+/harmony/enhanced/classlib/trunk:713674-735919,765923-901560
 /harmony/enhanced/classlib/trunk/working_classlib:884014-884286

Propchange: harmony/enhanced/classlib/branches/java6/depends/libs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 26 12:40:37 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/depends/libs:544451-893610
+/harmony/enhanced/classlib/trunk/depends/libs:544451-901560

Modified: harmony/enhanced/classlib/branches/java6/make/build-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/build-test.xml?rev=903199&r1=903198&r2=903199&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/build-test.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/build-test.xml Tue Jan 26 12:40:37 2010
@@ -27,6 +27,20 @@
     <property name="tests.output" location="build/test_report" />
     <import file="${basedir}/make/properties.xml" />
 
+    <property name="gen.report" value="true" />
+    <condition property="do.full.report" value="true">
+        <and>
+            <equals arg1="${gen.report}" arg2="true" />
+            <not><equals arg1="${short.report}" arg2="true" /></not>
+        </and>
+    </condition>
+    <condition property="do.short.report" value="true">
+        <and>
+            <equals arg1="${gen.report}" arg2="true" />
+            <equals arg1="${short.report}" arg2="true" />
+        </and>
+    </condition>
+
     <property name="tests.support.output" location="build/test_support" />
     <property name="support.dir" location="support"/>
     <property name="tests.depends.jars" location="deploy/jdk/jre/lib/boot" />
@@ -71,7 +85,7 @@
 
     <property name="report.dir" value="${tests.output}/html"/>
 
-    <target name="full-report" unless="short.report" >
+    <target name="full-report" if="do.full.report" >
         <delete dir="${report.dir}" />
         <junitreport todir="${tests.output}">
             <fileset dir="${tests.output}">
@@ -85,7 +99,7 @@
         <echo message="The test report is in ${display-location}"/>
     </target>
 
-    <target name="short-report" if="short.report" >
+    <target name="short-report" if="do.short.report">
         <delete dir="${report.dir}" />
         <junitreport todir="${tests.output}">
             <fileset dir="${tests.output}" includes="TEST*-*.xml">

Propchange: harmony/enhanced/classlib/branches/java6/make/depends-common.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 26 12:40:37 2010
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/make/depends-common.xml:768152-885602
+/harmony/enhanced/classlib/trunk/make/depends-common.xml:768152-901560

Modified: harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleBundleTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleBundleTest.java?rev=903199&r1=903198&r2=903199&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleBundleTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleBundleTest.java
Tue Jan 26 12:40:37 2010
@@ -21,26 +21,70 @@
 
 package javax.accessibility;
 
+import java.util.Locale;
+
 import junit.framework.TestCase;
 
 public class AccessibleBundleTest extends TestCase {
+    private MockAccessibleBundle bundle;
+
+    private Object[][] resources;
+
+    private static final String ACCESSIBLE_RESOURSE_BUNDLE = "javax.accessibility.AccessibleResourceBundle";
//$NON-NLS-1$
+
+    class MockAccessibleBundle extends AccessibleBundle {
+        public String getKey() {
+            return key;
+        }
+
+        public void setKey(String key) {
+            this.key = key;
+        }
+
+        public String toDisplayString(String resourceBundleName, Locale locale) {
+            return super.toDisplayString(resourceBundleName, locale);
+        }
+    }
 
     @SuppressWarnings("deprecation")
-    public void testToDisplayString() throws Exception {
-        AccessibleBundle bundle = new AccessibleBundle() {
-        };
+    public void setUp() {
+        bundle = new MockAccessibleBundle();
+        resources = new AccessibleResourceBundle().getContents();
+    }
 
-        Object[][] resources = new AccessibleResourceBundle().getContents();
+    public void tearDown() {
+        bundle = null;
+        resources = null;
+    }
 
+    /**
+     * @test {@link javax.accessibility.AccessibleBundle#toDisplayString()}
+     * @add test
+     *      {@link javax.accessibility.AccessibleBundle#toDisplayString(java.util.Locale)}
+     *@add test
+     *      {@link javax.accessibility.AccessibleBundle#toDisplayString(String, java.util.Locale)}
+     */
+    public void testToDisplayString_withoutArgAndWithArg() throws Exception {
         for (int i = 0; i < resources.length; i++) {
-            bundle.key = (String) resources[i][0];
-            assertEquals("DisplayString don't match resource: " + bundle.key, bundle
-                    .toDisplayString(), resources[i][1]);
-            assertEquals("toDisplayString don't match toString: " + bundle.key, bundle
-                    .toString(), bundle.toDisplayString());
+            bundle.setKey((String) resources[i][0]);
+            Locale defaultLocale = Locale.getDefault();
+            String expected = bundle.toDisplayString();
+            String actualWithLocale = bundle.toDisplayString(defaultLocale);
+            String actualWithResourceBundleName = bundle.toDisplayString(
+                    ACCESSIBLE_RESOURSE_BUNDLE, defaultLocale);
+            assertEquals("DisplayString don't match resource: "
+                    + bundle.getKey(), bundle.toDisplayString(),
+                    resources[i][1]);
+            assertEquals("toDisplayString(locale) error ", expected,
+                    actualWithLocale);
+            assertEquals(expected, actualWithResourceBundleName);
+            assertEquals("toDisplayString don't match toString: "
+                    + bundle.getKey(), bundle.toString(), bundle
+                    .toDisplayString());
         }
-        bundle.key = "ShouldNotFindSuchAString";
+        bundle.setKey("ShouldNotFindSuchAString");
         assertEquals("Not bundled DisplayString should match itself",
                 "ShouldNotFindSuchAString", bundle.toDisplayString());
     }
+
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleRelationSetTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleRelationSetTest.java?rev=903199&r1=903198&r2=903199&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleRelationSetTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleRelationSetTest.java
Tue Jan 26 12:40:37 2010
@@ -42,13 +42,18 @@
     }
 
     public void testAccessibleRelationSet() {
-        assertNotNull(set.relations);
+        assertNotNull(set.toArray());
 
         try {
             new AccessibleRelationSet(null);
             fail("expected null pointer exception");
         } catch (NullPointerException e) {
         }
+        AccessibleRelationSet set2 = new AccessibleRelationSet(relations);
+        for (AccessibleRelation re : relations) {
+            assertTrue("new set did not contain the relation", set2.contains(re
+                    .getKey()));
+        }
     }
 
     public void testAddContains() {
@@ -69,7 +74,7 @@
     }
 
     public void testNullOperations() {
-        set.relations = null;
+        set.clear();
         assertFalse("Empty set should not contain any item", set
                 .contains(AccessibleRelation.LABEL_FOR));
         assertNull("Empty set should not contain any item", set
@@ -77,7 +82,7 @@
         assertFalse("Empty set should not contain any item", set.remove(set
                 .get(AccessibleRelation.LABEL_FOR)));
         set.add(new AccessibleRelation(AccessibleRelation.CONTROLLER_FOR));
-        set.relations = null;
+        set.clear();
         set.addAll(relations);
     }
 
@@ -90,11 +95,11 @@
         assertSame(relations[0], set.get(AccessibleRelation.CONTROLLED_BY));
         set.remove(set.get(AccessibleRelation.CONTROLLED_BY));
 
-        set.relations = null;
+        set.clear();
         set.addAll(relations);
         set.addAll(relations);
         assertEquals("Should not add duplicate items in addAll",
-                relations.length, set.relations.size());
+                relations.length, set.size());
     }
 
     public void testGet() {
@@ -106,7 +111,7 @@
 
     public void testClear() {
         set.clear();
-        assertEquals("Cleared array should be empty", 0, set.relations.size());
+        assertEquals("Cleared array should be empty", 0, set.size());
     }
 
     public void testRemove() {
@@ -124,7 +129,7 @@
                 "String representation should contain elements representation",
                 stateSetString.indexOf(relations[1].toString()) >= 0);
 
-        set.relations = null;
+        set.clear();
         set.toString();
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleRelationTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleRelationTest.java?rev=903199&r1=903198&r2=903199&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleRelationTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/accessibility/src/test/api/java/common/javax/accessibility/AccessibleRelationTest.java
Tue Jan 26 12:40:37 2010
@@ -23,7 +23,7 @@
 
     public void testGetKey() {
         AccessibleRelation relation = new AccessibleRelation(AccessibleRelation.LABEL_FOR);
-        assertEquals(relation.key, relation.getKey());
+        assertEquals(AccessibleRelation.LABEL_FOR, relation.getKey());
     }
 
     public void testAccessibleRelation() {
@@ -52,4 +52,27 @@
         assertEquals(1, relation.getTarget().length);
         assertNull(relation.getTarget()[0]);
     }
+
+    /**
+     * @add tests
+     *      {@link javax.accessibility.AccessibleRelation#AccessibleRelation(String, Object)}
+     */
+    public void test_constructor_Ljava_lang_StringLjava_lang_Object() {
+        AccessibleRelation relation = new AccessibleRelation(
+                AccessibleRelation.LABEL_FOR, new String("test"));
+        assertEquals("target[0] did not equals to parameter passed in", "test",
+                (relation.getTarget()[0]).toString());
+    }
+
+    /**
+     * @add tests
+     *      {@link javax.accessibility.AccessibleRelation#AccessibleRelation(String, Object[])}
+     */
+    public void test_constructor_Ljava_lang_String$Ljava_lang_Object() {
+        AccessibleRelation relation = new AccessibleRelation("test",
+                new Object[2]);
+        assertEquals(2, relation.getTarget().length);
+        relation = new AccessibleRelation("test", null);
+        assertEquals(0, relation.getTarget().length);
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/jar/JarFile.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/jar/JarFile.java?rev=903199&r1=903198&r2=903199&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/jar/JarFile.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/jar/JarFile.java
Tue Jan 26 12:40:37 2010
@@ -17,19 +17,19 @@
 
 package java.util.jar;
 
-import java.io.ByteArrayOutputStream;
-import java.util.List;
-import java.util.ArrayList;
 import java.io.File;
 import java.io.FilterInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.ArrayList;
 import java.util.Enumeration;
+import java.util.List;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 
 import org.apache.harmony.archive.internal.nls.Messages;
 import org.apache.harmony.archive.util.Util;
+import org.apache.harmony.luni.util.InputStreamHelper;
 
 /**
  * {@code JarFile} is used to read jar entries and their associated data from
@@ -282,42 +282,6 @@
         return (JarEntry) getEntry(name);
     }
 
-    /*
-     * Drains the entire content from the given input stream and returns it as a
-     * byte[]. The stream is closed after being drained, or if an IOException
-     * occurs.
-     */
-    private byte[] getAllBytesFromStreamAndClose(InputStream is)
-            throws IOException {
-        try {
-            // Initial read
-            byte[] buffer = new byte[1024];
-            int count = is.read(buffer);
-            int nextByte = is.read();
-
-            // Did we get it all in one read?
-            if (nextByte == -1) {
-                byte[] dest = new byte[count];
-                System.arraycopy(buffer, 0, dest, 0, count);
-                return dest;
-            }
-
-            // Requires additional reads
-            ByteArrayOutputStream baos = new ByteArrayOutputStream(count * 2);
-            baos.write(buffer, 0, count);
-            baos.write(nextByte);
-            while (true) {
-                count = is.read(buffer);
-                if (count == -1) {
-                    return baos.toByteArray();
-                }
-                baos.write(buffer, 0, count);
-            }
-        } finally {
-            is.close();
-        }
-    }
-
     /**
      * Returns the {@code Manifest} object associated with this {@code JarFile}
      * or {@code null} if no MANIFEST entry exists.
@@ -340,7 +304,8 @@
         try {
             InputStream is = super.getInputStream(manifestEntry);
             if (verifier != null) {
-                verifier.addMetaEntry(manifestEntry.getName(), getAllBytesFromStreamAndClose(is));
+                verifier.addMetaEntry(manifestEntry.getName(),
+                        InputStreamHelper.readFullyAndClose(is));
                 is = super.getInputStream(manifestEntry);
             }
             try {
@@ -392,7 +357,7 @@
                                 || Util.asciiEndsWithIgnoreCase(entryName, ".RSA"))) {
                     signed = true;
                     InputStream is = super.getInputStream(entry);
-                    byte[] buf = getAllBytesFromStreamAndClose(is);
+                    byte[] buf = InputStreamHelper.readFullyAndClose(is);
                     verifier.addMetaEntry(entryName, buf);
                 }
             }

Modified: harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/jar/Manifest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/jar/Manifest.java?rev=903199&r1=903198&r2=903199&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/jar/Manifest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/jar/Manifest.java
Tue Jan 26 12:40:37 2010
@@ -30,7 +30,7 @@
 import java.util.Map;
 
 import org.apache.harmony.archive.internal.nls.Messages;
-import org.apache.harmony.luni.util.InputStreamExposer;
+import org.apache.harmony.luni.util.InputStreamHelper;
 import org.apache.harmony.luni.util.ThreadLocalCache;
 
 /**
@@ -209,7 +209,7 @@
         byte[] buf;
         // Try to read get a reference to the bytes directly
         try {
-            buf = InputStreamExposer.expose(is);
+            buf = InputStreamHelper.expose(is);
         } catch (UnsupportedOperationException uoe) {
             buf = readFully(is);
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/zip/ZipFile.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/zip/ZipFile.java?rev=903199&r1=903198&r2=903199&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/zip/ZipFile.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/src/main/java/java/util/zip/ZipFile.java
Tue Jan 26 12:40:37 2010
@@ -368,7 +368,6 @@
         RandomAccessFile mSharedRaf;
         long mOffset;
         long mLength;
-        private byte[] singleByteBuf = new byte[1];
 
         public RAFStream(RandomAccessFile raf, long pos) throws IOException {
             mSharedRaf = raf;
@@ -383,6 +382,7 @@
 
         @Override
         public int read() throws IOException {
+            byte[] singleByteBuf = new byte[1];
             if (read(singleByteBuf, 0, 1) == 1) {
                 return singleByteBuf[0] & 0XFF;
             } else {

Modified: harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/zlib/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/zlib/unix/makefile?rev=903199&r1=903198&r2=903199&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/zlib/unix/makefile
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/zlib/unix/makefile
Tue Jan 26 12:40:37 2010
@@ -22,7 +22,7 @@
 
 include $(HY_HDK)/build/make/defines.mk
 
-HYRELEASECFLAGS = -O3
+HYRELEASECFLAGS = -O2
 
 # Further performance improvement on x86 and x86_64
 ifneq (,$(findstring x86,$(HY_ARCH)))



Mime
View raw message