#A0000173088: Fix su lettura ul anonima.
This commit is contained in:
43
.githooks/commit-msg
Normal file
43
.githooks/commit-msg
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# An example hook script to check the commit log message.
|
||||||
|
# Called by "git commit" with one argument, the name of the file
|
||||||
|
# that has the commit message. The hook should exit with non-zero
|
||||||
|
# status after issuing an appropriate message if it wants to stop the
|
||||||
|
# commit. The hook is allowed to edit the commit message file.
|
||||||
|
#
|
||||||
|
# To enable this hook, rename this file to "commit-msg".
|
||||||
|
|
||||||
|
# Uncomment the below to add a Signed-off-by line to the message.
|
||||||
|
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
|
||||||
|
# hook is more suited to it.
|
||||||
|
#
|
||||||
|
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
|
||||||
|
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
|
||||||
|
|
||||||
|
# This example catches duplicate Signed-off-by lines.
|
||||||
|
|
||||||
|
USER_EMAIL=$(git log -1 --format=format:%ae HEAD)
|
||||||
|
USER_NAME=$(git log -1 --format=format:%an HEAD)
|
||||||
|
COMMIT_MESSAGE=$(cat $1)
|
||||||
|
|
||||||
|
if [[ $COMMIT_MESSAGE == "#"* ]];
|
||||||
|
then
|
||||||
|
ACTIVITY_ID=$(echo $COMMIT_MESSAGE | awk '{print $1;}')
|
||||||
|
ACTIVITY_ID=$(echo $ACTIVITY_ID | tr -d : | tr -d "#")
|
||||||
|
|
||||||
|
echo "Riconosciuta attivita: " $ACTIVITY_ID
|
||||||
|
curl -X POST "http://192.168.2.215:8080/ems-api/activity/createFromCommit?profileDb=INTEGRY&committerEmail=$USER_EMAIL" \
|
||||||
|
-d "commitMessage=$COMMIT_MESSAGE"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#echo "TESTO: " $COMMIT_MESSAGE
|
||||||
|
|
||||||
|
|
||||||
|
#test "" = "$(grep '^Signed-off-by: ' "$1" |
|
||||||
|
# sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
|
||||||
|
# echo >&2 Duplicate Signed-off-by lines.
|
||||||
|
# exit 1
|
||||||
|
#}
|
||||||
@@ -40,7 +40,6 @@ public class ServerStatusChecker {
|
|||||||
|
|
||||||
public void addCallback(RunnableArgs<Boolean> callback){
|
public void addCallback(RunnableArgs<Boolean> callback){
|
||||||
this.mCallback.add(callback);
|
this.mCallback.add(callback);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeCallback(RunnableArgs<Boolean> callback){
|
public void removeCallback(RunnableArgs<Boolean> callback){
|
||||||
|
|||||||
@@ -54,11 +54,7 @@ public class UtilityBarcode {
|
|||||||
if(!UtilityString.isNullOrEmpty(barcode)) {
|
if(!UtilityString.isNullOrEmpty(barcode)) {
|
||||||
barcode = barcode.trim();
|
barcode = barcode.trim();
|
||||||
|
|
||||||
if(barcode.length() <= 7){
|
return Integer.parseInt(barcode.substring(3));
|
||||||
return Integer.parseInt(barcode.substring(3));
|
|
||||||
} else
|
|
||||||
return null;
|
|
||||||
|
|
||||||
} else
|
} else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,7 +145,13 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
|||||||
|
|
||||||
cyclicRecover(sessionsIterator, onComplete, onFailed);
|
cyclicRecover(sessionsIterator, onComplete, onFailed);
|
||||||
}, ex -> {
|
}, ex -> {
|
||||||
onFailed.run(ex);
|
|
||||||
|
if(ex.getMessage().contains("Dati collo non corretti")) {
|
||||||
|
ColliDataRecover.closeSession(recoveredMtbColtID);
|
||||||
|
} else {
|
||||||
|
onFailed.run(ex);
|
||||||
|
}
|
||||||
|
|
||||||
cyclicRecover(sessionsIterator, onComplete, onFailed);
|
cyclicRecover(sessionsIterator, onComplete, onFailed);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -27,9 +27,6 @@ public class PointMobileBarcodeReader implements BarcodeReaderInterface {
|
|||||||
|
|
||||||
private static String TAG = PointMobileBarcodeReader.class.getName();
|
private static String TAG = PointMobileBarcodeReader.class.getName();
|
||||||
|
|
||||||
|
|
||||||
private int mBackupResultType = ScanConst.ResultType.DCD_RESULT_COPYPASTE;
|
|
||||||
|
|
||||||
public PointMobileBarcodeReader(Context context) {
|
public PointMobileBarcodeReader(Context context) {
|
||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
|
|
||||||
@@ -51,8 +48,7 @@ public class PointMobileBarcodeReader implements BarcodeReaderInterface {
|
|||||||
public void init() throws BarcodeAdapterNotFoundException {
|
public void init() throws BarcodeAdapterNotFoundException {
|
||||||
if(isRightAdapter()){
|
if(isRightAdapter()){
|
||||||
try{
|
try{
|
||||||
|
mScanManager.aDecodeSetTerminator(ScanConst.Terminator.DCD_TERMINATOR_NONE);
|
||||||
mBackupResultType = mScanManager.aDecodeGetResultType();
|
|
||||||
mScanManager.aDecodeSetResultType(ScanConst.ResultType.DCD_RESULT_USERMSG);
|
mScanManager.aDecodeSetResultType(ScanConst.ResultType.DCD_RESULT_USERMSG);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new BarcodeAdapterNotFoundException(getAdapterName());
|
throw new BarcodeAdapterNotFoundException(getAdapterName());
|
||||||
|
|||||||
Reference in New Issue
Block a user