From 5e2e35e45b02ea60ba9da02f21c2f36acd2ea68e Mon Sep 17 00:00:00 2001 From: Matt Nash Date: Wed, 25 Sep 2013 17:18:54 -0500 Subject: [PATCH] Issue #2250 fix for Python PathManager not correctly closing Change-Id: I3d600871ea09ec49ca83fdc5d898a4d9a0369d6f Former-commit-id: a55d89df84db254372db340f22559ac17940ddaf --- .../utility/common_static/base/python/LockingFile.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.common.localization.python/utility/common_static/base/python/LockingFile.py b/edexOsgi/com.raytheon.uf.common.localization.python/utility/common_static/base/python/LockingFile.py index fa74c47c2b..63bbd780aa 100644 --- a/edexOsgi/com.raytheon.uf.common.localization.python/utility/common_static/base/python/LockingFile.py +++ b/edexOsgi/com.raytheon.uf.common.localization.python/utility/common_static/base/python/LockingFile.py @@ -28,6 +28,8 @@ # Date Ticket# Engineer Description # ------------ ---------- ----------- -------------------------- # 03/12/13 mnash Initial Creation. +# 09/25/13 2250 mnash Fix for FileLocker.unlock +# not being correctly called # # # @@ -35,7 +37,7 @@ from com.raytheon.uf.common.localization import FileLocker, FileLocker_Type as Type from java.io import File as JavaFile from java.lang import Object - +import jep class File(file): @@ -52,7 +54,9 @@ class File(file): super(File, self).__init__(file.getAbsolutePath(), mode) def close(self): - FileLocker.unlock(self.lockerObject, self.file) - return super(File,self).close() + array = jep.jarray(1, JavaFile) + array[0] = self.file + FileLocker.unlock(self.lockerObject, array) + return super(File, self).close() + - \ No newline at end of file