From 1da822ce57cbf2234b4041b3918d5bec177cdd9c Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Tue, 16 Jan 2018 13:10:12 -0500 Subject: [PATCH] Fix build. Change scripts to use /usr/bin/env so that they work on NiXOS. Revert abort() logic. --- bin/deploy.sh | 4 ++-- bin/format.sh | 2 +- bin/sign.sh | 2 +- src/main/java/net/helenus/core/AbstractUnitOfWork.java | 2 +- src/main/java/net/helenus/core/SessionInitializer.java | 1 - 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/deploy.sh b/bin/deploy.sh index a54aa01..271fb4c 100755 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash -mvn clean jar:jar javadoc:jar source:jar deploy -Prelease +mvn clean jar:jar javadoc:jar source:jar deploy -Prelease diff --git a/bin/format.sh b/bin/format.sh index 9967eb1..031b9f3 100755 --- a/bin/format.sh +++ b/bin/format.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ "X$1" == "Xall" ]; then for f in $(find ./src -name \*.java); do diff --git a/bin/sign.sh b/bin/sign.sh index ca6b8e5..143db80 100755 --- a/bin/sign.sh +++ b/bin/sign.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash mvn clean jar:jar javadoc:jar source:jar install -Prelease diff --git a/src/main/java/net/helenus/core/AbstractUnitOfWork.java b/src/main/java/net/helenus/core/AbstractUnitOfWork.java index 87f45bf..e9d439b 100644 --- a/src/main/java/net/helenus/core/AbstractUnitOfWork.java +++ b/src/main/java/net/helenus/core/AbstractUnitOfWork.java @@ -416,7 +416,7 @@ public abstract class AbstractUnitOfWork /* Explicitly discard the work and mark it as as such in the log. */ public synchronized void abort() { - if (!isDone()) { + if (!aborted) { aborted = true; // Spoil any pending futures created within the context of this unit of work. diff --git a/src/main/java/net/helenus/core/SessionInitializer.java b/src/main/java/net/helenus/core/SessionInitializer.java index d573478..579a1c6 100644 --- a/src/main/java/net/helenus/core/SessionInitializer.java +++ b/src/main/java/net/helenus/core/SessionInitializer.java @@ -304,7 +304,6 @@ public final class SessionInitializer extends AbstractSessionOperations { idempotent, unitOfWorkClass, sessionCache, - statementCache, metricRegistry, zipkinTracer); }