This is an automated email from the ASF dual-hosted git repository. matthiasblaesing pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
commit a05a004178bb25c9aaaa9f621e02eb8658568077 Author: Matthias Bläsing <[email protected]> AuthorDate: Sun Jan 14 21:11:51 2018 +0100 Replace JavaHelp dependency in unittest with JNA The JavaHelp dependency is not available (licensing) and so can't be referenced in the unittests. The JNA library is part of the netbeans platform and so an equivalent replacement. --- .../src/org/netbeans/core/osgi/ActivatorTest.java | 35 ++++++++++++---------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/core.osgi/test/unit/src/org/netbeans/core/osgi/ActivatorTest.java b/core.osgi/test/unit/src/org/netbeans/core/osgi/ActivatorTest.java index bba5c15..dbc3d21 100644 --- a/core.osgi/test/unit/src/org/netbeans/core/osgi/ActivatorTest.java +++ b/core.osgi/test/unit/src/org/netbeans/core/osgi/ActivatorTest.java @@ -223,20 +223,25 @@ public class ActivatorTest extends NbTestCase { } public void testClassPathExtensions() throws Exception { - new OSGiProcess(getWorkDir()).newModule().sourceFile("custom/Install.java", "package custom;", - "public class Install extends org.openide.modules.ModuleInstall {", - "public @Override void restored() {", - "org.netbeans.api.javahelp.Help.class.hashCode();", - "javax.help.HelpSet.class.hashCode();", - "javax.help.event.HelpSetEvent.class.hashCode();", - "System.setProperty(\"used.javahelp\", \"true\");}", - "}").manifest( - "OpenIDE-Module: custom", - "OpenIDE-Module-Install: custom.Install", - "OpenIDE-Module-Module-Dependencies: org.openide.modules, org.netbeans.modules.javahelp/1").done(). - module("org.netbeans.modules.javahelp"). - run(false); - assertTrue(Boolean.getBoolean("used.javahelp")); + new OSGiProcess(getWorkDir()) + .newModule() + .sourceFile( + "custom/Install.java", + "package custom;", + "public class Install extends org.openide.modules.ModuleInstall {", + " public @Override void restored() {", + " boolean jnaVersionRead = com.sun.jna.Native.VERSION != null;", + " System.setProperty(\"used.jna\", Boolean.toString(jnaVersionRead));", + " }", + "}") + .manifest( + "OpenIDE-Module: custom", + "OpenIDE-Module-Install: custom.Install", + "OpenIDE-Module-Module-Dependencies: org.openide.modules, org.netbeans.libs.jna/1") + .done() + .module("org.netbeans.libs.jna") + .run(false); + assertTrue(Boolean.getBoolean("used.jna")); } public void testComSunPackages() throws Exception { @@ -255,4 +260,4 @@ public class ActivatorTest extends NbTestCase { assertTrue(Boolean.getBoolean("com.sun.available")); } -} +} \ No newline at end of file -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
