Menu

#86 Trove is wrongly detected

1.85
closed-fixed
Seb
None
5
2015-12-27
2014-07-16
Geert Bevin
No

The Trove class detection is wrongly using an old package of the interfaces, here's the patch to fix this. Not only does this prevent Trove 3.0.x to actually be used (since it's never detected), it also causes Trove 1.x to be detected, but generate runtime failures since the classes in CollectionFactoryTroveImpl are not available.

--- old/net/sf/oval/Validator.java  2014-07-16 09:53:04.000000000 +0200
+++ new/net/sf/oval/Validator.java  2014-07-16 09:52:38.000000000 +0200
@@ -156,7 +156,7 @@
            return new CollectionFactoryJavalutionImpl();
        }
        // else if Trove collection classes are found use them by default
-       else if (ReflectionUtils.isClassPresent("gnu.trove.THashMap") && ReflectionUtils.isClassPresent("gnu.trove.THashSet"))
+       else if (ReflectionUtils.isClassPresent("gnu.trove.map.hash.THashMap") && ReflectionUtils.isClassPresent("gnu.trove.set.hash.THashSet"))
        {
            LOG.info("gnu.trove collection classes are available.");

Discussion

  • Seb

    Seb - 2014-07-18
    • assigned_to: seb
    • Group: unknown --> 1.85-SNAPSHOT
     
  • Seb

    Seb - 2014-07-18

    Fixed in 1.85-SNAPSHOT. Thanks for reporting! http://oval.sourceforge.net/mvn-repo/snapshot/

     
  • Seb

    Seb - 2014-07-18
    • status: open --> closed-fixed