From 7c0081fba2002765e7bfc88c350c954dcc642bbb Mon Sep 17 00:00:00 2001
From: Ashwanth Fernando <7813562+crazysoftwarecoder@users.noreply.github.com>
Date: Fri, 29 May 2026 17:20:01 +1000
Subject: [PATCH 1/5] compile against jdk 17, replace removed jaxb base64 call
DatatypeConverter is gone since jdk 11. use java.util.Base64 and bump
the compiler release to 11 so this builds on current jdks.
---
.../bigpipe/core/tag/PageletBodyTag.java | 16 ++++----------
pom.xml | 21 ++++++++++++-------
2 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/bigpipe-java-web/src/main/java/com/myseriousorganization/bigpipe/core/tag/PageletBodyTag.java b/bigpipe-java-web/src/main/java/com/myseriousorganization/bigpipe/core/tag/PageletBodyTag.java
index 01b6714..11a5977 100644
--- a/bigpipe-java-web/src/main/java/com/myseriousorganization/bigpipe/core/tag/PageletBodyTag.java
+++ b/bigpipe-java-web/src/main/java/com/myseriousorganization/bigpipe/core/tag/PageletBodyTag.java
@@ -2,11 +2,11 @@
import java.io.IOException;
import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;
-import javax.xml.bind.DatatypeConverter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -49,16 +49,8 @@ private void emitDivPlaceholder(String pageletName) throws IOException {
}
protected String getBase64String(String input) {
- try {
- byte[] inputBytes = input.getBytes("UTF-8");
- String encodedString = DatatypeConverter.printBase64Binary(inputBytes);
- return encodedString;
- }
- catch (UnsupportedEncodingException e) {
- String message = "Could not transform String to UTF-8 bytes";
- logger.error(e.getMessage());
- throw new IllegalArgumentException(message);
- }
+ byte[] inputBytes = input.getBytes(StandardCharsets.UTF_8);
+ return Base64.getEncoder().encodeToString(inputBytes);
}
@Override
diff --git a/pom.xml b/pom.xml
index 844cb06..40e4d24 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,20 +11,27 @@
The java implementation of big-pipe.
- bigpipe-java-web
- bigpipe-java-web-example
+ bigpipe-java-web
+ bigpipe-java-web-example
+
+ 11
+ UTF-8
+
+
org.apache.maven.plugins
maven-compiler-plugin
-
- 1.7
- 1.7
-
+ 3.13.0
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.2.5
@@ -34,7 +41,7 @@
junit
junit
- 3.8.1
+ 4.13.2
test
From e180ccc402914aef652742a456deb74af2870e45 Mon Sep 17 00:00:00 2001
From: Ashwanth Fernando <7813562+crazysoftwarecoder@users.noreply.github.com>
Date: Fri, 29 May 2026 17:20:07 +1000
Subject: [PATCH 2/5] drop leftover main(), rename isPageletTask to what it
returns
---
.../bigpipe/core/executor/PageletTaskExecutor.java | 4 ++--
.../bigpipe/core/tag/BigPipeStartTag.java | 4 ----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/bigpipe-java-web/src/main/java/com/myseriousorganization/bigpipe/core/executor/PageletTaskExecutor.java b/bigpipe-java-web/src/main/java/com/myseriousorganization/bigpipe/core/executor/PageletTaskExecutor.java
index 63b96b6..eb55271 100644
--- a/bigpipe-java-web/src/main/java/com/myseriousorganization/bigpipe/core/executor/PageletTaskExecutor.java
+++ b/bigpipe-java-web/src/main/java/com/myseriousorganization/bigpipe/core/executor/PageletTaskExecutor.java
@@ -46,7 +46,7 @@ public void execute(final Object pageletTask, final HttpServletRequest servletRe
Preconditions.checkArgument(pageletTask!=null);
// Validate if this is a pagelet task.
- if (isPageletTask(pageletTask)) {
+ if (isNotPageletTask(pageletTask)) {
throw new TaskExecutionException("passed in object is not a PageletTask. "
+ "Please annotate your pagelet task class with @" + PageletTask.class.getCanonicalName());
}
@@ -75,7 +75,7 @@ public void run() {
});
}
- private boolean isPageletTask(Object obj) {
+ private boolean isNotPageletTask(Object obj) {
return (obj.getClass().getAnnotation(PageletTask.class)==null);
}
diff --git a/bigpipe-java-web/src/main/java/com/myseriousorganization/bigpipe/core/tag/BigPipeStartTag.java b/bigpipe-java-web/src/main/java/com/myseriousorganization/bigpipe/core/tag/BigPipeStartTag.java
index d94f5d1..2cf8a15 100644
--- a/bigpipe-java-web/src/main/java/com/myseriousorganization/bigpipe/core/tag/BigPipeStartTag.java
+++ b/bigpipe-java-web/src/main/java/com/myseriousorganization/bigpipe/core/tag/BigPipeStartTag.java
@@ -42,8 +42,4 @@ public void doTag() throws JspException, IOException {
out.println(SETTER_JS_FUNCTION);
}
- public static void main(String[] args) {
- new BigPipeStartTag();
- }
-
}
From d4cb093ee4bb7310daa8a5245238537c04bc9bb9 Mon Sep 17 00:00:00 2001
From: Ashwanth Fernando <7813562+crazysoftwarecoder@users.noreply.github.com>
Date: Fri, 29 May 2026 17:20:07 +1000
Subject: [PATCH 3/5] ci: github actions instead of travis
---
.github/workflows/build.yml | 20 ++++++++++++++++++++
.travis.yml | 3 ---
2 files changed, 20 insertions(+), 3 deletions(-)
create mode 100644 .github/workflows/build.yml
delete mode 100644 .travis.yml
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..f97ee26
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,20 @@
+name: build
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: '17'
+ cache: maven
+ - name: Build and test
+ run: mvn -B verify
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 9bcf999..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: java
-jdk:
- - oraclejdk8
From 40dc8f2f26b9297ac52fe1e9bf610aad4856a58b Mon Sep 17 00:00:00 2001
From: Ashwanth Fernando <7813562+crazysoftwarecoder@users.noreply.github.com>
Date: Fri, 29 May 2026 17:20:07 +1000
Subject: [PATCH 4/5] add license file, fix readme badge/license link and
headings
---
LICENSE | 21 +++++++++++++++++++++
README.md | 16 ++++++++--------
2 files changed, 29 insertions(+), 8 deletions(-)
create mode 100644 LICENSE
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..f4c39e9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2015 Ashwanth Fernando
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 9696265..1d34436 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[](https://travis-ci.org/crazysoftwarecoder/bigpipe)
+[](https://github.com/crazysoftwarecoder/bigpipe/actions/workflows/build.yml)
## A BigPipe implementation for Java
@@ -73,7 +73,7 @@ public ClassA {
}
```
-###Step 2
+### Step 2
Define the return ViewObject for each @PageletTaskMethod
@@ -90,12 +90,12 @@ class LeftNavBarDataVO implements ViewObject { // ViewObject is just a marker in
}
public void setCategoryName(String categoryName) {
-
+ this.categoryName = categoryName;
}
}
```
-###Step 3
+### Step 3
In your JSP
@@ -123,7 +123,7 @@ In your JSP