harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r592673 [2/10] - in /harmony/enhanced/classlib/branches/java6: depends/build/ depends/build/platform/ depends/manifests/icu4j_3.8/META-INF/ make/ modules/archive/ modules/archive/src/main/native/archive/unix/ modules/archive/src/main/native...
Date Wed, 07 Nov 2007 09:51:11 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapClient.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapClient.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapClient.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapClient.java Wed Nov  7 01:51:00 2007
@@ -22,18 +22,27 @@
 import java.io.OutputStream;
 import java.net.Socket;
 import java.net.UnknownHostException;
+import java.util.Hashtable;
 
+import javax.naming.CommunicationException;
+import javax.naming.ConfigurationException;
+import javax.naming.Context;
+import javax.naming.NamingException;
 import javax.naming.ldap.Control;
 import javax.net.SocketFactory;
+import javax.net.ssl.SSLSocketFactory;
 
+import org.apache.harmony.jndi.internal.nls.Messages;
 import org.apache.harmony.jndi.provider.ldap.asn1.ASN1Decodable;
 import org.apache.harmony.jndi.provider.ldap.asn1.ASN1Encodable;
+import org.apache.harmony.jndi.provider.ldap.asn1.LdapASN1Constant;
+import org.apache.harmony.security.asn1.ASN1Integer;
 
 /**
  * LdapClient is the actual class used to communicate with Ldap Server.
  * 
  */
-final public class LdapClient {
+public class LdapClient {
     /*
      * Socket used to communicate with Ldap Server.
      */
@@ -49,6 +58,11 @@
      */
     private OutputStream out;
 
+    // constructor for test
+    public LdapClient() {
+        // do nothing
+    }
+
     /**
      * Constructor for LdapClient.
      * 
@@ -108,6 +122,105 @@
         out.flush();
         LdapMessage responseMsg = new LdapMessage(response);
         responseMsg.decode(in);
+        if (opIndex == LdapASN1Constant.OP_SEARCH_REQUEST
+                && responseMsg.getOperationIndex() != LdapASN1Constant.OP_SEARCH_RESULT_DONE) {
+            responseMsg = new LdapMessage(response);
+            responseMsg.decode(in);
+        }
         return responseMsg;
+    }
+
+    public void abandon(final int messageId, Control[] controls)
+            throws IOException {
+        doOperationWithoutResponse(LdapASN1Constant.OP_ABANDON_REQUEST,
+                new ASN1Encodable() {
+
+                    public void encodeValues(Object[] values) {
+                        values[0] = ASN1Integer.fromIntValue(messageId);
+                    }
+
+                }, controls);
+    }
+
+    public void doOperationWithoutResponse(int opIndex, ASN1Encodable op,
+            Control[] controls) throws IOException {
+        LdapMessage request = new LdapMessage(opIndex, op, controls);
+        out.write(request.encode());
+        out.flush();
+    }
+
+    public void close() throws IOException {
+        socket.close();
+    }
+
+    /**
+     * Get new instance of LdapClient according environment variable
+     * 
+     * @param envmt
+     * @return
+     * @throws NamingException
+     */
+    public static LdapClient newInstance(String host, int port,
+            Hashtable<?, ?> envmt) throws NamingException {
+        String factoryName = (String) envmt
+                .get("java.naming.ldap.factory.socket");
+
+        SocketFactory factory = null;
+        if (factoryName == null || "".equals(factoryName)) {
+            if ("ssl".equalsIgnoreCase((String) envmt
+                    .get(Context.SECURITY_PROTOCOL))) {
+                factory = SSLSocketFactory.getDefault();
+            } else {
+                factory = SocketFactory.getDefault();
+            }
+        } else {
+
+            try {
+                factory = (SocketFactory) classForName(factoryName)
+                        .newInstance();
+            } catch (Exception e) {
+                ConfigurationException ex = new ConfigurationException();
+                ex.setRootCause(e);
+                throw ex;
+            }
+        }
+        // TODO: get LdapClient from pool first.
+
+        try {
+            return new LdapClient(factory, host, port);
+
+        } catch (IOException e) {
+            CommunicationException ex = new CommunicationException();
+            ex.setRootCause(e);
+            throw ex;
+        }
+    }
+
+    private static Class<?> classForName(final String className)
+            throws ClassNotFoundException {
+
+        Class<?> cls = null;
+        // try thread context class loader first
+        try {
+            cls = Class.forName(className, true, Thread.currentThread()
+                    .getContextClassLoader());
+        } catch (ClassNotFoundException e) {
+            // Ignored.
+        }
+        // try system class loader second
+        try {
+            cls = Class.forName(className, true, ClassLoader
+                    .getSystemClassLoader());
+        } catch (ClassNotFoundException e1) {
+            // Ignored.
+        }
+
+        if (cls == null) {
+            // jndi.1C=class {0} not found
+            throw new ClassNotFoundException(Messages.getString(
+                    "jndi.1C", className)); //$NON-NLS-1$
+        }
+
+        return cls;
     }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapMessage.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapMessage.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapMessage.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapMessage.java Wed Nov  7 01:51:00 2007
@@ -33,7 +33,7 @@
  * detailed information
  * 
  */
-public class LdapMessage implements ASN1Encodable {
+public class LdapMessage implements ASN1Encodable, ASN1Decodable {
     
     /**
      * operation request which could be encoded using ASN.1 BER
@@ -66,7 +66,14 @@
     public static synchronized int getNextMessageId() {
         return nextMessageId++;
     }
-    
+    /**
+     * Get message id of this message
+     * 
+     * @return id of this message
+     */
+    public int getMessageId() {
+        return messageId;
+    }
     /**
      * Construct a request message. <code>op</code> may not be
      * <code>null</code>. <code>controls</code> is <code>null</code> or a
@@ -131,13 +138,23 @@
         }
         ChosenValue chosen = (ChosenValue) values[1];
         opIndex = chosen.getIndex();
-        responseOp.decodeValues((Object[]) chosen.getValue());
+        if (opIndex == LdapASN1Constant.OP_SEARCH_RESULT_DONE
+                || opIndex == LdapASN1Constant.OP_SEARCH_RESULT_ENTRY
+                || opIndex == LdapASN1Constant.OP_SEARCH_RESULT_REF) {
+            /*
+             * we use LdapSearchResult to decode all types of search responses,
+             * so we need index to determine which type of response to decode
+             */
+            responseOp.decodeValues(new Object[] { chosen });
+        } else {
+            responseOp.decodeValues((Object[]) chosen.getValue());
+        }
 
     }
 
     public void encodeValues(Object[] values) {
         values[0] = ASN1Integer.fromIntValue(messageId);
-        // DelRequest are ASN.1 primitive
+        // Abandon & DelRequest are ASN.1 primitive
         if (opIndex == LdapASN1Constant.OP_ABANDON_REQUEST
                 || opIndex == LdapASN1Constant.OP_DEL_REQUEST) {
             Object[] objs = new Object[1];
@@ -153,7 +170,14 @@
      * 
      * @return id of this message
      */
-    public int getMessageId() {
-        return messageId;
+    /**
+     * Get index of the operation, determine which operation is encapsulated in
+     * this message. If this <code>LdapMessage</code> instance is not initial,
+     * <code>-1</code> will be returned.
+     * 
+     * @return index of the operation encapsulated in the message
+     */
+    public int getOperationIndex() {
+        return opIndex;
     }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/ASN1Decodable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/ASN1Decodable.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/ASN1Decodable.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/ASN1Decodable.java Wed Nov  7 01:51:00 2007
@@ -20,6 +20,9 @@
 /**
  * Retrieves data from ASN.1 data stream.
  * 
+ * @see org.apache.harmony.jndi.provider.ldap.asn1.ASN1Encodable
+ * @see org.apache.harmony.jndi.provider.ldap.asn1.ASN1ChoiceWrap
+ * @see org.apache.harmony.jndi.provider.ldap.asn1.ASN1SequenceWrap
  */
 public interface ASN1Decodable {
 

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/ASN1Encodable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/ASN1Encodable.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/ASN1Encodable.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/ASN1Encodable.java Wed Nov  7 01:51:00 2007
@@ -21,6 +21,9 @@
  * This interface is responsible for encoding data according to ASN.1 type schema.
  * Below is type mapping between ASN.1 and Java.
  * <p>
+ * Note: the mapping of SEQUENCE and CHOICE is supported only when using
+ * corresponding wrapped class ASN1SequenceWrap and ASN1ChoiceWrap
+ * <p>
  * <code>
  * ASN.1                Java
  * BOOLEAN              Boolean
@@ -33,6 +36,8 @@
  * CHOICE               Object[] or ChosenValue
  * </code>
  * 
+ * @see org.apache.harmony.jndi.provider.ldap.asn1.ASN1ChoiceWrap
+ * @see org.apache.harmony.jndi.provider.ldap.asn1.ASN1SequenceWrap
  */
 public interface ASN1Encodable {
 

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/LdapASN1Constant.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/LdapASN1Constant.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/LdapASN1Constant.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/LdapASN1Constant.java Wed Nov  7 01:51:00 2007
@@ -36,34 +36,42 @@
     public static final int OP_BIND_REQUEST = 0;
 
     public static final int OP_BIND_RESPONSE = 1;
+    
+    public static final int OP_SEARCH_REQUEST = 2;
+
+    public static final int OP_SEARCH_RESULT_ENTRY = 3;
 
+    public static final int OP_SEARCH_RESULT_DONE = 4;
+
+    public static final int OP_SEARCH_RESULT_REF = 5;
+    
     // FIXME change them to appropriate index number in the future.
-    public static final int OP_MODIFY_REQUEST = 2;
+    public static final int OP_MODIFY_REQUEST = 6;
     
-    public static final int OP_MODIFY_RESPONSE = 3;
+    public static final int OP_MODIFY_RESPONSE = 7;
 
-    public static final int OP_ADD_REQUEST = 4;
+    public static final int OP_ADD_REQUEST = 8;
     
-    public static final int OP_ADD_RESPONSE = 5;
+    public static final int OP_ADD_RESPONSE = 9;
     
-    public static final int OP_DEL_REQUEST = 6;
+    public static final int OP_DEL_REQUEST = 10;
 
-    public static final int OP_DEL_RESPONSE = 7;
+    public static final int OP_DEL_RESPONSE = 11;
 
-    public static final int OP_MODIFY_DN_REQUEST = 8;
+    public static final int OP_MODIFY_DN_REQUEST = 12;
     
-    public static final int OP_MODIFY_DN_RESPONSE = 9;
+    public static final int OP_MODIFY_DN_RESPONSE = 13;
 
-    public static final int OP_COMPARE_REQUEST = 10;
+    public static final int OP_COMPARE_REQUEST = 14;
     
-    public static final int OP_COMPARE_RESPONSE = 11;
+    public static final int OP_COMPARE_RESPONSE = 15;
 
-    public static final int OP_ABANDON_REQUEST = 12;
+    public static final int OP_ABANDON_REQUEST = 16;
 
-    public static final int OP_EXTENDED_REQUEST = 13;
+    public static final int OP_EXTENDED_REQUEST = 17;
+    
+    public static final int OP_EXTENDED_RESPONSE = 18;
     
-    public static final int OP_EXTENDED_RESPONSE = 14;
-
     public static final ASN1Type Attribute = new ASN1SequenceWrap(
             new ASN1Type[] { ASN1OctetString.getInstance(), // type
                     new ASN1SetOf(ASN1OctetString.getInstance()) }); // vals
@@ -134,6 +142,9 @@
                         }
                     }));
     
+    public static final ASN1Type UnbindRequest = new ASN1Implicit(
+            ASN1Constants.CLASS_APPLICATION, 2, ASN1Null.getInstance());
+    
     public static final ASN1Type AttributeValueAssertion = new ASN1SequenceWrap(
             new ASN1Type[] { ASN1OctetString.getInstance(), // attributeDesc
                     ASN1OctetString.getInstance() }); // assertionValue
@@ -223,12 +234,105 @@
     public static final ASN1Type ModifyResponse = new ASN1Implicit(
             ASN1Constants.CLASS_APPLICATION, 7, LDAPResult);
     
+    public static final ASN1Type SubstringFilter = new ASN1SequenceWrap(
+            new ASN1Type[] {
+                    ASN1OctetString.getInstance(), // type
+                    new ASN1SequenceOf(
+                            new ASN1ChoiceWrap(new ASN1Type[] { // substrings
+                                            new ASN1Implicit(
+                                                    // initial
+                                                    ASN1Constants.CLASS_CONTEXTSPECIFIC,
+                                                    0, ASN1OctetString
+                                                            .getInstance()),
+                                            new ASN1Implicit(
+                                                    // any
+                                                    ASN1Constants.CLASS_CONTEXTSPECIFIC,
+                                                    1, ASN1OctetString
+                                                            .getInstance()),
+                                            new ASN1Implicit(
+                                                    // final
+                                                    ASN1Constants.CLASS_CONTEXTSPECIFIC,
+                                                    2, ASN1OctetString
+                                                            .getInstance()) })) });
+    
+    public static final ASN1Type MatchingRuleAssertion = new ASN1SequenceWrap(
+            new ASN1Type[] {
+                    new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 1, // matchingRule
+                            ASN1OctetString.getInstance()),
+                    new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 2, // type
+                            ASN1OctetString.getInstance()),
+                    new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 3, // matchValue
+                            ASN1OctetString.getInstance()),
+                    new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 4, // dnAttributes
+                            ASN1Boolean.getInstance()) }) {
+        {
+            setOptional(0);
+            setOptional(1);
+            setDefault(Boolean.FALSE, 3);
+        }
+    };
+    
+    public static final ASN1Type Filter = new ASN1ChoiceWrap(new ASN1Type[] {
+            new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 0,
+                    new ASN1SetOf(new ASN1LdapFilter())),
+            new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 1,
+                    new ASN1SetOf(new ASN1LdapFilter())),
+            new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 2,
+                    new ASN1LdapFilter()),
+            new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 3,
+                    AttributeValueAssertion),
+            new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 4,
+                    SubstringFilter),
+            new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 5,
+                    AttributeValueAssertion),
+            new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 6,
+                    AttributeValueAssertion),
+            new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 7,
+                    ASN1OctetString.getInstance()),
+            new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 8,
+                    AttributeValueAssertion),
+            new ASN1Implicit(ASN1Constants.CLASS_CONTEXTSPECIFIC, 9,
+                    MatchingRuleAssertion) });
+    
+    public static final ASN1Type SearchRequest = new ASN1Implicit(
+            ASN1Constants.CLASS_APPLICATION, 3,
+            new ASN1SequenceWrap(new ASN1Type[] {
+                    ASN1OctetString.getInstance(), // baseObject
+                    ASN1Enumerated.getInstance(), // scope
+                    ASN1Enumerated.getInstance(), // derefAliases
+                    ASN1Integer.getInstance(), // sizeLimit
+                    ASN1Integer.getInstance(), // timeLimit
+                    ASN1Boolean.getInstance(), // typesonly
+                    Filter, // Filter
+                    new ASN1SequenceOf(ASN1OctetString.getInstance()) })); // attributes
+    
+    public static final ASN1Type PartialAttributeList = new ASN1SequenceOf(
+            new ASN1SequenceWrap(new ASN1Type[] {
+                    ASN1OctetString.getInstance(), // type
+                    new ASN1SetOf(ASN1OctetString.getInstance()) })); // vals
+    
+    public static final ASN1Type SearchResultEntry = new ASN1Implicit(
+            ASN1Constants.CLASS_APPLICATION, 4, new ASN1SequenceWrap(
+                    new ASN1Type[] { ASN1OctetString.getInstance(), // objectName
+                            PartialAttributeList })); // attributes
+    
+    public static final ASN1Type SearchResultReference = new ASN1Implicit(
+            ASN1Constants.CLASS_APPLICATION, 19, new ASN1SequenceOf(
+                    ASN1OctetString.getInstance()));
+    
+    public static final ASN1Type SearchResultDone = new ASN1Implicit(
+            ASN1Constants.CLASS_APPLICATION, 5, LDAPResult);
+    
     public static final ASN1Type LDAPMessage = new ASN1SequenceWrap(
             new ASN1Type[] {
                     ASN1Integer.getInstance(),
                     new ASN1ChoiceWrap(new ASN1Type[] { 
                             BindRequest,
                             BindResponse,
+                            SearchRequest,
+                            SearchResultEntry, 
+                            SearchResultDone,
+                            SearchResultReference, 
                             ModifyRequest,
                             ModifyResponse, 
                             AddRequest,

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/test/java/org/apache/harmony/jndi/provider/ldap/asn1/ASN1TestUtils.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/test/java/org/apache/harmony/jndi/provider/ldap/asn1/ASN1TestUtils.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/test/java/org/apache/harmony/jndi/provider/ldap/asn1/ASN1TestUtils.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/test/java/org/apache/harmony/jndi/provider/ldap/asn1/ASN1TestUtils.java Wed Nov  7 01:51:00 2007
@@ -66,9 +66,15 @@
             }
         } else if (type instanceof ASN1ChoiceWrap) {
             checkEncodeChoice(value, (ASN1ChoiceWrap) type);
+        }  else if (type instanceof ASN1LdapFilter) {
+            checkEncodeFilter(value, (ASN1LdapFilter) type);
         } else {
             Assert.fail("Not supported ASN.1 type");
         }
+    }
+
+    private static void checkEncodeFilter(Object value, ASN1LdapFilter filter) {
+        checkEncode(value, LdapASN1Constant.Filter);
     }
 
     private static void checkEncodeChoice(Object value, ASN1ChoiceWrap type) {

Modified: harmony/enhanced/classlib/branches/java6/modules/lang-management/make/exclude.linux.x86.ibm
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/lang-management/make/exclude.linux.x86.ibm?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/lang-management/make/exclude.linux.x86.ibm (original)
+++ harmony/enhanced/classlib/branches/java6/modules/lang-management/make/exclude.linux.x86.ibm Wed Nov  7 01:51:00 2007
@@ -1,14 +1,11 @@
 org/apache/harmony/lang/management/ClassLoadingMXBeanImplTest.java
 org/apache/harmony/lang/management/CompilationMXBeanImplTest.java
-org/apache/harmony/lang/management/DynamicMXBeanImplTest.java
 org/apache/harmony/lang/management/GarbageCollectorMXBeanImplTest.java
 org/apache/harmony/lang/management/LoggingMXBeanImplTest.java
 org/apache/harmony/lang/management/MemoryManagerImplTest.java
 org/apache/harmony/lang/management/MemoryMXBeanImplTest.java
 org/apache/harmony/lang/management/MemoryPoolMXBeanImplTest.java
-org/apache/harmony/lang/management/MultiInstanceDynamicMXBeanImplTest.java
 org/apache/harmony/lang/management/RuntimeMXBeanImplTest.java
-org/apache/harmony/lang/management/SingleInstanceDynamicMXBeanImplTest.java
 org/apache/harmony/lang/management/ThreadInfoTest.java
 org/apache/harmony/lang/management/ThreadMXBeanImplTest.java
 

Modified: harmony/enhanced/classlib/branches/java6/modules/lang-management/make/exclude.windows.x86.ibm
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/lang-management/make/exclude.windows.x86.ibm?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/lang-management/make/exclude.windows.x86.ibm (original)
+++ harmony/enhanced/classlib/branches/java6/modules/lang-management/make/exclude.windows.x86.ibm Wed Nov  7 01:51:00 2007
@@ -1,14 +1,11 @@
 org/apache/harmony/lang/management/ClassLoadingMXBeanImplTest.java
 org/apache/harmony/lang/management/CompilationMXBeanImplTest.java
-org/apache/harmony/lang/management/DynamicMXBeanImplTest.java
 org/apache/harmony/lang/management/GarbageCollectorMXBeanImplTest.java
 org/apache/harmony/lang/management/LoggingMXBeanImplTest.java
 org/apache/harmony/lang/management/MemoryManagerImplTest.java
 org/apache/harmony/lang/management/MemoryMXBeanImplTest.java
 org/apache/harmony/lang/management/MemoryPoolMXBeanImplTest.java
-org/apache/harmony/lang/management/MultiInstanceDynamicMXBeanImplTest.java
 org/apache/harmony/lang/management/RuntimeMXBeanImplTest.java
-org/apache/harmony/lang/management/SingleInstanceDynamicMXBeanImplTest.java
 org/apache/harmony/lang/management/ThreadInfoTest.java
 org/apache/harmony/lang/management/ThreadMXBeanImplTest.java
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/build.xml?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/build.xml Wed Nov  7 01:51:00 2007
@@ -111,6 +111,10 @@
             <fileset dir="${hy.luni.src.main.native}/vmi">
                 <include name="libvmi${shlib.suffix}"/>
             </fileset>
+            <!-- Copy link exports file on z/OS -->
+            <fileset dir="${hy.luni.src.main.native}/vmi/${hy.os.family}">
+                <include name="*${linklib.suffix}" if="is.zos" />
+            </fileset>
         </copy>
     </target>
 
@@ -129,6 +133,12 @@
                 <exclude name="*${manifest.suffix}"/>
             </fileset>
         </copy>
+        <!-- Copy link exports file on z/OS -->
+        <copy todir="${hy.hdk}/lib" overwrite="yes">
+            <fileset dir="${hy.luni.src.main.native}/luni/${hy.os.family}">
+                <include name="*${linklib.suffix}" if="is.zos" />
+            </fileset>
+        </copy>
 
         <!-- Build vmls lib -->
         <make dir="${hy.luni.src.main.native}/vmls/${hy.os.family}" />
@@ -161,6 +171,24 @@
     <target name="overlay-oss" >
         <unzip src="${fdlibm.zip}" dest="${hy.luni.src.main.native}/fdlibm_dist" />
         <chmod dir="${hy.luni.src.main.native}/fdlibm_dist" perm="ugo+r" />
+        <antcall target="-ascii2ebcdic-conversion" />
+    </target>
+
+    <target name="-ascii2ebcdic-conversion" if="is.zos">
+        <move todir="${hy.luni.src.main.native}/fdlibm_dist_ascii">
+            <fileset dir="${hy.luni.src.main.native}/fdlibm_dist">
+                <include name="**/*" />
+                <exclude name="**/*.o" />
+            </fileset>
+        </move>
+        <copy todir="${hy.luni.src.main.native}/fdlibm_dist" outputencoding="IBM-1047" >
+            <fileset dir="${hy.luni.src.main.native}/fdlibm_dist_ascii">
+                <include name="**/*" />
+                <exclude name="**/*.o" />
+            </fileset>               
+        </copy>
+        <fixcrlf srcdir="${hy.luni.src.main.native}/fdlibm_dist" includes="**/*" excludes="**/*.o" eol="unix" />
+        <delete dir="${hy.luni.src.main.native}/fdlibm_dist_ascii" />
     </target>
 
     <!-- Clean overlaid OSS packages -->

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.common?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.common (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.common Wed Nov  7 01:51:00 2007
@@ -1,2 +1,7 @@
 tests/api/java/net/URLClassLoaderTest.java
 tests/api/java/net/ExcludedProxyTest.java
+tests/api/java/util/CurrencyTest.java
+tests/api/java/util/FormatterTest.java
+tests/api/java/util/GregorianCalendarTest.java
+tests/api/java/util/LocaleTest.java
+tests/api/java/util/ScannerTest.java

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86.drl?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86.drl (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86.drl Wed Nov  7 01:51:00 2007
@@ -1,6 +1,5 @@
 org/apache/harmony/luni/tests/java/lang/ThreadTest.java
-org/apache/harmony/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
 tests/api/java/net/SocketTest.java
 
-# HARMONY-4753
+# HARMONY-4043 (was duplicate HARMONY-4753)
 org/apache/harmony/luni/tests/java/lang/SecurityManager2Test.java

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86.drl.interm
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86.drl.interm?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86.drl.interm (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86.drl.interm Wed Nov  7 01:51:00 2007
@@ -1,3 +1,2 @@
 #2315
 org/apache/harmony/luni/tests/java/net/InetAddressTest.java
-org/apache/harmony/tests/java/net/InetAddressTest.java

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86.ibm
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86.ibm?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86.ibm (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86.ibm Wed Nov  7 01:51:00 2007
@@ -1,4 +1,5 @@
 tests/api/java/util/PropertiesTest.java
-org/apache/harmony/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
 org/apache/harmony/luni/tests/java/lang/SecurityManager2Test.java
 org/apache/harmony/luni/tests/java/lang/PackageTest.java
+org/apache/harmony/luni/tests/java/lang/PackageTest.java
+org/apache/harmony/luni/tests/java/net/InetAddressTest.java

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86_64.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86_64.drl?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86_64.drl (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.linux.x86_64.drl Wed Nov  7 01:51:00 2007
@@ -1,8 +1,7 @@
 org/apache/harmony/luni/tests/java/net/InetAddressTest.java
 org/apache/harmony/luni/tests/java/lang/ThreadTest.java
-org/apache/harmony/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java
 tests/api/java/net/SocketTest.java
 tests/api/java/net/MulticastSocketTest.java
 
-# HARMONY-4753
+# HARMONY-4043 (was duplicate HARMONY-4753)
 org/apache/harmony/luni/tests/java/lang/SecurityManager2Test.java

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.windows.x86.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.windows.x86.drl?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.windows.x86.drl (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.windows.x86.drl Wed Nov  7 01:51:00 2007
@@ -1,2 +1,2 @@
-# HARMONY-4753
+# HARMONY-4043 (was duplicate HARMONY-4753)
 org/apache/harmony/luni/tests/java/lang/SecurityManager2Test.java

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.windows.x86_64.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.windows.x86_64.drl?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.windows.x86_64.drl (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/make/exclude.windows.x86_64.drl Wed Nov  7 01:51:00 2007
@@ -1,5 +1,5 @@
 tests/api/java/net/MulticastSocketTest.java
 tests/api/java/util/ArrayListTest.java
 
-# HARMONY-4753
+# HARMONY-4043 (was duplicate HARMONY-4753)
 org/apache/harmony/luni/tests/java/lang/SecurityManager2Test.java

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Calendar.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Calendar.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Calendar.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Calendar.java Wed Nov  7 01:51:00 2007
@@ -156,12 +156,13 @@
 	 *            the locale
 	 */
 	protected Calendar(TimeZone timezone, Locale locale) {
-		this(timezone);
-		ResourceBundle bundle = Locale.getBundle("Locale", locale); //$NON-NLS-1$
-		setFirstDayOfWeek(((Integer) bundle.getObject("First_Day")).intValue()); //$NON-NLS-1$
-		setMinimalDaysInFirstWeek(((Integer) bundle.getObject("Minimal_Days")) //$NON-NLS-1$
-				.intValue());
-	}
+        this(timezone);
+        com.ibm.icu.util.Calendar icuCalendar = com.ibm.icu.util.Calendar
+                .getInstance(com.ibm.icu.util.SimpleTimeZone
+                        .getTimeZone(timezone.getID()), locale);
+        setFirstDayOfWeek(icuCalendar.getFirstDayOfWeek());
+        setMinimalDaysInFirstWeek(icuCalendar.getMinimalDaysInFirstWeek());
+    }
 
 	/**
 	 * Adds the specified amount to a Calendar field.

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Currency.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Currency.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Currency.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Currency.java Wed Nov  7 01:51:00 2007
@@ -19,8 +19,6 @@
 
 import java.io.Serializable;
 
-import org.apache.harmony.luni.util.Msg;
-
 /**
  * This class represents a currency as identified in the ISO 4217 currency
  * codes.
@@ -33,10 +31,6 @@
 
     private String currencyCode;
 
-    private static String currencyVars = "EURO, HK, PREEURO"; //$NON-NLS-1$
-
-    private transient int defaultFractionDigits;
-
     /**
      * @param currencyCode
      */
@@ -60,20 +54,7 @@
         Currency currency = codesToCurrencies.get(currencyCode);
 
         if (currency == null) {
-            ResourceBundle bundle = Locale.getBundle(
-                    "ISO4CurrenciesToDigits", Locale.getDefault()); //$NON-NLS-1$
             currency = new Currency(currencyCode);
-
-            String defaultFractionDigits = null;
-            try {
-                defaultFractionDigits = bundle.getString(currencyCode);
-            } catch (MissingResourceException e) {
-                throw new IllegalArgumentException(
-                        org.apache.harmony.luni.util.Msg.getString(
-                                "K0322", currencyCode)); //$NON-NLS-1$
-            }
-            currency.defaultFractionDigits = Integer
-                    .parseInt(defaultFractionDigits);
             codesToCurrencies.put(currencyCode, currency);
         }
 
@@ -91,21 +72,11 @@
      *             if the locale's country is not a supported ISO 3166 Country
      */
     public static Currency getInstance(Locale locale) {
-        String country = locale.getCountry();
-        String variant = locale.getVariant();
-        if (!variant.equals("") && currencyVars.indexOf(variant) > -1) { //$NON-NLS-1$
-            country = country + "_" + variant; //$NON-NLS-1$
-        }
-
-        ResourceBundle bundle = Locale.getBundle(
-                "ISO4Currencies", Locale.getDefault()); //$NON-NLS-1$
-        String currencyCode = null;
-        try {
-            currencyCode = bundle.getString(country);
-        } catch (MissingResourceException e) {
-            throw new IllegalArgumentException(Msg.getString(
-                    "K0323", locale.toString())); //$NON-NLS-1$
+        com.ibm.icu.util.Currency currency = com.ibm.icu.util.Currency.getInstance(locale);
+        if(currency == null) {
+            return null;
         }
+        String currencyCode = currency.getCurrencyCode();
 
         if (currencyCode.equals("None")) { //$NON-NLS-1$
             return null;
@@ -161,35 +132,7 @@
         if (locale.getCountry().equals("")) { //$NON-NLS-1$
             return currencyCode;
         }
-
-        // check in the Locale bundle first, if the local has the same currency
-        ResourceBundle bundle = Locale.getBundle("Locale", locale); //$NON-NLS-1$
-        if (((String) bundle.getObject("IntCurrencySymbol")) //$NON-NLS-1$
-                .equals(currencyCode)) {
-            return (String) bundle.getObject("CurrencySymbol"); //$NON-NLS-1$
-        }
-
-        // search for a Currency bundle
-        bundle = null;
-        try {
-            bundle = Locale.getBundle("Currency", locale); //$NON-NLS-1$
-        } catch (MissingResourceException e) {
-            return currencyCode;
-        }
-
-        // is the bundle found for a different country? (for instance the
-        // default locale's currency bundle)
-        if (!bundle.getLocale().getCountry().equals(locale.getCountry())) {
-            return currencyCode;
-        }
-
-        // check if the currency bundle for this locale
-        // has an entry for this currency
-        String result = (String) bundle.handleGetObject(currencyCode);
-        if (result != null) {
-            return result;
-        }
-        return currencyCode;
+        return com.ibm.icu.util.Currency.getInstance(currencyCode).getSymbol(locale);
     }
 
     /**
@@ -200,7 +143,7 @@
      * @return the default number of fraction digits for this currency
      */
     public int getDefaultFractionDigits() {
-        return defaultFractionDigits;
+        return com.ibm.icu.util.Currency.getInstance(currencyCode).getDefaultFractionDigits();
     }
 
     /**

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java Wed Nov  7 01:51:00 2007
@@ -24,14 +24,12 @@
 import java.io.ObjectStreamField;
 import java.io.Serializable;
 import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 
-import org.apache.harmony.luni.internal.locale.Country;
-import org.apache.harmony.luni.internal.locale.Language;
 import org.apache.harmony.luni.util.PriviAction;
-import org.apache.harmony.luni.util.Util;
+
+import com.ibm.icu.util.ULocale;
 
 /**
  * Locale represents a language/country/variant combination. It is an identifier
@@ -46,8 +44,6 @@
 	
 	private static final long serialVersionUID = 9149081749638150636L;
 
-	private static volatile Locale[] availableLocales;
-
 	// Initialize a default which is used during static
 	// initialization of the default for the platform.
 	private static Locale defaultLocale = new Locale();
@@ -180,6 +176,8 @@
     private transient String languageCode;
     private transient String variantCode;
 
+    private transient ULocale uLocale;
+
 	/**
 	 * Constructs a default which is used during static initialization of the
 	 * default for the platform.
@@ -224,7 +222,14 @@
         if (language == null || country == null || variant == null) {
             throw new NullPointerException();
         }
-        languageCode = Util.toASCIILowerCase(language);
+        if(language.length() == 0 && country.length() == 0){
+            languageCode = "";
+            countryCode = "";
+            variantCode = variant;
+            return;
+        }
+        this.uLocale = new ULocale(language, country, variant);
+        languageCode = uLocale.getLanguage();
         // Map new language codes to the obsolete language
         // codes so the correct resource bundles will be used.
         if (languageCode.equals("he")) {//$NON-NLS-1$
@@ -236,9 +241,9 @@
         }
 
         // countryCode is defined in ASCII character set
-        countryCode = Util.toASCIIUpperCase(country);
+        countryCode = uLocale.getCountry();
 
-        variantCode = variant;
+        variantCode = uLocale.getVariant();
     }
 
 	/**
@@ -373,15 +378,12 @@
 	 * @return an array of Locale
 	 */
 	public static Locale[] getAvailableLocales() {
-		if (availableLocales == null) {
-            availableLocales = AccessController
-                    .doPrivileged(new PrivilegedAction<Locale[]>() {
-                        public Locale[] run() {
-                            return find("org/apache/harmony/luni/internal/locale/Locale_"); //$NON-NLS-1$
-                        }
-                    });
+		ULocale[] ulocales =  ULocale.getAvailableLocales();
+        Locale[] locales = new Locale[ulocales.length];
+        for (int i = 0; i < locales.length; i++) {
+            locales[i] = ulocales[i].toLocale();
         }
-		return availableLocales.clone();
+        return locales;
 	}
 
 	/**
@@ -423,24 +425,7 @@
 	 * @return a country name
 	 */
 	public String getDisplayCountry(Locale locale) {
-		if (countryCode.length() == 0) {
-            return countryCode;
-        }
-		try {
-			// First try the specified locale
-			ResourceBundle bundle = getBundle("Country", locale); //$NON-NLS-1$
-			String result = (String) bundle.handleGetObject(countryCode);
-			if (result != null) {
-                return result;
-            }
-			// Now use the default locale
-			if (locale != Locale.getDefault()) {
-                bundle = getBundle("Country", Locale.getDefault()); //$NON-NLS-1$
-            }
-			return bundle.getString(countryCode);
-		} catch (MissingResourceException e) {
-			return countryCode;
-		}
+		return ULocale.forLocale(this).getDisplayCountry(ULocale.forLocale(locale));
 	}
 
 	/**
@@ -464,24 +449,7 @@
 	 * @return a language name
 	 */
 	public String getDisplayLanguage(Locale locale) {
-		if (languageCode.length() == 0) {
-            return languageCode;
-        }
-		try {
-			// First try the specified locale
-			ResourceBundle bundle = getBundle("Language", locale); //$NON-NLS-1$
-			String result = (String) bundle.handleGetObject(languageCode);
-			if (result != null) {
-                return result;
-            }
-			// Now use the default locale
-			if (locale != Locale.getDefault()) {
-                bundle = getBundle("Language", Locale.getDefault()); //$NON-NLS-1$
-            }
-			return bundle.getString(languageCode);
-		} catch (MissingResourceException e) {
-			return languageCode;
-		}
+        return ULocale.forLocale(this).getDisplayLanguage(ULocale.forLocale(locale));
 	}
 
 	/**
@@ -552,31 +520,7 @@
 	 * @return a variant name
 	 */
 	public String getDisplayVariant(Locale locale) {
-		if (variantCode.length() == 0) {
-            return variantCode;
-        }
-		ResourceBundle bundle;
-		try {
-			bundle = getBundle("Variant", locale); //$NON-NLS-1$
-		} catch (MissingResourceException e) {
-			return variantCode.replace('_', ',');
-		}
-
-		StringBuffer result = new StringBuffer();
-		StringTokenizer tokens = new StringTokenizer(variantCode, "_"); //$NON-NLS-1$
-		while (tokens.hasMoreTokens()) {
-			String code, variant = tokens.nextToken();
-			try {
-				code = bundle.getString(variant);
-			} catch (MissingResourceException e) {
-				code = variant;
-			}
-			result.append(code);
-			if (tokens.hasMoreTokens()) {
-                result.append(',');
-            }
-		}
-		return result.toString();
+        return ULocale.forLocale(this).getDisplayVariant(ULocale.forLocale(locale));
 	}
 
 	/**
@@ -589,11 +533,7 @@
 	 *                when there is no matching three letter ISO country code
 	 */
 	public String getISO3Country() throws MissingResourceException {
-		if (countryCode.length() == 0) {
-            return ""; //$NON-NLS-1$
-        }
-		ResourceBundle bundle = getBundle("ISO3Countries", this); //$NON-NLS-1$
-		return bundle.getString(countryCode);
+        return ULocale.forLocale(this).getISO3Country();
 	}
 
 	/**
@@ -606,11 +546,7 @@
 	 *                when there is no matching three letter ISO language code
 	 */
 	public String getISO3Language() throws MissingResourceException {
-		if (languageCode.length() == 0) {
-            return ""; //$NON-NLS-1$
-        }
-		ResourceBundle bundle = getBundle("ISO3Languages", this); //$NON-NLS-1$
-		return bundle.getString(languageCode);
+        return ULocale.forLocale(this).getISO3Language();
 	}
 
 	/**
@@ -620,18 +556,7 @@
 	 * @return an array of String
 	 */
 	public static String[] getISOCountries() {
-        ListResourceBundle bundle = new Country();
-
-        // To initialize the table
-        Enumeration<String> keys = bundle.getKeys(); 
-        int size = bundle.table.size();
-        String[] result = new String[size];
-        int index = 0;
-        while (keys.hasMoreElements()) {
-            String element = keys.nextElement();
-            result[index++] = element;
-        }
-        return result;
+        return ULocale.getISOCountries();
     }
 
 	/**
@@ -641,14 +566,7 @@
 	 * @return an array of String
 	 */
 	public static String[] getISOLanguages() {
-		ListResourceBundle bundle = new Language();
-		Enumeration<String> keys = bundle.getKeys(); // to initialize the table
-		String[] result = new String[bundle.table.size()];
-		int index = 0;
-		while (keys.hasMoreElements()) {
-            result[index++] = keys.nextElement();
-        }
-		return result;
+        return ULocale.getISOLanguages();
 	}
 
 	/**
@@ -727,15 +645,6 @@
 			result.append(variantCode);
 		}
 		return result.toString();
-	}
-
-	static ResourceBundle getBundle(final String clName, final Locale locale) {
-		return AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() {
-					public ResourceBundle run() {
-						return ResourceBundle.getBundle("org.apache.harmony.luni.internal.locale." //$NON-NLS-1$
-								+ clName, locale);
-					}
-				});
 	}
 
 	private static final ObjectStreamField[] serialPersistentFields = {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/TimeZone.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/TimeZone.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/TimeZone.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/TimeZone.java Wed Nov  7 01:51:00 2007
@@ -20,6 +20,7 @@
 
 import java.io.Serializable;
 import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.text.DateFormatSymbols;
 
 import org.apache.harmony.luni.util.PriviAction;
@@ -445,8 +446,27 @@
 	 */
 	public static synchronized void setDefault(TimeZone timezone) {
 		if (timezone != null) {
-			Default = timezone;
-			return;
+            final com.ibm.icu.util.TimeZone icuTZ = com.ibm.icu.util.TimeZone
+                    .getTimeZone(timezone.getID());
+
+            AccessController
+                    .doPrivileged(new PrivilegedAction<java.lang.reflect.Field>() {
+                        public java.lang.reflect.Field run() {
+                            java.lang.reflect.Field field = null;
+                            try {
+                                field = com.ibm.icu.util.TimeZone.class
+                                        .getDeclaredField("defaultZone");
+                                field.setAccessible(true);
+                                field.set("defaultZone", icuTZ);
+                            } catch (Exception e) {
+                                return null;
+                            }
+                            return field;
+                        }
+                    });
+            
+            Default = timezone;
+            return;
 		}
 
 		String zone = AccessController.doPrivileged(new PriviAction<String>(

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/fdlibm/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/fdlibm/unix/makefile?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/fdlibm/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/fdlibm/unix/makefile Wed Nov  7 01:51:00 2007
@@ -44,8 +44,11 @@
 	$(FDLIBM_DIST)w_log.o $(FDLIBM_DIST)w_log10.o $(FDLIBM_DIST)w_pow.o $(FDLIBM_DIST)w_remainder.o \
 	$(FDLIBM_DIST)w_scalb.o $(FDLIBM_DIST)w_sinh.o $(FDLIBM_DIST)w_sqrt.o
 
-# OPTS is overriden
+# OPT is overriden except on zOS (fpic, for example, is not an option on zOS)
+ifneq ($(HY_OS),zos)
 OPT = -O0 -ffloat-store -fpic
+endif
+
 DEFINES += -D_IEEE_LIBM
 
 LIBNAME = $(LIBPATH)libhyfdlibm.a

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/launcher/shared/main.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/launcher/shared/main.c?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/launcher/shared/main.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/launcher/shared/main.c Wed Nov  7 01:51:00 2007
@@ -29,6 +29,10 @@
 #endif /* HY_NO_THR */
 #include <string.h>
 #include <stdlib.h>
+#ifdef ZOS
+#include <unistd.h>
+#endif
+
 
 #define PORT_LIB_OPTION "_org.apache.harmony.vmi.portlib"
 
@@ -46,7 +50,7 @@
 #define PLATFORM_STRNICMP strnicmp
 #endif
 
-#if defined(LINUX) || defined(FREEBSD) || defined(AIX) || defined(MACOSX)
+#if defined(LINUX) || defined(FREEBSD) || defined(AIX) || defined(MACOSX) || defined(ZOS)
 #define PLATFORM_STRNICMP strncasecmp
 #endif
 
@@ -1196,11 +1200,14 @@
     }
   stringMid = ((*env)->GetMethodID (env, stringClass, "<init>", "([BII)V"));
 
+#ifndef ZOS /* Only do UTF conversion on non-z/OS platforms*/
   if (nameIsUTF)
-    {
+#endif /* !ZOS */
+  {
       cls = (*env)->FindClass (env, slashifiedClassName);
       portLibrary->mem_free_memory (portLibrary, slashifiedClassName);
     }
+#ifndef ZOS
   else
     {
       rc =
@@ -1236,10 +1243,12 @@
           rc = 12;
           goto done;
         }
+
       cls = (*env)->FindClass (env, utfClassName);
       (*env)->ReleaseStringUTFChars (env, str, utfClassName);
       (*env)->DeleteLocalRef (env, str);
     }
+#endif /* !ZOS */
 
   if (!cls)
     {
@@ -1259,6 +1268,7 @@
     }
   for (i = 0; i < java_argc; ++i)
     {
+#ifndef ZOS /* Only convert the option strings on non-zOS platforms */
       rc =
         convertString (env, portLibrary, stringClass, stringMid, java_argv[i],
                        &str);
@@ -1282,6 +1292,9 @@
         }
 
       (*env)->SetObjectArrayElement (env, args, i, str);
+#else
+      (*env)->SetObjectArrayElement (env, args, i, (*env)->NewStringUTF(env, java_argv[i]));
+#endif /* !ZOS */
       if ((*env)->ExceptionCheck (env))
         {
           /* HYNLS_EXELIB_INTERNAL_VM_ERR_FAILED_SET_ARRAY_ELEM=Internal VM error: Failed to set array element for %s\n */
@@ -1291,7 +1304,9 @@
           rc = 9;
           goto done;
         }
+#ifndef ZOS
       (*env)->DeleteLocalRef (env, str);
+#endif /* !ZOS */
     }
 
   mid =

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/launcher/unix/main_hlp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/launcher/unix/main_hlp.c?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/launcher/unix/main_hlp.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/launcher/unix/main_hlp.c Wed Nov  7 01:51:00 2007
@@ -26,6 +26,17 @@
 #include <pwd.h>
 #include <sys/types.h>
 
+#if defined(ZOS)
+/* zOS does not define PATH_MAX, so just set it to be _POSIX_PATH_MAX */
+#ifndef PATH_MAX
+#define PATH_MAX _POSIX_PATH_MAX
+#endif
+/* Need to define this to get RTLD_NOW on zOS */
+#ifndef __SUSV3
+#define __SUSV3
+#endif
+#endif
+
 #if defined(LINUX)
 #include <sys/sysinfo.h>
 #endif

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/cbigint.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/cbigint.c?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/cbigint.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/cbigint.c Wed Nov  7 01:51:00 2007
@@ -18,7 +18,7 @@
 #include <string.h>
 #include "cbigint.h"
 
-#if defined(LINUX) || defined(FREEBSD)
+#if defined(LINUX) || defined(FREEBSD) || defined(ZOS)
 #define USE_LL
 #endif
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/dblparse.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/dblparse.c?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/dblparse.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/dblparse.c Wed Nov  7 01:51:00 2007
@@ -22,7 +22,7 @@
 #include "harmonyglob.h"
 #include "exceptions.h"
 
-#if defined(LINUX) || defined(FREEBSD)
+#if defined(LINUX) || defined(FREEBSD) || defined(ZOS)
 #define USE_LL
 #endif
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/fltparse.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/fltparse.c?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/fltparse.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/fltparse.c Wed Nov  7 01:51:00 2007
@@ -22,7 +22,7 @@
 #include "harmonyglob.h"
 #include "exceptions.h"
 
-#if defined(LINUX)
+#if defined(LINUX) || defined(ZOS)
 #define USE_LL
 #endif
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/luniglob.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/luniglob.c?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/luniglob.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/luniglob.c Wed Nov  7 01:51:00 2007
@@ -333,7 +333,9 @@
     {
         unsigned i = 0;
         /* Make a string version of the CP separator */
-        char cpSeparator[] = {(char)hysysinfo_get_classpathSeparator (), '\0'};
+        char cpSeparator[2];
+        cpSeparator[0] = (char)hysysinfo_get_classpathSeparator();
+        cpSeparator[1] = '\0';
 		
         /* Read current value of bootclasspath property */
         rcGetProperty = (*vmInterface)->GetSystemProperty (vmInterface,

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c Wed Nov  7 01:51:00 2007
@@ -23,7 +23,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
-#if defined(FREEBSD)
+#if defined(FREEBSD) || defined(ZOS)
 #include <sys/types.h>
 #include <sys/socket.h>
 #else

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c Wed Nov  7 01:51:00 2007
@@ -30,6 +30,11 @@
 #include "OSMemory.h"
 #include "IMemorySystem.h"
 
+/* z/OS mman.h does not define MAP_FAILED - it should always be ((void*)-1) */
+#ifndef MAP_FAILED
+#define MAP_FAILED      ((void *) -1)
+#endif
+
 #define	OS_JNI(func) JNICALL Java_org_apache_harmony_luni_platform_OSMemory_##func
 
 JNIEXPORT jboolean JNICALL Java_org_apache_harmony_luni_platform_OSMemory_isLittleEndianImpl(JNIEnv * env, jclass clazz)
@@ -67,6 +72,7 @@
 
 JNIEXPORT jint JNICALL Java_org_apache_harmony_luni_platform_OSMemory_loadImpl
   (JNIEnv * env, jobject thiz, jlong addr, jlong size){
+#if !defined(ZOS)
    if(mlock((void *)((IDATA)addr), size)!=-1)
    {
       if(munlock((void *)((IDATA)addr),size)!=-1)
@@ -77,10 +83,14 @@
       	   return 0;
    }
    return -1;
+#else
+   return 0;
+#endif /* !defined(ZOS) */
   }
 
 JNIEXPORT jboolean JNICALL Java_org_apache_harmony_luni_platform_OSMemory_isLoadedImpl
   (JNIEnv * env, jobject thiz, jlong addr, jlong size){
+#if !defined(ZOS)
 	  PORT_ACCESS_FROM_ENV (env);
   	  jboolean result = 0;
   	  IDATA m_addr = (IDATA)addr;
@@ -103,6 +113,9 @@
 	  }
 	  hymem_free_memory(vec);
       return result;
+#else
+      return ;
+#endif /* !defined(ZOS) */
   }
 
 JNIEXPORT jint JNICALL Java_org_apache_harmony_luni_platform_OSMemory_flushImpl

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c Wed Nov  7 01:51:00 2007
@@ -15,14 +15,26 @@
  *  limitations under the License.
  */
 
-#if defined(FREEBSD) || defined(AIX) || defined(MACOSX)
+#if defined(FREEBSD) || defined(AIX) || defined(MACOSX) || defined(ZOS)
 #include <sys/types.h>
 #include <netinet/in.h>
 #endif
+
+#if !defined(ZOS)
 #include <sys/poll.h>
+#else
+/* poll.h in a different location on zOS */
+#include <poll.h>
+#endif
+
+/* We do not get these header files "for free" on zOS, so we will use the
+  definitions for these structures defined in OSNetworkSystem.h */
+#if !defined(ZOS)
 #include <netinet/in_systm.h>
 #include<netinet/ip.h>
 #include<netinet/ip_icmp.h>
+#endif /* !ZOS */
+
 #include "nethelp.h"
 #include "harmonyglob.h"
 #include "hysock.h"
@@ -36,7 +48,11 @@
 #define SOCKET_ERROR -1
 
 unsigned short ip_checksum(unsigned short * buffer, int size);
+#if !defined(ZOS)
 void set_icmp_packet(struct icmp * icmp_hdr, int packet_size);
+#else
+void set_icmp_packet(struct ICMPHeader * icmp_hdr, int packet_size);
+#endif
 
 // Alternative Select function
 int
@@ -59,13 +75,21 @@
   (JNIEnv * env, jobject clz, jobject address, jobject localaddr,  jint ttl, jint timeout){
   PORT_ACCESS_FROM_ENV (env);
   struct sockaddr_in dest,source,local;
+#if !defined(ZOS)
   struct icmp * send_buf = 0;
   struct ip * recv_buf = 0;
+  struct icmp* icmphdr = 0;
+#else /* !ZOS */
+  struct ICMPHeader* send_buf = 0;
+  struct IPHeader* recv_buf = 0;
+  struct ICMPHeader* icmphdr = 0;
+#endif /* !ZOS */
   int result,ret=UNREACHABLE;
   struct pollfd my_pollfd;
   int sockadd_size = sizeof (source);
   jbyte host[HYSOCK_INADDR6_LEN];
   U_32 length;
+  unsigned short header_len = 0;
 
   int sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
   if (INVALID_SOCKET == sock){
@@ -131,14 +155,25 @@
   	goto cleanup;
   }  
 			    
-  unsigned short header_len = recv_buf->ip_hl << 2;
-  struct icmp* icmphdr = (struct icmp*)((char*)recv_buf + header_len);
+#if !defined(ZOS)
+  header_len = recv_buf->ip_hl << 2;
+  icmphdr = (struct icmp*)((char*)recv_buf + header_len);
   if ((result < header_len + ICMP_SIZE)||
 	(icmphdr->icmp_type != ICMP_ECHO_REPLY)||
 	(icmphdr->icmp_id != getpid())) {	
 	if (!(icmphdr->icmp_type == ICMP_ECHO_REQUEST && icmphdr->icmp_seq == 0))
 		goto cleanup;
   }
+#else
+  header_len = recv_buf->h_len << 2;
+  icmphdr = (struct ICMPHeader*)((char*)recv_buf + header_len);
+  if ((result < header_len + ICMP_SIZE)||
+	(icmphdr->type != ICMP_ECHO_REPLY)||
+	(icmphdr->id != getpid())) {	
+	if (!(icmphdr->type == ICMP_ECHO_REQUEST && icmphdr->seq == 0))
+		goto cleanup;
+  }
+#endif
   ret = REACHABLE;
 cleanup:
 
@@ -173,8 +208,10 @@
     return (unsigned short )(~sum);
 }
 
+#if !defined(ZOS)
 void set_icmp_packet(struct icmp* icmp_hdr, int packet_size)
 {
+
     icmp_hdr->icmp_type = ICMP_ECHO_REQUEST;
     icmp_hdr->icmp_code = 0;
     icmp_hdr->icmp_cksum = 0;
@@ -184,6 +221,21 @@
     // Calculate a checksum on the result
     icmp_hdr->icmp_cksum = ip_checksum((unsigned short*)icmp_hdr, packet_size);
 }
+#else
+void set_icmp_packet(struct ICMPHeader* icmp_hdr, int packet_size)
+{
+
+    icmp_hdr->type = ICMP_ECHO_REQUEST;
+    icmp_hdr->code = 0;
+    icmp_hdr->checksum = 0;
+    icmp_hdr->id = getpid();
+    icmp_hdr->seq = 0;
+
+    // Calculate a checksum on the result
+    icmp_hdr->checksum = ip_checksum((unsigned short*)icmp_hdr, packet_size);
+}
+#endif
+
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/makefile?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/makefile Wed Nov  7 01:51:00 2007
@@ -20,7 +20,9 @@
 include $(HY_HDK)/build/make/defines.mk
 
 # CFLAGS += -fpic -Wall -Werror 
-CFLAGS += -fpic -Wall
+ifneq ($(HY_OS),zos)
+CFLAGS += -Wall
+endif
 
 BUILDFILES = \
 	$(SHAREDSUB)luni_copyright.o $(SHAREDSUB)file.o procimpl.o \

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/vmi/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/vmi/unix/makefile?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/vmi/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/vmi/unix/makefile Wed Nov  7 01:51:00 2007
@@ -19,7 +19,6 @@
 
 include $(HY_HDK)/build/make/defines.mk
 
-CFLAGS += -fpic
 BUILDFILES = $(SHAREDSUB)vmi_copyright.o $(SHAREDSUB)vmi.o
 MDLLIBFILES = $(LIBPATH)libhypool.a
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/util/DateTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/util/DateTest.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/util/DateTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/util/DateTest.java Wed Nov  7 01:51:00 2007
@@ -436,12 +436,13 @@
 		TimeZone tz = TimeZone.getDefault();
 		TimeZone.setDefault(TimeZone.getTimeZone("EST"));
 		try {
-			Date d1 = new Date(0);
-			assertTrue("Returned incorrect string: " + d1, d1.toString()
-					.equals("Wed Dec 31 19:00:00 EST 1969"));
-		} finally {
-			TimeZone.setDefault(tz);
-		}
+            Date d1 = new Date(0);
+            assertTrue("Returned incorrect string: " + d1, d1.toString()
+                    .startsWith("Wed Dec 31 19:00:00")
+                    && d1.toString().endsWith("1969"));
+        } finally {
+            TimeZone.setDefault(tz);
+        }
 	}
 
 	/**

Modified: harmony/enhanced/classlib/branches/java6/modules/misc/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/misc/build.xml?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/misc/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/misc/build.xml Wed Nov  7 01:51:00 2007
@@ -131,6 +131,12 @@
                 <exclude name="*${manifest.suffix}"/>
             </fileset>
         </copy>
+        <!-- Copy link exports file on z/OS -->
+        <copy todir="${hy.hdk}/lib" overwrite="yes">
+            <fileset dir="${hy.misc.src.main.native}/accessors/${hy.os.family}">
+                <include name="*${linklib.suffix}" if="is.zos" />
+            </fileset>
+        </copy>
     </target>
     
     <!-- Clean natives -->

Modified: harmony/enhanced/classlib/branches/java6/modules/misc/src/main/native/accessors/shared/MemMacros.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/misc/src/main/native/accessors/shared/MemMacros.h?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/misc/src/main/native/accessors/shared/MemMacros.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/misc/src/main/native/accessors/shared/MemMacros.h Wed Nov  7 01:51:00 2007
@@ -21,6 +21,11 @@
     #include <stddef.h>
 #endif
 
+/* Need to include inttypes.h to get intptr_t and uintptr_t */
+#if defined(ZOS)
+#include <inttypes.h>
+#endif
+
 #include <jni.h>
 
 #define jlong2addr(a, x) ((a *)((uintptr_t)(x)))

Modified: harmony/enhanced/classlib/branches/java6/modules/misc/src/main/native/accessors/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/misc/src/main/native/accessors/unix/makefile?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/misc/src/main/native/accessors/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/misc/src/main/native/accessors/unix/makefile Wed Nov  7 01:51:00 2007
@@ -15,7 +15,6 @@
 
 include $(HY_HDK)/build/make/defines.mk
 
-CFLAGS += -fpic
 INCLUDES += -I$(SHARED)common
 
 BUILDFILES = \

Modified: harmony/enhanced/classlib/branches/java6/modules/nio/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/build.xml?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio/build.xml Wed Nov  7 01:51:00 2007
@@ -79,6 +79,12 @@
                 <exclude name="*${manifest.suffix}"/>
             </fileset>
         </copy>
+        <!-- Copy link exports file on z/OS -->
+        <copy todir="${hy.hdk}/lib" overwrite="yes">
+            <fileset dir="${hy.nio.src.main.native}/nio/${hy.os.family}">
+                <include name="*${linklib.suffix}" if="is.zos" />
+            </fileset>
+        </copy>
     </target>
 
     <target name="clean">

Modified: harmony/enhanced/classlib/branches/java6/modules/nio/src/main/native/nio/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/src/main/native/nio/unix/makefile?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio/src/main/native/nio/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio/src/main/native/nio/unix/makefile Wed Nov  7 01:51:00 2007
@@ -19,8 +19,6 @@
 
 include $(HY_HDK)/build/make/defines.mk
 
-CFLAGS += -fpic
-
 BUILDFILES = \
 	../shared/DirectBufferUtil.o ../shared/AddressUtil.o
 ifeq ($(HY_OS),linux)

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/unix/makefile?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/unix/makefile Wed Nov  7 01:51:00 2007
@@ -19,8 +19,6 @@
 
 include $(HY_HDK)/build/make/defines.mk
 
-CFLAGS += -fpic
-
 BUILDFILES = \
   ../shared/CP_1250.o \
   ../shared/CP_1251.o \

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayout.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayout.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayout.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayout.java Wed Nov  7 01:51:00 2007
@@ -157,15 +157,7 @@
 			return Codec.SIGNED5;
 		} else if (layout.indexOf("B") >= 0) { //$NON-NLS-1$
 			return Codec.BYTE1;
-		}
-		/*
-		 * TODO Add this as a test (and don't commit since this is copyright
-		 * text) && ) If the layout contains 'O', use BRANCH5. Otherwise, if the
-		 * layout contains 'P', use BCI5. Otherwise, if the layout contains 'S'
-		 * but not 'KS' or 'RS', use SIGNED5. Otherwise, if the layout contains
-		 * 'B', use BYTE1. For all other layouts use UNSIGNED5.
-		 */
-		else {
+		} else {
 			return Codec.UNSIGNED5;
 		}
 	}

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java?rev=592673&r1=592672&r2=592673&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java Wed Nov  7 01:51:00 2007
@@ -194,10 +194,10 @@
             result[i] = new long[counts[i]];
             sum += counts[i];
         }
-        int[] hi = null;
+        long[] hi = null;
         int[] lo;
         if(hiCodec != null) {
-            hi = decodeBandInt(name, in, hiCodec, sum);
+            hi = decodeBandLong(name, in, hiCodec, sum);
             lo = decodeBandInt(name, in, loCodec, sum);        
         } else {
             lo = decodeBandInt(name, in, loCodec, sum);



Mime
View raw message