diff --git a/cave/build/static/linux/cave/caveUtil.sh b/cave/build/static/linux/cave/caveUtil.sh index e6068607f0..c885483fc9 100644 --- a/cave/build/static/linux/cave/caveUtil.sh +++ b/cave/build/static/linux/cave/caveUtil.sh @@ -42,6 +42,7 @@ # Sep 16, 2015 #18041 lshi Purge CAVE logs after 30 days instead of 7 # Apr 20, 2016 #18910 lshi Change CAVE log purging to add check for find commands # already running +# May 27, 2016 ASM#18971 dfriedman Fix local variable usage in deleteOldEclipseConfigurationDirs ######################## source /awips2/cave/iniLookup.sh @@ -402,7 +403,7 @@ function deleteOldEclipseConfigurationDirs() { local tmp_dir=$1 local tmp_dir_pat=$(echo "$tmp_dir" | sed -e 's/|/\\|/g') - save_IFS=$IFS + local save_IFS=$IFS IFS=$'\n' # Find directories that are owned by the user and older than one hour local old_dirs=( $(find "$tmp_dir" -mindepth 1 -maxdepth 1 -type d -user "$USER" -mmin +60) ) @@ -412,6 +413,7 @@ function deleteOldEclipseConfigurationDirs() fi # Determine which of those directories are in use. local lsof_args=() + local d for d in "${old_dirs[@]}"; do lsof_args+=('+D') lsof_args+=("$d") @@ -420,9 +422,10 @@ function deleteOldEclipseConfigurationDirs() # Run lsof, producing machine readable output, filter the out process IDs, # the leading 'n' of any path, and any subpath under a configuration # directory. Then filter for uniq values. - in_use_dirs=$(lsof -w -n -l -P -S 10 -F pn "${lsof_args[@]}" | grep -v ^p | \ + local in_use_dirs=$(lsof -w -n -l -P -S 10 -F pn "${lsof_args[@]}" | grep -v ^p | \ sed -r -e 's|^n('"$tmp_dir_pat"'/[^/]*).*$|\1|' | uniq) IFS=$save_IFS + local p for p in "${old_dirs[@]}"; do if ! echo "$in_use_dirs" | grep -qxF "$p"; then rm -rf "$p" diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/HydroDBDataManager.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/HydroDBDataManager.java index beda314b1b..5931af560b 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/HydroDBDataManager.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/HydroDBDataManager.java @@ -32,6 +32,7 @@ import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.viz.core.exception.VizException; +import com.raytheon.viz.hydrocommon.data.ColorValueData; import com.raytheon.viz.hydrocommon.data.HydroDBData; import com.raytheon.viz.hydrocommon.util.DbUtils; @@ -47,6 +48,8 @@ import com.raytheon.viz.hydrocommon.util.DbUtils; * Nov 03, 2011 11273 lbousaidi added updateNewData and putNewData. * Apr 18, 2013 1790 rferrel Code cleanup part of non-blocking dialogs. * Jan 15, 2016 DCS18180 JingtaoD code improvement based on code review for DR17935 + * May 27, 2016 19012 lbousaidi remove the check for apostrophe when there is a call to + * ColorDataValue table class * * * @author askripsky @@ -355,15 +358,29 @@ public class HydroDBDataManager extends HydroDataManager { try { @SuppressWarnings("unchecked") T newDataForQuery = (T) newData.getClass().newInstance(); - DbUtils.escapeSpecialCharforData(newData, newDataForQuery); - - // Check if it's going to be an update or insert - if (checkData(newDataForQuery) > 0) { - // Do an update - updateData(newDataForQuery); + if (newData.getClass().getName().contains(ColorValueData.class.getName())) + { + // Check if it's going to be an update or insert + if (checkData(newData) > 0) { + // Do an update + updateData(newData); + } else { + // Do an insert + insertData(newData); + } + } else { - // Do an insert - insertData(newDataForQuery); + + DbUtils.escapeSpecialCharforData(newData, newDataForQuery); + + // Check if it's going to be an update or insert + if (checkData(newDataForQuery) > 0) { + // Do an update + updateData(newDataForQuery); + } else { + // Do an insert + insertData(newDataForQuery); + } } } catch (InstantiationException | IllegalAccessException e) { diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py index a2620efc39..ef7e8f7d1e 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py @@ -43,6 +43,8 @@ # NumPy 1.9. # 04/07/2016 5539 randerso Reversed order of parameters/return value in collapseKey # to match order of Wx/Discrete tuple +# 05/27/2016 19014 ryu Fix rounding issue causing Td to be greater than T +# in output netCDF file. # ## @@ -766,7 +768,7 @@ def storeScalarWE(we, trList, file, timeRange, databaseID, if multiplier is not None: cube -= offset cube *= multiplier - numpy.around(cube,out=cube) + numpy.floor(cube+0.5, out=cube) # normal trim else: digits = we.getGpi().getPrecision()