You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2019/05/07 11:33:47 UTC

[maven-doxia] branch DOXIA-576 updated (3ae7294 -> 2a0566c)

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch DOXIA-576
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git.


 discard 3ae7294  [DOXIA-576] Move to non-deprecated methods (as of 4.3)
 discard b89b6d1  [DOXIA-576] Upgrade httpcomponents
     add a7b930b  [DOXIA-591] Update minimum required Java to 7
     add 3aafdd8  [DOXIA-591] Use Java 7 syntax
     new 2a0566c  [DOXIA-576] Upgrade httpcomponents httpclient 4.5.8, httpcore 4.4.11

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (3ae7294)
            \
             N -- N -- N   refs/heads/DOXIA-576 (2a0566c)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/maven/doxia/index/IndexEntry.java   |   6 +-
 .../org/apache/maven/doxia/index/IndexingSink.java |   4 +-
 .../org/apache/maven/doxia/macro/SwfMacro.java     | 149 ++++++++++-----------
 .../maven/doxia/macro/snippet/SnippetMacro.java    |  10 +-
 .../maven/doxia/macro/snippet/SnippetReader.java   |   2 +-
 .../maven/doxia/parser/AbstractXmlParser.java      |  17 +--
 .../maven/doxia/parser/Xhtml5BaseParser.java       |  44 +++---
 .../apache/maven/doxia/parser/XhtmlBaseParser.java |  42 +++---
 .../parser/module/DefaultParserModuleManager.java  |   2 +-
 .../maven/doxia/sink/impl/RandomAccessSink.java    |   4 +-
 .../doxia/sink/impl/SinkEventAttributeSet.java     |  10 +-
 .../maven/doxia/sink/impl/Xhtml5BaseSink.java      |  38 +++---
 .../maven/doxia/sink/impl/XhtmlBaseSink.java       |  36 ++---
 .../org/apache/maven/doxia/util/DoxiaUtils.java    |  20 +--
 .../org/apache/maven/doxia/util/HtmlTools.java     |  35 ++---
 .../org/apache/maven/doxia/util/XmlValidator.java  |   6 +-
 .../org/apache/maven/doxia/AbstractModuleTest.java |   4 +-
 .../maven/doxia/document/DocumentModelTest.java    |  11 +-
 .../apache/maven/doxia/macro/EchoMacroTest.java    |   2 +-
 .../org/apache/maven/doxia/macro/SsiMacroTest.java |   2 +-
 .../org/apache/maven/doxia/macro/SwfMacroTest.java |   6 +-
 .../doxia/macro/manager/MacroManagerTest.java      |   2 +-
 .../doxia/macro/snippet/SnippetMacroTest.java      |   4 +-
 .../apache/maven/doxia/macro/toc/TocMacroTest.java |   4 +-
 .../maven/doxia/parser/AbstractParserTest.java     |  29 +---
 .../maven/doxia/parser/Xhtml5BaseParserTest.java   |   2 +-
 .../maven/doxia/parser/XhtmlBaseParserTest.java    |   2 +-
 .../doxia/sink/impl/AbstractSinkTestCase.java      |   4 +-
 .../doxia/sink/impl/SinkEventAttributeSetTest.java |   2 +-
 .../doxia/sink/impl/SinkEventTestingSink.java      |  10 +-
 .../maven/doxia/sink/impl/SinkUtilsTest.java       |   2 +-
 .../sink/impl/WellformednessCheckingSink.java      |   4 +-
 .../maven/doxia/sink/impl/Xhtml5BaseSinkTest.java  |  14 +-
 .../maven/doxia/sink/impl/XhtmlBaseSinkTest.java   |  14 +-
 .../apache/maven/doxia/util/DoxiaUtilsTest.java    |   7 +-
 .../maven/doxia/xsd/AbstractXmlValidator.java      |  13 +-
 .../maven/doxia/xsd/AbstractXmlValidatorTest.java  |  16 +--
 .../apache/maven/doxia/module/apt/AptMarkup.java   |  20 ++-
 .../apache/maven/doxia/module/apt/AptParser.java   |  12 +-
 .../org/apache/maven/doxia/module/apt/AptSink.java |  18 +--
 .../maven/doxia/module/apt/AptParserTest.java      |  20 +--
 .../apache/maven/doxia/module/apt/AptSinkTest.java |  11 +-
 .../doxia/module/confluence/ConfluenceParser.java  |   2 +-
 .../doxia/module/confluence/ConfluenceSink.java    |   6 +-
 .../confluence/parser/ChildBlocksBuilder.java      |  10 +-
 .../parser/DefinitionListBlockParser.java          |   2 +-
 .../confluence/parser/FigureBlockParser.java       |   4 +-
 .../confluence/parser/ParagraphBlockParser.java    |   5 +-
 .../confluence/parser/list/ListBlockParser.java    |   2 +-
 .../confluence/parser/list/TreeComponent.java      |   2 +-
 .../confluence/parser/list/TreeListBuilder.java    |   4 +-
 .../confluence/parser/table/TableBlockParser.java  |  16 +--
 .../module/confluence/ConfluenceParserTest.java    |   6 +-
 .../maven/doxia/module/docbook/DocBookParser.java  |  60 ++++-----
 .../maven/doxia/module/docbook/DocBookSink.java    |  14 +-
 .../doxia/module/docbook/DocBookParserTest.java    |   2 +-
 .../apache/maven/doxia/module/fml/FmlParser.java   |  42 +++---
 .../maven/doxia/module/fml/FmlParserTest.java      |  14 +-
 .../maven/doxia/module/fml/FmlValidatorTest.java   |   2 +-
 .../maven/doxia/module/fo/FoAggregateSink.java     |  18 +--
 .../maven/doxia/module/fo/FoConfiguration.java     |  13 +-
 .../org/apache/maven/doxia/module/fo/FoSink.java   |  48 ++++---
 .../org/apache/maven/doxia/module/fo/FoUtils.java  |   2 +-
 .../maven/doxia/module/fo/FoAggregateSinkTest.java |  28 ++--
 .../apache/maven/doxia/module/itext/ITextSink.java |  14 +-
 .../apache/maven/doxia/module/itext/ITextUtil.java |  10 +-
 .../doxia/module/itext/SinkActionContext.java      |   6 +-
 .../apache/maven/doxia/module/latex/LatexSink.java |   8 +-
 doxia-modules/doxia-module-markdown/pom.xml        |   4 -
 .../module/markdown/FlexmarkDoxiaExtension.java    |   2 +-
 .../module/markdown/FlexmarkDoxiaLinkResolver.java |   2 +-
 .../module/markdown/FlexmarkDoxiaNodeRenderer.java |  35 +++--
 .../doxia/module/markdown/MarkdownParser.java      |   2 +-
 .../doxia-module-markdown/src/site/apt/index.apt   |  24 ----
 .../doxia/module/markdown/MarkdownParserTest.java  |  15 +--
 .../apache/maven/doxia/module/rtf/PBMReader.java   |   4 +-
 .../org/apache/maven/doxia/module/rtf/RtfSink.java |  29 ++--
 .../apache/maven/doxia/module/rtf/WMFWriter.java   |   8 +-
 .../apache/maven/doxia/module/rtf/RtfSinkTest.java |   4 +-
 .../maven/doxia/module/twiki/TWikiParser.java      |   2 +-
 .../apache/maven/doxia/module/twiki/TWikiSink.java |  14 +-
 .../module/twiki/parser/AbstractFatherBlock.java   |   8 +-
 .../module/twiki/parser/FormatedTextParser.java    |   4 +-
 .../twiki/parser/GenericListBlockParser.java       |   6 +-
 .../module/twiki/parser/HorizontalRuleBlock.java   |   3 +-
 .../maven/doxia/module/twiki/parser/NopBlock.java  |   3 +-
 .../module/twiki/parser/ParagraphBlockParser.java  |   6 +-
 .../doxia/module/twiki/parser/SectionBlock.java    |   2 +-
 .../module/twiki/parser/SectionBlockParser.java    |   2 +-
 .../module/twiki/parser/TableBlockParser.java      |   6 +-
 .../doxia/module/twiki/parser/TextParser.java      |  18 +--
 .../module/twiki/parser/VerbatimBlockParser.java   |   2 +-
 .../maven/doxia/module/twiki/parser/ListTest.java  |   6 +-
 .../doxia/module/twiki/parser/ParagraphTest.java   |   8 +-
 .../doxia/module/twiki/parser/SectionTest.java     |   2 +-
 .../doxia/module/twiki/parser/TwikiParserTest.java |   2 +-
 .../maven/doxia/module/twiki/parser/WordsTest.java |  81 ++++++-----
 .../apache/maven/doxia/module/xdoc/XdocParser.java |   6 +-
 .../apache/maven/doxia/module/xdoc/XdocSink.java   |  13 +-
 .../maven/doxia/module/xdoc/XdocIdentityTest.java  |   4 +-
 .../maven/doxia/module/xdoc/XdocParserTest.java    |  10 +-
 .../maven/doxia/module/xdoc/XdocSinkTest.java      |   2 +-
 .../maven/doxia/module/xdoc/XdocValidatorTest.java |   2 +-
 .../maven/doxia/module/xhtml/XhtmlParser.java      |   4 +-
 .../doxia/module/xhtml/XhtmlIdentityTest.java      |   4 +-
 .../maven/doxia/module/xhtml/XhtmlParserTest.java  |   2 +-
 .../maven/doxia/module/xhtml/XhtmlSinkTest.java    |  12 +-
 .../maven/doxia/module/xhtml5/Xhtml5Parser.java    |   4 +-
 .../doxia/module/xhtml5/Xhtml5IdentityTest.java    |   4 +-
 .../doxia/module/xhtml5/Xhtml5ParserTest.java      |   2 +-
 .../maven/doxia/module/xhtml5/Xhtml5SinkTest.java  |  12 +-
 pom.xml                                            |   2 +-
 112 files changed, 610 insertions(+), 777 deletions(-)


[maven-doxia] 01/01: [DOXIA-576] Upgrade httpcomponents httpclient 4.5.8, httpcore 4.4.11

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch DOXIA-576
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git

commit 2a0566c0e6dd4fa35fc601acbcaa98cda081f797
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Tue May 7 13:24:54 2019 +0200

    [DOXIA-576] Upgrade httpcomponents httpclient 4.5.8, httpcore 4.4.11
---
 doxia-core/pom.xml                                 |  4 +--
 .../maven/doxia/parser/AbstractXmlParser.java      | 34 +++++++++-------------
 2 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/doxia-core/pom.xml b/doxia-core/pom.xml
index 867c20c..6f675a6 100644
--- a/doxia-core/pom.xml
+++ b/doxia-core/pom.xml
@@ -62,12 +62,12 @@ under the License.
     <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpclient</artifactId>
-      <version>4.0.2</version>
+      <version>4.5.8</version>
     </dependency>
     <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpcore</artifactId>
-      <version>4.0.1</version>
+      <version>4.4.11</version>
     </dependency>
 
     <!-- test -->
diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java b/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
index dbeed05..1ac62fb 100644
--- a/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
+++ b/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
@@ -36,16 +36,13 @@ import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
 import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.HttpRequestRetryHandler;
+import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
-import org.apache.http.impl.client.DefaultHttpClient;
 import org.apache.http.impl.client.DefaultHttpRequestRetryHandler;
+import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.http.util.EntityUtils;
-
 import org.apache.maven.doxia.macro.MacroExecutionException;
 import org.apache.maven.doxia.markup.XmlMarkup;
 import org.apache.maven.doxia.sink.Sink;
@@ -811,19 +808,17 @@ public abstract class AbstractXmlParser
             }
 
             // it is an HTTP url, using HttpClient...
-            DefaultHttpClient client = new DefaultHttpClient();
-            HttpGet method = new HttpGet( url.toString() );
-            // Set a user-agent that doesn't contain the word "java", otherwise it will be blocked by the W3C
-            // The default user-agent is "Apache-HttpClient/4.0.2 (java 1.5)"
-            method.setHeader( "user-agent", "Apache-Doxia/" + doxiaVersion() );
-
-            HttpRequestRetryHandler retryHandler = new DefaultHttpRequestRetryHandler( 3, false );
-            client.setHttpRequestRetryHandler( retryHandler );
-
-            HttpEntity entity = null;
+            HttpClientBuilder httpClientBuilder = HttpClientBuilder.create()
+                    .useSystemProperties()
+                    .setRetryHandler( new DefaultHttpRequestRetryHandler( 3, false ) )
+                    // Set a user-agent that doesn't contain the word "java", otherwise it will be blocked by the W3C
+                    // The default user-agent is "Apache-HttpClient/4.5.8 (java 7)"
+                    .setUserAgent( "Apache-Doxia/" + doxiaVersion() );
+
+            CloseableHttpResponse response = null;
             try
             {
-                HttpResponse response = client.execute( method );
+                response = httpClientBuilder.build( ).execute( new HttpGet( url.toString( ) ) );
                 int statusCode = response.getStatusLine().getStatusCode();
                 if ( statusCode != HttpStatus.SC_OK )
                 {
@@ -832,8 +827,7 @@ public abstract class AbstractXmlParser
                         + response.getStatusLine().getReasonPhrase() + "'." );
                 }
 
-                entity = response.getEntity();
-                return EntityUtils.toByteArray( entity );
+                return EntityUtils.toByteArray( response.getEntity() );
             }
             catch ( ClientProtocolException e )
             {
@@ -845,11 +839,11 @@ public abstract class AbstractXmlParser
             }
             finally
             {
-                if ( entity != null )
+                if ( response != null )
                 {
                     try
                     {
-                        entity.consumeContent();
+                        response.close();
                     }
                     catch ( IOException e )
                     {