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

org.omg.CORBA.ORB.string_to_object throws NPE instead of DataConversion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 5.0
    • other-libs
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      java version "1.5.0_04"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      When parsing URL with the wrong prefix, 1.4.2 throws DataConversion when 1.5.04 throws NullPointerException.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the provided test case.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      org.omg.CORBA.DATA_CONVERSION or org.omg.CORBA.BAD_PARAM.
      ACTUAL -
      java.lang.NullPointerException

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      For 1.4.2 the provided test case prints:

      Thrown org.omg.CORBA.DATA_CONVERSION: vmcid: SUN minor code: 202 completed: No

      For 1.5.0 it prints:

      Thrown java.lang.NullPointerException

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import org.omg.CORBA.ORB;

      public class Regress
      {
        public static void main(String[] args)
        {
          try
            {
              ORB orb = ORB.init(new String[0], null);
              orb.string_to_object("beer:corbaloc:###@###.###/Prod/aTradingService:80");
            }
          catch (Exception e)
            {
              System.out.println("Thrown "+e);
            }
        }
      }

      ---------- END SOURCE ----------

            kcavanauorcl Ken Cavanaugh (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: