yangtools.git
8 years agoBug 4051: Yangtools fails to decode leafref in choice statement 94/27394/2 stable/helium
Peter Kajsa [Wed, 23 Sep 2015 12:34:44 +0000 (14:34 +0200)]
Bug 4051: Yangtools fails to decode leafref in choice statement

XMLStreamUtils fails to find codec when type of leaf (or leaf-list)
is leafref.

Change-Id: Ib7435c0804298afead6fae215a9ed1ef32b4d9d4
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
8 years agoBug 4090: Yangtools fails to find leafref in choice statement 71/27271/3
Peter Kajsa [Tue, 22 Sep 2015 12:05:49 +0000 (14:05 +0200)]
Bug 4090: Yangtools fails to find leafref in choice statement

XMLDocumentUtils fails to find codec when type of leaf (or leaf-list)
is leafref.

Change-Id: Ieda09948d0e975ba1e16d5d55710be41441d985a
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
8 years agoadd EnumerationBuilderImpl test 11/11711/3
Peter Bandzi [Wed, 1 Oct 2014 11:15:46 +0000 (13:15 +0200)]
add EnumerationBuilderImpl test

Change-Id: I4bab0d83892c15fa198d72e99c262ee2011d9830
Signed-off-by: Peter Bandzi <pbandzi@cisco.com>
8 years agoBumping versions by 0.0.1 after the Helium SR4 release 36/24636/1
Thanh Ha [Thu, 30 Jul 2015 18:55:39 +0000 (14:55 -0400)]
Bumping versions by 0.0.1 after the Helium SR4 release

Change-Id: Id255927092f2c9c8df0d42a1058bb447fdd59ea6
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoApplying the Helium SR4 release patch 35/24635/1 release/helium-sr4
Thanh Ha [Thu, 30 Jul 2015 18:55:34 +0000 (14:55 -0400)]
Applying the Helium SR4 release patch

Change-Id: I5a8d40d43777bccf0ad8e8c01e4b6d05e88305be
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoBug 3821 - Augmentation codecs may be loaded after codec creation. 89/24589/2
Ryan Goulding [Tue, 28 Jul 2015 22:36:24 +0000 (18:36 -0400)]
Bug 3821 - Augmentation codecs may be loaded after codec creation.

In some scenarios - where schema context already contained
schema for introduced augmentation, but class was not known
at time codec creation was triggered - codec for augmenation
was not created and any subsequent uses of codec (class is
already known) failed with IncorrectNestingException.

This patch introduces

  - new exception MissingClassInLoadingStrategy
    which is subclass used by MD-SAL to retry after context update
    or timeout
  - supports loading of  augmentation codec after parent codec
    was created and augmentation is part of schema codec

Change-Id: If85f8e2be614a139947abc5daaa1e141b3c9b22c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
8 years agoBug 2507 - Malformed JSON - multiline string 80/17180/6
Jan Hajnar [Tue, 9 Jun 2015 13:02:58 +0000 (15:02 +0200)]
Bug 2507 - Malformed JSON - multiline string

* added function to escape illegal characters for Json writer
* added test in data codec tests to test if testing for illegal characters
matches and replaces illegal characters in input test string and is
equal to expected output test string.

Change-Id: Ia494151326438ff5fde03f3049689305ae6a3d5b
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoBumping versions by 0.0.1 after the Helium SR3 release 59/16859/1
Thanh Ha [Thu, 19 Mar 2015 23:35:44 +0000 (19:35 -0400)]
Bumping versions by 0.0.1 after the Helium SR3 release

Change-Id: If4cdbbc244400e0b6430cd61f67f8ef8d0d973db
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoApplying the Helium SR3 release patch 58/16858/1 release/helium-sr3
Thanh Ha [Thu, 19 Mar 2015 23:35:40 +0000 (19:35 -0400)]
Applying the Helium SR3 release patch

Change-Id: I1b029d05452ec75804b67f987f006dee79208893
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoFix ImmutableOrderedLeafSetNode.size() 95/15895/1
Robert Varga [Sat, 28 Feb 2015 20:29:22 +0000 (21:29 +0100)]
Fix ImmutableOrderedLeafSetNode.size()

The method always returned 0, which seems to have been missed.

Change-Id: Icdc8ec423aabd3cf7dc163670de6929d63bff3be
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit a5f0103bea326415bdabfbdb6fc04d60cab6de2c)

9 years agoBump versions by 0.0.1 after Helium SR2 release 19/14719/1
Thanh Ha [Tue, 3 Feb 2015 05:15:03 +0000 (00:15 -0500)]
Bump versions by 0.0.1 after Helium SR2 release

Change-Id: I45ed46c406ff13a28dba590fee7b5383258965ce
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoApplying Helium SR2 release patch 18/14718/1 release/helium-sr2
Thanh Ha [Tue, 3 Feb 2015 05:14:39 +0000 (00:14 -0500)]
Applying Helium SR2 release patch

Change-Id: I713efc4781b0b24a0c80885f8f3a0b05144d0c63
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoFixed incorrect serialization of multiple nested UnionTypes. 23/14423/1
Tomas Cere [Wed, 21 Jan 2015 17:59:05 +0000 (18:59 +0100)]
Fixed incorrect serialization of multiple nested UnionTypes.

Change-Id: I2bf4153fc3b931fd6f80f2683b8abb47a1e12c7b
Signed-off-by: Tomas Cere <tcere@cisco.com>
(cherry picked from commit 134bc3f2bb1d71c55aad9014efde1a9a2d252e40)

9 years agoBug 2539: Properly report incorrect Instance Identifiers 27/14327/2
Tony Tkacik [Mon, 19 Jan 2015 14:24:12 +0000 (15:24 +0100)]
Bug 2539: Properly report incorrect Instance Identifiers

Binding Data Codec throws IllegalArgumentException
with description for incorrect instance identifiers
instead of generic NullPointerExceptions.

Change-Id: Ia47c83925a18f029c70b2816e2fcb58632027e3c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 2606: Fixed serialization of null augmentations. 55/14255/1
Tony Tkacik [Mon, 19 Jan 2015 14:24:12 +0000 (15:24 +0100)]
Bug 2606: Fixed serialization of null augmentations.

Binding DTO contract allowed to use addAugmentation(T,null)
to remove augmentation, but this was not supported
by binding-data-codec.

Added explicit ommision of null augmentations.

Change-Id: Ib16f3a18e6b09ab970dcaef83e3fca4f490c9ec3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit ba6f94b348ce7ff005896aa267d75bbc3a664957)

9 years agoSet root pom.xml <name> for Sonar 25/14025/2
Thanh Ha [Fri, 9 Jan 2015 19:23:53 +0000 (14:23 -0500)]
Set root pom.xml <name> for Sonar

As mentioned on the mailing list Sonar uses the <name> field of the
pom.xml that is passed to the mvn command as the name of the project in
Sonar. In most cases this is the root pom.xml file in a project. This
patch sets the name to the project shortname.

https://lists.opendaylight.org/pipermail/discuss/2014-November/004024.html

Change-Id: I9c53cecee278b1232dbd782f1f1a73007598385a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoBug 2258: Fixed Type Definition search in runtime generated codecs 61/12261/4
Tony Tkacik [Mon, 27 Oct 2014 13:11:37 +0000 (14:11 +0100)]
Bug 2258: Fixed Type Definition search in runtime generated codecs

Type Definition search in runtime generated codecs, did not look
up nested (scoped) type definitions properly, which resulted
in IllegalArgumentException in schema context update which
prevented further working of codec.

Updated code to perform correct nested search in grouping
and type-definitoions.

Change-Id: I3860c2f70b5e0ba3d265b7f2b032e89eadaced08
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-2350: do encapsulte null snapshot 69/13969/2
Robert Varga [Thu, 25 Dec 2014 09:44:48 +0000 (10:44 +0100)]
BUG-2350: do encapsulte null snapshot

getSnapshot() has only one caller in the same package, so performing
Optional.formNullable() just so we can then check for presence means
unnecessary object creation. Remove it and just deal with the potential
nulls.

Also rename methods for clarity and do not allow direct stores of nulls
into the cache.

Change-Id: I671a075ad6200fc37e586e413256bdd57e9ae4a0
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 7ca95bff0f46eb67301634210176ec3f59fd0f4e)

9 years agoBUG-2350: improve performance of data tree merges 68/13968/2
Robert Varga [Sun, 21 Dec 2014 00:53:08 +0000 (01:53 +0100)]
BUG-2350: improve performance of data tree merges

Profiling has revealed that performing a merge on a large subtree
results in all pre-existing nodes being verified. The MD-SAL performs an
empty merge whenever the user asks for parents to be created --
resulting in up to 75% overhead.

Change-Id: I94310b2cb27c8585a8b8c4933ff0f0f658fda9be
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 87ef072436f327228e132c2547c8c94c2f2150e7)

9 years agoBUG-2350: Prune empty nodes from transaction when it is sealed 67/13967/1
Robert Varga [Thu, 11 Dec 2014 17:03:14 +0000 (18:03 +0100)]
BUG-2350: Prune empty nodes from transaction when it is sealed

When we seal() a ModifiedNode tree, check also whether we have unmodified
children and prune them. Also turn a SUBTREE_MODIFIED with empty nodes
into an UNMODIFIED node.

Change-Id: I077d23023fdbfb4ab232ed826cc32b4541779e87
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit fe30cc8cfb0e1945ced3902e98ef886d1bf869d8)

9 years agoBUG-2350: Cleanup delete/merge/write cohesion 66/13966/1
Robert Varga [Thu, 11 Dec 2014 15:57:10 +0000 (16:57 +0100)]
BUG-2350: Cleanup delete/merge/write cohesion

The three methods are not public, and are not used in fluent way. Group
them together and make sure they look the same.

Change-Id: Ib0acb09020b381e8fc259e862ed6b340bd7260e2
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit b57c902bda90f50549d1b3a6340c7a8111cfa3da)

9 years agoBUG-2350: Mark ModifiedNode as NotThreadSafe 65/13965/1
Robert Varga [Thu, 11 Dec 2014 17:16:32 +0000 (18:16 +0100)]
BUG-2350: Mark ModifiedNode as NotThreadSafe

The class is not intended to be threadsafe, so mmark it as such. Also
remove an invalid @GuardedBy annotation.

Change-Id: Ib2a5ee9710ff41447ff999d5056ae71d06b328a3
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 4c4e52bbaa89e3f2a131e2f6ef21048016ba9f3c)

9 years agoBUG-2350: Match InMemoryDataTreeModification.write() argument name 64/13964/1
Robert Varga [Thu, 11 Dec 2014 15:54:24 +0000 (16:54 +0100)]
BUG-2350: Match InMemoryDataTreeModification.write() argument name

This is an implementation of an interface method, so make sure the
argument name matches.

Change-Id: Ia2ee1d5e614aafac9d232abcefec65253c016bc9
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 82a4194241b59f2cadbb748c032a327de464627e)

9 years agoBUG-2350: optimize SchemaRootCodecContext.getYangIdentifierChild() 56/13956/1
Robert Varga [Sat, 20 Dec 2014 23:15:39 +0000 (00:15 +0100)]
BUG-2350: optimize SchemaRootCodecContext.getYangIdentifierChild()

This particular method has been found to dominate deletion-heavy
workloads, where it can account for up to 30% of time due to loading of
classes.

Eliminate this cost by instantiating a LoadingCache, which short-cuts
the class load.

Change-Id: I45c3f4acd67d85da30f26b71f73226a5beaf2876
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 3c8c97d208f4132ad5e5a54497a29512014b7894)

9 years agoMerge "Bug 2157 - Race condition when adding a RPC implementation with an output...
Tony Tkacik [Wed, 7 Jan 2015 09:12:20 +0000 (09:12 +0000)]
Merge "Bug 2157 - Race condition when adding a RPC implementation with an output" into stable/helium

9 years agoBUG 2350: Cleanup binding proxy instantiation 61/13761/1
Robert Varga [Fri, 19 Dec 2014 14:04:34 +0000 (15:04 +0100)]
BUG 2350: Cleanup binding proxy instantiation

Profiling of BGP topology provider has revealed a performance bottleneck
when instantiating proxies for list children. As it turns out around 68%
of CPU cycles is being burned in looking up the proxy class and its
contructor. This patch performs the obvious tradeoff by caching it and
exposing a utility function to subclasses.

Change-Id: Icb76f232df8223925fa802859313bbf63ee58eeb
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 8c639bd626d98b3c2c2c60067928b06cca8a94fc)

9 years agoBUG-2470: fix ADD/DELETE state compression 77/13577/2
Robert Varga [Thu, 11 Dec 2014 15:41:04 +0000 (16:41 +0100)]
BUG-2470: fix ADD/DELETE state compression

If we are deleting a previously-modified node, we need check whether the
node existed before the transaction. It was there the modification needs
to be turned into a DELETE. But it this transaction introduced it, we
need to turn into a no-op -- otherwise we will trigger a wrong path.

If we don't the user will experience the effects of attempting to delete
a non-existing node, which is clearly not what the user intended.

Change-Id: Iceb926d69e1e9df359b3299e2e38a90ba3565fd1
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2498: optimize enum's forValue() method 69/13569/1
Robert Varga [Wed, 10 Dec 2014 11:12:13 +0000 (12:12 +0100)]
BUG-2498: optimize enum's forValue() method

Use an ImmutableMap, as it provides optimized lookups based on
cardinality. Also hide the map from the package and turn it into a
constant.

Change-Id: I01591e56646705891fcc3fb8b871071169d35093
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit b488843d4da2ce059233258789371d9c6768da56)

9 years agoBug 2157 - Race condition when adding a RPC implementation with an 47/13447/1
Jan Hajnar [Wed, 12 Nov 2014 09:21:03 +0000 (10:21 +0100)]
Bug 2157 - Race condition when adding a RPC implementation with an
output

* added wait for schema in 'getRpcQnamesFor()' method

Change-Id: I2baa71f4237a1125db9a6e5ec8077237dc8ef544
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
(cherry picked from commit 8f70f752049bf21def29d83e6113df7f4c193ed6)

9 years agoFix feature-test failing with surefire 2.18 65/13365/1
Robert Varga [Thu, 4 Dec 2014 12:05:20 +0000 (13:05 +0100)]
Fix feature-test failing with surefire 2.18

feature-test fails maven-surefire-plugin 2.18 (but works with 2.17) due
to it assumming the constructor is called only once and modifying global
state. That global state is guarded from multiple modifications with an
Error. Move the offending initialization into static initializer, thus
ensuring we invoke the function only once.

Change-Id: I771ce384927769436ff0c8133471cefe27954a3d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1953: perform proper string validation 19/11319/11
Robert Varga [Thu, 18 Sep 2014 12:51:15 +0000 (14:51 +0200)]
BUG-1953: perform proper string validation

Activates the use ot Patterns to enforce the string value has the format
specified by the yang file. Also fixes mutability of the exposed list,
which may have been attacked, injecting wrong strings.

Change-Id: I32d0ceb836df1f5ed04122a10115f66f75bfa1ec
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2354: Fixed parsing of block comments between statement and argument 08/12908/1
Martin Ciglan [Wed, 12 Nov 2014 11:28:42 +0000 (12:28 +0100)]
Bug 2354: Fixed parsing of block comments between statement and argument

Lexer didn't contain BLOCK_COMMENT_MODE in VALUE_MODE,
therefore parser tried to parse comments instead of skipping them

Change-Id: I6d131a45df121570537686006aa31397124ea6ca
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit d87064cc88b59c970a02cb2567cd34fc7eb421ce)

9 years agoMerge "Bug 2326 - NormalizeNode equals fails when NormalizeNodes being compared conta...
Tony Tkacik [Tue, 18 Nov 2014 09:36:11 +0000 (09:36 +0000)]
Merge "Bug 2326 - NormalizeNode equals fails when NormalizeNodes being compared contain binary data which is identical." into stable/helium

9 years agoMerge "BUG-2386: ISIS Yang model compilation issue" into stable/helium
Tony Tkacik [Tue, 18 Nov 2014 08:36:53 +0000 (08:36 +0000)]
Merge "BUG-2386: ISIS Yang model compilation issue" into stable/helium

9 years agoBUG 2353 : LeafSetEntryBuilder does not compare byte array values correctly 84/12884/1
Moiz Raja [Thu, 13 Nov 2014 17:08:04 +0000 (09:08 -0800)]
BUG 2353 : LeafSetEntryBuilder does not compare byte array values correctly

Use Object.deepEquals to compare the value of the NodeIdentifier and the actual
value to be set on the LeafSetEntry

Change-Id: I4482b19d029058a0f78d3b19508d6f7797448710
Signed-off-by: Moiz Raja <moraja@cisco.com>
9 years agoBUG-2386: ISIS Yang model compilation issue 01/12701/3
Reinaldo Penno [Thu, 6 Nov 2014 06:30:45 +0000 (22:30 -0800)]
BUG-2386: ISIS Yang model compilation issue

This patch fixes a slight typo, which prevents the resulting Pattern from being useful.

Change-Id: Ib4bc98ad68237ebea4eccf5522dfd79db88a7906
Signed-off-by: Reinaldo Penno <rapenno@gmail.com>
(cherry picked from commit 980409656693d454ad12e438d6c9ecd764ebd7c1)

9 years agoBug 2326 - NormalizeNode equals fails when NormalizeNodes being 12/12812/1
pkajsa [Tue, 11 Nov 2014 07:08:38 +0000 (08:08 +0100)]
Bug 2326 - NormalizeNode equals fails when NormalizeNodes being
compared contain binary data which is identical.

Change-Id: If049e215156f5338eb3ff0ab95d19eecd622defd
Signed-off-by: pkajsa <pkajsa@cisco.com>
(cherry picked from commit edb26746369bb57488887115e10e19e2f52526b2)

9 years agoRevert "Revert "BUG 2282 - JSON top level element without module name"" 16/12716/1
Thanh Ha [Tue, 11 Nov 2014 03:35:26 +0000 (22:35 -0500)]
Revert "Revert "BUG 2282 - JSON top level element without module name""

To undo revert commit b1135e4f2e6e6856322d012eb732a01d6f7b68ed for
Helium SR1.

Change-Id: I58fc5c4ed5dd02aed8355155e86bff3a61326c9a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoRevert "Revert "BUG-2329 Add handling of anyxml nodes in XmlDocumentUtils with schema"" 15/12715/1
Thanh Ha [Tue, 11 Nov 2014 03:34:46 +0000 (22:34 -0500)]
Revert "Revert "BUG-2329 Add handling of anyxml nodes in XmlDocumentUtils with schema""

To undo revert commit 4c307b829542f6411ecdabba01f65601acc56a76 for
Helium SR1.

Change-Id: Ibb4994b31a298802b0b1e9e34c549d5d4168ec5d
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoBumping versions by 0.0.1 after the Helium.1 release 97/12697/1
Colin Dixon [Mon, 10 Nov 2014 20:34:12 +0000 (14:34 -0600)]
Bumping versions by 0.0.1 after the Helium.1 release

Change-Id: I030a544c44f438b4182b99313d209e839fb580bd
Signed-off-by: Colin Dixon <colin@colindixon.com>
9 years agoApplying the Helium.1 release patch 96/12696/1 release/helium-sr1
Colin Dixon [Mon, 10 Nov 2014 20:33:42 +0000 (14:33 -0600)]
Applying the Helium.1 release patch

Change-Id: I479fb9962aa03910dfdea35976ce26bc6fbff608
Signed-off-by: Colin Dixon <colin@colindixon.com>
9 years agoRevert "BUG-2329 Add handling of anyxml nodes in XmlDocumentUtils with schema" 95/12695/1
Colin Dixon [Mon, 10 Nov 2014 20:33:02 +0000 (14:33 -0600)]
Revert "BUG-2329 Add handling of anyxml nodes in XmlDocumentUtils with schema"

To roll back to the same code as in the git hash
8c0ae36b12e57323dea7fbd9fa7a79da84dab980 before applying the Helium.1
release patch.

This reverts commit 7aab20756b858bc7f0ca8ca5a8b24d98067373b4.

Change-Id: I825bcfcdc15a236b4d46051fcf0791f02a175226
Signed-off-by: Colin Dixon <colin@colindixon.com>
9 years agoRevert "BUG 2282 - JSON top level element without module name" 94/12694/1
Colin Dixon [Mon, 10 Nov 2014 20:32:04 +0000 (14:32 -0600)]
Revert "BUG 2282 - JSON top level element without module name"

To roll back to the same code as in the git hash
8c0ae36b12e57323dea7fbd9fa7a79da84dab980 before applying the Helium.1
release patch.

This reverts commit 6eee2a1ce9e69a7b653a7b4427573eff67588d1f.

Change-Id: Id14020c2ee1dcf9869d602bfbd1815d65ced0755
Signed-off-by: Colin Dixon <colin@colindixon.com>
9 years agoMerge "BUG 2282 - JSON top level element without module name" into stable/helium
Tony Tkacik [Fri, 7 Nov 2014 10:18:28 +0000 (10:18 +0000)]
Merge "BUG 2282 - JSON top level element without module name" into stable/helium

9 years agoBUG-2329 Add handling of anyxml nodes in XmlDocumentUtils with schema 93/12593/1
Maros Marsalek [Thu, 6 Nov 2014 14:27:14 +0000 (15:27 +0100)]
BUG-2329 Add handling of anyxml nodes in XmlDocumentUtils with schema

Change-Id: I32fe0658aa495f98b75e804cec58ad9dcea02cf3
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Bug 2271: Fixed potentional NPE in generateTypesFromChoiceCases" into stable...
Tony Tkacik [Wed, 5 Nov 2014 13:31:54 +0000 (13:31 +0000)]
Merge "Bug 2271: Fixed potentional NPE in generateTypesFromChoiceCases" into stable/helium

9 years agoBug 2271: Fixed potentional NPE in generateTypesFromChoiceCases 85/12485/1
Lukas Sedlak [Tue, 21 Oct 2014 14:17:35 +0000 (16:17 +0200)]
Bug 2271: Fixed potentional NPE in generateTypesFromChoiceCases

Added check to verify if parent is not null since not
all GeneratedTypes can implement ChildOf<parent>
definition.

Change-Id: I9b01dc154fa767e2411c563540135051c3aab678
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
(cherry picked from commit e296c756501bc50b1295a84a6ddd085850a71e32)

9 years agoBUG 2282 - JSON top level element without module name 59/12459/2
Jozef Gloncak [Mon, 3 Nov 2014 15:02:54 +0000 (16:02 +0100)]
BUG 2282 - JSON top level element without module name

Json top level element now doesn't have to contain module name prefix.

If namespace of some child element was changed and only one child with
specified name exist in schema then its namespace is used by default.

If more then one potential child in various namespaces exists then
exception is raised. Exception is also raised if no such element as
specified in JSON input exists in YANG schema.

Change-Id: I8a38fde4f2e9b79562f6bf7c79acafd51c7bff32
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoFix Bug 2291 32/12432/1
Loi Pan [Fri, 31 Oct 2014 22:59:49 +0000 (23:59 +0100)]
Fix Bug 2291

Change-Id: Ie86cd6f61648aefc81c80c53866e2421216cd111
Signed-off-by: Loi Pan <mr.loipan@gmail.com>
9 years agoMerge "Remove module name prefix from top level element" into stable/helium
Tony Tkacik [Fri, 31 Oct 2014 08:47:28 +0000 (08:47 +0000)]
Merge "Remove module name prefix from top level element" into stable/helium

9 years agoMerge "Bug 2279 - top level element should be entry and not list" into stable/helium
Tony Tkacik [Thu, 30 Oct 2014 15:18:04 +0000 (15:18 +0000)]
Merge "Bug 2279 - top level element should be entry and not list" into stable/helium

9 years agoRemove module name prefix from top level element 83/12383/1
Jozef Gloncak [Thu, 30 Oct 2014 15:02:20 +0000 (16:02 +0100)]
Remove module name prefix from top level element

Previous patch added condition which caused that name of every top level
JSON element was printed also with module name prefix.

It caused that some test failing.

Purpose of this patch is revert this change.

Change-Id: I3c6a992048e76fe0fa5ad0369c474710999502d4
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBug 2279 - top level element should be entry and not list 78/12378/1
Jozef Gloncak [Thu, 30 Oct 2014 09:04:32 +0000 (10:04 +0100)]
Bug 2279 - top level element should be entry and not list

JSON input which contains at top level list entry data is now converted
to normalized node structure with top level element of entry type.

Previous status: top level element element was returned as list which
contained list entries.

Change-Id: Ie632f02819aab5a4dc2512b818c729d1074d98dc
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBUG 1975 - yang unkeyed list is transformed to map node 63/12263/3
Jozef Gloncak [Tue, 23 Sep 2014 13:21:21 +0000 (15:21 +0200)]
BUG 1975 - yang unkeyed list is transformed to map node

Parsers and serializer for base, for concrete DOM type anf for composite
node structure to normalized node conversion were
added/modified to make it possible parse|serialize unkeyed list to|from
UnkeyedListNode and parse OrderedListNode.

yang-data-operations artifact - was added UnkeyedListNodeModification
class to handle cases when unkeyed list is loaded from input stream

Change-Id: Ia3a9554dea00bb9d424495a2b6ed1f96765be738
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBUG 2155 - depth parameter in NormalizedNodeWriter 27/12227/4
Jozef Gloncak [Fri, 24 Oct 2014 08:43:48 +0000 (10:43 +0200)]
BUG 2155 - depth parameter in NormalizedNodeWriter

For stable helium

- NormalizedNodeWriter - added depth class field (maxDepth, currentDepth)
  to make it possible to manage how deeply will be normalized node
  structure walked during generating output strea (JSON, XML).
  Presence of various normalized node will change current depth as
  follows:
  - ContainerNode = +1,
  - ListEntryNode (MapEntryNode, UnkeyedListEntryNode) = +1,
  - calling of endNode() method will decrease currentDepth by 1.

Change-Id: I7342581f4a1de25f8e8bb50ac0933258d7e3bce5
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoMerge "Parent schema node input parameter in JsonParserStream" into stable/helium
Tony Tkacik [Tue, 28 Oct 2014 13:26:52 +0000 (13:26 +0000)]
Merge "Parent schema node input parameter in JsonParserStream" into stable/helium

9 years agoParent schema node input parameter in JsonParserStream 59/12259/2
Jozef Gloncak [Fri, 24 Oct 2014 08:43:48 +0000 (10:43 +0200)]
Parent schema node input parameter in JsonParserStream

For stable helium

- JsonParserStream - added input parameter to create() factory method which
  specify parent schema node of schema node which is at top level of JSON
  input. Usually it is schema context.

Change-Id: I15ca2bdd0f8ace617d834040cd9a6745b40ee78a
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoMerge "Bug 2117: Inner grouping used in outer grouping's choice case" into stable...
Tony Tkacik [Mon, 27 Oct 2014 11:37:07 +0000 (11:37 +0000)]
Merge "Bug 2117: Inner grouping used in outer grouping's choice case" into stable/helium

9 years agoBug 2117: Inner grouping used in outer grouping's choice case 51/12251/1
Martin Ciglan [Fri, 24 Oct 2014 08:55:17 +0000 (10:55 +0200)]
Bug 2117: Inner grouping used in outer grouping's choice case

Inner grouping(s) of outer grouping(s) found and handled properly

Change-Id: I09853215febf47312b431976ad096d1ee774c9f6
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit 6bb1dccf4fa701f1fa6bb77dba1047812d7e268e)

9 years agoBug 2180 - schema aware builders for ordered list and leaf-list are 49/12249/1
Jan Hajnar [Wed, 22 Oct 2014 13:39:08 +0000 (15:39 +0200)]
Bug 2180 - schema aware builders for ordered list and leaf-list are
absent

* added builders that provide ordered list and ordered leaf-list nodes
* added tests to check ordered node parsing

NOTE: this patch is based on patches by Tony Burke<tony@iservice.com>

Change-Id: I351e841c9fd1e02678b94598f7f5d46ab00a8334
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Signed-off-by: Tony Burke <tony@iservice.com>
(cherry picked from commit 9b67d090d24d46f137e022d934d3f5e163147548)

9 years agoMerge "Bug 2172 - AbstractGeneratedTypeBuilder check for duplicate elements." into...
Tony Tkacik [Thu, 23 Oct 2014 07:54:13 +0000 (07:54 +0000)]
Merge "Bug 2172 - AbstractGeneratedTypeBuilder check for duplicate elements." into stable/helium

9 years agoBug 2191: Invalid use of addType in ChoiceCaseBuilder 49/12149/1
Ladislav Borak [Fri, 17 Oct 2014 08:04:22 +0000 (10:04 +0200)]
Bug 2191: Invalid use of addType in ChoiceCaseBuilder

1) in CoppyUtils removed from method copy functionality about copying
   typedefs and grouping from old ChoiceCaseBuilder, which throw in
   this implementation YangParseException

2) in AbstractDocumentedDataNodeContainerBuilder removed final modifier
   from method addGrouping because this method must be overriden in
   ChoiceCaseBuilder to throw YangParseException

3) in ChoiceCaseBuilder were overriden addGrouping method to throw
   YangParseException becaouse by RFC 6020 is not allowed that
   choice case has grouping

Change-Id: Ic06524f3489a36c73f07c8b44701895dc0e9896e
Signed-off-by: Ladislav Borak <lborak@cisco.com>
(cherry picked from commit 5eb73b6c47326147af391608ee22ab8f8ab2c87c)

9 years agoBug 2172 - AbstractGeneratedTypeBuilder check for duplicate elements. 48/12148/1
pkajsa [Fri, 17 Oct 2014 09:00:56 +0000 (11:00 +0200)]
Bug 2172 - AbstractGeneratedTypeBuilder check for duplicate elements.

Check for duplicity of added elements has been added into add* methods
in the AbstractGeneratedTypeBuilder class.

Change-Id: I9ef4caef0a835c0e171e86c2b322c3452bdaada0
Signed-off-by: pkajsa <pkajsa@cisco.com>
(cherry picked from commit b1e2b02d59a05fdca07cb469712d9872a1d84bb1)

9 years agoMerge "Bug 2147 - JSON does not properly encode multiline string" into stable/helium
Tony Tkacik [Fri, 17 Oct 2014 09:00:29 +0000 (09:00 +0000)]
Merge "Bug 2147 - JSON does not properly encode multiline string" into stable/helium

9 years agoMerge "Bug 2156: Unsupported augment target" into stable/helium
Tony Tkacik [Fri, 17 Oct 2014 09:00:11 +0000 (09:00 +0000)]
Merge "Bug 2156: Unsupported augment target" into stable/helium

9 years agoMerge "Bug 2202: DerivableSchemaNode API incorrect Javadoc" into stable/helium
Tony Tkacik [Fri, 17 Oct 2014 08:59:51 +0000 (08:59 +0000)]
Merge "Bug 2202: DerivableSchemaNode API incorrect Javadoc" into stable/helium

9 years agoMerge "Bug 2183: ClassCastException in AbstractTypeMemberBuilder fix" into stable...
Tony Tkacik [Fri, 17 Oct 2014 08:59:03 +0000 (08:59 +0000)]
Merge "Bug 2183: ClassCastException in AbstractTypeMemberBuilder fix" into stable/helium

9 years agoBug 2176 - add property with name == null fix. 16/12016/1
pkajsa [Thu, 16 Oct 2014 06:45:01 +0000 (08:45 +0200)]
Bug 2176 - add property with name == null fix.

The Preconditions.checkArgument(name != null,..) check has been added into the
addProperty(String name) method in the AbstractGeneratedTypeBuilder class.

Change-Id: I9db2b718011fa397cf1cd659ae56f8764bb8316e
Signed-off-by: pkajsa <pkajsa@cisco.com>
(cherry picked from commit 23e82385c675216762588f9400ff8244b68bd8cd)

9 years agoBug 2183: ClassCastException in AbstractTypeMemberBuilder fix 15/12015/1
Martin Ciglan [Tue, 14 Oct 2014 14:46:17 +0000 (16:46 +0200)]
Bug 2183: ClassCastException in AbstractTypeMemberBuilder fix

Change-Id: I0d5a21653f958c630c2a573b9cb90af28e59a627
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit b741f59e2b57c1812af40e89c89782a8a717a394)

9 years agoBug 2202: DerivableSchemaNode API incorrect Javadoc 14/12014/1
Martin Ciglan [Thu, 16 Oct 2014 12:27:17 +0000 (14:27 +0200)]
Bug 2202: DerivableSchemaNode API incorrect Javadoc

Change-Id: If0c9a986dbd01ed1f51a15275ce78dca4b10ea30
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit 7dc18da2dd06e4b4e2d69e3607e82e027d46819c)

9 years agoBug 2147 - JSON does not properly encode multiline string 08/12008/1
Jan Hajnar [Wed, 15 Oct 2014 12:54:37 +0000 (14:54 +0200)]
Bug 2147 - JSON does not properly encode multiline string

* added newline and return characters to escape list
* updated tests

Change-Id: I48cd418b1633de12e80bdab0b7c7bc91113dbf6d
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
(cherry picked from commit e6c3a206a204de77c70df1c0940a088493401749)

9 years agoBug 2156: Unsupported augment target 60/11860/2
pkajsa [Tue, 7 Oct 2014 14:56:59 +0000 (16:56 +0200)]
Bug 2156: Unsupported augment target

Some yang models contain augmentations into unsupported target
(e.g. node in body of extension). This causes maven build failure
(by generation of DTO), even though parsing such models is successful.

Change-Id: I8efff696aa2d3b95c5168ba8e42d49a93d1dff74
Signed-off-by: pkajsa <pkajsa@cisco.com>
(cherry picked from commit 48387f2188ee83a3c8e909df01e109ebd3e7c89c)

9 years agobug 1957 StackOverFlowError in YangParserImpl 59/11359/9
Martin Ciglan [Thu, 18 Sep 2014 13:24:56 +0000 (15:24 +0200)]
bug 1957 StackOverFlowError in YangParserImpl

StackOverFlowError exception was replaced by YangParseException

Change-Id: I7dd47d671581e07d26da9a12a7db25b7bcdac8a1
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoChanging .gitreview to use the stable/helium branch 79/11779/1
Colin Dixon [Tue, 7 Oct 2014 14:23:20 +0000 (09:23 -0500)]
Changing .gitreview to use the stable/helium branch

Change-Id: Iaac1e293b35f5ca9265737642db1c4de38e8c060
Signed-off-by: Colin Dixon <colin@colindixon.com>
9 years agoIncrementing versions by 0.0.1 for post-Helium stability branch 26/11726/1
Colin Dixon [Fri, 3 Oct 2014 16:44:46 +0000 (11:44 -0500)]
Incrementing versions by 0.0.1 for post-Helium stability branch

Change-Id: I72548306616a45edb87d66312f6452723af1f460
Signed-off-by: Colin Dixon <colin@colindixon.com>
9 years agoApplying the Helium release patch for yangtools 25/11725/1 release/helium
Colin Dixon [Fri, 3 Oct 2014 16:44:31 +0000 (11:44 -0500)]
Applying the Helium release patch for yangtools

Change-Id: I38c8930662caaedbbbbddbef5fe81d6ad166ba37
Signed-off-by: Colin Dixon <colin@colindixon.com>
9 years agoMerge "BUG-2022: String Type pattern parsing and resolving fix." into stable/helium
Robert Varga [Mon, 22 Sep 2014 15:59:05 +0000 (15:59 +0000)]
Merge "BUG-2022: String Type pattern parsing and resolving fix." into stable/helium

9 years agoBUG-2022: String Type pattern parsing and resolving fix. 40/11440/5
Lukas Sedlak [Mon, 22 Sep 2014 11:40:46 +0000 (13:40 +0200)]
BUG-2022: String Type pattern parsing and resolving fix.

Added fix during string type pattern restriction resolution in ParserListenerUtils. Now if pattern statement in yang model contains uncompilable string
the warning is logged and pattern restriction is not among types restrictions.
Each pattern is wrapped between "^"and "$" symbols.

Modified exisiting tests and test resources for testing of transofrmation of incorrect pattern regular expressions.

Change-Id: I86d6066b93e2f21b5c826729469228286a31965d
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoAdded Test suite for testing of TypeProviderImpl. 45/11245/5
Lukas Sedlak [Fri, 5 Sep 2014 08:58:14 +0000 (10:58 +0200)]
Added Test suite for testing of TypeProviderImpl.

Removed commented out blocks of code from TypeProviderImpl.
Fixed invalid typecast in getTypeDefaultConstruction(LeafSchemaNode, defaultValue) in else branch of BitsTypeDefinition processing. The parent value is of type ModuleImpl which cannot
be cast to SchemaNode as originaly was. Instead of we can extract QName direclty from parent value -> no need to typecast at all.

Fixed leafrefToDef method in TypeProviderImpl. This method will now process defaultValue from method parameter instead of parent node. Method leafrefToDef has been called only via getTypeDefaultConstruction(LeafSchemaNode, defaultValue) method where default value has been added implicitly. In case that user calls getTypeDefaultConstruction for leafref schema node
and specifies defaultValue as parameter and not in yang model the method will throw exception. Now behaviour of leafrefToDef depends only and only on parameter passed in getTypeDefaultConstruction.

Created TypeProviderTest which contains whole test suite for testing of TypeProviderImpl class.
TestIntegerTypeDefinition is mock implementation of IntegerTypeDefinition in order to testing null references returned by TypeDefinition object.

TypeProviderModel contains methods for provisiononing of YANG test models from test/resources folder.
Created Mock implementations of LeafrefTypeWithNullToStringInXpath, LeafrefTypeWithNullXpath, TestIntegerTypeDefinition and TestLeafSchemaNode designated
to increase branch coverage in tests and provide fail scenarios.

Change-Id: I5599c9b1e8f02a8553fab27c1771e32f88c38bc6
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoMerge "BUG-1954: Fix useless Boolean instantiation" into stable/helium
Tony Tkacik [Mon, 22 Sep 2014 14:08:22 +0000 (14:08 +0000)]
Merge "BUG-1954: Fix useless Boolean instantiation" into stable/helium

9 years agoMerge "Bug 1984, Bug 2005: Changed valueEquals to work with null values." into stable...
Robert Varga [Sun, 21 Sep 2014 18:22:58 +0000 (18:22 +0000)]
Merge "Bug 1984, Bug 2005: Changed valueEquals to work with null values." into stable/helium

9 years agoBug 1984, Bug 2005: Changed valueEquals to work with null values. 13/11413/1
Tony Tkacik [Sun, 21 Sep 2014 07:01:36 +0000 (09:01 +0200)]
Bug 1984, Bug 2005: Changed valueEquals to work with null values.

ImmutableNode implementation hashCode and equals did not worked
properly with null values, which are rare, but allowed by
typedef empty statement.

Methods were fixed to work properly with null values and
added comment which explicitly says, that nulls are allowed
because of empty type.

Change-Id: I8fa3431bae19783dfbc0e2d3684c2e981e11da46
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 1950: Raise memory and permgen limits for featurs-test" into stable/helium
Tony Tkacik [Sat, 20 Sep 2014 14:48:10 +0000 (14:48 +0000)]
Merge "Bug 1950: Raise memory and permgen limits for featurs-test" into stable/helium

9 years agoMerge "Bug 1991: Ignore AugmentationIdentifier in XML Serialization" into stable...
Robert Varga [Sat, 20 Sep 2014 09:23:13 +0000 (09:23 +0000)]
Merge "Bug 1991: Ignore AugmentationIdentifier in XML Serialization" into stable/helium

9 years agoBug 1950: Raise memory and permgen limits for featurs-test 96/11396/1
Ed Warnicke [Thu, 18 Sep 2014 11:23:31 +0000 (06:23 -0500)]
Bug 1950: Raise memory and permgen limits for featurs-test

Change-Id: I7e72e605eac4029835cbc8e64e22d0ecedc1dacc
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoBug 1991: Ignore AugmentationIdentifier in XML Serialization 95/11395/1
Tony Tkacik [Sat, 20 Sep 2014 08:47:26 +0000 (10:47 +0200)]
Bug 1991: Ignore AugmentationIdentifier in XML Serialization

AugmentationIdentifier is YANGTools/MD-SAL specific
concept which eases navigation in parsed data, but
does not exists in XML Instance Identifier.

AugmentationIdentifier from XML perspective identifies
subset of child nodes of parent element, from which
also next path argument select element from that subset
so it is safe to leave it during serialization.

Change-Id: If42acf6db82f7c4920546283cb89a2cf58f80a6e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-1954: Fix useless Boolean instantiation 18/11318/3
Robert Varga [Thu, 18 Sep 2014 09:40:15 +0000 (11:40 +0200)]
BUG-1954: Fix useless Boolean instantiation

No need to instantiate booleans for string, just use Boolean.TRUE.

Change-Id: I5156d4a8cafd08ced0802c55812cded7bdbe1cee
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1956: bump java-concurrent-hash-trie-map version 0.2.23 56/11356/1
Robert Varga [Fri, 19 Sep 2014 07:46:39 +0000 (09:46 +0200)]
BUG-1956: bump java-concurrent-hash-trie-map version 0.2.23

Bump the version again, this time accounting for the late API change.

Change-Id: I95e947adcef587069ea3579da98b3f5d217a6e58
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 1960: Revert "BUG-1956: bump java-concurrent-hash-trie-map version 0.2...
Tony Tkacik [Thu, 18 Sep 2014 22:11:20 +0000 (22:11 +0000)]
Merge "Bug 1960: Revert "BUG-1956: bump java-concurrent-hash-trie-map version 0.2.23"" into stable/helium

9 years agoBug 1960: Revert "BUG-1956: bump java-concurrent-hash-trie-map version 0.2.23" 40/11340/1
Tony Tkacik [Thu, 18 Sep 2014 21:31:56 +0000 (21:31 +0000)]
Bug 1960: Revert "BUG-1956: bump java-concurrent-hash-trie-map version 0.2.23"

After bumping version to 0.2.23, it seems TrieMap have problem with large
datasets. During stress testing structures from other instance of TrieMap
started leaking to other map.

This reverts commit ef4042ba45dcdf9882781931a03f93610c03557c.

Change-Id: If6c29da670de32b4fe061218b6ec842f118a4f44
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1906: Fixed bug in Binding leafref to union codec 86/11286/3
Tony Tkacik [Wed, 17 Sep 2014 12:45:33 +0000 (14:45 +0200)]
Bug 1906: Fixed bug in Binding leafref to union codec

In models, where leafref was used to reference type, incorrect
codec (EncapsulatedValueCodec) was used for all cases with
derived type instead of actual codec. EncapsulatedValueCodec
covered most cases except Union and Bits.

Added special handling for leafref, where type definition
for referenced leaf is fetched and codec is used based
on that notion.

Change-Id: Id790554e1e84bcf01179add4f5327a4e7380ebe1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit 697925b94246e725412b88151ec097c812a65b39)

9 years agoMerge "BUG-1956: bump java-concurrent-hash-trie-map version 0.2.23" into stable/helium
Tony Tkacik [Thu, 18 Sep 2014 14:37:47 +0000 (14:37 +0000)]
Merge "BUG-1956: bump java-concurrent-hash-trie-map version 0.2.23" into stable/helium

9 years agoMerge "Bug 1848: Make sure that XmlStreamUtils preserve list key order." into stable...
Robert Varga [Thu, 18 Sep 2014 13:17:59 +0000 (13:17 +0000)]
Merge "Bug 1848: Make sure that XmlStreamUtils preserve list key order." into stable/helium

9 years agoBUG-1956: bump java-concurrent-hash-trie-map version 0.2.23 22/11322/1
Robert Varga [Thu, 18 Sep 2014 13:15:12 +0000 (15:15 +0200)]
BUG-1956: bump java-concurrent-hash-trie-map version 0.2.23

Change-Id: Idde0cb420818fb4ba65128b45fc9fbeb9bbf8ffd
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1849 Check for duplicate required sources and exclude all redundant" into...
Tony Tkacik [Thu, 18 Sep 2014 12:54:36 +0000 (12:54 +0000)]
Merge "BUG-1849 Check for duplicate required sources and exclude all redundant" into stable/helium

9 years agoMerge "BUG-1902: reuse ConcreteTypeImpl instances" into stable/helium
Tony Tkacik [Wed, 17 Sep 2014 14:10:07 +0000 (14:10 +0000)]
Merge "BUG-1902: reuse ConcreteTypeImpl instances" into stable/helium

9 years agoBug 1848: Make sure that XmlStreamUtils preserve list key order. 87/11287/1
Tony Tkacik [Tue, 16 Sep 2014 10:28:58 +0000 (12:28 +0200)]
Bug 1848: Make sure that XmlStreamUtils preserve list key order.

Change-Id: I3d7a91c9ae4ec74b1c7130c4af504af73a2f4507
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit 2d56be8a89b494cd8423a6377c9574966067aa88)

9 years agoBUG-1849 Check for duplicate required sources and exclude all redundant 85/11285/1
Maros Marsalek [Tue, 16 Sep 2014 14:35:13 +0000 (16:35 +0200)]
BUG-1849 Check for duplicate required sources and exclude all redundant

Also check for source identifier mismatch

Change-Id: I32fc76a56fd7adb564b7b9c9fc2679c5f36069cb
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-1902: reuse ConcreteTypeImpl instances 25/11225/4
Robert Varga [Tue, 16 Sep 2014 09:53:44 +0000 (11:53 +0200)]
BUG-1902: reuse ConcreteTypeImpl instances

Creates shared instances for byte[], char[], Serializable and QName
and reuses them as much as possible. Unfortuntely this Helium-specific
patch does not have an explicit cache due to maven interactions, which
prevent us from useing Guava cache classes.

Change-Id: I6d9b57418e4a7dbbe4878f9f9fd1ed57ddb4362d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1886: implement lock-free InMemoryDataTree.commit() 40/11240/1
Robert Varga [Tue, 16 Sep 2014 13:31:30 +0000 (15:31 +0200)]
BUG-1886: implement lock-free InMemoryDataTree.commit()

This patch reworks the data layout to remove all locking from the hold
codepaths. All state is not encapsulated in DataTreeState which is
atomically replaced.

The allocation, verification and preparation of a modification are
both lock- and wait-free.

Schema context is still synchronized to preventmadness
from concurrent schema context changes.

Commit runs lock-free, but may retry operations if it races with schema
context change -- which should happen rarely if ever.

Change-Id: I296b2805ef2575e76052e004a0d317a098d207df
Signed-off-by: Robert Varga <rovarga@cisco.com>