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 156330
Collapse All | Expand All

(-)a/core.startup/test/unit/src/org/netbeans/core/startup/layers/CountingSecurityManager.java (-1 / +1 lines)
Lines 443-449 Link Here
443
        if (file.endsWith("tests.jar")) {
443
        if (file.endsWith("tests.jar")) {
444
            return false;
444
            return false;
445
        }
445
        }
446
        if (file.startsWith(System.getProperty("java.home").replaceAll("/[^/]*$", ""))) {
446
        if (file.startsWith(System.getProperty("java.home").replaceAll("[/\\\\][^/\\\\]*$", ""))) {
447
            return false;
447
            return false;
448
        }
448
        }
449
        if (file.startsWith(System.getProperty("netbeans.home") + File.separator + "lib")) {
449
        if (file.startsWith(System.getProperty("netbeans.home") + File.separator + "lib")) {
(-)a/ide.ergonomics/test/unit/src/org/netbeans/modules/ide/ergonomics/fod/FodDataObjectFactoryTest.java (+1 lines)
Lines 45-50 Link Here
45
import java.util.Collections;
45
import java.util.Collections;
46
import java.util.HashSet;
46
import java.util.HashSet;
47
import java.util.logging.Level;
47
import java.util.logging.Level;
48
import java.util.logging.Logger;
48
import junit.framework.Test;
49
import junit.framework.Test;
49
import org.netbeans.junit.NbModuleSuite;
50
import org.netbeans.junit.NbModuleSuite;
50
import org.netbeans.junit.NbTestCase;
51
import org.netbeans.junit.NbTestCase;
(-)a/ide.kit/test/qa-functional/src/org/netbeans/test/ide/CountingSecurityManager.java (-1 / +1 lines)
Lines 443-449 Link Here
443
        if (file.endsWith("tests.jar")) {
443
        if (file.endsWith("tests.jar")) {
444
            return false;
444
            return false;
445
        }
445
        }
446
        if (file.startsWith(System.getProperty("java.home").replaceAll("/[^/]*$", ""))) {
446
        if (file.startsWith(System.getProperty("java.home").replaceAll("[/\\\\][^/\\\\]*$", ""))) {
447
            return false;
447
            return false;
448
        }
448
        }
449
        if (!acceptFileInDir(file, System.getProperty("netbeans.home"))) {
449
        if (!acceptFileInDir(file, System.getProperty("netbeans.home"))) {
(-)a/nbjunit/src/org/netbeans/junit/Log.java (-2 / +5 lines)
Lines 304-311 Link Here
304
                sb.append("\n  ").append(s.toString());
304
                sb.append("\n  ").append(s.toString());
305
            }
305
            }
306
        }
306
        }
307
        
307
        try {
308
        getLog(record).println(sb.toString());
308
            getLog(record).println(sb.toString());
309
        } catch (LinkageError err) {
310
            // prevent circular references
311
        }
309
312
310
313
311
        messages.append(sb.toString());
314
        messages.append(sb.toString());
(-)a/o.n.bootstrap/src/org/netbeans/JarClassLoader.java (-19 / +21 lines)
Lines 77-83 Link Here
77
import java.util.logging.Level;
77
import java.util.logging.Level;
78
import java.util.logging.Logger;
78
import java.util.logging.Logger;
79
import java.util.zip.ZipEntry;
79
import java.util.zip.ZipEntry;
80
import org.openide.util.Exceptions;
80
import org.openide.util.Utilities;
81
81
82
/**
82
/**
83
 * A ProxyClassLoader capable of loading classes from a set of jar files
83
 * A ProxyClassLoader capable of loading classes from a set of jar files
Lines 379-399 Link Here
379
            return file.getPath();
379
            return file.getPath();
380
        }
380
        }
381
381
382
        private static String toURI(File file) {
382
        private static String toURI(final File file) {
383
            String sp = slashify(file.getPath(), false);
383
            class VFile extends File {
384
            if (sp.startsWith("//")) // NOI18N
384
                public VFile() {
385
                sp = "//" + sp; // NOI18N
385
                    super(file.getPath());
386
            return "jar:file:"+ sp +"!/"; // NOI18N
386
                }
387
        }
387
388
        private static String slashify(String path, boolean isDirectory) {
388
                @Override
389
            String p = path;
389
                public boolean isDirectory() {
390
            if (File.separatorChar != '/')
390
                    return false;
391
                p = p.replace(File.separatorChar, '/');
391
                }
392
            if (!p.startsWith("/"))
392
393
                p = "/" + p;
393
                @Override
394
            if (!p.endsWith("/") && isDirectory)
394
                public File getAbsoluteFile() {
395
                p = p + "/";
395
                    return this;
396
            return p;
396
                }
397
            }
398
            return "jar:" + new VFile().toURI() + "!/"; // NOI18N
397
        }
399
        }
398
400
399
        @Override
401
        @Override
Lines 740-751 Link Here
740
                throw new IOException("Malformed JAR-protocol URL: " + u);
742
                throw new IOException("Malformed JAR-protocol URL: " + u);
741
            }
743
            }
742
            int from;
744
            int from;
743
            if (url.startsWith("file:")) {
745
            if (url.startsWith("file:/")) {
744
                from = 5;
746
                from = Utilities.isWindows() ? 6 : 5;
745
            } else {
747
            } else {
746
                from = 0;
748
                from = 0;
747
            }
749
            }
748
            String jar = url.substring(from, bang);
750
            String jar = url.substring(from, bang).replace('/', File.separatorChar);
749
            String _name = url.substring(bang+2);
751
            String _name = url.substring(bang+2);
750
            Source _src = Source.sources.get(jar);
752
            Source _src = Source.sources.get(jar);
751
            if (_src == null) {
753
            if (_src == null) {

Return to bug 156330