Commit Graph

149 Commits

Author SHA1 Message Date
Jonathan Locke
35d0170b0a Merge branch 'master' into jlocke/merge_4.1_20190827 2019-08-27 15:21:21 +01:00
Jonathan Locke
e5f314ffbf Merge branch 'release/4' into jlocke/merge_4.1_20190827
Merged release/4 (Corda OS version 4.1) into a branch created from master (Corda OS version 4.3)

Conflicts:
	build.gradle
	client/rpc/src/main/kotlin/net/corda/client/rpc/internal/ReconnectingCordaRPCOps.kt
	common/logging/build.gradle
	common/logging/src/main/kotlin/net/corda/common/logging/CordaVersion.kt
	constants.properties
	core-tests/src/test/kotlin/net/corda/coretests/utilities/ProgressTrackerTest.kt
	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
	docs/source/api-contract-constraints.rst
	docs/source/api-stability-guarantees.rst
	docs/source/app-upgrade-notes.rst
	docs/source/changelog.rst
	docs/source/clientrpc.rst
	docs/source/conf.py
	docs/source/corda-network/UAT.md
	docs/source/getting-set-up.rst
	docs/source/network-builder.rst
	docs/source/upgrading-cordapps.rst
	docs/source/versioning.rst
	node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcReconnectTests.kt
	serialization/src/main/kotlin/net/corda/serialization/internal/amqp/PropertyDescriptor.kt
	serialization/src/main/kotlin/net/corda/serialization/internal/model/LocalTypeInformationBuilder.kt
	tools/network-builder/src/main/resources/node-Dockerfile
	tools/network-builder/src/main/resources/notary-Dockerfile
2019-08-27 14:51:22 +01:00
Chris Rankin
e25d9a1d4e Update KDocs. 2019-08-27 11:24:41 +01:00
Chris Rankin
92ae45a949 Fix typo decimal62 -> decimal64. 2019-08-26 15:26:36 +01:00
Chris Rankin
4ebd02bc04 Tidy up changes for review. 2019-08-23 11:11:11 +01:00
Chris Rankin
b2d335c518 Make the choice of AMQP serializer for primitive types configurable. 2019-08-23 08:52:16 +01:00
Chris Rankin
99074b5a49 Modify the fingerprinter not to use ConcurrentHashMap.computeIfAbsent() because we cannot guarantee that the cache is not reentered by the computation. 2019-08-23 08:52:04 +01:00
Chris Rankin
a5d5e0d476 Allow custom serialization for all subclasses of a configurable set of classes. 2019-08-23 08:51:56 +01:00
Chris Rankin
bdd5d13655 Provide a map of Java primitive types as a configuration value. 2019-08-23 08:51:47 +01:00
Chris Rankin
aa2f1029a6 Use LocalTypeIdentifier information where available to lookup CustomSerializer. 2019-08-23 08:51:37 +01:00
Chris Rankin
be64c89515 Implement generic CustomerSerializers that create more specific AMQPSerializer instances at runtime. 2019-08-23 08:51:27 +01:00
Chris Rankin
e4f38d1945 Ensure that described properties are associated with a descriptor. 2019-08-23 08:51:16 +01:00
Chris Rankin
8f0c7c947a Allow custom serializers to be registered with type aliases for deserializing. 2019-08-23 08:51:06 +01:00
Shams Asari
71c316ca5a
CORDA-2954: Upgrade to common-lang3 (#5152)
Utilised Fields.getAllFieldsList where we were doing the equivalent
2019-05-21 17:48:32 +01:00
josecoll
0263650a5f
Revert "Merge pull request #5145 from corda/jdk11-migration-gradle5-upgrade" (#5146)
This reverts commit f46377556c, reversing
changes made to ba675e73b9.
2019-05-20 16:16:49 +01:00
josecoll
e1d1563901 Remove invalid compiler flag (--illegal-access=warn is a run-time flag only). 2019-05-20 15:09:36 +01:00
josecoll
a0a4318cc0 EXPERIMENTAL: tweaks and attempts to set module directives (with/without using gradle module plugin) 2019-05-20 15:08:27 +01:00
josecoll
a56ef580b2 Temp remove usage of java modularity plugin. 2019-05-20 15:08:27 +01:00
josecoll
ac56f302eb TEMP disable use of "sun.security, sun.misc.Unsafe" in serializer lists (re-instate with module add-exports directive) 2019-05-20 15:08:27 +01:00
Chris Rankin
b9f7c1a08a CORDA-2893, ENT-3422: Tweak JUnit 5 configurations to keep vintage engine off compile classpaths. (#5138)
* Tweak JUnit 5 configurations to keep vintage engine off compile classpaths.

* Configure Gradle tests to use JUnit 5.
2019-05-20 11:57:56 +01:00
Dan Newton
cd73161513 CORDA-2870 improve error messages for non composable types (#5120)
* 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`.
2019-05-16 10:05:49 +01:00
Dominic Fox
0b63157a4b ENT-3422 Add JUnit 5 dependencies to all projects (#5084)
* ENT-3422 Add JUnit 5 dependencies to all projects

* Remove explicit junit 4 imports where not needed

* Minor PR fixes

* Limit import scope
2019-05-15 16:40:12 +01:00
Dimos Raptis
a468bee0ed [CORDA-2473] - Remove AMQP system property (#5112) 2019-05-14 13:22:22 +01:00
Tudor Malene
67808d985e CORDA-2363 - Fix ClassNotFound handling (#5078) (#5107)
(cherry picked from commit 25f335861b)
2019-05-09 15:23:21 +01:00
JamesHR3
b4e96778bf [CORDA-2517] Whitelist attachments signed by keys that already sign existing trusted attachments (#5068)
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)"
2019-05-07 12:55:27 +01:00
Tudor Malene
25f335861b Fix ClassNotFound handling (#5078) 2019-05-02 18:03:02 +01:00
JamesHR3
7a7c471ebf [CORDA-2575] Allow users to whitelist attachments by public key config (#5035) 2019-04-25 16:55:43 +01:00
Dominic Fox
a29f417a67 CORDA-2860 relax property type checking (#5028) (#5038)
* 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
2019-04-18 14:20:00 +01:00
Dominic Fox
a416d5025f CORDA-2860 relax property type checking (#5028)
* 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
2019-04-17 16:14:24 +00:00
JamesHR3
4afbf78c79 CORDA-2633 - Restructure evolution serialization errors to print reason first (#4978) (#5014)
(cherry picked from commit 9963a6609f)
2019-04-15 10:27:39 +01:00
Dominic Fox
13f6bc0c4d CORDA-2848 - relax fingerprinter strictness (#5001 (#5007)) 2019-04-12 11:54:47 +01:00
Dominic Fox
2e97eaee0d CORDA-2848 relax fingerprinter strictness (#5001)
* CORDA-2848 relax fingerprinter strictness

* Unit test for non-serializable type parameter case
2019-04-11 15:42:56 +01:00
JamesHR3
9963a6609f CORDA-2633 Restructure evolution serialization errors to print reason first (#4978) 2019-04-08 17:04:02 +01:00
josecoll
add380b135
Merge pull request #4963 from corda/colljos-backport-secfix-serializer
(BACKPORT) ENT-3121 restrict custom serializers
2019-03-29 16:51:44 +00:00
Dominic Fox
c04a448bf3 CORDA-2782 allow un-whitelisted Comparable (#4940) 2019-03-29 15:24:08 +00:00
josecoll
864efe38d1 ENT-3440 Allow custom serializers that extend CordaThrowable. 2019-03-29 14:50:31 +00:00
Dominic Fox
17e7cd3abc ENT-3121 - restrict custom serializers (#1852)
* 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
2019-03-29 14:48:07 +00:00
Jonathan Locke
3e4a5976d8 Revert "CORDA-2782 Add Comparable to default whitelist for vault query criteria using comparables (#4920)"
This reverts commit 12e7897316.
2019-03-26 12:18:45 +01:00
josecoll
12e7897316
CORDA-2782 Add Comparable to default whitelist for vault query criteria using comparables (#4920)
* 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
2019-03-25 11:59:39 +00:00
Dominic Fox
345a76d1cd CORDA-2742 treat boxed types as assignable from primitives (#4890) 2019-03-15 15:16:14 +00:00
Katelyn Baker
cfccfd075e
CORDA-2688 - Add Serialization Context option for no carpenting (#4849)
* 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
2019-03-04 17:44:56 +00:00
Dominic Fox
0984e87c5e CORDA-1947 - Regenerate test data and unignore test (#4838)
* CORDA-1947 Regenerate test data and unignore test

* Formatting
2019-03-04 13:45:14 +00:00
James Higgs
b52fdf0e0f Port the improved error message introduced in ENT-3068 to OS 2019-02-28 14:29:41 +01:00
Dominic Fox
6d5ccfaeac Explanatory comment on test 2019-02-27 13:12:32 +01:00
Dominic Fox
2173228b27 Unit test covering https://r3-cev.atlassian.net/browse/CORDA-2674 2019-02-27 13:12:32 +01:00
Dominic Fox
74c5b8d127 CORDA-2674 observe the true type of an atomic type 2019-02-27 13:12:32 +01:00
Tudor Malene
3d362e066c CORDA-2595 - check that all attachments are trusted before loading (#4763)
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
2019-02-15 17:33:14 +00:00
Dominic Fox
444ebb741b Test for non-strict factory behaviour 2019-02-14 09:59:22 +01:00
Dominic Fox
fac9b5368f Prevent non-null values from being discarded 2019-02-14 09:59:22 +01:00
Mike Hearn
02645f7b9e Rework package namespace ownership check to verify every package of every class file.
Previous implementation was in LedgerTransaction and focused only on contract classes,
but every package matters.

Also fixes some exception types and does misc refactorings.
2019-02-11 17:10:50 +01:00