* CORDA-2870 Add `reason` and `remedy` to `LocalTypeInformation.NonComposable`
When creating `LocalTypeInformation.NonComposable` pass in the `reason`
a type was not composable and the `remedy` to fix it. This required
changes in `LocalTypeInformationBuilder` to pass in this extra
information so that it can be used later.
The message that the `ObjectSerializer` includes in its
`NotSerializableException` now includes the extra information about the
non composable type.
* CORDA-2870 Include custom serializers in serialization error message
In `ObjectSerializer`, when a serialization exception is thrown,
include the registered custom serializers + their classloaders as part
of the error message.
This required making properties on `CustomSerializerRegistry` and
`LocalSerializerFactory` public.
Tidy up `LocalTypeInformationBuilder` error message text for
transitive non-composable types.
* CORDA-2870 Tidy up error thrown for unserializable objects
Fix `DeserializeSimpleTypesTests` and tidy up the code in
`ObjectSerializer` a bit.
* CORDA-2870 Remove non-composable warning logs in `LocalTypeInformationBuilder`
The flag `warnIfNonComposable` and its corresponding log lines are not
needed now that the non-composable error messages contain a lot of
information in them.
The `warnIfNonComposable` flag is now incorrect and has been renamed to
`validateProperties` and the function `suppressWarningsAnd` has been
changed to `suppressValidation`.
`propertyDescriptors` has also had its input boolean changed to
`validateProperties` to better represent what it is doing.
* CORDA-2870 Remove need for casting by moving variable to interface
Expose `customSerializerNames` in `LocalSerializerFactory` and
`CustomSerializerFactory`.
This allows a different signed version of the same CorDapp to be automatically trusted.
This reverts "[CORDA-2575] Allow users to whitelist attachments by public key config (#5035)"
* CORDA-2860 relax property type checking
* Remove redundant check
* Unit test
* Comment linking ticket to test
* More descriptive comment
* Fix test that was broken by jacocoData field being silently added to class
* Revert to previous behaviour around opaques, suppress validation
* Tests for custom registry restrictions
* ENT-3121 restrict custom serialisation
* Remove redundant code
* Only count declared annotations
* Check annotation on superclasses, remove annotation from ByteArray
* Forbid custom serialization of primitive types
* Remove @CordaSerializable from another class that is always handled by custom serialisation
* Add log warnings to aid diagnosis of custom serialization issues
* Remove another annotation
* Remove another annotation
* Remove another annotation
* Remove another annotation
* Fixup api-current
* Fixup api-current
* KDocs on exceptions
* CORDA-2782 Add Comparable to default whitelist for vault query criteria using comparables
* Commit the java.lang.Comparable type.
* Fix broken unit test in serialization-deterministic
* CORDA-2688 - Add Serialization Context option for no carpenting
Can be used by the attachment class loader - Serialization Framework
will still consume all Exceptions and throw a NotSerializableException
* Fix tests
CORDA-2595 - Fix test and api.
CORDA-2595 add test
CORDA-2595 fix tests
CORDA-2595 fix test and address code review comments
CORDA-2595 address code review comments
Previous implementation was in LedgerTransaction and focused only on contract classes,
but every package matters.
Also fixes some exception types and does misc refactorings.
* Start pooling classpath scanning
Quickly patch synchronisation of attachment class loader cache. Needs a revisit but more complicated due to DJVM.
Annotate away for DJVM
Take ClassGraph utils into their own file so we can exclude for DJVM
Clean up a little
* Daemonize the threads
* Seems to be some concurrency problems with use of ClassGraph. Using a mutex for now to work around.
There were two issues:
* The original "sealing violation: can't seal package net.corda.nodeapi" issue was due to the isolated CorDapp containing some code in the net.corda.nodeapi namespace. This has been moved to the isolated namespace.
* The test was not correctly creating the second transaction with the dummy command
* Add whitelists and custom serializers from cordapps to serialization context
* Remove changes in TransactionBuilder, add caching
* Add whitelists and custom serializers from cordapps to serialization context
* Remove changes in TransactionBuilder, add caching
* Address comments
* Increase node memory for SIMM integration test
* Cache only serialization context
* Increase integ test timeout
* Fix API breakage
* Increase max heap size for web server integ test
* Move classloading utils from separate module to core.internal
* Adjust heap size for more integ tests
* Increase time window for IRS demo transactions
* Fix determinator
* Add parameter in core-deterministic
* Stub out class-loading method for DJVM
* Fixed incorrect attachment loading integration test
`AttachmentLoadingTests.test that attachments retrieved over the network are not used for code` was a false-positive - it was incorrect on multiple levels. Fixing it required updating the finance:isolated CorDapp, at which point it was given the new MANIFEST metadata for V4, and moved out of the net.corda.finance namespace to avoid package sealing issues.
The new test exposed a bug in the LedgerTransaction verification logic. This was cleaned up as it was too easy to verify on the wrong instance.
TestCordapp has now two implementations to clearly separate the two use cases it has in the Corda repo:
* TestCordappImpl which implements the revised public API of TestCordapp; namely that a TestCordapp instance references a real CorDapp jar on the classpath. This is either an external dependency jar in which case it’s taken as is and given to the node, or it’s a local gradle project in which case it’s compiled using the gradle “jar” task to generate the CorDapp jar. This approach means the jar has all the original CorDapp versioning information, which is important that it’s correct when testing. To this end, TestCordapp only needs to expose the ability to specify the app’s config. All the remaining properties have moved to CustomCordapp.
* CustomCordapp for creating arbitrary custom CorDapps, including specifying the jar’s MANIFEST values. This is internal API and only used for testing the platform. Technically this shouldn’t implement TestCordapp but does so to reduce the complexity of the driver and mock network.