Skip to content

Commit

Permalink
Handle Optional correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulsom committed Nov 7, 2017
1 parent b1b3006 commit b67a1ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import grooves.example.javaee.queries.PatientAccountQuery;
import grooves.example.javaee.queries.PatientHealthQuery;
import org.reactivestreams.Publisher;
import rx.Observable;

import javax.inject.Inject;
import javax.ws.rs.*;
Expand Down Expand Up @@ -77,7 +76,7 @@ public PatientHealth health(
final Patient patient = database.patients()
.filter(it -> Objects.equals(it.getId(), id))
.findFirst()
.get();
.orElse(null);

Publisher<PatientHealth> computation =
version != null ?
Expand Down Expand Up @@ -115,7 +114,7 @@ public PatientAccount account(
final Patient patient = database.patients()
.filter(it -> Objects.equals(it.getId(), id))
.findFirst()
.get();
.orElse(null);

Publisher<PatientAccount> computation =
version != null ?
Expand Down
10 changes: 6 additions & 4 deletions semaphore-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ function build() {

./gradlew build snapshot --scan --build-cache --configure-on-demand

# ./gradlew sonarqube srcclr \
# -Dsonar.login=$SONAR_TOKEN \
# -Dsonar.host.url=https://sonarqube.com \
# -Dsonar.organization=rahulsom-github
./gradlew sonarqube \
-Dsonar.login=$SONAR_TOKEN \
-Dsonar.host.url=https://sonarqube.com \
-Dsonar.organization=rahulsom-github

# ./gradlew srcclr
}

if [ "$PULL_REQUEST_NUMBER" != "" ]; then
Expand Down

0 comments on commit b67a1ea

Please sign in to comment.