This is an automated email from the git hooks/post-receive script. ebourg-guest pushed a commit to branch master in repository jakarta-jmeter.
commit dd869842385409ef18252a4f10305f92bfeccf81 Author: Emmanuel Bourg <[email protected]> Date: Wed Mar 30 00:08:24 2016 +0200 Refreshed the patches --- debian/changelog | 5 +- debian/patches/01_improve_cli_help.patch | 2 +- debian/patches/02_disable-soap-sampler.patch | 2 +- debian/patches/03_disable-jdbc-module.patch | 6 +- debian/patches/04_java8_compatibility.patch | 105 ------------ debian/patches/05_ignore-jodd.patch | 228 ++++++++++++++++--------- debian/patches/06_link-to-system-javadoc.patch | 2 +- debian/patches/series | 1 - 8 files changed, 162 insertions(+), 189 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4b21466..c2c451b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ -jakarta-jmeter (2.11-6) UNRELEASED; urgency=medium +jakarta-jmeter (2.12-1) UNRELEASED; urgency=medium + * Team upload. + * New upstream release + - Refreshed the patches * Moved the package to Git -- Emmanuel Bourg <[email protected]> Tue, 29 Mar 2016 23:56:31 +0200 diff --git a/debian/patches/01_improve_cli_help.patch b/debian/patches/01_improve_cli_help.patch index 60b2e14..76411ff 100644 --- a/debian/patches/01_improve_cli_help.patch +++ b/debian/patches/01_improve_cli_help.patch @@ -61,7 +61,7 @@ Forwarded: no + or jmeter-server --- a/build.xml +++ b/build.xml -@@ -980,7 +980,7 @@ +@@ -988,7 +988,7 @@ <exclude name="*eucJP*"/> </fileset> <!-- This file is used by the jmeter -h option --> diff --git a/debian/patches/02_disable-soap-sampler.patch b/debian/patches/02_disable-soap-sampler.patch index 211924b..2ad290f 100644 --- a/debian/patches/02_disable-soap-sampler.patch +++ b/debian/patches/02_disable-soap-sampler.patch @@ -5,7 +5,7 @@ Author: Onkar Shinde <[email protected]> Forwarded: not-needed --- a/build.xml +++ b/build.xml -@@ -599,9 +599,10 @@ +@@ -607,9 +607,10 @@ <target name="compile-http" depends="compile-jorphan,compile-core,compile-components" description="Compile components specific to HTTP sampling."> <mkdir dir="${build.http}"/> <!-- Directory needs to exist, or jar will fail --> diff --git a/debian/patches/03_disable-jdbc-module.patch b/debian/patches/03_disable-jdbc-module.patch index dc1293e..266c675 100644 --- a/debian/patches/03_disable-jdbc-module.patch +++ b/debian/patches/03_disable-jdbc-module.patch @@ -4,7 +4,7 @@ Author: Onkar Shinde <[email protected]> Forwarded: not-needed --- a/build.xml +++ b/build.xml -@@ -749,7 +749,7 @@ +@@ -757,7 +757,7 @@ </javac> </target> @@ -13,7 +13,7 @@ Forwarded: not-needed <target name="compile-examples" depends="compile-jorphan,compile-core" description="Compile example components."> <mkdir dir="${build.examples}"/> -@@ -1025,6 +1025,7 @@ +@@ -1033,6 +1033,7 @@ </jar> <!-- jdbc --> @@ -21,7 +21,7 @@ Forwarded: not-needed <jar jarfile="${dest.jar}/ApacheJMeter_jdbc.jar" manifest="${build.dir}/MANIFEST_BIN.MF"> <zipfileset file="${resources.meta-inf}/default.notice" fullpath="META-INF/NOTICE" /> -@@ -1033,6 +1034,7 @@ +@@ -1041,6 +1042,7 @@ <fileset dir="${build.jdbc}" includes="**/*.class" /> <fileset dir="${src.jdbc}" includes="**/*.properties" /> </jar> diff --git a/debian/patches/04_java8_compatibility.patch b/debian/patches/04_java8_compatibility.patch deleted file mode 100644 index d6e1d86..0000000 --- a/debian/patches/04_java8_compatibility.patch +++ /dev/null @@ -1,105 +0,0 @@ -Description: Renames the HashTree.replace(Object, Object) method to replaceKey(). - This avoids a conflict with the new Map.replace(Object, Object) method - introduced in Java 8. -Author: Emmanuel Bourg <[email protected]> -Forwarded: https://issues.apache.org/bugzilla/show_bug.cgi?id=56360 ---- a/src/jorphan/org/apache/jorphan/collections/ListedHashTree.java -+++ b/src/jorphan/org/apache/jorphan/collections/ListedHashTree.java -@@ -116,7 +116,7 @@ - - /** {@inheritDoc} */ - @Override -- public void replace(Object currentKey, Object newKey) { -+ public void replaceKey(Object currentKey, Object newKey) { - HashTree tree = getTree(currentKey); - data.remove(currentKey); - data.put(newKey, tree); ---- a/src/jorphan/org/apache/jorphan/collections/HashTree.java -+++ b/src/jorphan/org/apache/jorphan/collections/HashTree.java -@@ -763,7 +763,7 @@ - * Finds the given current key, and replaces it with the given new key. Any - * tree structure found under the original key is moved to the new key. - */ -- public void replace(Object currentKey, Object newKey) { -+ public void replaceKey(Object currentKey, Object newKey) { - HashTree tree = getTree(currentKey); - data.remove(currentKey); - data.put(newKey, tree); ---- a/src/core/org/apache/jmeter/JMeter.java -+++ b/src/core/org/apache/jmeter/JMeter.java -@@ -861,7 +861,7 @@ - HashTree replacementTree = rc.getReplacementSubTree(); - if (replacementTree != null) { - convertSubTree(replacementTree); -- tree.replace(item, rc); -+ tree.replaceKey(item, rc); - tree.set(rc, replacementTree); - } - } -@@ -886,14 +886,14 @@ - HashTree replacementTree = rc.getReplacementSubTree(); - if (replacementTree != null) { - convertSubTree(replacementTree); -- tree.replace(item, rc); -+ tree.replaceKey(item, rc); - tree.set(rc, replacementTree); - } - } - } else { // Not a ReplaceableController - convertSubTree(tree.getTree(item)); - TestElement testElement = item.getTestElement(); -- tree.replace(item, testElement); -+ tree.replaceKey(item, testElement); - } - } else { // Not enabled - tree.remove(item); ---- a/src/core/org/apache/jmeter/engine/ConvertListeners.java -+++ b/src/core/org/apache/jmeter/engine/ConvertListeners.java -@@ -62,7 +62,7 @@ - // Used for remote notification of threads start/stop,see BUG 54152 - try { - RemoteThreadsListenerWrapper wrapper = new RemoteThreadsListenerWrapper(new RemoteThreadsListenerImpl()); -- subTree.replace(item, wrapper); -+ subTree.replaceKey(item, wrapper); - } catch (RemoteException e) { - log.error("Error replacing "+RemoteThreadsListenerTestElement.class.getName() - +" by wrapper:"+RemoteThreadsListenerWrapper.class.getName(), e); -@@ -78,13 +78,13 @@ - RemoteSampleListener rtl = new RemoteSampleListenerImpl(item); - if (item instanceof TestStateListener && item instanceof SampleListener) { // TL - all - RemoteListenerWrapper wrap = new RemoteListenerWrapper(rtl); -- subTree.replace(item, wrap); -+ subTree.replaceKey(item, wrap); - } else if (item instanceof TestStateListener) { - RemoteTestListenerWrapper wrap = new RemoteTestListenerWrapper(rtl); -- subTree.replace(item, wrap); -+ subTree.replaceKey(item, wrap); - } else if (item instanceof SampleListener) { - RemoteSampleListenerWrapper wrap = new RemoteSampleListenerWrapper(rtl); -- subTree.replace(item, wrap); -+ subTree.replaceKey(item, wrap); - } else { - log.warn("Could not replace Remotable item "+item.getClass().getName()); - } ---- a/src/core/org/apache/jmeter/gui/action/Save.java -+++ b/src/core/org/apache/jmeter/gui/action/Save.java -@@ -211,7 +211,7 @@ - JMeterTreeNode item = (JMeterTreeNode) iter.next(); - convertSubTree(tree.getTree(item)); - TestElement testElement = item.getTestElement(); // requires JMeterTreeNode -- tree.replace(item, testElement); -+ tree.replaceKey(item, testElement); - } - } - } ---- a/src/reports/org/apache/jmeter/report/gui/action/ReportSave.java -+++ b/src/reports/org/apache/jmeter/report/gui/action/ReportSave.java -@@ -127,7 +127,7 @@ - ReportTreeNode item = (ReportTreeNode) iter.next(); - convertSubTree(tree.getTree(item)); - TestElement testElement = item.getTestElement(); -- tree.replace(item, testElement); -+ tree.replaceKey(item, testElement); - } - } - } diff --git a/debian/patches/05_ignore-jodd.patch b/debian/patches/05_ignore-jodd.patch index 9cbdc5a..992ce19 100644 --- a/debian/patches/05_ignore-jodd.patch +++ b/debian/patches/05_ignore-jodd.patch @@ -1,9 +1,31 @@ Description: Disable the JoddExtractor since jodd isn't in Debian yet Author: Emmanuel Bourg <[email protected]> Forwarded: not-needed +--- a/src/components/org/apache/jmeter/extractor/HtmlExtractor.java ++++ b/src/components/org/apache/jmeter/extractor/HtmlExtractor.java +@@ -44,7 +44,7 @@ + public static final String EXTRACTOR_JODD = "JODD"; //$NON-NLS-1$ + + public static String[] getImplementations(){ +- return new String[]{EXTRACTOR_JSOUP,EXTRACTOR_JODD}; ++ return new String[]{EXTRACTOR_JSOUP}; + } + + public static final String DEFAULT_EXTRACTOR = ""; // $NON-NLS-1$ +@@ -213,8 +213,8 @@ + boolean useDefaultExtractor = DEFAULT_EXTRACTOR.equals(impl); + if (useDefaultExtractor || EXTRACTOR_JSOUP.equals(impl)) { + return new JSoupExtractor(); +- } else if (EXTRACTOR_JODD.equals(impl)) { +- return new JoddExtractor(); ++ //} else if (EXTRACTOR_JODD.equals(impl)) { ++ // return new JoddExtractor(); + } else { + throw new IllegalArgumentException("Extractor implementation:"+ impl+" is unknown"); + } --- a/src/components/org/apache/jmeter/extractor/JoddExtractor.java +++ /dev/null -@@ -1,96 +0,0 @@ +@@ -1,102 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with @@ -29,6 +51,8 @@ Forwarded: not-needed -import jodd.lagarto.dom.LagartoDOMBuilder; -import jodd.lagarto.dom.Node; -import jodd.lagarto.dom.NodeSelector; +-import jodd.log.LoggerFactory; +-import jodd.log.impl.Slf4jLoggerFactory; - -import org.apache.jmeter.threads.JMeterContextService; -import org.apache.jorphan.util.JOrphanUtils; @@ -46,6 +70,10 @@ Forwarded: not-needed - private static final long serialVersionUID = -7235814605293262972L; - - private static final String CACHE_KEY_PREFIX = JoddExtractor.class.getName()+"_PARSED_BODY"; +- +- static { +- LoggerFactory.setLoggerFactory(new Slf4jLoggerFactory()); +- } - - /** - * @@ -100,31 +128,9 @@ Forwarded: not-needed - } - } -} ---- a/src/components/org/apache/jmeter/extractor/HtmlExtractor.java -+++ b/src/components/org/apache/jmeter/extractor/HtmlExtractor.java -@@ -44,7 +44,7 @@ - public static final String EXTRACTOR_JODD = "JODD"; //$NON-NLS-1$ - - public static String[] getImplementations(){ -- return new String[]{EXTRACTOR_JSOUP,EXTRACTOR_JODD}; -+ return new String[]{EXTRACTOR_JSOUP}; - } - - public static final String DEFAULT_EXTRACTOR = ""; // $NON-NLS-1$ -@@ -213,8 +213,8 @@ - boolean useDefaultExtractor = DEFAULT_EXTRACTOR.equals(impl); - if (useDefaultExtractor || EXTRACTOR_JSOUP.equals(impl)) { - return new JSoupExtractor(); -- } else if (EXTRACTOR_JODD.equals(impl)) { -- return new JoddExtractor(); -+ //} else if (EXTRACTOR_JODD.equals(impl)) { -+ // return new JoddExtractor(); - } else { - throw new IllegalArgumentException("Extractor implementation:"+ impl+" is unknown"); - } --- a/src/protocol/http/org/apache/jmeter/protocol/http/parser/LagartoBasedHtmlParser.java -+++ b/src/protocol/http/org/apache/jmeter/protocol/http/parser/LagartoBasedHtmlParser.java -@@ -1,172 +0,0 @@ ++++ /dev/null +@@ -1,242 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with @@ -149,11 +155,18 @@ Forwarded: not-needed -import java.net.URL; -import java.util.Collections; -import java.util.Iterator; +-import java.util.Stack; - -import jodd.lagarto.EmptyTagVisitor; -import jodd.lagarto.LagartoException; -import jodd.lagarto.LagartoParser; +-import jodd.lagarto.LagartoParserConfig; -import jodd.lagarto.Tag; +-import jodd.lagarto.TagType; +-import jodd.lagarto.TagUtil; +-import jodd.lagarto.dom.HtmlCCommentExpressionMatcher; +-import jodd.log.LoggerFactory; +-import jodd.log.impl.Slf4jLoggerFactory; - -import org.apache.commons.lang3.StringUtils; -import org.apache.jmeter.protocol.http.util.ConversionUtils; @@ -166,6 +179,9 @@ Forwarded: not-needed - */ -public class LagartoBasedHtmlParser extends HTMLParser { - private static final Logger log = LoggingManager.getLoggerForClass(); +- static { +- LoggerFactory.setLoggerFactory(new Slf4jLoggerFactory()); +- } - - /* - * A dummy class to pass the pointer of URL. @@ -178,23 +194,27 @@ Forwarded: not-needed - } - - private static final class JMeterTagVisitor extends EmptyTagVisitor { -- +- private HtmlCCommentExpressionMatcher htmlCCommentExpressionMatcher; - private URLCollection urls; - private URLPointer baseUrl; +- private Float ieVersion; +- private Stack<Boolean> enabled = new Stack<Boolean>(); - - /** - * @param baseUrl - * @param urls +- * @param ieVersion - */ -- public JMeterTagVisitor(final URLPointer baseUrl, URLCollection urls) { +- public JMeterTagVisitor(final URLPointer baseUrl, URLCollection urls, Float ieVersion) { - this.urls = urls; - this.baseUrl = baseUrl; +- this.ieVersion = ieVersion; - } - - private final void extractAttribute(Tag tag, String attributeName) { -- String url = tag.getAttributeValue(attributeName, false); +- CharSequence url = tag.getAttributeValue(attributeName); - if (!StringUtils.isEmpty(url)) { -- urls.addURL(url, baseUrl.url); +- urls.addURL(url.toString(), baseUrl.url); - } - } - /* @@ -205,6 +225,9 @@ Forwarded: not-needed - */ - @Override - public void script(Tag tag, CharSequence body) { +- if (!enabled.peek()) { +- return; +- } - extractAttribute(tag, ATT_SRC); - } - @@ -215,67 +238,116 @@ Forwarded: not-needed - */ - @Override - public void tag(Tag tag) { -- -- String tagName = tag.getName().toLowerCase(); -- if (tagName.equals(TAG_BODY)) { -- extractAttribute(tag, ATT_BACKGROUND); -- } else if (tagName.equals(TAG_BASE)) { -- String baseref = tag.getAttributeValue(ATT_HREF, false); -- try { -- if (!StringUtils.isEmpty(baseref))// Bugzilla 30713 -- { -- baseUrl.url = ConversionUtils.makeRelativeURL(baseUrl.url, baseref); +- if (!enabled.peek()) { +- return; +- } +- TagType tagType = tag.getType(); +- switch (tagType) { +- case START: +- case SELF_CLOSING: +- if (tag.nameEquals(TAG_BODY)) { +- extractAttribute(tag, ATT_BACKGROUND); +- } else if (tag.nameEquals(TAG_BASE)) { +- CharSequence baseref = tag.getAttributeValue(ATT_HREF); +- try { +- if (!StringUtils.isEmpty(baseref))// Bugzilla 30713 +- { +- baseUrl.url = ConversionUtils.makeRelativeURL(baseUrl.url, baseref.toString()); +- } +- } catch (MalformedURLException e1) { +- throw new RuntimeException(e1); - } -- } catch (MalformedURLException e1) { -- throw new RuntimeException(e1); -- } -- } else if (tagName.equals(TAG_IMAGE)) { -- extractAttribute(tag, ATT_SRC); -- } else if (tagName.equals(TAG_APPLET)) { -- extractAttribute(tag, ATT_CODE); -- } else if (tagName.equals(TAG_OBJECT)) { -- extractAttribute(tag, ATT_CODEBASE); -- extractAttribute(tag, ATT_DATA); -- } else if (tagName.equals(TAG_INPUT)) { -- // we check the input tag type for image -- if (ATT_IS_IMAGE.equalsIgnoreCase(tag.getAttributeValue(ATT_TYPE, false))) { -- // then we need to download the binary +- } else if (tag.nameEquals(TAG_IMAGE)) { +- extractAttribute(tag, ATT_SRC); +- } else if (tag.nameEquals(TAG_APPLET)) { +- extractAttribute(tag, ATT_CODE); +- } else if (tag.nameEquals(TAG_OBJECT)) { +- extractAttribute(tag, ATT_CODEBASE); +- extractAttribute(tag, ATT_DATA); +- } else if (tag.nameEquals(TAG_INPUT)) { +- // we check the input tag type for image +- CharSequence type = tag.getAttributeValue(ATT_TYPE); +- if (type != null && TagUtil.equalsIgnoreCase(ATT_IS_IMAGE, type)) { +- // then we need to download the binary +- extractAttribute(tag, ATT_SRC); +- } +- } else if (tag.nameEquals(TAG_SCRIPT)) { +- extractAttribute(tag, ATT_SRC); +- // Bug 51750 +- } else if (tag.nameEquals(TAG_FRAME) || tag.nameEquals(TAG_IFRAME)) { +- extractAttribute(tag, ATT_SRC); +- } else if (tag.nameEquals(TAG_EMBED)) { - extractAttribute(tag, ATT_SRC); +- } else if (tag.nameEquals(TAG_BGSOUND)){ +- extractAttribute(tag, ATT_SRC); +- } else if (tag.nameEquals(TAG_LINK)) { +- CharSequence relAttribute = tag.getAttributeValue(ATT_REL); +- // Putting the string first means it works even if the attribute is null +- if (relAttribute != null && TagUtil.equalsIgnoreCase(STYLESHEET,relAttribute)) { +- extractAttribute(tag, ATT_HREF); +- } +- } else { +- extractAttribute(tag, ATT_BACKGROUND); - } -- } else if (tagName.equals(TAG_SCRIPT)) { -- extractAttribute(tag, ATT_SRC); -- // Bug 51750 -- } else if (tagName.equals(TAG_FRAME) || tagName.equals(TAG_IFRAME)) { -- extractAttribute(tag, ATT_SRC); -- } else if (tagName.equals(TAG_EMBED)) { -- extractAttribute(tag, ATT_SRC); -- } else if (tagName.equals(TAG_BGSOUND)){ -- extractAttribute(tag, ATT_SRC); -- } else if (tagName.equals(TAG_LINK)) { -- // Putting the string first means it works even if the attribute is null -- if (STYLESHEET.equalsIgnoreCase(tag.getAttributeValue(ATT_REL, false))) { -- extractAttribute(tag, ATT_HREF); +- +- +- // Now look for URLs in the STYLE attribute +- CharSequence styleTagStr = tag.getAttributeValue(ATT_STYLE); +- if(!StringUtils.isEmpty(styleTagStr)) { +- HtmlParsingUtils.extractStyleURLs(baseUrl.url, urls, styleTagStr.toString()); - } -- } else { -- extractAttribute(tag, ATT_BACKGROUND); +- break; +- case END: +- break; - } +- } - -- -- // Now look for URLs in the STYLE attribute -- String styleTagStr = tag.getAttributeValue(ATT_STYLE, false); -- if(styleTagStr != null) { -- HtmlParsingUtils.extractStyleURLs(baseUrl.url, urls, styleTagStr); +- /* (non-Javadoc) +- * @see jodd.lagarto.EmptyTagVisitor#condComment(java.lang.CharSequence, boolean, boolean, boolean) +- */ +- @Override +- public void condComment(CharSequence expression, boolean isStartingTag, +- boolean isHidden, boolean isHiddenEndTag) { +- // See http://css-tricks.com/how-to-create-an-ie-only-stylesheet/ +- if(!isStartingTag) { +- enabled.pop(); +- } else { +- if (htmlCCommentExpressionMatcher == null) { +- htmlCCommentExpressionMatcher = new HtmlCCommentExpressionMatcher(); +- } +- String expressionString = expression.toString().trim(); +- enabled.push(Boolean.valueOf(htmlCCommentExpressionMatcher.match(ieVersion.floatValue(), +- expressionString))); - } - } +- +- /* (non-Javadoc) +- * @see jodd.lagarto.EmptyTagVisitor#start() +- */ +- @Override +- public void start() { +- super.start(); +- enabled.clear(); +- enabled.push(Boolean.TRUE); +- } - } - - @Override -- public Iterator<URL> getEmbeddedResourceURLs(byte[] html, URL baseUrl, +- public Iterator<URL> getEmbeddedResourceURLs(String userAgent, byte[] html, URL baseUrl, - URLCollection coll, String encoding) throws HTMLParseException { - try { +- Float ieVersion = extractIEVersion(userAgent); +- - String contents = new String(html,encoding); -- LagartoParser lagartoParser = new LagartoParser(contents); -- JMeterTagVisitor tagVisitor = new JMeterTagVisitor(new URLPointer(baseUrl), coll); +- // As per Jodd javadocs, emitStrings should be false for visitor for better performances +- LagartoParser lagartoParser = new LagartoParser(contents, false); +- LagartoParserConfig<LagartoParserConfig<?>> config = new LagartoParserConfig<LagartoParserConfig<?>>(); +- config.setCaseSensitive(false); +- // Conditional comments only apply for IE < 10 +- config.setEnableConditionalComments(isEnableConditionalComments(ieVersion)); +- +- lagartoParser.setConfig(config); +- JMeterTagVisitor tagVisitor = new JMeterTagVisitor(new URLPointer(baseUrl), coll, ieVersion); - lagartoParser.parse(tagVisitor); - return coll.iterator(); - } catch (LagartoException e) { @@ -289,6 +361,10 @@ Forwarded: not-needed - } - } - +- +- +- +- - /* (non-Javadoc) - * @see org.apache.jmeter.protocol.http.parser.HTMLParser#isReusable() - */ diff --git a/debian/patches/06_link-to-system-javadoc.patch b/debian/patches/06_link-to-system-javadoc.patch index bca83ec..7e29535 100644 --- a/debian/patches/06_link-to-system-javadoc.patch +++ b/debian/patches/06_link-to-system-javadoc.patch @@ -3,7 +3,7 @@ Author: Onkar Shinde <[email protected]> Forwarded: not-needed --- a/build.xml +++ b/build.xml -@@ -2239,7 +2239,7 @@ +@@ -2248,7 +2248,7 @@ packagenames="org.apache.jmeter.*,org.apache.jorphan.*" excludepackagenames="org.apache.jorphan.timer"> <classpath refid="classpath"/> diff --git a/debian/patches/series b/debian/patches/series index 685780a..7b66ba5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,7 +1,6 @@ 01_improve_cli_help.patch 02_disable-soap-sampler.patch 03_disable-jdbc-module.patch -04_java8_compatibility.patch 05_ignore-jodd.patch 06_link-to-system-javadoc.patch 07_ignore-tika.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jakarta-jmeter.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

