Skip to content

Commit

Permalink
Merge pull request #59 from GoogleCloudPlatform/main
Browse files Browse the repository at this point in the history
Test for null value before using field.getHeader().
  • Loading branch information
ludoch authored Oct 9, 2023
2 parents 8a7bf84 + a296343 commit 2cf0d33
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ on:
pull_request:
branches:
- main

permissions:
contents: read
push:
branches-ignore:
- 'dependabot/**'

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion kokoro/gcp_ubuntu/publish_javadoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -e
shopt -s globstar

setup_docuploader() {
curl -fsSL --retry 10 -o /tmp/jar1.jar https://github.com/googleapis/java-docfx-doclet/releases/download/1.8.0/docfx-doclet-1.8.0-jar-with-dependencies.jar
curl -fsSL --retry 10 -o /tmp/jar1.jar https://github.com/googleapis/java-docfx-doclet/releases/download/1.9.0/docfx-doclet-1.9.0-jar-with-dependencies.jar
# Update Python 3 and Maven
sudo apt-get update
sudo apt-get install -y python3 python3-pip maven
Expand Down
5 changes: 1 addition & 4 deletions kokoro/gcp_ubuntu/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,9 @@ export JAVA_HOME="$(update-java-alternatives -l | grep "1.17" | head -n 1 | tr -
# Make sure `JAVA_HOME` is set.
echo "JAVA_HOME = $JAVA_HOME"

# Install Maven.
sudo apt-get -qq update && sudo apt-get -qq install -y maven

# compile all packages
echo "Calling release:prepare and release:perform."
mvn release:prepare release:perform -B -q --settings=../settings.xml -DskipTests -Darguments=-DskipTests -Dgpg.homedir=${GNUPGHOME} -Dgpg.passphrase=${GPG_PASSPHRASE}
./mvnw release:prepare release:perform -B -q --settings=../settings.xml -DskipTests -Darguments=-DskipTests -Dgpg.homedir=${GNUPGHOME} -Dgpg.passphrase=${GPG_PASSPHRASE}

git remote set-url origin https://gae-java-bot:${GAE_JAVA_BOT_GITHUB_TOKEN}@github.com/GoogleCloudPlatform/appengine-java-standard
echo "Doing git tag and push."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public boolean handle(Request request, Response response, Callback callback) thr
@Override
public HttpField onAddField(HttpField field)
{
if (field.getHeader().is(HttpHeader.CONTENT_LENGTH.asString()))
if ((field.getHeader()!=null) && (field.getHeader().is(HttpHeader.CONTENT_LENGTH.asString())))
{
long contentLength = field.getLongValue();
if (_responseLimit > 0 && contentLength > _responseLimit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static void beforeClass() throws IOException, InterruptedException {
File currentDirectory = new File("").getAbsoluteFile();
Process process =
new ProcessBuilder(
"mvn",
"../../mvnw",
"install",
"appengine:stage",
"-f",
Expand Down

0 comments on commit 2cf0d33

Please sign in to comment.