You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/01/02 06:26:42 UTC

[GitHub] asfgit closed pull request #1063: Updating to Felix 6.0.1

asfgit closed pull request #1063: Updating to Felix 6.0.1
URL: https://github.com/apache/incubator-netbeans/pull/1063
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index 135458d2f2..85bbeb3e37 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,7 +23,7 @@ script:
   - ant $OPTS $TARGET
   - if [ "x$COMPILETEST" == "xtrue" ]; then ant -quiet test -Djavac.compilerargs=-nowarn -Dbuild.compiler.deprecation=false -Dtest.includes=NoTestsJustBuild; fi
   - if [ "x$LICENSE" == "xtrue" ]; then ant -quiet verify-libs-and-licenses -Dverify-libs-and-licenses.haltonfailure=true; fi
-  - if [ "x$EOL" == "xtrue" ]; then ./travis-check-line-endings.sh; fi
+  - if [ "x$EOL" == "xtrue" ]; then ./nbbuild/travis/check-line-endings.sh; fi
   - if [ "x$SIGTEST" == "xtrue" ]; then ant check-sigtests; fi
   - if [ "x$CV" == "xtrue" ]; then ant -quiet -f ergonomics/ide.ergonomics/ test -Dtest.config=commit; fi
   - if [ "x$RUN_TESTS_JDK8" == "xtrue" ]; then for MODULE in $TEST_MODULES; do cd $MODULE; ant test; done; fi
diff --git a/harness/nbjunit/src/org/netbeans/junit/MockServices.java b/harness/nbjunit/src/org/netbeans/junit/MockServices.java
index 41163dc5ba..c450ae5520 100644
--- a/harness/nbjunit/src/org/netbeans/junit/MockServices.java
+++ b/harness/nbjunit/src/org/netbeans/junit/MockServices.java
@@ -96,7 +96,11 @@ public static void setServices(Class<?>... services) throws IllegalArgumentExcep
             int x = g.enumerate(ts, true);
             if (x < s) {
                 for (int i = 0; i < x; i++) {
-                    ts[i].setContextClassLoader(l);
+                    try {
+                        ts[i].setContextClassLoader(l);
+                    } catch (SecurityException e) {
+                        LOG.log(Level.FINE, "Cannot set context classloader for " + ts[i].getName(), e);
+                    }
                 }
                 LOG.log(Level.FINE, "Set context class loader on {0} threads", x);
                 break;
diff --git a/travis-check-line-endings.sh b/nbbuild/travis/check-line-endings.sh
similarity index 100%
rename from travis-check-line-endings.sh
rename to nbbuild/travis/check-line-endings.sh
diff --git a/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/EnabledAutoloadTest.java b/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/EnabledAutoloadTest.java
index 84a2cfa226..7976a5af77 100644
--- a/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/EnabledAutoloadTest.java
+++ b/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/EnabledAutoloadTest.java
@@ -43,7 +43,6 @@ public EnabledAutoloadTest(String name) {
     }
 
     public static Test suite() {
-        NetigsoUtil.downgradeJDK();
         return
             NbModuleSuite.emptyConfiguration().addTest(
                 EnabledAutoloadTest.class
diff --git a/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/IntegrationTest.java b/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/IntegrationTest.java
index 590d74cfcf..c8b52da773 100644
--- a/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/IntegrationTest.java
+++ b/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/IntegrationTest.java
@@ -47,7 +47,6 @@ public IntegrationTest(String name) {
     }
 
     public static Test suite() {
-        NetigsoUtil.downgradeJDK();
         return
             NbModuleSuite.emptyConfiguration().addTest(
                 IntegrationTest.class
diff --git a/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/NetigsoUsesSwingTest.java b/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/NetigsoUsesSwingTest.java
index 9b3f39bf31..b9070daf89 100644
--- a/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/NetigsoUsesSwingTest.java
+++ b/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/NetigsoUsesSwingTest.java
@@ -43,7 +43,6 @@ public NetigsoUsesSwingTest(String name) {
     }
 
     protected @Override void setUp() throws Exception {
-        NetigsoUtil.downgradeJDK();
         Locale.setDefault(Locale.US);
         clearWorkDir();
 
diff --git a/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/NetigsoUtil.java b/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/NetigsoUtil.java
index 3663ba289c..e9eaca5020 100644
--- a/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/NetigsoUtil.java
+++ b/platform/core.netigso/test/unit/src/org/netbeans/core/netigso/NetigsoUtil.java
@@ -34,13 +34,6 @@
     private NetigsoUtil() {
     }
     
-    static void downgradeJDK() {
-        final Pattern JDK9 = Pattern.compile("(1\\.)?9");   //NOI18N
-        if (JDK9.matcher(System.getProperty("java.specification.version")).matches()) {
-            System.setProperty("java.specification.version", "1.8");
-        }
-    }
-
     public static Framework framework(ModuleManager mgr) throws Exception {
         final Method nm = mgr.getClass().getDeclaredMethod("netigso");
         nm.setAccessible(true);
diff --git a/platform/core.osgi/nbproject/project.properties b/platform/core.osgi/nbproject/project.properties
index f20464139d..22014f7a2a 100644
--- a/platform/core.osgi/nbproject/project.properties
+++ b/platform/core.osgi/nbproject/project.properties
@@ -18,8 +18,8 @@ is.autoload=true
 javac.source=1.6
 javac.compilerargs=-Xlint -Xlint:-serial
 cp.extra=\
-    ${nb_all}/platform/libs.osgi/external/osgi.core-5.0.0.jar:\
-    ${nb_all}/platform/libs.osgi/external/osgi.cmpn-4.2.jar
+    ${nb_all}/platform/libs.osgi/external/osgi.core-7.0.0.jar:\
+    ${nb_all}/platform/libs.osgi/external/osgi.cmpn-5.0.0.jar
 test.unit.cp.extra=\
     ${ant.core.lib}:\
     ${nbantext.jar}:\
diff --git a/platform/core.osgi/nbproject/project.xml b/platform/core.osgi/nbproject/project.xml
index f83edc3ddf..84ca51df7e 100644
--- a/platform/core.osgi/nbproject/project.xml
+++ b/platform/core.osgi/nbproject/project.xml
@@ -47,14 +47,6 @@
                         <specification-version>9.0</specification-version>
                     </run-dependency>
                 </dependency>
-                <dependency>
-                    <code-name-base>org.openide.filesystems.compat8</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>9.0</specification-version>
-                    </run-dependency>
-                </dependency>
                 <dependency>
                     <code-name-base>org.openide.modules</code-name-base>
                     <build-prerequisite/>
diff --git a/platform/core.osgi/src/org/netbeans/core/osgi/OSGiRepository.java b/platform/core.osgi/src/org/netbeans/core/osgi/OSGiRepository.java
index 4c0db6c797..0b3f7a23cc 100644
--- a/platform/core.osgi/src/org/netbeans/core/osgi/OSGiRepository.java
+++ b/platform/core.osgi/src/org/netbeans/core/osgi/OSGiRepository.java
@@ -31,7 +31,6 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.openide.filesystems.FileStatusListener;
-import org.openide.filesystems.FileSystem$Environment;
 import org.openide.filesystems.FileSystem;
 import org.openide.filesystems.FileUtil;
 import org.openide.filesystems.LocalFileSystem;
@@ -119,8 +118,6 @@ public void removeLayersFor(List<Bundle> bundles) {
     private static final class SFS extends MultiFileSystem implements LookupListener {
 
         static {
-            @SuppressWarnings("deprecation") Object _1 = FileSystem$Environment.class; // FELIX-2128
-            @SuppressWarnings("deprecation") Object _2 = org.openide.filesystems.FileSystemCapability.class;
             Object _3 = FileStatusListener.class;
             Object _4 = LookupEvent.class; // FELIX-3477
         }
diff --git a/platform/libs.felix/external/binaries-list b/platform/libs.felix/external/binaries-list
index b3375f75f4..0e8b06d580 100644
--- a/platform/libs.felix/external/binaries-list
+++ b/platform/libs.felix/external/binaries-list
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-1BA97A9FFD4A1DFF3E75B76CD3AE3D0EFF8493B7 org.apache.felix:org.apache.felix.main:4.2.1
+8D5C405F2BA570684D4B6FE4B3825138B16C05E9 org.apache.felix:org.apache.felix.main:6.0.1
diff --git a/platform/libs.felix/external/org.apache.felix.main-4.2.1-license.txt b/platform/libs.felix/external/org.apache.felix.main-6.0.1-license.txt
similarity index 99%
rename from platform/libs.felix/external/org.apache.felix.main-4.2.1-license.txt
rename to platform/libs.felix/external/org.apache.felix.main-6.0.1-license.txt
index 562d2c6142..1b7a8156bd 100644
--- a/platform/libs.felix/external/org.apache.felix.main-4.2.1-license.txt
+++ b/platform/libs.felix/external/org.apache.felix.main-6.0.1-license.txt
@@ -1,8 +1,8 @@
 Name: Felix
-Version: 4.2.1
+Version: 6.0.1
 Description: Apache Felix OSGi container.
 License: Apache-2.0
-Files: org.apache.felix.main-4.2.1.jar
+Files: org.apache.felix.main-6.0.1.jar
 Origin: Apache Software Foundation
 URL: http://archive.apache.org/dist/felix/
 
diff --git a/platform/libs.felix/external/org.apache.felix.main-4.2.1-notice.txt b/platform/libs.felix/external/org.apache.felix.main-6.0.1-notice.txt
similarity index 100%
rename from platform/libs.felix/external/org.apache.felix.main-4.2.1-notice.txt
rename to platform/libs.felix/external/org.apache.felix.main-6.0.1-notice.txt
diff --git a/platform/libs.felix/manifest.mf b/platform/libs.felix/manifest.mf
index bd35b980e2..6fbae895fe 100644
--- a/platform/libs.felix/manifest.mf
+++ b/platform/libs.felix/manifest.mf
@@ -9,6 +9,7 @@ Covered-Packages: META-INF,/MANIFEST.MF,org.netbeans.libs.felix,
  default/default.properties,org.apache.felix.framework,
  org.apache.felix.framework.cache,org.apache.felix.framework.capabilityset,
  org.apache.felix.framework.ext,org.apache.felix.framework.resolver,
+ org.apache.felix.resolver,org.apache.felix.resolver.util,
  org.apache.felix.framework.util,org.apache.felix.framework.util.manifestparser,
  org.apache.felix.main,org.apache.felix.framework.wiring
  
diff --git a/platform/libs.felix/nbproject/project.properties b/platform/libs.felix/nbproject/project.properties
index 25cbcfb141..bb254f6a38 100644
--- a/platform/libs.felix/nbproject/project.properties
+++ b/platform/libs.felix/nbproject/project.properties
@@ -15,6 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-release.external/org.apache.felix.main-4.2.1.jar=modules/ext/org.apache.felix.main-4.2.1.jar
+release.external/org.apache.felix.main-6.0.1.jar=modules/ext/org.apache.felix.main-6.0.1.jar
 javac.source=1.6
 javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/platform/libs.felix/nbproject/project.xml b/platform/libs.felix/nbproject/project.xml
index f257bb02db..ba76a2bc64 100644
--- a/platform/libs.felix/nbproject/project.xml
+++ b/platform/libs.felix/nbproject/project.xml
@@ -36,8 +36,8 @@
             </module-dependencies>
             <public-packages/>
             <class-path-extension>
-                <runtime-relative-path>ext/org.apache.felix.main-4.2.1.jar</runtime-relative-path>
-                <binary-origin>external/org.apache.felix.main-4.2.1.jar</binary-origin>
+                <runtime-relative-path>ext/org.apache.felix.main-6.0.1.jar</runtime-relative-path>
+                <binary-origin>external/org.apache.felix.main-6.0.1.jar</binary-origin>
             </class-path-extension>
         </data>
     </configuration>
diff --git a/platform/libs.osgi/build.xml b/platform/libs.osgi/build.xml
index 0e4848d4b1..83f4c918a1 100644
--- a/platform/libs.osgi/build.xml
+++ b/platform/libs.osgi/build.xml
@@ -22,29 +22,4 @@
 <project basedir="." default="build" name="platform/libs.osgi">
     <description>Builds, tests, and runs the project org.netbeans.libs.osgi</description>
     <import file="../../nbbuild/templates/projectized.xml"/>
-    
-    <!-- A task to check if the binary 'external/osgi.cmpn-4.2.jar' exists -->
-    <target name="-check-requires-patching-maven-sources">
-        <available file="external/osgi.cmpn-4.2.jar" property="sources-already-patched" />
-    </target>
-    
-    <!-- 
-         '-javac-init' task is invoked after maven sources have been downloaded 
-         to 'external/org.osgi.compendium-4.2.0.jar'
-         (see external/binaries-list).
-         Netbeans had its own copy of osgi.cmpn-4.2.jar, which is identical to
-         the downloaded binary. The downloaded binary contains the source code
-         in addition to the compiled class files.
-         The sources are now stripped from the binary to create the original file
-         netbeans used to bundle.
-    -->
-    <target name="-prepare-patched-binary" depends="-check-requires-patching-maven-sources" unless="sources-already-patched">
-        <echo message="Patching org.osgi.compendium-4.2.0 for Netbeans..." />
-        <zip destfile="external/osgi.cmpn-4.2.jar">
-            <zipfileset src="external/org.osgi.compendium-4.2.0.jar" excludes="OSGI-OPT/**" />
-        </zip>
-    </target>
-    
-    <!-- Hook into harness "-javac-init" task -->
-    <target name="-javac-init" depends="-prepare-patched-binary, projectized-common.-javac-init" />
 </project>
diff --git a/platform/libs.osgi/external/binaries-list b/platform/libs.osgi/external/binaries-list
index 04a2d9c820..70105119c0 100644
--- a/platform/libs.osgi/external/binaries-list
+++ b/platform/libs.osgi/external/binaries-list
@@ -14,5 +14,5 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-1E506145EC53132BCE79CE8798D98026B598FD48 org.osgi:org.osgi.compendium:4.2.0
-2F2FBFF3FB80F91B159A7FA9F0C42A894BB8BCC5 org.osgi:osgi.core:5.0.0
+9D7A9C35591F6FA1C98AC85AF32775C12361AEE4 org.osgi:org.osgi.compendium:5.0.0
+7545EAB9BD1F85E9F1162865A7281C8BECB417F2 org.osgi:osgi.core:7.0.0
diff --git a/platform/libs.osgi/external/osgi-5.0-license.txt b/platform/libs.osgi/external/osgi-7.0-license.txt
similarity index 98%
rename from platform/libs.osgi/external/osgi-5.0-license.txt
rename to platform/libs.osgi/external/osgi-7.0-license.txt
index ce394fadf8..1b31129556 100644
--- a/platform/libs.osgi/external/osgi-5.0-license.txt
+++ b/platform/libs.osgi/external/osgi-7.0-license.txt
@@ -1,10 +1,10 @@
 Name: OSGi
-Version: 5.0
-Files: osgi.core-5.0.0.jar org.osgi.compendium-4.2.0.jar
+Version: 7.0
+Files: osgi.core-7.0.0.jar org.osgi.compendium-5.0.0.jar
 Description: OSGi specification (core & compendium).
 License: Apache-2.0
 Origin: OSGi
-URL: http://www.osgi.org/Download/Release5
+URL: https://www.osgi.org/release-7-download/
 
                                  Apache License
                            Version 2.0, January 2004
diff --git a/platform/libs.osgi/manifest.mf b/platform/libs.osgi/manifest.mf
index c516d52b0f..2d9605348f 100644
--- a/platform/libs.osgi/manifest.mf
+++ b/platform/libs.osgi/manifest.mf
@@ -1,5 +1,5 @@
 Manifest-Version: 1.0
 OpenIDE-Module: org.netbeans.libs.osgi
 OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/osgi/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.25
+OpenIDE-Module-Specification-Version: 1.26
 
diff --git a/platform/libs.osgi/nbproject/project.properties b/platform/libs.osgi/nbproject/project.properties
index eb79fec0ee..c4bc829548 100644
--- a/platform/libs.osgi/nbproject/project.properties
+++ b/platform/libs.osgi/nbproject/project.properties
@@ -18,5 +18,5 @@ is.autoload=true
 javac.source=1.6
 javac.compilerargs=-Xlint -Xlint:-serial
 
-release.external/osgi.core-5.0.0.jar=modules/ext/osgi.core-5.0.0.jar
-release.external/org.osgi.compendium-4.2.0.jar=modules/ext/org.osgi.compendium-4.2.0.jar
+release.external/osgi.core-7.0.0.jar=modules/ext/osgi.core-7.0.0.jar
+release.external/org.osgi.compendium-5.0.0.jar=modules/ext/org.osgi.compendium-5.0.0.jar
diff --git a/platform/libs.osgi/nbproject/project.xml b/platform/libs.osgi/nbproject/project.xml
index 303fc39aad..b498c35b9b 100644
--- a/platform/libs.osgi/nbproject/project.xml
+++ b/platform/libs.osgi/nbproject/project.xml
@@ -30,12 +30,12 @@
                 <subpackages>org.osgi</subpackages>
             </public-packages>
             <class-path-extension>
-                <runtime-relative-path>ext/osgi.core-5.0.0.jar</runtime-relative-path>
-                <binary-origin>external/osgi.core-5.0.0.jar</binary-origin>
+                <runtime-relative-path>ext/osgi.core-7.0.0.jar</runtime-relative-path>
+                <binary-origin>external/osgi.core-7.0.0.jar</binary-origin>
             </class-path-extension>
             <class-path-extension>
-                <runtime-relative-path>ext/org.osgi.compendium-4.2.0.jar</runtime-relative-path>
-                <binary-origin>external/org.osgi.compendium-4.2.0.jar</binary-origin>
+                <runtime-relative-path>ext/org.osgi.compendium-5.0.0.jar</runtime-relative-path>
+                <binary-origin>external/org.osgi.compendium-5.0.0.jar</binary-origin>
             </class-path-extension>
         </data>
     </configuration>
diff --git a/platform/netbinox/src/org/netbeans/modules/netbinox/Netbinox.java b/platform/netbinox/src/org/netbeans/modules/netbinox/Netbinox.java
index a6a1dc12ed..fc849439a5 100644
--- a/platform/netbinox/src/org/netbeans/modules/netbinox/Netbinox.java
+++ b/platform/netbinox/src/org/netbeans/modules/netbinox/Netbinox.java
@@ -35,7 +35,9 @@
 import org.osgi.framework.Filter;
 import org.osgi.framework.FrameworkListener;
 import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceFactory;
 import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceObjects;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.ServiceRegistration;
 
@@ -216,5 +218,15 @@ public void addFrameworkListener(FrameworkListener fl) {
         public void addBundleListener(BundleListener bl) {
             delegate.addBundleListener(bl);
         }
+
+        @Override
+        public <S> ServiceRegistration<S> registerService(Class<S> type, ServiceFactory<S> sf, Dictionary<String, ?> dctnr) {
+            return delegate.registerService(type, sf, dctnr);
+        }
+
+        @Override
+        public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> sr) {
+            return delegate.getServiceObjects(sr);
+        }
     } // end of Context
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists