You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2018/05/11 22:17:32 UTC

[sling-org-apache-sling-scripting-thymeleaf] 01/02: SLING-7664 Update Thymeleaf to 3.0.9

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

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-thymeleaf.git

commit 9d0ebc3a40f57c08bd84b8bddac504896d7ceb69
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sat May 12 00:06:34 2018 +0200

    SLING-7664 Update Thymeleaf to 3.0.9
    
    * update Thymeleaf and its dependencies
    * export Thymeleaf packages with versions calculated by bnd
      (requires new version for package o.a.s.scripting.thymeleaf and bundle)
---
 bnd.bnd                                            | 39 +++++++++++++++++++++-
 pom.xml                                            | 13 ++++----
 .../sling/scripting/thymeleaf/package-info.java    |  2 +-
 .../java/org/thymeleaf/engine/TemplateManager.java | 17 ++++++----
 4 files changed, 56 insertions(+), 15 deletions(-)

diff --git a/bnd.bnd b/bnd.bnd
index 381d218..1bf06e8 100644
--- a/bnd.bnd
+++ b/bnd.bnd
@@ -10,7 +10,44 @@ Bundle-Vendor: The Apache Software Foundation
 
 Export-Package:\
   org.apache.sling.scripting.thymeleaf,\
-  org.thymeleaf.*;version=${org.thymeleaf.version};-split-package:=merge-first
+  org.thymeleaf;version=5.0.0,\
+  org.thymeleaf.cache;version=3.1.0,\
+  org.thymeleaf.context;version=3.1.0,\
+  org.thymeleaf.dialect;version=3.0.0,\
+  org.thymeleaf.engine;version=4.0.0;-split-package:=merge-first,\
+  org.thymeleaf.exceptions;version=3.0.0,\
+  org.thymeleaf.expression;version=3.1.0,\
+  org.thymeleaf.inline;version=3.0.0,\
+  org.thymeleaf.linkbuilder;version=3.0.0,\
+  org.thymeleaf.messageresolver;version=3.0.0,\
+  org.thymeleaf.model;version=3.0.0,\
+  org.thymeleaf.postprocessor;version=3.0.0,\
+  org.thymeleaf.preprocessor;version=3.0.0,\
+  org.thymeleaf.processor;version=3.0.0,\
+  org.thymeleaf.processor.cdatasection;version=3.0.0,\
+  org.thymeleaf.processor.comment;version=3.0.0,\
+  org.thymeleaf.processor.doctype;version=3.0.0,\
+  org.thymeleaf.processor.element;version=3.0.0,\
+  org.thymeleaf.processor.processinginstruction;version=3.0.0,\
+  org.thymeleaf.processor.templateboundaries;version=3.0.0,\
+  org.thymeleaf.processor.text;version=3.0.0 ,\
+  org.thymeleaf.processor.xmldeclaration;version=3.0.0,\
+  org.thymeleaf.standard;version=3.0.0,\
+  org.thymeleaf.standard.expression;version=3.1.0,\
+  org.thymeleaf.standard.inline;version=3.0.0,\
+  org.thymeleaf.standard.processor;version=3.1.0,\
+  org.thymeleaf.standard.serializer;version=3.0.0,\
+  org.thymeleaf.standard.util;version=3.0.0,\
+  org.thymeleaf.templatemode;version=3.0.0,\
+  org.thymeleaf.templateparser;version=3.0.0,\
+  org.thymeleaf.templateparser.markup;version=3.0.0,\
+  org.thymeleaf.templateparser.markup.decoupled;version=3.0.0,\
+  org.thymeleaf.templateparser.raw;version=3.0.0,\
+  org.thymeleaf.templateparser.reader;version=3.0.0,\
+  org.thymeleaf.templateparser.text;version=4.0.0,\
+  org.thymeleaf.templateresolver;version=3.1.0;-split-package:=merge-first,\
+  org.thymeleaf.templateresource;version=3.1.0,\
+  org.thymeleaf.util;version=3.3.0
 
 Import-Package:\
   com.fasterxml.jackson.*;version=${com.fasterxml.jackson.version};resolution:=optional,\
diff --git a/pom.xml b/pom.xml
index a8831e3..7f33813 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
   </parent>
 
   <artifactId>org.apache.sling.scripting.thymeleaf</artifactId>
-  <version>1.1.1-SNAPSHOT</version>
+  <version>2.0.0-SNAPSHOT</version>
 
   <name>Apache Sling Scripting Thymeleaf</name>
   <description>Apache Sling Scripting Thymeleaf</description>
@@ -38,7 +38,6 @@
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <sling.java.version>8</sling.java.version>
-    <org.thymeleaf.version>3.0.3.RELEASE</org.thymeleaf.version>
     <com.fasterxml.jackson.version>2.6.3</com.fasterxml.jackson.version>
     <org.ops4j.pax.exam.version>4.11.0</org.ops4j.pax.exam.version>
   </properties>
@@ -166,31 +165,31 @@
     <dependency>
       <groupId>org.thymeleaf</groupId>
       <artifactId>thymeleaf</artifactId>
-      <version>${org.thymeleaf.version}</version>
+      <version>3.0.9.RELEASE</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>org.attoparser</groupId>
       <artifactId>attoparser</artifactId>
-      <version>2.0.2.RELEASE</version>
+      <version>2.0.5.RELEASE</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.unbescape</groupId>
       <artifactId>unbescape</artifactId>
-      <version>1.1.4.RELEASE</version>
+      <version>1.1.6.RELEASE</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.servicemix.bundles</groupId>
       <artifactId>org.apache.servicemix.bundles.ognl</artifactId>
-      <version>3.2_1</version>
+      <version>3.2.1_1</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.javassist</groupId>
       <artifactId>javassist</artifactId>
-      <version>3.20.0-GA</version>
+      <version>3.22.0-GA</version>
       <scope>provided</scope>
     </dependency>
     <!-- jsoup -->
diff --git a/src/main/java/org/apache/sling/scripting/thymeleaf/package-info.java b/src/main/java/org/apache/sling/scripting/thymeleaf/package-info.java
index 5f2ab7c..0c5d436 100644
--- a/src/main/java/org/apache/sling/scripting/thymeleaf/package-info.java
+++ b/src/main/java/org/apache/sling/scripting/thymeleaf/package-info.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-@Version("1.0.0")
+@Version("1.1.0")
 package org.apache.sling.scripting.thymeleaf;
 
 import org.osgi.annotation.versioning.Version;
diff --git a/src/main/java/org/thymeleaf/engine/TemplateManager.java b/src/main/java/org/thymeleaf/engine/TemplateManager.java
index 0700825..b80f7ca 100644
--- a/src/main/java/org/thymeleaf/engine/TemplateManager.java
+++ b/src/main/java/org/thymeleaf/engine/TemplateManager.java
@@ -112,14 +112,13 @@ public final class TemplateManager {
         }
 
         final boolean standardDialectPresent = this.configuration.isStandardDialectPresent();
-        final String standardDialectPrefix = this.configuration.getStandardDialectPrefix();
 
         // TODO Make these parser implementations configurable: one parser per template mode, then make default implementations extensible/configurable (e.g. AttoParser config)
         this.htmlParser = new HTMLTemplateParser(DEFAULT_PARSER_POOL_SIZE,DEFAULT_PARSER_BLOCK_SIZE);
         this.xmlParser = new XMLTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE);
-        this.textParser = new TextTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE, standardDialectPresent, standardDialectPrefix);
-        this.javascriptParser = new JavaScriptTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE, standardDialectPresent, standardDialectPrefix);
-        this.cssParser = new CSSTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE, standardDialectPresent, standardDialectPrefix);
+        this.textParser = new TextTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE, standardDialectPresent);
+        this.javascriptParser = new JavaScriptTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE, standardDialectPresent);
+        this.cssParser = new CSSTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE, standardDialectPresent);
         this.rawParser = new RawTemplateParser(DEFAULT_PARSER_POOL_SIZE, DEFAULT_PARSER_BLOCK_SIZE);
 
     }
@@ -705,10 +704,16 @@ public final class TemplateManager {
 
 
         /*
-         * Instantiate the throttling artifacts
+         * Instantiate the throttling artifacts, including the throttled writer, which might be only for
          */
         final TemplateFlowController flowController = new TemplateFlowController();
-        final ThrottledTemplateWriter throttledTemplateWriter = new ThrottledTemplateWriter(template, flowController);
+
+        final ThrottledTemplateWriter throttledTemplateWriter;
+        if (templateSpec.isOutputSSE()) {
+            throttledTemplateWriter = new SSEThrottledTemplateWriter(template, flowController);
+        } else {
+            throttledTemplateWriter = new ThrottledTemplateWriter(template, flowController);
+        }
 
 
         /*

-- 
To stop receiving notification emails like this one, please contact
olli@apache.org.