changeset 12648:1fbe3ca3d30d

don't equate missing current annotation processor file with it being out of date
author Doug Simon <doug.simon@oracle.com>
date Thu, 31 Oct 2013 12:08:07 +0100
parents b038b643a3a4
children f376a77c22fb
files mxtool/mx.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mxtool/mx.py	Wed Oct 30 21:49:04 2013 +0100
+++ b/mxtool/mx.py	Thu Oct 31 12:08:07 2013 +0100
@@ -330,14 +330,13 @@
         aps = self.annotation_processors()
         outOfDate = False
         currentApsFile = join(self.suite.mxDir, 'currentAnnotationProcessors', self.name)
-        if exists(currentApsFile):
+        currentApsFileExists = exists(currentApsFile)
+        if currentApsFileExists:
             with open(currentApsFile) as fp:
                 currentAps = [l.strip() for l in fp.readlines()]
                 if currentAps != aps:
                     outOfDate = True
-        else:
-            outOfDate = True
-        if outOfDate:
+        if outOfDate or not currentApsFileExists:
             if not exists(dirname(currentApsFile)):
                 os.mkdir(dirname(currentApsFile))
             with open(currentApsFile, 'w') as fp: