yangtools.git
9 years agoMerge "Improvements in InMemoryDataTree benchmarking."
Robert Varga [Fri, 5 Sep 2014 21:43:19 +0000 (21:43 +0000)]
Merge "Improvements in InMemoryDataTree benchmarking."

9 years agoImprovements in InMemoryDataTree benchmarking. 52/10852/1
Lukas Sedlak [Fri, 5 Sep 2014 14:03:16 +0000 (16:03 +0200)]
Improvements in InMemoryDataTree benchmarking.

Added profile "benchmarks" into Yangtools parent pom to automatically run benchmarks with Yangtools build.
Added maven build plugin into benchmarks project for running JMH benchmarks via Maven execution.
Added minor changes to specify Fork and Warmup counts for InMemoryDataTree benchmark.

Change-Id: I8897a75a1cbed6a16fab13c8b7b4d68e61d88db6
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoMerge "Do not require namespace repairing"
Tony Tkacik [Fri, 5 Sep 2014 12:07:33 +0000 (12:07 +0000)]
Merge "Do not require namespace repairing"

9 years agoMerge "Added safe copy of array."
Tony Tkacik [Fri, 5 Sep 2014 07:55:28 +0000 (07:55 +0000)]
Merge "Added safe copy of array."

9 years agoBUG-1714: rework XmlDocumentUtils flow 37/10837/1
Robert Varga [Fri, 5 Sep 2014 06:16:32 +0000 (08:16 +0200)]
BUG-1714: rework XmlDocumentUtils flow

This reworks the flow such that we never override the result of a
codec's transformation. As a drive-by, we reuse the QName exposed in
SchemaContext to reuse the NETCONF QNameModule.

Change-Id: Id4e1c55fc403167436bbf7836b31e0de7f0d6355
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Added critical fixes for ASTSchemaSource class."
Robert Varga [Thu, 4 Sep 2014 20:26:16 +0000 (20:26 +0000)]
Merge "Added critical fixes for ASTSchemaSource class."

9 years agoMerge "SchemaTracker needs only PathArgument"
Tony Tkacik [Thu, 4 Sep 2014 20:26:00 +0000 (20:26 +0000)]
Merge "SchemaTracker needs only PathArgument"

9 years agoMerge "Added long to double typecast for division ops."
Robert Varga [Thu, 4 Sep 2014 20:22:13 +0000 (20:22 +0000)]
Merge "Added long to double typecast for division ops."

9 years agoSchemaTracker needs only PathArgument 87/10787/2
Robert Varga [Thu, 4 Sep 2014 15:52:27 +0000 (17:52 +0200)]
SchemaTracker needs only PathArgument

Degrade the required interface to PathArgument, as we can accept it
instead of its subclass.

Change-Id: I00b28d42cfb4dff84f30a7e18d748359b93ae088
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix for writing ordered map to JSON 76/10776/2
malauko [Thu, 4 Sep 2014 13:27:41 +0000 (15:27 +0200)]
Fix for writing ordered map to JSON

Change-Id: I698bc61ee4e94af63317c145851b802f3194ee06
Signed-off-by: malauko <malauko@cisco.com>
9 years agoAdded safe copy of array. 77/10777/1
Lukas Sedlak [Thu, 4 Sep 2014 13:25:48 +0000 (15:25 +0200)]
Added safe copy of array.

In class c-tor ParametrizedTypeImpl added safe copy of Types array instead of direct assigment.

Change-Id: I31c5f62faeca76238701465ca71f72e76f4d0701
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoAdded long to double typecast for division ops. 75/10775/1
Lukas Sedlak [Thu, 4 Sep 2014 13:13:48 +0000 (15:13 +0200)]
Added long to double typecast for division ops.

Added long to double typecast in addDuration method to increase precision after division operations.

Change-Id: I4cba5661c9b634db86d25b2286e7f9cd4fa84b6c
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoAdded critical fixes for ASTSchemaSource class. 70/10770/1
Lukas Sedlak [Thu, 4 Sep 2014 12:32:13 +0000 (14:32 +0200)]
Added critical fixes for ASTSchemaSource class.

Modified c-tor of ASTSchemaSource class to not check text parameter with NotNull precondition.
Added NotNull preconditions check into apply methods.

Change-Id: I34965c7cd4225340d589aeebf8d22365c4d373e2
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoMerge "Added missing parent tag to pom files"
Tony Tkacik [Thu, 4 Sep 2014 10:12:10 +0000 (10:12 +0000)]
Merge "Added missing parent tag to pom files"

9 years agoMerge "BUG-1687, BUG-1689 FIx belongs-to resolution in dependency resolver"
Tony Tkacik [Thu, 4 Sep 2014 09:58:15 +0000 (09:58 +0000)]
Merge "BUG-1687, BUG-1689 FIx belongs-to resolution in dependency resolver"

9 years agoMerge "add tests to yang-model-util"
Lukas Sedlak [Thu, 4 Sep 2014 09:44:31 +0000 (09:44 +0000)]
Merge "add tests to yang-model-util"

9 years agoBUG-1687, BUG-1689 FIx belongs-to resolution in dependency resolver 57/10757/1
Maros Marsalek [Thu, 4 Sep 2014 09:24:34 +0000 (11:24 +0200)]
BUG-1687, BUG-1689 FIx belongs-to resolution in dependency resolver

Change-Id: Ie4461b123394b2b8f0cd574c623adcfdf533ec5f
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Bug 1446: Changed QNM to toString listener for debug output"
Tony Tkacik [Thu, 4 Sep 2014 07:09:38 +0000 (07:09 +0000)]
Merge "Bug 1446: Changed QNM to toString listener for debug output"

9 years agoDo not require namespace repairing 97/10697/2
Robert Varga [Wed, 3 Sep 2014 14:00:13 +0000 (16:00 +0200)]
Do not require namespace repairing

Turns the requirement off, as we are generating namespaces as needed.

Change-Id: I7d91324a00c0281c3e6ffbf3a5c3befc432db8e0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Fix xml->CompositeNode transformation for rpc replies for rpcs with no output"
Tony Tkacik [Wed, 3 Sep 2014 16:09:06 +0000 (16:09 +0000)]
Merge "Fix xml->CompositeNode transformation for rpc replies for rpcs with no output"

9 years agoFix xml->CompositeNode transformation for rpc replies for rpcs with no output 90/10690/2
Maros Marsalek [Wed, 3 Sep 2014 12:47:52 +0000 (14:47 +0200)]
Fix xml->CompositeNode transformation for rpc replies for rpcs with no output

Change-Id: I9bcc884306478d974aa0547056cb70d4258c786e
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Added methods for benchmarking of commit/write ops"
Robert Varga [Wed, 3 Sep 2014 14:27:37 +0000 (14:27 +0000)]
Merge "Added methods for benchmarking of commit/write ops"

9 years agoMerge "Added hardcoded URLs back for repository section"
Robert Varga [Wed, 3 Sep 2014 14:13:45 +0000 (14:13 +0000)]
Merge "Added hardcoded URLs back for repository section"

9 years agoMerge changes I55667cbb,I94073183,Ib87cc0ec
Tony Tkacik [Wed, 3 Sep 2014 14:06:19 +0000 (14:06 +0000)]
Merge changes I55667cbb,I94073183,Ib87cc0ec

* changes:
  BUG-1668: make sure we preserve schema key order
  Make PathArgument cache its hashCode()
  JSONNormalizedNodeStreamWriter: unify constructors

9 years agoBUG-1668: make sure we preserve schema key order 95/10695/1
Robert Varga [Wed, 3 Sep 2014 13:23:15 +0000 (15:23 +0200)]
BUG-1668: make sure we preserve schema key order

Fixes up callers to preserve key ordering as defined by schema, or as
passed in from external components.

At the same time fixes the parser to not emit duplicate entries into the
key list.

Change-Id: I55667cbb9ea0609d879b38452c6c98fcbd8b2e7e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoadd tests to yang-model-util 83/10683/2
Peter Bandzi [Wed, 3 Sep 2014 12:00:20 +0000 (14:00 +0200)]
add tests to yang-model-util

Change-Id: Iac335a8433b680c71caa2312856af38c37c24967
Signed-off-by: Peter Bandzi <pbandzi@cisco.com>
9 years agoBug 1442: Fixed decoding of identities which used default namespace. 91/10691/1
Tony Tkacik [Wed, 3 Sep 2014 12:53:27 +0000 (14:53 +0200)]
Bug 1442: Fixed decoding of identities which used default namespace.

Change-Id: Ia6f607ccaac083d0b028208adb06835077d6040a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoAdded methods for benchmarking of commit/write ops 89/10689/1
Lukas Sedlak [Wed, 3 Sep 2014 12:37:43 +0000 (14:37 +0200)]
Added methods for benchmarking of commit/write ops

Added methods for benchmarking of efficiency of InMemoryDataTree for commits after each write.
Scenarios remain the same.

Change-Id: I71527f78d7762ba7baf7a7bef6471c2c81c26db0
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoMake PathArgument cache its hashCode() 85/10685/1
Robert Varga [Wed, 3 Sep 2014 12:12:21 +0000 (14:12 +0200)]
Make PathArgument cache its hashCode()

Recent tracing has shown that in badly-behaved workloads we can end up
performing a lot of hash-based lookups with a PathArgument. This patch
adds the obvious CPU/memory tradeoff of having a lazily-computed and
cached hashcode.

Change-Id: I9407318377778c9852cbaa7c439d3be7824930a7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoJSONNormalizedNodeStreamWriter: unify constructors 82/10682/1
Robert Varga [Wed, 3 Sep 2014 10:37:40 +0000 (12:37 +0200)]
JSONNormalizedNodeStreamWriter: unify constructors

We have needlessly duplicated constructors -- unify them.

Change-Id: Ib87cc0eccb8f92a9d3caaf1540e90b8d4a8b9c03
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1676: do not emit double quotes for numbers 81/10681/1
Robert Varga [Wed, 3 Sep 2014 09:26:16 +0000 (11:26 +0200)]
BUG-1676: do not emit double quotes for numbers

Look up the value type in a set of known-numeric types and
emit quotes only if the type is not found there.

Change-Id: Ied303486bbda04126861fb709922fc21fafa1c95
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 1441: Fixed incorrect commas serialization of unkeyed-list."
Robert Varga [Wed, 3 Sep 2014 10:13:02 +0000 (10:13 +0000)]
Merge "Bug 1441: Fixed incorrect commas serialization of unkeyed-list."

9 years agoMerge "Bug 1442: Fixed SchemaTracker resolving case children."
Robert Varga [Wed, 3 Sep 2014 10:12:43 +0000 (10:12 +0000)]
Merge "Bug 1442: Fixed SchemaTracker resolving case children."

9 years agoBug 1441: Fixed incorrect commas serialization of unkeyed-list. 77/10677/1
Tony Tkacik [Wed, 3 Sep 2014 08:37:21 +0000 (10:37 +0200)]
Bug 1441: Fixed incorrect commas serialization of unkeyed-list.

Change-Id: I467325fdebeca33e8b61054e137290e82f41f6e0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1442: Fixed SchemaTracker resolving case children. 76/10676/1
Tony Tkacik [Wed, 3 Sep 2014 08:35:45 +0000 (10:35 +0200)]
Bug 1442: Fixed SchemaTracker resolving case children.

Change-Id: I5bfb012bf4bbd5234f31f668a0f17552bdac32b7
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoNormalizedNodeWriter: emit sizing hints 54/10654/2
Robert Varga [Tue, 2 Sep 2014 21:20:40 +0000 (23:20 +0200)]
NormalizedNodeWriter: emit sizing hints

This patch adds the minimum smarts to allow emitting child sizing hints.

Change-Id: I79a4728db1ec1cb9460e5750d3cce099185add94
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1668: make sure MapEntryNodes emit key children first 45/10645/2
Robert Varga [Tue, 2 Sep 2014 17:47:23 +0000 (19:47 +0200)]
BUG-1668: make sure MapEntryNodes emit key children first

As per RFC6020, the XML representation requires the key entries to be
emitted first. It takes some doing, but this patch does exactly that.

Change-Id: If1b8155f914475224389609cc43e244e2e431f23
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdded hardcoded URLs back for repository section 49/10649/1
Devin Avery [Tue, 2 Sep 2014 19:29:34 +0000 (15:29 -0400)]
Added hardcoded URLs back for repository section

Because the odlparent pom file lives in a different project
it needs to be downloaded from the repository when you build
yangtools along for example.

Therefore we need to hardcode the repository portion of the URLs.

Added note about how to override repository section if needed.

Change-Id: I9ce2455b07f95be6ee2fed45f8a19d37681ff19f
Signed-off-by: Devin Avery <devin.avery@brocade.com>
9 years agoBUG-1665: rework prefix assignment logic 42/10642/2
Robert Varga [Tue, 2 Sep 2014 16:08:52 +0000 (18:08 +0200)]
BUG-1665: rework prefix assignment logic

Expand the charset, but do not include xXmMlL in it, preventing a
possible issue. Also speed up the codec process by having things aligned
at 32, allowing us to use shift of 5.

Change-Id: I812b24afc00e3711ae38a69144d4b15fa3232253
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1668: split the writeout paths 44/10644/1
Robert Varga [Tue, 2 Sep 2014 17:22:32 +0000 (19:22 +0200)]
BUG-1668: split the writeout paths

This makes the writeout paths more explicit and adds a FIXME.

Change-Id: If4ca9a098dfae49b7833a787555103d57068330e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1622 Fix DependencyResolver ignoring submodule but no parent"
Robert Varga [Tue, 2 Sep 2014 14:45:50 +0000 (14:45 +0000)]
Merge "BUG-1622 Fix DependencyResolver ignoring submodule but no parent"

9 years agoMerge "Bug 1441: Expose constructor, which allows to modify initial namespace of...
Tony Tkacik [Tue, 2 Sep 2014 14:15:56 +0000 (14:15 +0000)]
Merge "Bug 1441: Expose constructor, which allows to modify initial namespace of JSON Stream."

9 years agoMerge "BUG-1258: fix TreeNode amortization"
Tony Tkacik [Tue, 2 Sep 2014 13:58:57 +0000 (13:58 +0000)]
Merge "BUG-1258: fix TreeNode amortization"

9 years agoBUG-1622 Fix DependencyResolver ignoring submodule but no parent 37/10637/1
Maros Marsalek [Tue, 2 Sep 2014 13:47:30 +0000 (15:47 +0200)]
BUG-1622 Fix DependencyResolver ignoring submodule but no parent

Change-Id: Ia38e54ba38309d12d1233bda5abbd664e100fb5f
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoRevert "Bug 1478 - Autoboxing support" 28/10628/2
Tony Tkacik [Tue, 2 Sep 2014 12:37:20 +0000 (12:37 +0000)]
Revert "Bug 1478 - Autoboxing support"

Autoboxing support did not compiled properly with
extensive uses of cases and grouping.

This was found in integration with models
from other projects.

This reverts commit 473b1615dd9b523b96aef8b92424e7664eb7c089.

Change-Id: I65eee5078ca856f16d5740b7507bfade6c6aeadc
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Eliminate duplicate code"
Tony Tkacik [Tue, 2 Sep 2014 13:15:54 +0000 (13:15 +0000)]
Merge "Eliminate duplicate code"

9 years agoBug 1441: Expose constructor, which allows to modify initial namespace of JSON Stream. 34/10634/1
Tony Tkacik [Tue, 2 Sep 2014 13:10:41 +0000 (15:10 +0200)]
Bug 1441: Expose constructor, which allows to modify initial namespace of JSON Stream.

Change-Id: Ibbfea5c9b57a7608df8faea78ae67d2028adad76
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Fixed getPath in SchemaContextImpl."
Robert Varga [Tue, 2 Sep 2014 12:36:08 +0000 (12:36 +0000)]
Merge "Fixed getPath in SchemaContextImpl."

9 years agoMerge "Added tests for yang.model.util"
Robert Varga [Tue, 2 Sep 2014 12:34:20 +0000 (12:34 +0000)]
Merge "Added tests for yang.model.util"

9 years agoBUG-1258: fix TreeNode amortization 24/10624/2
Robert Varga [Tue, 2 Sep 2014 11:38:09 +0000 (13:38 +0200)]
BUG-1258: fix TreeNode amortization

As it turns out, the TreeNode can be either fully-amortized or
fully-materialized. This means that we can properly capture which nodes
need to be materialized at pretty much zero cost and then pay that cost
once.

Change-Id: I12baf2e07576a3af1ae167edf21f795beef57c69
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFixed getPath in SchemaContextImpl. 23/10623/1
Tony Tkacik [Tue, 2 Sep 2014 11:56:06 +0000 (13:56 +0200)]
Fixed getPath in SchemaContextImpl.

Change-Id: I4af93fa9c7aee6342c3a5cfacd8634520fe8ccc2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG 1441: Fixed JSONNormalizedNodeStreamWriter bug in writing list items. 21/10621/1
Tony Tkacik [Tue, 2 Sep 2014 10:52:39 +0000 (12:52 +0200)]
BUG 1441: Fixed JSONNormalizedNodeStreamWriter bug in writing list items.

Change-Id: I3c3b14bd48e2bdbfc126284fe6e4a3e469b7a47e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoAdded tests for yang.model.util 19/10319/2
Peter Bandzi [Tue, 26 Aug 2014 15:35:12 +0000 (17:35 +0200)]
Added tests for yang.model.util

Change-Id: Ib3a2671e1858f2cab8b86c6e65a191c74238729a
Signed-off-by: Peter Bandzi <pbandzi@cisco.com>
9 years agoEliminate duplicate code 96/10596/3
Robert Varga [Mon, 1 Sep 2014 18:05:07 +0000 (20:05 +0200)]
Eliminate duplicate code

Since we have introduced the reusable tools for identity serdes, this patch migrates current APIs to use the common code.

Change-Id: I2ccfbd25ddcfd704fcec6d0bcb2d4fcefd94bcab
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFixed compilation breakage in JSONNormalizedNodeStreamWriter caused by merge job. 14/10614/1
Tony Tkacik [Tue, 2 Sep 2014 07:11:08 +0000 (09:11 +0200)]
Fixed compilation breakage in JSONNormalizedNodeStreamWriter caused by merge job.

Change-Id: I05b9ced5e2cce837df1f86a0804e36bf1a7cf907
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Fixed SchemaTracker behaviour in choice nodes."
Robert Varga [Mon, 1 Sep 2014 20:35:36 +0000 (20:35 +0000)]
Merge "Fixed SchemaTracker behaviour in choice nodes."

9 years agoMerge "Hotfix for stmtsep use in YangParser grammar."
Tony Tkacik [Mon, 1 Sep 2014 20:07:57 +0000 (20:07 +0000)]
Merge "Hotfix for stmtsep use in YangParser grammar."

9 years agoFixed SchemaTracker behaviour in choice nodes. 02/10602/2
Tony Tkacik [Mon, 1 Sep 2014 19:57:47 +0000 (21:57 +0200)]
Fixed SchemaTracker behaviour in choice nodes.

Change-Id: Ia1ed56a8a263b1d0397ad0c54f9b6e5775939d89
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 1478 - Autoboxing support"
Tony Tkacik [Mon, 1 Sep 2014 19:54:27 +0000 (19:54 +0000)]
Merge "Bug 1478 - Autoboxing support"

9 years agoMerge "Use resolved augmentation schema instead of original schema."
Robert Varga [Mon, 1 Sep 2014 19:53:10 +0000 (19:53 +0000)]
Merge "Use resolved augmentation schema instead of original schema."

9 years agoAdded missing parent tag to pom files 61/10461/4
Devin Avery [Thu, 28 Aug 2014 18:48:09 +0000 (14:48 -0400)]
Added missing parent tag to pom files

Some pom files were missing the parent tag even
though they were still referenced from a parent
pom file in terms of building.

By adding a logical parent pom reference in
we are able to inherit properties, specifically
the distributionManagement tag (which should
not be defined in every tag pom).

Change-Id: I56d8c1359e3bd1a510001b9e348ba265055e8c1f
Signed-off-by: Devin Avery <devin.avery@brocade.com>
9 years agoMerge "Replaced harcoded nexus proxy URLs with variable."
Robert Varga [Mon, 1 Sep 2014 19:08:05 +0000 (19:08 +0000)]
Merge "Replaced harcoded nexus proxy URLs with variable."

9 years agoMerge "BUG-1440: extract a reusable StringInstanceIdentifierCodec"
Tony Tkacik [Mon, 1 Sep 2014 18:52:25 +0000 (18:52 +0000)]
Merge "BUG-1440: extract a reusable StringInstanceIdentifierCodec"

9 years agoMerge "Improve TypeProviderImpl.sortTypeDefinitionAccordingDepth()"
Tony Tkacik [Mon, 1 Sep 2014 18:35:57 +0000 (18:35 +0000)]
Merge "Improve TypeProviderImpl.sortTypeDefinitionAccordingDepth()"

9 years agoUse resolved augmentation schema instead of original schema. 98/10598/1
Tony Tkacik [Mon, 1 Sep 2014 18:24:39 +0000 (20:24 +0200)]
Use resolved augmentation schema instead of original schema.

Change-Id: Ieb6970723539478c72f22e698cf19b05482950a1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-1440: extract a reusable StringInstanceIdentifierCodec 95/10595/1
Robert Varga [Mon, 1 Sep 2014 16:13:16 +0000 (18:13 +0200)]
BUG-1440: extract a reusable StringInstanceIdentifierCodec

Eliminates the helpers package and exposes the mapping utilities in the
yang-data-util package. The utilities can then be reused by the XML
implementation, too.

Change-Id: I20df1b04e6ad875d13d18072852b0f5ac35ab8cc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Change yang-maven-plugin to write yang files to build output"
Tony Tkacik [Mon, 1 Sep 2014 16:21:08 +0000 (16:21 +0000)]
Merge "Change yang-maven-plugin to write yang files to build output"

9 years agoBUG-1440: introduce SchemaTracker and use it 59/10559/4
Robert Varga [Sun, 31 Aug 2014 20:46:02 +0000 (22:46 +0200)]
BUG-1440: introduce SchemaTracker and use it

Extracts schema tracking from the XML writer, exposes it to the outside
world and teach yang-data-codec-gson how to use it.

Change-Id: I6794273caf75d9c0d94fa7db272acb45f6a34364
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1440: simplify parsing 58/10558/3
Robert Varga [Sun, 31 Aug 2014 11:43:32 +0000 (13:43 +0200)]
BUG-1440: simplify parsing

Merges the switch statement and push out the value setting into a common
method.

Change-Id: I6b8d8271bd3daab29db8f90a3e7a0a2cd1594043
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdd slf4j-simple for tests 72/10572/1
Robert Varga [Mon, 1 Sep 2014 10:58:23 +0000 (12:58 +0200)]
Add slf4j-simple for tests

Just to activate logging, so we get something, not the NOOP
implementation.

Change-Id: I0c485264bfef4ce9944c970cb453c9049fd44bee
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoKill trailing whitespace 71/10571/1
Robert Varga [Mon, 1 Sep 2014 10:27:15 +0000 (12:27 +0200)]
Kill trailing whitespace

Change-Id: If8e0ee748fb3f595f2e3e39ef40800fd35d317d8
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge changes I8a672b0e,I8f0a22a8,I2192d909
Robert Varga [Mon, 1 Sep 2014 09:07:03 +0000 (09:07 +0000)]
Merge changes I8a672b0e,I8f0a22a8,I2192d909

* changes:
  BUG-1440: use a precondition instead of a throw
  BUG-1440: remove open-coded Multimap
  BUG-1440: improve CompositeNodeDataWithSchema

9 years agoMerge changes I0bc3b486,I67f2ca3e,Ie591417d,I01acd9f9,I8e1526a6,I0876d878,I0ed71b9c...
Tony Tkacik [Mon, 1 Sep 2014 08:43:57 +0000 (08:43 +0000)]
Merge changes I0bc3b486,I67f2ca3e,Ie591417d,I01acd9f9,I8e1526a6,I0876d878,I0ed71b9c,I0697d018,I2750f089,I48183547

* changes:
  BUG-1440: add documentation and update API
  BUG-1440: add documentation
  BUG-1440: speed up LoggingNormalizedNodeStreamWriter
  BUG-1441: implement XMLStreamNormalizedNodeStreamWriter
  BUG-1440: fix a few typos
  BUG-1440: speedup namespace/localname splitting
  BUG-1440: speedup namespace resolution
  BUG-1440: cache codecs
  BUG-1440: remove unused imports
  BUG-1440: include gson codec in feature

9 years agoMerge "BUG-869: minor changes to improve code readability in TypeDefinitionAwareCodec"
Robert Varga [Sun, 31 Aug 2014 13:47:14 +0000 (13:47 +0000)]
Merge "BUG-869: minor changes to improve code readability in TypeDefinitionAwareCodec"

9 years agoBUG-1440: use a precondition instead of a throw 44/10544/2
Robert Varga [Sun, 31 Aug 2014 08:46:07 +0000 (10:46 +0200)]
BUG-1440: use a precondition instead of a throw

Removes string concat in exception text and makes the code more
readable.

Change-Id: I8a672b0e355b61119db3e48bc290853bbc78a429
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1443: Make sure that LazyDataObject hashCode computation is consistent 30/10130/2
Tony Tkacik [Wed, 20 Aug 2014 15:17:02 +0000 (17:17 +0200)]
Bug 1443: Make sure that LazyDataObject hashCode computation is consistent

Change-Id: Ib430dabc445975c02d6176e23e4fb9c85b43f906
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoReplaced harcoded nexus proxy URLs with variable. 23/10323/3
Devin Avery [Tue, 26 Aug 2014 17:00:17 +0000 (13:00 -0400)]
Replaced harcoded nexus proxy URLs with variable.

Change-Id: I150dc155c81471d098c974491683d15059805ca0
Signed-off-by: Devin Avery <devin.avery@brocade.com>
9 years agoBUG-1440: remove open-coded Multimap 43/10543/1
Robert Varga [Sun, 31 Aug 2014 00:21:28 +0000 (02:21 +0200)]
BUG-1440: remove open-coded Multimap

The code is completely equivalent with what Guava's Multimap provides,
so let's just use that.

Change-Id: I8f0a22a89c4c31a62f16ebd970f940cfc04af2ff
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1440: add documentation and update API 41/10541/1
Robert Varga [Sat, 30 Aug 2014 21:42:57 +0000 (23:42 +0200)]
BUG-1440: add documentation and update API

Cleans up the API defition, making it slightly easier to understand.

Change-Id: I0bc3b486ec6bc88eea226a6fe39a346775b9e2bc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1440: improve CompositeNodeDataWithSchema 42/10542/1
Robert Varga [Sat, 30 Aug 2014 21:54:37 +0000 (23:54 +0200)]
BUG-1440: improve CompositeNodeDataWithSchema

- Hide internal state, making fields final
- Preserve field order in augmentations
- Use preconditions and simplify checks
- Emit correct child sizing hints
- Speed up predicate/augmentation builder

Change-Id: I2192d9093aa3909a960f4172468d971d2fd51aec
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1440: add documentation 40/10540/1
Robert Varga [Sat, 30 Aug 2014 21:19:06 +0000 (23:19 +0200)]
BUG-1440: add documentation

Change-Id: I67f2ca3e03216afeb8a4b80105d72347c5a4719c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1440: speed up LoggingNormalizedNodeStreamWriter 39/10539/1
Robert Varga [Sat, 30 Aug 2014 21:04:28 +0000 (23:04 +0200)]
BUG-1440: speed up LoggingNormalizedNodeStreamWriter

Precompute indent string as we go, saving some object instantiations.

Change-Id: Ie591417d28066140e99d7718d19d926d1e863d1f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1441: implement XMLStreamNormalizedNodeStreamWriter 89/10489/8
Robert Varga [Thu, 28 Aug 2014 15:17:37 +0000 (17:17 +0200)]
BUG-1441: implement XMLStreamNormalizedNodeStreamWriter

Introduces a direct NormalizedNode/XMLStreamWriter binding component.

Change-Id: I01acd9f9d9e8c70b3f4cbe796ae2f948073f94f4
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1440: fix a few typos 26/10526/2
Robert Varga [Sat, 30 Aug 2014 20:42:59 +0000 (22:42 +0200)]
BUG-1440: fix a few typos

Change-Id: I8e1526a67a746006e9c6200d68ca26303846c547
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1440: speedup namespace/localname splitting 25/10525/3
Robert Varga [Sat, 30 Aug 2014 18:36:07 +0000 (20:36 +0200)]
BUG-1440: speedup namespace/localname splitting

Instead of using splitters, perform just normal lookups.

Change-Id: I0876d8784c35e1911985293c010afcdf8484793e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1440: speedup namespace resolution 24/10524/3
Robert Varga [Sat, 30 Aug 2014 18:09:45 +0000 (20:09 +0200)]
BUG-1440: speedup namespace resolution

Use char lookup instead of string.

Change-Id: I0ed71b9c317cafe3847680cb861136cd0258499e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1440: cache codecs 22/10522/2
Robert Varga [Sat, 30 Aug 2014 18:03:02 +0000 (20:03 +0200)]
BUG-1440: cache codecs

Building a codec up is a bit expensive, so let's cache the objects while
we're decoding them.

Change-Id: I0697d018fe3937b8caf97518fd7a5d22ba832c51
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1440: remove unused imports 33/10433/5
Robert Varga [Thu, 28 Aug 2014 09:33:59 +0000 (11:33 +0200)]
BUG-1440: remove unused imports

These were leftover by previous changes.

Change-Id: I2750f0895fd7fbccb419167eb8e474fc18d26234
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1440: include gson codec in feature 52/10352/9
Robert Varga [Wed, 27 Aug 2014 06:16:02 +0000 (08:16 +0200)]
BUG-1440: include gson codec in feature

This updates the feature file to include the yang-data-codec-gson.

Change-Id: I48183547ba70a5f3d866dd9e5e694863d0607a2a
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1478 - Autoboxing support 44/9744/5
Ladislav Borak [Wed, 6 Aug 2014 12:48:49 +0000 (14:48 +0200)]
Bug 1478 - Autoboxing support

Change-Id: Id9c812f238c16d6bae2894364a366f6781a986e3
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove explicit final keywords 09/10509/2
Robert Varga [Fri, 29 Aug 2014 21:47:37 +0000 (23:47 +0200)]
Remove explicit final keywords

These context use the filan modifier needlessly, so remove them to get
rid of sonar warnings.

Change-Id: I1ec3133c3978b0cfaa31c74ba57393ff9973ddc6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoCompare booleans via equals() 08/10508/2
Robert Varga [Fri, 29 Aug 2014 21:30:55 +0000 (23:30 +0200)]
Compare booleans via equals()

Fixes a sonar warning.

Change-Id: Ifd39bfb8318b406365901117647be581d18ef9e7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoIdentifiableItemCodec should be a static inner class 07/10507/1
Robert Varga [Fri, 29 Aug 2014 21:26:53 +0000 (23:26 +0200)]
IdentifiableItemCodec should be a static inner class

Headline really says it all. There is no reason for
IdentifiableItemCodec to be non-static.

Change-Id: I713625dbea7201a9f11d5431d81584528ddb74aa
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not use String.toString() 06/10506/1
Robert Varga [Fri, 29 Aug 2014 21:26:13 +0000 (23:26 +0200)]
Do not use String.toString()

It is obviously not needed. Fixes a sonar warning.

Change-Id: I944acc591793520c62907f90924fc0d730646d49
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoImprove UnionType.toString() 05/10505/1
Robert Varga [Fri, 29 Aug 2014 21:20:38 +0000 (23:20 +0200)]
Improve UnionType.toString()

Do not create itermediate string just to pass it into a StringBuilder.
Fixes a sonar warning.

Change-Id: I424c1686bd919255d306c1934cb67779b7a07f52
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMake sure to use exception chaining 04/10504/1
Robert Varga [Fri, 29 Aug 2014 21:15:35 +0000 (23:15 +0200)]
Make sure to use exception chaining

Preserving the original exception is critical for finding the root
cause, so let's keep it available via getCause(). Fixes a sonar warning.

Change-Id: I1315d228df13460a76be3e3dd6a97d03ed1723a6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix ObjectCacheFactory thread safety 03/10503/1
Robert Varga [Fri, 29 Aug 2014 21:12:08 +0000 (23:12 +0200)]
Fix ObjectCacheFactory thread safety

The global factory instance needs to be volatile to guarantee proper
visibility. Also fix a sonar warning about field naming.

Change-Id: Ia0fd50d7a2a6210dbda1c1e2f0615ac05512eb64
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUint16 shared instance should be final 02/10502/1
Robert Varga [Fri, 29 Aug 2014 21:06:21 +0000 (23:06 +0200)]
Uint16 shared instance should be final

Reported by sonar.

Change-Id: I3b33c1d65db865c3bfebf4e455044b3d5a941397
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoSimplify YangInstanceIndentifier references 88/10488/2
Robert Varga [Thu, 28 Aug 2014 15:05:29 +0000 (17:05 +0200)]
Simplify YangInstanceIndentifier references

Change-Id: I272b332b87f05ef03c27f0e38256c64a70dd92f4
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix SchemaPath.legacyPath visibility 87/10487/2
Robert Varga [Fri, 29 Aug 2014 14:59:18 +0000 (16:59 +0200)]
Fix SchemaPath.legacyPath visibility

Thread safety is not assured without legacyPath being volatile.

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