Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4655386

JCK: POA.create() doesn't throw InvalidPolicy for conflicting policies

    Details

    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.6
    • Verification:
      Not verified

      Description



      Name: aaR10142 Date: 03/20/2002



      The spec says:
      "
      11.3.8.2 create_POA
      ..
      If any of the policy objects specified are not valid for the ORB implementation,
      if conflicting policy objects are specified,
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      or if any of the specified policy objects require
      prior administrative action that has not been performed, an InvalidPolicy
      exception is raised containing the index in the policies parameter value of
      the first offending policy object.
      "

      POA.create() method doesn't throw InvalidPolicy for conflicting policies,

      See example:
      ------------- ORBTest.java ---------------------
       import org.omg.CORBA.*;
      import org.omg.PortableServer.*;
      import org.omg.PortableServer.POAPackage.InvalidPolicy;

      public class ORBTest {
                                                                     
          public static void main(String argv[]) {
      try {
      ORB orb = ORB.init(argv, null);

      POA rootPOA = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
      try {
      Policy[] policies = {
      rootPOA.create_implicit_activation_policy(
      ImplicitActivationPolicyValue.NO_IMPLICIT_ACTIVATION),
      rootPOA.create_implicit_activation_policy(
      ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION)

      };

      POA testPOA = rootPOA.create_POA("Test", null, policies);
                      System.out.println("Failed. No InvalidPolicy exception");
      } catch (InvalidPolicy e){
      System.out.println("OKAY");
                  }
      } catch(Exception e) {
      System.out.println("ERROR : " + e);
      e.printStackTrace(System.out);
      }
          }

      }
                             

      ------------------- start --------------------
      #>javac -classpath . -d . ORBTest.java
      #>java -classpath . ORBTest
      ----------------- 1.4 output -----------------
      Failed. No InvalidPolicy exception
      ---------------------------------------------------------

      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              hputtaswsunw Hemanth Puttaswamy (Inactive)
              Reporter:
              alisunw Ali Ali (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: