Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use StandardCharsets.UTF_8 in JSONTokener, delete Java 1.6 build pipeline #914

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,6 @@ on:
branches: [ master ]

jobs:
# old-school build and jar method. No tests run or compiled.
build-1_6:
name: Java 1.6
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: 1.6
- name: Compile Java 1.6
run: |
mkdir -p target/classes
javac -version
javac -source 1.6 -target 1.6 -d target/classes/ src/main/java/org/json/*.java
- name: Create java 1.6 JAR
run: |
jar cvf target/org.json.jar -C target/classes .
- name: Upload JAR 1.6
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: Create java 1.6 JAR
path: target/*.jar

build-8:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/json/JSONTokener.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.json;

import java.io.*;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

/*
Public Domain.
Expand Down Expand Up @@ -57,7 +57,7 @@ public JSONTokener(Reader reader) {
* @param inputStream The source.
*/
public JSONTokener(InputStream inputStream) {
this(new InputStreamReader(inputStream, Charset.forName("UTF-8")));
this(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
}


Expand Down
Loading