Commit Graph

77 Commits

Author SHA1 Message Date
Viktor Kolomeyko
51ed943272 Remove SerializationFactory parameter from the places where it is not needed
Also minor improvements to the looping/if-branching code and documentation changes

Functionally, this change is a NOP
2017-08-17 17:53:40 +01:00
Viktor Kolomeyko
4a3848cc2a Delete KryoAMQPSerializer and its registration
As discussed with @rick-r3 this class is no longer fit for purpose because it may break reference equality if part of the graph been serialized with Kryo and part with AMQP
2017-08-17 17:52:47 +01:00
Katelyn Baker
e6e6644fc9 Fixes to bring into line with changes API
Can't have default factories now, they need building with whitelist and
classloader.

Also remove completely spurious import that broke everything, have a
feeling that was something IntelliJ pulled in "to be helpful"
2017-08-17 14:17:59 +01:00
Katelyn Baker
6076d39ee4 Remove spurious printlns 2017-08-17 13:53:35 +01:00
Katelyn Baker
c72ac2a102 Add WeakHashMap to the blacklist 2017-08-17 13:53:35 +01:00
Katelyn Baker
8bebd6ea0b Rework To better deal with types we won't serialise
* Add depricated jvm types to the blacklist
* Add concrete types for user convenience
* Add better "We won't serialise this because" error handling
2017-08-17 13:53:35 +01:00
Katelyn Baker
d2933ca8a3 Finalise which map containers to serialize 2017-08-17 13:53:35 +01:00
Katelyn Baker
de05a11511 Move toward allowing serialisation of concrete types 2017-08-17 13:53:35 +01:00
Katelyn Baker
4b8d6e32c3 Merge pull request #1269 from corda/bugfix/kat/missingFactory
Re-re-move Java test to the correct location, fix compile issue
2017-08-17 13:25:30 +01:00
Viktor Kolomeyko
4286065872 Eliminate explicit Kryo configuration to allow flexibility for AMQP 2017-08-17 12:01:27 +01:00
Chris Rankin
1672b4aa0a Simple deserialisation fixes. (#1243)
* Fix typo: prefered -> preferred
* Simplify KryoVerifierSerializationScheme and resolve warning.
* Add a custom serialiser for PrivacySeed so that we can avoid invoking RNG.
2017-08-17 11:15:04 +01:00
Katelyn Baker
f38954e550 Re-re-move Java test to the correct location, fix compile issue
Somehow this slipped past Gradle that I hadn't changed the serializer
factory here to take the needed argument now it's no longer defaulted
2017-08-17 11:04:30 +01:00
Katelyn Baker
2dc362a409 Merge pull request #1252 from corda/feature/kat/moveAMQPSerialiserTowardCommonInterface
Move AMQP serialiser toward common interface
2017-08-17 09:43:30 +01:00
Shams Asari
dc8d232480 Creating a PartyAndCertificate only requires a CertPath 2017-08-16 16:36:03 +01:00
Katelyn Baker
4d54d1a8dc Review Comments
Removing unused default method on the factory, it was added for testing
although given there are easier ways to build factories for the tests it
was never used and doesn't need leaving in
2017-08-16 11:39:07 +01:00
Katelyn Baker
49c23a58d1 Final changes integrating tests into the new API
Fix some rebase issues
Ensure tests are using the correct versions of the factories
2017-08-15 15:11:26 +01:00
Katelyn Baker
825908cf15 Refactoring changes to work with interface changes
Specifically we don't need the factory factory as that functionality
lives in the global defaults
2017-08-15 15:11:26 +01:00
Katelyn Baker
139eef2ccb Move AMQP serializer toward the new common abstract itnerface
Allow unique serializer factories to be created per unique set of
WhiteList / Class Loader pair. Remove default consruction of the
SerializerFactory to force use of the FactoryFactory to get the generic
factory and thus access to it's ClassLoader
2017-08-15 15:11:20 +01:00
Katelyn Baker
ae72d4d788 Review comments
Rename rtn to serializer
Some whatspace reformatting
2017-08-14 17:35:36 +01:00
Katelyn Baker
2d28cb01d5 Optimise by caching class when serialising
This removed the need to calculate anything on de-serialisation if using
the same factory
2017-08-14 17:35:36 +01:00
Rick Parker
2f08425c43 Refactor KryoAMQPSerializer to go through generic APIs to access AMQP serialization (#1225) 2017-08-14 17:24:04 +01:00
Rick Parker
31df43bd76 Some preparation work for AMQP serialization integration & a refactor fix (#1214) 2017-08-11 13:23:00 +01:00
Matthew Nesbit
af13371510 Move certificate builder code from core to node utilities.
Address PR comments

Fixup dead reference
2017-08-11 12:02:38 +01:00
Katelyn Baker
52aa145c91 Ensure deserialised obj isn't cached serialised version
if it is (it's not) then we wouldn't be testing the carpetner
2017-08-10 12:17:10 +01:00
Katelyn Baker
4d6230f22c Post rebase fixes
- Add missing import
- Deal with files that need to move from core to nodeapi.internal
- Fix up the imports
2017-08-09 16:39:28 +01:00
Katelyn Baker
1f9c04544d Make the carpenter a member of the serialiser factory
If it's not then the caroenter's class loader isn't persistent and thus
we will be constantly recarpenting objects
2017-08-09 15:25:17 +01:00
Katelyn Baker
36cbcae99c Review Comments 2017-08-09 15:09:59 +01:00
Katelyn Baker
45ed78b1a8 Serialiser / Synthesiser work and cleanup
- Adding test case that shows it should work
      AS it works with concrete classes, not if we carpent up the back end
    - WIP
    - The current test fails because the carpenter is creating the map (for
      some reason) as a linked hash map and not a normal map that we can't
      serialise. Added a test to confirm that it's not the carpenter here.

      Two questions really, why are we creating it as a linked has map, AFAIK
      the carpenter should just be whipping up what it's told to and it's not
      being given a linked map

      Secondly, should we support serialisation of these objects

    - Remove debug
    - Remove yet more debug
2017-08-09 15:09:59 +01:00
Katelyn Baker
92ba0c33e1 Adding more / better tests, splitting existing tests up
Squashed commit messages
    - Split up the serialiser/synthesiser tests into more manageable sizes
    - WIP - found test which breaks deserialiser
      Looks to be soemthign to do with synthesising a class with a container
      of Interfaces
2017-08-09 15:09:59 +01:00
Katelyn Baker
ae70d73e56 Synthesiser / Serializer integration working 2017-08-09 15:09:59 +01:00
Katelyn Baker
0541d128e4 Fixes for nullable Prim Types
Commit messages from Squashed Commits
    - Carpenter doesn't work with nullable prim types
    - Fix to get Cherry picks up to date with Master
2017-08-09 15:06:48 +01:00
Katelyn Baker
a5106d74a8 Integration of the serialiser and carpenter working
Tests added
2017-08-09 15:05:56 +01:00
Katelyn Baker
4cfa376d7d Add the carpenter into the deserializer
Deseializing any blob that contains a type unknown to the classloader
will cause a class object to be carpented up and a suitable object
returned
2017-08-09 15:04:50 +01:00
Rick Parker
28610868c4 Remove Kryo from core module completely, including gradle dependencies (#1161) 2017-08-09 14:53:46 +01:00
Andrzej Cichocki
3a3ead2dfe Remove ListenableFuture from core/main (#1030) 2017-08-07 14:31:24 +01:00
Patrick Kuo
3a63f0c606 * remove x500 name validation when loading config file (#1137)
* added x500 name validation in Network registration.
* fix for github issue #1130
2017-07-28 16:18:49 +01:00
Shams Asari
407b467f67 Moved the majority of the contents of Utils.kt into either InternalUtils.kt or KotlinUtils.kt.
What remains is being dealt with in another PR.
2017-07-24 19:25:56 +01:00
Rick Parker
fe9db6f1f7 Remove links to Kryo from serialization "clients" (#1079) 2017-07-21 14:23:05 +01:00
Clinton
0ccfae252f POMs generated by publishing are now correct. (#1055)
* POMs generated by publishing are now correct. The publish extension now requires an explicit call to configure the publishing instead of waiting until after evaluation. This prevents evaluation order issues with the artifact renaming code that causes the POM to have the original, incorrect, artifact names.

* Fixed new test compile issues caused by removal of some dependencies in test utils that caused webserver code to be automatically included in any project also compiling test utils.
2017-07-18 12:34:56 +01:00
Shams Asari
195189070a Moved the Path extension methods that were in Utils.kt into the internal package 2017-07-17 16:01:19 +01:00
Shams Asari
7caee508ec Refactored ErrorOr into Try, with Success and Failure data sub-classes, and moved it into core.utilities 2017-07-11 12:10:38 +01:00
Patrick Kuo
7e8de79848 Legal name validation for X500Name (#983)
* * Legal name validation for X500Name while loading from config file.

* * Removed unintended changes.
2017-07-11 12:09:30 +01:00
Shams Asari
f718acb939 Moved CordaException.kt to base core package 2017-07-10 10:36:59 +01:00
Andrzej Cichocki
cefa14507a Retire HostAndPort (#962)
* Don't attempt to parse a resolved InetSocketAddress toString
* A mock node isn't reachable via an address
2017-07-07 15:11:07 +01:00
Clinton Alexander
b4e7d7ca1b Can now publish to artifactory. 2017-07-03 18:12:56 +01:00
Katarzyna Streich
58da76c052 Network map redesign: Change field types in NodeInfo, move away messaging data from NodeInfo (#921)
* First stage of changing fields in NodeInfo.

Part of work related to NetworkMapService upgrade. Create slots for
multiple IP addresses and legalIdentities per node.

* NodeInfo stores HostAndPort.

Move information specific to messaging layer away from NodeInfo.
Only HostAndPort addresses are stored. Add peer name - peer handle
mapping to MockNetwork to reflect that change.
2017-06-27 18:14:51 +01:00
Andrius Dagys
aaf7de0d02 RPC server: buffer response messages until the client queue is fully set up.
The issue arises when the server restarts, and the client is sometimes
not able to recreate its queue in time, so the server is unable to send
back a response message and just drops it, causing the client to hang.
2017-06-22 11:26:04 +01:00
Clinton
08cbcac40c Corda publications and JARs now have cord or corda at the start. (#749)
Core corda publications and JARs now have cord or corda at the start (excluding gradle plugins). Removed an unnecessary dependency on test-utils in node-schemas to prevent an evaluation order bug in gradle.
2017-06-06 15:05:47 +01:00
Andrzej Cichocki
c510e67ed5 Move ShutdownHook to node-api. (#770) 2017-06-02 15:32:20 +01:00
Rick Parker
d3f027cea8 Custom serialiser support for AMQP (#741) 2017-05-31 18:33:57 +01:00