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

api/java_net/ProxySelector/index.html#Misc JCK test fail plugin

XMLWordPrintable

    • b61
    • generic, other
    • generic, solaris
    • Verified

      JCK : 6.0b08
      J2SE : FAIL -b52, b53 PLUGIN FIREFOX, PLUGIN IE
      Platform[s] : FAIL - linux, windows XP

      JCK test owner : http://javaweb.sfbay/jcce/tcks/jck/docs/others/owners.jto

      Failing Tests:
      ===============
      api/java_net/ProxySelector/index.html#Misc failed (plugin firefox) with security exception caused by:

      java.lang.NullPointerException
      at com.sun.deploy.net.proxy.DynamicProxyManager.removeProxyFromCache(DynamicProxyManager.java:138)
      at com.sun.deploy.net.proxy.DeployProxySelector.connectFailed(DeployProxySelector.java:242)
      at javasoft.sqe.tests.api.java.net.ProxySelector.MiscTests.connectFailed001(MiscTests.java:242)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
      at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
      at com.sun.jck.lib.ExecJCKTestSameJVMCmd$Version2Test.execute(ExecJCKTestSameJVMCmd.java:389)
      at com.sun.jck.lib.ExecJCKTestSameJVMCmd$StandardTest.run(ExecJCKTestSameJVMCmd.java:334)
      at com.sun.jck.lib.ExecJCKTestSameJVMCmd.execute(ExecJCKTestSameJVMCmd.java:211)
      at com.sun.jck.lib.ExecJCKTestSameJVMCmd.run(ExecJCKTestSameJVMCmd.java:140)
      at com.sun.javatest.agent.Agent$Task.executeCommand(Agent.java:818)
      at com.sun.javatest.agent.Agent$Task.execute(Agent.java:749)
      at com.sun.javatest.agent.Agent$Task.handleRequest(Agent.java:610)
      at com.sun.javatest.agent.Agent.handleRequestsUntilClosed(Agent.java:377)
      at com.sun.javatest.agent.Agent.access$000(Agent.java:41)
      at com.sun.javatest.agent.Agent$1.run(Agent.java:253)
      at java.lang.Thread.run(Thread.java:611)i

      Source code of com.sun.deploy.net.proxy.DeployProxySelector.connectFailed():

      public void connectFailed(URI uri, SocketAddress socketaddress, IOException ioexception)
          {
              if(uri == null || socketaddress == null || ioexception == null)
                  throw new IllegalArgumentException("Arguments can't be null.");
              Trace.msgNetPrintln("net.proxy.connectionFailure", new Object[] {
                  uri.toString() + ", " + socketaddress.toString() + ioexception.toString()
              });
              try
              {
                  DynamicProxyManager.removeProxyFromCache(uri.toURL(), socketaddress.toString());
              }
              catch(Exception exception)
              {
                  Trace.securityPrintException(exception); //Here security exception thrown, because of NPE in DynamicProxyManager.removeProxyFromCache(,)
              }
          }

      Source code of com.sun.deploy.net.proxy.DynamicProxyManager.removeProxyFromCache():

       protected static void removeProxyFromCache(URL url, String s) {
      String s1 = buildProxyKey(url);
                  List list = (List)proxyCache.get(s1); // Here NPE thrown
                  ListIterator listiterator = list.listIterator();
                  ArrayList arraylist = new ArrayList();
                  do
                  {
                      if(!listiterator.hasNext())
                          break;
                      ProxyInfo proxyinfo = (ProxyInfo)listiterator.next();
                      String s2 = proxyinfo.getProxy();
                      if(s2 != null && s.contains(s2))
                          arraylist.add(proxyinfo);
                  } while(true);
                  for(ListIterator listiterator1 = arraylist.listIterator(); listiterator1.hasNext(); list.remove(listiterator1.next()));
                  if(list.size() == 0)
                      proxyCache.remove(s1);
          }


      How to reproduce:
      ====================

      run JCK6.0 b08 api/java_net/ProxySelector/index.html#Misc test under "linux and firefox plugin" or "windows XP IE plugin"
      Attached testreproducer.zip:

      To reproduce bug unzip archive, look if path in start.sh is correct (JRE_HOME, JCK_HOME, BROWSER) and run start.sh

            awoodsomsunw Ashley Woodsom (Inactive)
            dtoporovsunw Denis Toporov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: