Markus Koschany pushed to branch master at Debian Java Maintainers / jboss-modules
Commits: a33a06cf by Markus Koschany at 2020-04-19T15:47:04+02:00 Switch to debhelper-compat = 13. - - - - - 6aa08adc by Markus Koschany at 2020-04-19T15:47:23+02:00 New upstream version 1.10.1 - - - - - a66bfdbc by Markus Koschany at 2020-04-19T15:47:29+02:00 Update upstream source from tag 'upstream/1.10.1' Update to upstream version '1.10.1' with Debian dir f6a21c1f665b07cfe0be09ccfc4a558ad414984a - - - - - 9f7224d4 by Markus Koschany at 2020-04-19T15:48:10+02:00 Update copyright years - - - - - f747659b by Markus Koschany at 2020-04-19T15:48:30+02:00 Update changelog - - - - - 5 changed files: - debian/changelog - debian/control - debian/copyright - pom.xml - src/main/java/org/jboss/modules/Main.java Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,10 @@ +jboss-modules (1.10.1-1) unstable; urgency=medium + + * New upstream version 1.10.1. + * Switch to debhelper-compat = 13. + + -- Markus Koschany <[email protected]> Sun, 19 Apr 2020 15:48:14 +0200 + jboss-modules (1.10.0-1) unstable; urgency=medium * New upstream version 1.10.0. ===================================== debian/control ===================================== @@ -5,7 +5,7 @@ Maintainer: Debian Java Maintainers <[email protected] Uploaders: Markus Koschany <[email protected]> Build-Depends: - debhelper-compat (= 12), + debhelper-compat (= 13), default-jdk, default-jdk-doc, junit4, ===================================== debian/copyright ===================================== @@ -3,7 +3,7 @@ Upstream-Name: JBoss Modules Source: https://github.com/jboss-modules/jboss-modules Files: * -Copyright: 2014-2019, Red Hat, Inc. +Copyright: 2014-2020, Red Hat, Inc. License: Apache-2.0 Files: src/main/java/org/jboss/modules/xml/XmlPullParser.java @@ -25,7 +25,7 @@ License: LGPL-2.1+ Files: debian/* Copyright: 2015, Alexandre Viau <[email protected]> - 2015-2019, Markus Koschany <[email protected]> + 2015-2020, Markus Koschany <[email protected]> License: Apache-2.0 License: Apache-2.0 ===================================== pom.xml ===================================== @@ -23,7 +23,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.jboss.modules</groupId> <artifactId>jboss-modules</artifactId> - <version>1.10.0.Final</version> + <version>1.10.1.Final</version> <name>JBoss Modules</name> <parent> ===================================== src/main/java/org/jboss/modules/Main.java ===================================== @@ -470,7 +470,22 @@ public final class Main { System.exit(1); } final ModuleLoader agentLoader = new ModuleLoader(new FileSystemClassPathModuleFinder(loader)); - for (String agentJar : agentJars) { + for (String agentJarArg : agentJars) { + final String agentJar; + final String agentArgs; + final int i = agentJarArg.indexOf('='); + if (i > 0) { + agentJar = agentJarArg.substring(0, i); + if (agentJarArg.length() > (i + 1)) { + agentArgs = agentJarArg.substring(i + 1); + } else { + agentArgs = ""; + } + } else { + agentJar = agentJarArg; + agentArgs = ""; + } + final Module agentModule; try { agentModule = agentLoader.loadModule(new File(agentJar).getAbsolutePath()); @@ -500,20 +515,29 @@ public final class Main { } throw e; } + // Note that this does not implement agent invocation as defined on + // https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html. This is also not + // done on the system class path which means some agents that rely on that may not work well here. final Attributes attributes = manifest.getMainAttributes(); final String preMainClassName = attributes.getValue("Premain-Class"); if (preMainClassName != null) { final Class<?> preMainClass = Class.forName(preMainClassName, true, classLoader); - final Method premain; + Object[] premainArgs; + Method premain; try { premain = preMainClass.getDeclaredMethod("premain", String.class, Instrumentation.class); + premainArgs = new Object[] {agentArgs, instrumentation}; + } catch (NoSuchMethodException ignore) { + // If the method is not found we should check for the string only method + premain = preMainClass.getDeclaredMethod("premain", String.class); + premainArgs = new Object[] {agentArgs}; } catch (Exception e) { System.out.printf("Failed to find premain method: %s", e); System.exit(1); throw new IllegalStateException(); } try { - premain.invoke(null, "" /*todo*/, instrumentation); + premain.invoke(null, premainArgs); } catch (InvocationTargetException e) { System.out.printf("Execution of premain method failed: %s", e.getCause()); System.exit(1); View it on GitLab: https://salsa.debian.org/java-team/jboss-modules/-/compare/960cfca5f656548c2a2a10ddf90b65a7822c84df...f747659b32eaa901815ea06a054de3e36823d88f -- View it on GitLab: https://salsa.debian.org/java-team/jboss-modules/-/compare/960cfca5f656548c2a2a10ddf90b65a7822c84df...f747659b32eaa901815ea06a054de3e36823d88f You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ pkg-java-commits mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-commits

