Skip to content
Merged
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
10 changes: 6 additions & 4 deletions .github/workflows/junit-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,15 @@ jobs:
echo "::error::Download path $root is missing."
exit 1
fi
files=("$root"/build/**/TEST-*.xml)
# upload-artifact strips the common 'build/' prefix from the uploaded
# paths, so reports land as $root/test/... and $root/<plugin>/test/...
files=("$root"/**/TEST-*.xml)
if [ ${#files[@]} -eq 0 ] || [ ! -e "${files[0]}" ]; then
echo "::error::No TEST-*.xml under $root/build/ (artifact missing, wrong layout, or download failed)."
echo "::error::No TEST-*.xml under $root/ (artifact missing, wrong layout, or download failed)."
find "$root" -maxdepth 5 -type d -print 2>/dev/null | head -80 || true
exit 1
fi
echo "Found ${#files[@]} JUnit report file(s) under $root/build/."
echo "Found ${#files[@]} JUnit report file(s) under $root/."
- name: Resolve PR number
id: pr
run: |
Expand All @@ -82,7 +84,7 @@ jobs:
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
with:
report_paths: ./junit-ubuntu-jdk17/build/**/TEST-*.xml
report_paths: ./junit-ubuntu-jdk17/**/TEST-*.xml
check_name: JUnit Test Report
commit: ${{ github.event.workflow_run.head_sha }}
fail_on_failure: false
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/master-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ jobs:
./build/classes/**/*.class
# plugin and test class files
./build/**/classes/**/*.class
# plugin test class files (compiled into build/<plugin>/test/)
./build/*/test/**/*.class
# dependencies
./build/lib/*.jar
./build/test/lib/*.jar
Expand All @@ -298,6 +300,8 @@ jobs:
if: always() && matrix.os == 'ubuntu-latest'
with:
name: coverage-data-ubuntu-jdk${{ matrix.java }}
path: ./build/coverage/*.exec
path: |
./build/coverage/*.exec
./build/coverage/jacoco.xml
retention-days: 1
if-no-files-found: ignore
6 changes: 3 additions & 3 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ jobs:
name: junit-test-results-ubuntu-latest-jdk17
workflow: master-build.yml
run_id: ${{ github.event.workflow_run.id }}
path: |
./build/test/TEST-*.xml
./build/**/test/TEST-*.xml
# Artifact has build/ stripped (upload-artifact LCA); re-root under build/
# so paths match build/test/... and build/<plugin>/test/...
path: ./build/
continue-on-error: true

- name: Flatten test reports (JDK 17 only)
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sonar.links.ci=https://github.com/apache/nutch/actions
sonar.sources=src/java,src/plugin
sonar.tests=src/test,src/plugin
sonar.test.inclusions=**/src/test/**/*.java,**/Test*.java,**/*IT.java
sonar.exclusions=**/build.xml,**/build-ivy.xml,**/build-plugin.xml,**/ivy.xml,**/plugin.xml
sonar.exclusions=**/build.xml,**/build-ivy.xml,**/build-plugin.xml,**/ivy.xml,**/plugin.xml,**/sample/**,**/data/**,**/logs/**
sonar.source.encoding=UTF-8
sonar.java.source=17

Expand Down
4 changes: 2 additions & 2 deletions src/java/org/apache/nutch/util/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ public static boolean isEmpty(String str) {
}

/**
* Simple character substitution which cleans/removes all chars from a given String.
* Simple character substitution which cleans/removes all \uFFFD chars from a given String.
* @param value the String to clean
* @return substituted cleaned string
*/
public static String cleanField(String value) {
return value.replaceAll("", "");
return value.replaceAll("\uFFFD", "");
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/java/org/apache/nutch/util/TableUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static String unreverseHost(String reversedHostName) {
}

/**
* Convert given Utf8 instance to String and and cleans out any offending ""
* Convert given Utf8 instance to String and and cleans out any offending "\uFFFD"
* from the String.
*
*
Expand Down
Loading