Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 96711
Collapse All | Expand All

(-)a/core.startup/src/org/netbeans/core/startup/ConsistencyVerifier.java (-1 / +3 lines)
 Lines 99-105   public class ConsistencyVerifier { Link Here 
99
        mgr.mutexPrivileged().enterWriteAccess();
99
        mgr.mutexPrivileged().enterWriteAccess();
100
        Manifest dummy = new Manifest();
100
        Manifest dummy = new Manifest();
101
        dummy.getMainAttributes().putValue("OpenIDE-Module", "__dummy__"); // NOI18N
101
        dummy.getMainAttributes().putValue("OpenIDE-Module", "__dummy__"); // NOI18N
102
        dummy.getMainAttributes().putValue("OpenIDE-Module-Provides", "org.openide.modules.ModuleFormat1, " + // NOI18N
102
        dummy.getMainAttributes().putValue("OpenIDE-Module-Provides",
103
                "org.openide.modules.ModuleFormat1, " + // NOI18N
104
                "org.openide.modules.ModuleFormat2, " + // NOI18N
103
                "org.openide.modules.os.Unix, " + // NOI18N
105
                "org.openide.modules.os.Unix, " + // NOI18N
104
                "org.openide.modules.os.PlainUnix, " + // NOI18N
106
                "org.openide.modules.os.PlainUnix, " + // NOI18N
105
                "org.openide.modules.os.Windows, " + // NOI18N
107
                "org.openide.modules.os.Windows, " + // NOI18N
(-)a/core.startup/src/org/netbeans/core/startup/NbInstaller.java (-22 / +73 lines)
 Lines 52-57   import java.util.Date; Link Here 
52
import java.util.Date;
52
import java.util.Date;
53
import java.util.HashMap;
53
import java.util.HashMap;
54
import java.util.HashSet;
54
import java.util.HashSet;
55
import java.util.LinkedList;
55
import java.util.List;
56
import java.util.List;
56
import java.util.Locale;
57
import java.util.Locale;
57
import java.util.Map;
58
import java.util.Map;
 Lines 93-99   import org.xml.sax.SAXException; Link Here 
93
 * @author Jesse Glick, Jan Pokorsky, Jaroslav Tulach, et al.
94
 * @author Jesse Glick, Jan Pokorsky, Jaroslav Tulach, et al.
94
 */
95
 */
95
final class NbInstaller extends ModuleInstaller {
96
final class NbInstaller extends ModuleInstaller {
96
    
97
98
    private static final Logger LOG = Logger.getLogger(NbInstaller.class.getName());
99
97
    /** set of manifest sections for each module */
100
    /** set of manifest sections for each module */
98
    private final Map<Module,Set<ManifestSection>> sections = new HashMap<Module,Set<ManifestSection>>(100);
101
    private final Map<Module,Set<ManifestSection>> sections = new HashMap<Module,Set<ManifestSection>>(100);
99
    /** ModuleInstall classes for each module that declares one */
102
    /** ModuleInstall classes for each module that declares one */
 Lines 110-117   final class NbInstaller extends ModuleIn Link Here 
110
    private ModuleManager mgr;
113
    private ModuleManager mgr;
111
    /** set of permitted core or package dependencies from a module */
114
    /** set of permitted core or package dependencies from a module */
112
    private final Map<Module,Set<String>> kosherPackages = new HashMap<Module,Set<String>>(100);
115
    private final Map<Module,Set<String>> kosherPackages = new HashMap<Module,Set<String>>(100);
113
    /** Package prefixes passed as special system property. */
116
    /** classpath ~ JRE packages to be hidden from a module */
114
    private static String[] specialResourcePrefixes = null;
117
    private final Map<Module,List<Module.PackageExport>> hiddenClasspathPackages = new  HashMap<Module,List<Module.PackageExport>>();
115
        
118
        
116
    /** Create an NbInstaller.
119
    /** Create an NbInstaller.
117
     * You should also call {@link #registerManager} and if applicable
120
     * You should also call {@link #registerManager} and if applicable
 Lines 135-140   final class NbInstaller extends ModuleIn Link Here 
135
    // @SuppressWarnings("unchecked")
138
    // @SuppressWarnings("unchecked")
136
    public void prepare(Module m) throws InvalidException {
139
    public void prepare(Module m) throws InvalidException {
137
        ev.log(Events.PREPARE, m);
140
        ev.log(Events.PREPARE, m);
141
        checkForHiddenPackages(m);
138
        Set<ManifestSection> mysections = null;
142
        Set<ManifestSection> mysections = null;
139
        Class<?> clazz = null;
143
        Class<?> clazz = null;
140
        {
144
        {
 Lines 224-229   final class NbInstaller extends ModuleIn Link Here 
224
            layers.put(m, layerResource);
228
            layers.put(m, layerResource);
225
        }
229
        }
226
    }
230
    }
231
232
    private void checkForHiddenPackages(Module m) throws InvalidException {
233
        List<Module.PackageExport> hiddenPackages = new ArrayList<Module.PackageExport>();
234
        List<Module> mWithDeps = new LinkedList<Module>();
235
        mWithDeps.add(m);
236
        for (Dependency d : m.getDependencies()) {
237
            if (d.getType() == Dependency.TYPE_MODULE) {
238
                Module _m = mgr.get((String) Util.parseCodeName(d.getName())[0]);
239
                assert _m != null : d;
240
                mWithDeps.add(_m);
241
            }
242
        }
243
        for (Module _m : mWithDeps) {
244
            String hidden = (String) _m.getAttribute("OpenIDE-Module-Hide-Classpath-Packages"); // NOI18N
245
            if (hidden != null) {
246
                for (String piece : hidden.trim().split("[ ,]+")) { // NOI18N
247
                    try {
248
                        if (piece.endsWith(".*")) { // NOI18N
249
                            String pkg = piece.substring(0, piece.length() - 2);
250
                            Dependency.create(Dependency.TYPE_MODULE, pkg);
251
                            if (pkg.lastIndexOf('/') != -1) {
252
                                throw new IllegalArgumentException("Illegal OpenIDE-Module-Hide-Classpath-Packages: " + hidden); // NOI18N
253
                            }
254
                            hiddenPackages.add(new Module.PackageExport(pkg.replace('.', '/') + '/', false));
255
                        } else if (piece.endsWith(".**")) { // NOI18N
256
                            String pkg = piece.substring(0, piece.length() - 3);
257
                            Dependency.create(Dependency.TYPE_MODULE, pkg);
258
                            if (pkg.lastIndexOf('/') != -1) {
259
                                throw new IllegalArgumentException("Illegal OpenIDE-Module-Hide-Classpath-Packages: " + hidden); // NOI18N
260
                            }
261
                            hiddenPackages.add(new Module.PackageExport(pkg.replace('.', '/') + '/', true));
262
                        } else {
263
                            throw new IllegalArgumentException("Illegal OpenIDE-Module-Hide-Classpath-Packages: " + hidden); // NOI18N
264
                        }
265
                    } catch (IllegalArgumentException x) {
266
                        throw new InvalidException(_m, x.getMessage());
267
                    }
268
                }
269
            }
270
        }
271
        if (!hiddenPackages.isEmpty()) {
272
            hiddenClasspathPackages.put(m, hiddenPackages);
273
        }
274
    }
227
    
275
    
228
    public void dispose(Module m) {
276
    public void dispose(Module m) {
229
        Util.err.fine("dispose: " + m);
277
        Util.err.fine("dispose: " + m);
 Lines 237-242   final class NbInstaller extends ModuleIn Link Here 
237
        installs.remove(m);
285
        installs.remove(m);
238
        layers.remove(m);
286
        layers.remove(m);
239
        kosherPackages.remove(m);
287
        kosherPackages.remove(m);
288
        hiddenClasspathPackages.remove(m);
240
    }
289
    }
241
    
290
    
242
    public void load(List<Module> modules) {
291
    public void load(List<Module> modules) {
 Lines 727-734   final class NbInstaller extends ModuleIn Link Here 
727
                arr.add("org.openide.modules.os.Solaris"); // NOI18N
776
                arr.add("org.openide.modules.os.Solaris"); // NOI18N
728
            }
777
            }
729
            
778
            
730
            // module format is now 1
779
            // module format is now 2
731
            arr.add ("org.openide.modules.ModuleFormat1"); // NOI18N
780
            arr.add("org.openide.modules.ModuleFormat1"); // NOI18N
781
            arr.add("org.openide.modules.ModuleFormat2"); // NOI18N
732
            
782
            
733
            return arr.toArray (new String[0]);
783
            return arr.toArray (new String[0]);
734
        }
784
        }
 Lines 743-775   final class NbInstaller extends ModuleIn Link Here 
743
            for (String cppkg : CLASSPATH_PACKAGES) {
793
            for (String cppkg : CLASSPATH_PACKAGES) {
744
                if (pkg.startsWith(cppkg) && !findKosher(m).contains(cppkg)) {
794
                if (pkg.startsWith(cppkg) && !findKosher(m).contains(cppkg)) {
745
                    // Undeclared use of a classpath package. Refuse it.
795
                    // Undeclared use of a classpath package. Refuse it.
746
                    if (Util.err.isLoggable(Level.FINE)) {
796
                    if (LOG.isLoggable(Level.FINE)) {
747
                        Util.err.fine("Refusing to load classpath package " + pkg + " for " + m.getCodeNameBase() + " without a proper dependency"); // NOI18N
797
                        LOG.fine("Refusing to load classpath package " + pkg + " for " + m.getCodeNameBase() + " without a proper dependency"); // NOI18N
748
                    }
798
                    }
749
                    return false;
799
                    return false;
750
                }
800
                }
751
            }
801
            }
802
            List<Module.PackageExport> hiddenPackages = hiddenClasspathPackages.get(m);
803
            if (hiddenPackages != null) {
804
                for (Module.PackageExport hidden : hiddenPackages) {
805
                    if (hidden.recursive ? pkg.startsWith(hidden.pkg) : pkg.equals(hidden.pkg)) {
806
                        if (LOG.isLoggable(Level.FINE)) {
807
                            LOG.fine("Refusing to load classpath package " + pkg + " for " + m.getCodeNameBase());
808
                        }
809
                        return false;
810
                    }
811
                }
812
            }
813
        }
814
        if (LOG.isLoggable(Level.FINER)) {
815
            LOG.finer("Delegating resource " + pkg + " from " + parent + " for " + m.getCodeNameBase());
752
        }
816
        }
753
        return true;
817
        return true;
754
    }
818
    }
755
    
819
    
756
    private static final String[] CLASSPATH_PACKAGES = new String[] {
820
    private static final String[] CLASSPATH_PACKAGES = {
757
        // core.jar shall be inaccessible
821
        // core.jar shall be inaccessible
758
        "org/netbeans/core/startup/",
822
        "org/netbeans/core/startup/",
759
        // Java language infrastructure bundled with IDE; do not want clashes with JDK 6:
823
        // Do not add JRE packages here! See issue #96711 for the alternative.
760
        "com/sun/tools/javac/",
761
        "com/sun/tools/javadoc/",
762
        "com/sun/javadoc/",
763
        "com/sun/source/",
764
        "javax/annotation/",
765
        "javax/lang/model/",
766
        "javax/tools/",
767
        // do not want JAX-WS 2.0 classes from JDK 6;
768
        "javax/xml/bind/", // NOI18N
769
        "javax/xml/ws/", // NOI18N
770
        "javax/xml/stream/", // NOI18N
771
        "javax/jws/", // NOI18N
772
        "javax/xml/soap/" // NOI18N
773
    };
824
    };
774
    
825
    
775
    private Set<String> findKosher(Module m) {
826
    private Set<String> findKosher(Module m) {
(-)a/core.startup/test/unit/src/org/netbeans/core/startup/ConsistencyVerifierTest.java (-1 / +3 lines)
 Lines 100-107   public class ConsistencyVerifierTest ext Link Here 
100
    public void testStandardProvides() throws Exception {
100
    public void testStandardProvides() throws Exception {
101
        assertProblems("{}",
101
        assertProblems("{}",
102
                "=foo; Requires=org.openide.modules.ModuleFormat1");
102
                "=foo; Requires=org.openide.modules.ModuleFormat1");
103
        assertProblems("{foo=[requires org.openide.modules.ModuleFormat2]}",
103
        assertProblems("{}",
104
                "=foo; Requires=org.openide.modules.ModuleFormat2");
104
                "=foo; Requires=org.openide.modules.ModuleFormat2");
105
        assertProblems("{foo=[requires org.openide.modules.ModuleFormat99]}",
106
                "=foo; Requires=org.openide.modules.ModuleFormat99");
105
        assertProblems("{}",
107
        assertProblems("{}",
106
                "=foo; Requires=org.openide.modules.os.Unix");
108
                "=foo; Requires=org.openide.modules.os.Unix");
107
        assertProblems("{}",
109
        assertProblems("{}",
(-)a/core.startup/test/unit/src/org/netbeans/core/startup/ModuleFormatSatisfiedTest.java (-1 / +1 lines)
 Lines 75-81   public class ModuleFormatSatisfiedTest e Link Here 
75
        man.getMainAttributes ().putValue ("OpenIDE-Module", "org.test.FormatDependency/1");
75
        man.getMainAttributes ().putValue ("OpenIDE-Module", "org.test.FormatDependency/1");
76
        
76
        
77
        
77
        
78
        String req = "org.openide.modules.ModuleFormat1";
78
        String req = "org.openide.modules.ModuleFormat1, org.openide.modules.ModuleFormat2";
79
        
79
        
80
        man.getMainAttributes ().putValue ("OpenIDE-Module-Requires", req);
80
        man.getMainAttributes ().putValue ("OpenIDE-Module-Requires", req);
81
        
81
        
(-)a/core.startup/test/unit/src/org/netbeans/core/startup/NbInstallerHideClasspathPackagesTest.java (+119 lines)
Line 0    Link Here 
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * If you wish your version of this file to be governed by only the CDDL
25
 * or only the GPL Version 2, indicate your decision by adding
26
 * "[Contributor] elects to include this software in this distribution
27
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
28
 * single choice of license, a recipient has the option to distribute
29
 * your version of this file under either the CDDL, the GPL Version 2 or
30
 * to extend the choice of license to its licensees as provided above.
31
 * However, if you add GPL Version 2 code and therefore, elected the GPL
32
 * Version 2 license, then the option applies only if the new code is
33
 * made subject to such option by the copyright holder.
34
 *
35
 * Contributor(s):
36
 *
37
 * Portions Copyrighted 2008 Sun Microsystems, Inc.
38
 */
39
40
package org.netbeans.core.startup;
41
42
import java.io.File;
43
import java.util.Arrays;
44
import java.util.Collections;
45
import java.util.HashMap;
46
import java.util.HashSet;
47
import java.util.Map;
48
import java.util.logging.Level;
49
import org.netbeans.Events;
50
import org.netbeans.Module;
51
import org.netbeans.ModuleManager;
52
53
/**
54
 * Checks that OpenIDE-Module-Hide-Classpath-Packages works.
55
 */
56
public class NbInstallerHideClasspathPackagesTest extends SetupHid {
57
58
    public NbInstallerHideClasspathPackagesTest(String n) {
59
        super(n);
60
    }
61
62
    public void testHideClasspathPackages() throws Exception {
63
        File m1j = new File(getWorkDir(), "m1.jar");
64
        Map<String,String> contents = new  HashMap<String,String>();
65
        contents.put("javax/net/SocketFactory.class", "ignored");
66
        contents.put("javax/swing/JPanel.class", "overrides");
67
        contents.put("javax/swing/text/Document.class", "overrides");
68
        contents.put("javax/naming/Context.class", "overrides");
69
        contents.put("javax/naming/spi/Resolver.class", "ignored");
70
        Map<String,String> mani = new HashMap<String,String>();
71
        mani.put("OpenIDE-Module", "m1");
72
        mani.put("OpenIDE-Module-Hide-Classpath-Packages", "javax.swing.**, javax.naming.*");
73
        createJar(m1j, contents, mani);
74
        File m2j = new File(getWorkDir(), "m2.jar");
75
        mani = new HashMap<String,String>();
76
        mani.put("OpenIDE-Module", "m2");
77
        mani.put("OpenIDE-Module-Module-Dependencies", "m1");
78
        // Just to check early attempts to load packages:
79
        mani.put("OpenIDE-Module-Layer", "m2/layer.xml");
80
        mani.put("OpenIDE-Module-Package-Dependencies", "javax.management[Descriptor]");
81
        createJar(m2j, Collections.singletonMap("m2/layer.xml", "<filesystem/>"), mani);
82
        File m3j = new File(getWorkDir(), "m3.jar");
83
        createJar(m3j, Collections.<String,String>emptyMap(), Collections.singletonMap("OpenIDE-Module", "m3"));
84
        Events ev = new FakeEvents();
85
        NbInstaller inst = new NbInstaller(ev);
86
        ModuleManager mgr = new ModuleManager(inst, ev);
87
        inst.registerManager(mgr);
88
        mgr.mutexPrivileged().enterWriteAccess();
89
        try {
90
            Module m1 = mgr.create(m1j, null, false, false, false);
91
            Module m2 = mgr.create(m2j, null, false, false, false);
92
            Module m3 = mgr.create(m3j, null, false, false, false);
93
            mgr.enable(new HashSet<Module>(Arrays.asList(m1, m2, m3)));
94
            ModuleManagerTest.assertDoesNotOverride(m1, "javax.net.SocketFactory");
95
            ModuleManagerTest.assertOverrides(m1, "javax.swing.JPanel");
96
            ModuleManagerTest.assertOverrides(m1, "javax.swing.text.Document");
97
            ModuleManagerTest.assertOverrides(m1, "javax.naming.Context");
98
            ModuleManagerTest.assertDoesNotOverride(m1, "javax.naming.spi.Resolver");
99
            ModuleManagerTest.assertDoesNotOverride(m2, "javax.net.SocketFactory");
100
            ModuleManagerTest.assertOverrides(m2, "javax.swing.JPanel");
101
            ModuleManagerTest.assertOverrides(m2, "javax.swing.text.Document");
102
            ModuleManagerTest.assertOverrides(m2, "javax.naming.Context");
103
            ModuleManagerTest.assertDoesNotOverride(m2, "javax.naming.spi.Resolver");
104
            ModuleManagerTest.assertDoesNotOverride(m3, "javax.net.SocketFactory");
105
            ModuleManagerTest.assertDoesNotOverride(m3, "javax.swing.JPanel");
106
            ModuleManagerTest.assertDoesNotOverride(m3, "javax.swing.text.Document");
107
            ModuleManagerTest.assertDoesNotOverride(m3, "javax.naming.Context");
108
            ModuleManagerTest.assertDoesNotOverride(m3, "javax.naming.spi.Resolver");
109
        } finally {
110
            mgr.mutexPrivileged().exitWriteAccess();
111
        }
112
    }
113
114
    @Override
115
    protected Level logLevel() {
116
        return Level.FINER;
117
    }
118
119
}
(-)a/etl.editor/manifest.mf (-1 / +2 lines)
 Lines 2-8   OpenIDE-Module: org.netbeans.modules.etl Link Here 
2
OpenIDE-Module: org.netbeans.modules.etl.editor
2
OpenIDE-Module: org.netbeans.modules.etl.editor
3
OpenIDE-Module-Layer: org/netbeans/modules/etl/layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/etl/layer.xml
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/etl/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/etl/Bundle.properties
5
OpenIDE-Module-Requires: org.openide.windows.IOProvider
5
OpenIDE-Module-Requires: org.openide.windows.IOProvider, org.openide.modules.ModuleFormat2
6
OpenIDE-Module-Hide-Classpath-Packages: javax.xml.stream.**
6
OpenIDE-Module-Specification-Version: 1.0
7
OpenIDE-Module-Specification-Version: 1.0
7
8
8
Name: org/netbeans/modules/etl/ui/ETLDataLoader.class
9
Name: org/netbeans/modules/etl/ui/ETLDataLoader.class
(-)a/libs.javacapi/manifest.mf (+2 lines)
 Lines 3-5   OpenIDE-Module-Implementation-Version: 1 Link Here 
3
OpenIDE-Module-Implementation-Version: 1
3
OpenIDE-Module-Implementation-Version: 1
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/javacapi/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/javacapi/Bundle.properties
5
OpenIDE-Module-Layer: org/netbeans/libs/javacapi/layer.xml
5
OpenIDE-Module-Layer: org/netbeans/libs/javacapi/layer.xml
6
OpenIDE-Module-Requires: org.openide.modules.ModuleFormat2
7
OpenIDE-Module-Hide-Classpath-Packages: com.sun.javadoc.**, com.sun.source.**, javax.annotation.**, javax.lang.model.**, javax.tools.**
(-)a/libs.javacimpl/manifest.mf (+2 lines)
 Lines 2-5   OpenIDE-Module: org.netbeans.libs.javaci Link Here 
2
OpenIDE-Module: org.netbeans.libs.javacimpl/1
2
OpenIDE-Module: org.netbeans.libs.javacimpl/1
3
OpenIDE-Module-Implementation-Version: 5
3
OpenIDE-Module-Implementation-Version: 5
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/javacimpl/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/javacimpl/Bundle.properties
5
OpenIDE-Module-Requires: org.openide.modules.ModuleFormat2
6
OpenIDE-Module-Hide-Classpath-Packages: com.sun.tools.javac.**, com.sun.tools.javadoc.**
5
7
(-)a/o.n.soa.libs.xmlbeans/manifest.mf (+2 lines)
 Lines 3-5   OpenIDE-Module-Localizing-Bundle: org/ne Link Here 
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/soa/libs/xmlbeans/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/soa/libs/xmlbeans/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.0
4
OpenIDE-Module-Specification-Version: 1.0
5
OpenIDE-Module-Implementation-Version: 2.1.0
5
OpenIDE-Module-Implementation-Version: 2.1.0
6
OpenIDE-Module-Requires: org.openide.modules.ModuleFormat2
7
OpenIDE-Module-Hide-Classpath-Packages: javax.xml.stream.**
(-)a/openide.modules/apichanges.xml (+51 lines)
 Lines 47-52   made subject to such option by the copyr Link Here 
47
  	<apidef name="modules">Modules API</apidef>
47
  	<apidef name="modules">Modules API</apidef>
48
  </apidefs>
48
  </apidefs>
49
<changes>
49
<changes>
50
    <change id="OpenIDE-Module-Hide-Classpath-Packages">
51
        <api name="modules"/>
52
        <summary></summary>
53
        <version major="7" minor="6"/>
54
        <date day="16" month="2" year="2008"/>
55
        <author login="jglick"/>
56
        <compatibility semantic="incompatible">
57
            <p>
58
                To guaranteed that the new tag will be honored you should also:
59
            </p>
60
            <pre>OpenIDE-Module-Requires: org.openide.modules.ModuleFormat2</pre>
61
            <p>
62
                Several JRE packages used to be hidden automatically but are not any more;
63
                while these were never documented, modules which relied on being able to override
64
                these packages could be broken by having the JRE classes exposed instead. Specifically,
65
                the following packages (or package prefixes) were in NetBeans 6.0 not loaded from the
66
                classpath, but now will be unless otherwise requested:
67
            </p>
68
            <pre>com.sun.javadoc
69
com.sun.source
70
com.sun.tools.javac
71
com.sun.tools.javadoc
72
javax.annotation
73
javax.jws
74
javax.lang.model
75
javax.tools
76
javax.xml.bind
77
javax.xml.soap
78
javax.xml.stream
79
javax.xml.ws</pre>
80
        </compatibility>
81
        <description>
82
            <p>
83
                Packages supplied in a module which overlap those in the JRE or its extensions will normally be ignored
84
                (as usual, the JRE takes precedence). Modules which wish to specifically suppress loading of some packages
85
                from the classpath can now request the class loader to do so by specifying:
86
            </p>
87
            <pre>OpenIDE-Module-Hide-Classpath-Packages: javax.lang.model.*, com.sun.source.**</pre>
88
            <p>
89
                (The syntax is analogous to that of <code>OpenIDE-Module-Public-Packages</code>.)
90
            </p>
91
            <p>
92
                Such a declaration affects not just this module, but any other modules declaring a <em>direct</em>
93
                dependency on it (<code>OpenIDE-Module-Module-Dependencies</code>). The module is now free to bundle
94
                its own versions of these classes and be sure they will be used by it and its clients.
95
                Be aware that as with all changes to the normal class loading scheme,
96
                careless usage could result in <code>LinkageError</code>s.
97
            </p>
98
        </description>
99
        <issue number="96711"/>
100
    </change>
50
    <change id="no-FileObject-for-module-JAR-entry">
101
    <change id="no-FileObject-for-module-JAR-entry">
51
        <api name="modules"/>
102
        <api name="modules"/>
52
        <summary>No longer possible to obtain a module JAR entry as a <code>FileObject</code></summary>
103
        <summary>No longer possible to obtain a module JAR entry as a <code>FileObject</code></summary>
(-)a/openide.modules/manifest.mf (-1 / +1 lines)
 Lines 1-5   Manifest-Version: 1.0 Link Here 
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.openide.modules
2
OpenIDE-Module: org.openide.modules
3
OpenIDE-Module-Localizing-Bundle: org/openide/modules/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/openide/modules/Bundle.properties
4
OpenIDE-Module-Specification-Version: 7.5
4
OpenIDE-Module-Specification-Version: 7.6
5
5
(-)a/websvc.jaxws21api/manifest.mf (+2 lines)
 Lines 3-5   OpenIDE-Module-Localizing-Bundle: org/ne Link Here 
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/websvc/jaxws21api/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/websvc/jaxws21api/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.2
4
OpenIDE-Module-Specification-Version: 1.2
5
AutoUpdate-Show-In-Client: false
5
AutoUpdate-Show-In-Client: false
6
OpenIDE-Module-Requires: org.openide.modules.ModuleFormat2
7
OpenIDE-Module-Hide-Classpath-Packages: javax.jws.**, javax.xml.bind.**, javax.xml.stream.**, javax.xml.ws.**, javax.xml.soap.**, javax.annotation.**

Return to bug 96711
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo