خرید بک لینک

Vote count: 0

Some basic information, I currently work on an inteal system which uses jars made by other teams within the company.

I'm currently adding some unit testing to our product, however I'm seeing problems when I'm mocking classes provided by the other teams. It appears that their jars are signed and when I try to mock I get these exceptions:

Caused by: java.lang.SecurityException: class "com.example.MyClass$$FastClassByCGLIB$$730dfe4e"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:895)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:665)
at java.lang.ClassLoader.defineClass(ClassLoader.java:758)

Obviously this seems to make sense for security reasons. I'm just wondering if it's possible if the security check can be disabled within the junit ruer/jvm, as most of our code depends on this third party code, and we can't just instantiate instances of these classes aoyingly.

(Extra information: we're using Spock for unit tests with CGLIB to provide the mocking)

asked 38 secs ago

- - , .

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 17 اسفند 1394 ساعت: 16:42

صفحه بندی