Skip to content

Commit 138eb4a

Browse files
ukellergrealish
authored andcommitted
fix NPE
1 parent 335bf3a commit 138eb4a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

build_demo.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
#!/bin/bash
22
set -e
33
pushd $(dirname $0)
4+
md5_cmd=md5
45

6+
if ! test -x /sbin/md5; then
7+
md5_cmd=md5sum
8+
fi
9+
GG_THING_NAME=$(id -un)-greengrass-parsec
10+
if test -e /etc/hostname; then
11+
GG_THING_NAME=$(cat /etc/hostname)-greengrass-parsec
12+
fi
513

614
function dirty_build_on_new_comits() {
715
for repo in \
816
awslabs/aws-crt-java \
917
aws/aws-iot-device-sdk-java-v2 \
1018
revaultch/aws-greengrass-nucleus; do
1119
curl -S https://api.github.com/repos/${repo}/commits/key-op-prototype
12-
done | md5sum | cut -d" " -f1 > greengrass_demo/dirty_repo.txt
20+
done | ${md5_cmd} | cut -d" " -f1 > greengrass_demo/dirty_repo.txt
1321
touch -t 190001010000 greengrass_demo/dirty_repo.txt
1422
export DIRTY_TS=$(cat greengrass_demo/dirty_repo.txt)
1523
}
@@ -63,7 +71,6 @@ function gg_run() {
6371
}
6472
function run_demo() {
6573
parsec_run
66-
GG_THING_NAME=$(cat /etc/hostname)-greengrass-parsec
6774
source secrets.env
6875
gg_run greengrass_demo_provisioning provision
6976
gg_run greengrass_demo_run run -d

parsec-jca-java/src/main/java/org/parallaxsecond/parsec/jce/provider/DynamicByteBuffer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public DynamicByteBuffer(int initialCapacity, float growFactor) {
2020
}
2121
this.growFactor = growFactor;
2222
this.byteBuffer = ByteBuffer.allocate(initialCapacity);
23+
this.buffer = byteBuffer;
2324
}
2425
public void setByteBuffer(ByteBuffer buffer) {
2526
this.byteBuffer = buffer;

0 commit comments

Comments
 (0)