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

InitialContext - and subclasses may throw undocumented runtime exceptions.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 23
    • core-libs
    • None

      For instance:
      var env = new Hashtable<String, String>();
      env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
      env.put("com.sun.jndi.ldap.connect.timeout", "Foo");
      new InitialContext(env);
      | Exception java.lang.NumberFormatException: For input string: "Foo"
      | at NumberFormatException.forInputString (NumberFormatException.java:68)
      | at Integer.parseInt (Integer.java:652)

      The LDAP provider is just used as an example here. It seems the DNS provider might have similar issues.

            aefimov Aleksej Efimov
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: