• Icon: Patch Patch
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • None
    • Windows

      I can not find a way to attach a patch to bug 5313, so here it is.

       
      Index: main/remoting/src/main/java/hudson/remoting/RemoteClassLoader.java
      ===================================================================
      --- main/remoting/src/main/java/hudson/remoting/RemoteClassLoader.java	(revision 26080)
      +++ main/remoting/src/main/java/hudson/remoting/RemoteClassLoader.java	(working copy)
      @@ -258,7 +258,20 @@
       
       
           private File makeResource(String name, byte[] image) throws IOException {
      -        File tmpFile = File.createTempFile("hudson-remoting", "");
      +    	//work around sun bug 6325169 on windows
      +    	//see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6325169
      +        File tmpFile = null;
      +        IOException lastException = null;
      +        for(int i=0; i<100 && tmpFile==null; i++) {
      +        	try {
      +        		tmpFile = File.createTempFile("hudson-remoting", "");
      +        	}catch(IOException e) {
      +        		lastException = e;
      +        	}
      +        }
      +        if(tmpFile == null) {
      +        	throw new IOException("Failed hard at creating a temp directory", lastException);
      +        }
               tmpFile.delete();
               File resource = new File(tmpFile, name);
               resource.getParentFile().mkdirs();
      

          [JENKINS-5314] Patch for bug 5313

          jnegre created issue -
          Alan Harder made changes -
          Link New: This issue duplicates JENKINS-5313 [ JENKINS-5313 ]
          Kohsuke Kawaguchi made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Andrew Bayer made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 135403 ] New: JNJira + In-Review [ 203462 ]

            Unassigned Unassigned
            jnegre jnegre
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: