This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 141291
Collapse All | Expand All

(-)a/websvc.core/src/org/netbeans/modules/websvc/core/jaxws/projects/JaxWsSourceForBinaryQueryImpl.java (-11 / +8 lines)
Lines 39-45 Link Here
39
39
40
package org.netbeans.modules.websvc.core.jaxws.projects;
40
package org.netbeans.modules.websvc.core.jaxws.projects;
41
41
42
import java.net.URISyntaxException;
42
import java.io.File;
43
import java.net.URL;
43
import java.net.URL;
44
import java.util.HashMap;
44
import java.util.HashMap;
45
import java.util.Map;
45
import java.util.Map;
Lines 61-79 Link Here
61
    private final Map<URL, SourceForBinaryQuery.Result> cache = new HashMap<URL, SourceForBinaryQuery.Result>();
61
    private final Map<URL, SourceForBinaryQuery.Result> cache = new HashMap<URL, SourceForBinaryQuery.Result>();
62
    
62
    
63
    public SourceForBinaryQuery.Result findSourceRoots(URL binaryRoot) {
63
    public SourceForBinaryQuery.Result findSourceRoots(URL binaryRoot) {
64
   
64
        File archiveFile = FileUtil.archiveOrDirForURL(binaryRoot);
65
        URL archiveFile = FileUtil.getArchiveFile(binaryRoot);
66
65
67
        if (archiveFile != null) {
66
        if (archiveFile != null) {
68
            SourceForBinaryQuery.Result result = cache.get(archiveFile);
67
            SourceForBinaryQuery.Result result = cache.get(binaryRoot);
69
            if (result == null) {
68
            if (result == null) {
70
                try {
69
                Project prj = FileOwnerQuery.getOwner(archiveFile.toURI());
71
                    Project prj = FileOwnerQuery.getOwner(archiveFile.toURI());
70
                if (prj != null && prj.getLookup().lookup(JAXWSClientSupport.class) != null) {
72
                    if (prj != null && prj.getLookup().lookup(JAXWSClientSupport.class) != null) {
71
                    result = new Result(prj);
73
                        result = new Result(prj);
72
                    cache.put(binaryRoot, result);
74
                        cache.put(archiveFile, result);
73
                }
75
                    }
76
                } catch (URISyntaxException ex) {}
77
            }
74
            }
78
            
75
            
79
            return result;
76
            return result;

Return to bug 141291