aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2021-06-19 19:34:56 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2021-06-19 19:35:25 +0200
commit09739b1ae090fc1944a1267ed4c40cf58ce7d049 (patch)
treed03b03166e20a6e84185930d1bc50032c7c0c5e8
parentfixed a typo (diff)
downloadjavatoolkit-09739b1ae090fc1944a1267ed4c40cf58ce7d049.tar.gz
javatoolkit-09739b1ae090fc1944a1267ed4c40cf58ce7d049.tar.bz2
javatoolkit-09739b1ae090fc1944a1267ed4c40cf58ce7d049.zip
fixed handling of module-info.class
Closes: https://bugs.gentoo.org/742935 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rwxr-xr-xsrc/py/class-version-verify.py8
-rw-r--r--src/py/javatoolkit/cvv.py5
2 files changed, 9 insertions, 4 deletions
diff --git a/src/py/class-version-verify.py b/src/py/class-version-verify.py
index e4ee7c8..968618c 100755
--- a/src/py/class-version-verify.py
+++ b/src/py/class-version-verify.py
@@ -81,10 +81,12 @@ def main():
if not options.silent:
for set in cvv_magic.bad:
print("Bad: %s %s %s" % set)
+ for set in cvv_magic.skipped:
+ print("Skipped: %s %s %s" % set)
- print("CVV: %s\nChecked: %i Good: %i Bad: %i" %
- (options.version, len(cvv_magic.good) +
- len(cvv_magic.bad), len(cvv_magic.good), len(cvv_magic.bad)))
+ print("CVV: %s\nChecked: %i Good: %i Bad: %i Skipped: %i" %
+ (options.version, len(cvv_magic.good) + len(cvv_magic.bad) + len(cvv_magic.skipped),
+ len(cvv_magic.good), len(cvv_magic.bad), len(cvv_magic.skipped)))
if len(cvv_magic.bad) > 0:
sys.exit(1)
diff --git a/src/py/javatoolkit/cvv.py b/src/py/javatoolkit/cvv.py
index 6ae2501..1f15415 100644
--- a/src/py/javatoolkit/cvv.py
+++ b/src/py/javatoolkit/cvv.py
@@ -13,9 +13,12 @@ class CVVMagic:
self.target = target
self.good = []
self.bad = []
+ self.skipped = []
def add(self, version, jar, file):
- if version <= self.target:
+ if file == "module-info.class" and self.target < 9:
+ self.skipped.append(("1.%s" % (version), jar, file))
+ elif version <= self.target:
self.good.append(("1.%s" % (version), jar, file))
else:
self.bad.append(("1.%s" % (version), jar, file))