yangtools.git
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 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 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 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 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>
9 years agoMerge "BUG-576: fixed possible null pointer dereference in BindingGeneratorImpl"
Robert Varga [Fri, 29 Aug 2014 20:54:16 +0000 (20:54 +0000)]
Merge "BUG-576: fixed possible null pointer dereference in BindingGeneratorImpl"

9 years agoMerge "BUG-1433: augmentation field visibility changed to default"
Robert Varga [Fri, 29 Aug 2014 20:52:17 +0000 (20:52 +0000)]
Merge "BUG-1433: augmentation field visibility changed to default"

9 years agoMerge "Bug 1446: Add new concurrent classes for tracking stats"
Tony Tkacik [Fri, 29 Aug 2014 20:47:04 +0000 (20:47 +0000)]
Merge "Bug 1446: Add new concurrent classes for tracking stats"

9 years agoMerge "BUG-869: removed redundant check for null before an instanceof"
Robert Varga [Fri, 29 Aug 2014 20:40:46 +0000 (20:40 +0000)]
Merge "BUG-869: removed redundant check for null before an instanceof"

9 years agoMerge "BUG-869: added proper handling of nullable parameter"
Robert Varga [Fri, 29 Aug 2014 20:23:26 +0000 (20:23 +0000)]
Merge "BUG-869: added proper handling of nullable parameter"

9 years agoMerge "Fix to feature files to include ietf-yang-types-20130715"
Robert Varga [Fri, 29 Aug 2014 20:04:40 +0000 (20:04 +0000)]
Merge "Fix to feature files to include ietf-yang-types-20130715"

9 years agoFix to feature files to include ietf-yang-types-20130715 70/10470/2
Ed Warnicke [Thu, 28 Aug 2014 20:39:21 +0000 (15:39 -0500)]
Fix to feature files to include ietf-yang-types-20130715

ietf-yang-types-20130715 was missing from feature:

odl-yangtools-models

Change-Id: Idb6c6cd2b3377e8f3c18bd1e4b1dd665f00d2642
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoBug 1446: Add new concurrent classes for tracking stats 37/9837/7
tpantelis [Thu, 7 Aug 2014 21:32:09 +0000 (17:32 -0400)]
Bug 1446: Add new concurrent classes for tracking stats

TrackingLinkedBlockingQueue
    A LinkedBlockingQueue that tracks the largest queue size foridebugging.

CountingRejectedExecutionHandler
    A RejectedExecutionHandler that delegates to a backing RejectedExecutionHandler
    and counts the number of rejected tasks.

DurationStatsTracker
    Class that calculates and tracks time duration statistics.

Change-Id: I1b7bbb45301d8cf682a5de5d51cc64727e3139dc
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoMerge "Bug 1505 - Provide test coverage for binding-data-codec using sal-test-model"
Tony Tkacik [Thu, 28 Aug 2014 16:19:22 +0000 (16:19 +0000)]
Merge "Bug 1505 - Provide test coverage for binding-data-codec using sal-test-model"

9 years agoMerge "Hotfix for gson test."
Tony Tkacik [Thu, 28 Aug 2014 15:03:20 +0000 (15:03 +0000)]
Merge "Hotfix for gson test."

9 years agoMerge "BUG-869: avoid String repetition in RestRestconfService."
Tony Tkacik [Thu, 28 Aug 2014 14:42:09 +0000 (14:42 +0000)]
Merge "BUG-869: avoid String repetition in RestRestconfService."

9 years agoMerge "BUG-576: fixed invalid key used to search map of modules."
Tony Tkacik [Thu, 28 Aug 2014 14:41:41 +0000 (14:41 +0000)]
Merge "BUG-576: fixed invalid key used to search map of modules."

9 years agoMerge "BUG-576: fixed bug in AbstractSchemaRepository.removeSource"
Tony Tkacik [Thu, 28 Aug 2014 14:40:15 +0000 (14:40 +0000)]
Merge "BUG-576: fixed bug in AbstractSchemaRepository.removeSource"

9 years agoMerge "BUG-576: added support for handling nested groupings in code generator."
Tony Tkacik [Thu, 28 Aug 2014 14:39:35 +0000 (14:39 +0000)]
Merge "BUG-576: added support for handling nested groupings in code generator."

9 years agoMerge "BUG-576: fixed invalid if conditions in LazyGeneratedCodecRegistry."
Tony Tkacik [Thu, 28 Aug 2014 14:39:09 +0000 (14:39 +0000)]
Merge "BUG-576: fixed invalid if conditions in LazyGeneratedCodecRegistry."

9 years agoHotfix for gson test. 53/10453/1
Lukas Sedlak [Thu, 28 Aug 2014 14:10:27 +0000 (16:10 +0200)]
Hotfix for gson test.

Test had to be modified prior to internal use of hash sets. Test relied on retrieving first item from
parsedData values. That lead to test failure on various platforms. Now test should run without problems.

Change-Id: Icaa920645c0e12bc922eef131b89e27d7a6b213f
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoHotfix for stmtsep use in YangParser grammar. 48/10448/1
Lukas Sedlak [Thu, 28 Aug 2014 13:03:56 +0000 (15:03 +0200)]
Hotfix for stmtsep use in YangParser grammar.

The stmtsep can occour 0..n times. Based on that the use of stmtsep? was replaced for stmtsep*
Added definitions for use of extensions outside of body statements in ext-use.yang.

Change-Id: I23092a7a6a5474bfed214ad08f64346a17b13df3
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoMerge "BUG-576: fixed test sources loading in YangModuleInfoCompilationTest."
Tony Tkacik [Thu, 28 Aug 2014 12:18:31 +0000 (12:18 +0000)]
Merge "BUG-576: fixed test sources loading in YangModuleInfoCompilationTest."

9 years agoMerge "BUG-869: removed useless null check from DataValidationException.checkListKey"
Tony Tkacik [Thu, 28 Aug 2014 11:50:24 +0000 (11:50 +0000)]
Merge "BUG-869: removed useless null check from DataValidationException.checkListKey"

9 years agoBUG-869: avoid String repetition in RestRestconfService. 44/10444/1
Martin Vitez [Thu, 28 Aug 2014 11:44:54 +0000 (13:44 +0200)]
BUG-869: avoid String repetition in RestRestconfService.

Change-Id: I5dee877114166842dbbbf3596970e0cea55b7686
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoBUG-869: removed useless null check from DataValidationException.checkListKey 35/10435/2
Martin Vitez [Thu, 28 Aug 2014 09:46:25 +0000 (11:46 +0200)]
BUG-869: removed useless null check from DataValidationException.checkListKey

Null check is useless because

1. it is already performed in call to overloaded checkListKey
2. value is already dereferenced and if it were null a NullPointerException would have occurred

Expression 'if (isLegal == false)' simplified to 'if (!isLegal)'.

Change-Id: I7bf332e99e35d283726e439caf1d2a39a17df932
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoMerge "BUG-1590: introduce PathArgument.toRelativeString() and use it"
Tony Tkacik [Thu, 28 Aug 2014 10:43:01 +0000 (10:43 +0000)]
Merge "BUG-1590: introduce PathArgument.toRelativeString() and use it"

9 years agoBUG-869: minor changes to improve code readability in TypeDefinitionAwareCodec 37/10437/1
Martin Vitez [Thu, 28 Aug 2014 10:24:17 +0000 (12:24 +0200)]
BUG-869: minor changes to improve code readability in TypeDefinitionAwareCodec

 - String.format should use %n rather than \n
 - removed redundant call to String.toString on known non-null object

Change-Id: Iac2506041184852c1e1e12bab787d1eefef1358b
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoBUG-869: removed redundant check for null before an instanceof 36/10436/1
Martin Vitez [Thu, 28 Aug 2014 10:01:38 +0000 (12:01 +0200)]
BUG-869: removed redundant check for null before an instanceof

No need to check for null before an instanceof, the instanceof keyword returns false when given a null argument.

Change-Id: Ib572460a5972406a6a27347f73e19d27109f994c
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoBUG-576: fixed bug in AbstractSchemaRepository.removeSource 34/10434/1
Martin Vitez [Thu, 28 Aug 2014 09:40:48 +0000 (11:40 +0200)]
BUG-576: fixed bug in AbstractSchemaRepository.removeSource

Change-Id: If91f1877c1bcd17eab3f547dbe4dc6613421a129
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoBUG-869: replaced inefficient use of keySet with entrySet in XmlUtils 31/10431/1
Martin Vitez [Thu, 28 Aug 2014 09:25:57 +0000 (11:25 +0200)]
BUG-869: replaced inefficient use of keySet with entrySet in XmlUtils

Change-Id: Ib665da6c15b6906e6eb220fd0ec53b7ecfbba04f
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoBUG-576: fixed invalid if conditions in LazyGeneratedCodecRegistry. 30/10430/1
Martin Vitez [Thu, 28 Aug 2014 09:03:39 +0000 (11:03 +0200)]
BUG-576: fixed invalid if conditions in LazyGeneratedCodecRegistry.

1. fixed check to 'previous instanceof DataNodeContainer' - this check always return true
2. fixed incorrect equals parameter: expected URI but was QName

Change-Id: Ib67ac5b1fc87296bcaa117e9bf1d5f04185c367b
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoImprove TypeProviderImpl.sortTypeDefinitionAccordingDepth() 61/10261/4
Robert Varga [Mon, 25 Aug 2014 20:13:20 +0000 (22:13 +0200)]
Improve TypeProviderImpl.sortTypeDefinitionAccordingDepth()

Follow-up patch to . We do not actually need the key, so just use
values() instead of full entries.

Change-Id: Ibb5679bdf0caca140d73eb9ef065db6a58505532
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1505 - Provide test coverage for binding-data-codec using 07/10307/4
Jan Hajnar [Thu, 21 Aug 2014 13:07:33 +0000 (15:07 +0200)]
Bug 1505 - Provide test coverage for binding-data-codec using
sal-test-model

* added test yang modules to bindig-test-model
* added tests for serialization/deserialization of normalized nodes and
paths to binding-data-codec

Change-Id: Ibdf24dd9e51281be488fb40481a79d6f086a2115
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoMerge "Fixed incorrect instanceof in yang-data-operations."
Robert Varga [Wed, 27 Aug 2014 16:37:08 +0000 (16:37 +0000)]
Merge "Fixed incorrect instanceof in yang-data-operations."

9 years agoBUG-576: fixed test sources loading in YangModuleInfoCompilationTest. 58/10358/3
Martin Vitez [Wed, 27 Aug 2014 08:42:57 +0000 (10:42 +0200)]
BUG-576: fixed test sources loading in YangModuleInfoCompilationTest.

Fixed test to parse File sources with relative test.

Change-Id: I4af05166a2c26cf4a3f673b1651ac28c717dd43e
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoMerge "Bug 1630: Updated normalized to binding codec to exclude LeafSetEntryNode."
Tony Tkacik [Wed, 27 Aug 2014 14:19:24 +0000 (14:19 +0000)]
Merge "Bug 1630: Updated normalized to binding codec to exclude LeafSetEntryNode."

9 years agoBug 1630: Updated normalized to binding codec to exclude LeafSetEntryNode. 78/10378/1
Tony Tkacik [Wed, 27 Aug 2014 14:12:44 +0000 (16:12 +0200)]
Bug 1630: Updated normalized to binding codec to exclude LeafSetEntryNode.

Change-Id: I8d921ed8d03e19a3fb9868ef9a0a8ebecb02563c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Fixed merge job breakage."
Tony Tkacik [Wed, 27 Aug 2014 14:08:47 +0000 (14:08 +0000)]
Merge "Fixed merge job breakage."

9 years agoFixed merge job breakage. 76/10376/1
Tony Tkacik [Wed, 27 Aug 2014 13:39:17 +0000 (15:39 +0200)]
Fixed merge job breakage.

Change-Id: I981e5e70e8798492403ef14c9d7af091145765d0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "BUG-869: reworked check for integer value."
Tony Tkacik [Wed, 27 Aug 2014 13:23:55 +0000 (13:23 +0000)]
Merge "BUG-869: reworked check for integer value."

9 years agoMerge "ModifiedNode instantiation improvement."
Tony Tkacik [Wed, 27 Aug 2014 13:10:11 +0000 (13:10 +0000)]
Merge "ModifiedNode instantiation improvement."

9 years agoMerge "Bug 1258: Implement DataTree partial indexing"
Tony Tkacik [Wed, 27 Aug 2014 13:09:47 +0000 (13:09 +0000)]
Merge "Bug 1258: Implement DataTree partial indexing"

9 years agoBUG-1630: fix warning message format 70/10370/1
Robert Varga [Wed, 27 Aug 2014 12:15:28 +0000 (14:15 +0200)]
BUG-1630: fix warning message format

The bug has been reasolved by change
I4a35ff27725dab7f35b83ae1bcc6d728a313bd1c, this patch just fixes the
message format.

Change-Id: Ic77f0675c8adb1c6d2ba29ea555335e7eaba4a34
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-650: add missing bypass"
Tony Tkacik [Wed, 27 Aug 2014 12:09:12 +0000 (12:09 +0000)]
Merge "BUG-650: add missing bypass"

9 years agoMerge "BUG-650: improve toYangInstanceIdentifier() speed"
Tony Tkacik [Wed, 27 Aug 2014 11:19:25 +0000 (11:19 +0000)]
Merge "BUG-650: improve toYangInstanceIdentifier() speed"

9 years agoBUG-650: add missing bypass 63/10363/1
Robert Varga [Wed, 27 Aug 2014 10:29:55 +0000 (12:29 +0200)]
BUG-650: add missing bypass

ChoiceNode is not representable either, so check for it early. Also
eliminate the FIXME, now that we are in the clear about what needs to
happen. Finally log offending class in warning, so we can track it down.

Change-Id: I4a35ff27725dab7f35b83ae1bcc6d728a313bd1c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Pre-cache child node set"
Tony Tkacik [Wed, 27 Aug 2014 10:28:15 +0000 (10:28 +0000)]
Merge "Pre-cache child node set"

9 years agoMerge "Bug 1443: Added support for misplaced augmentations."
Lukas Sedlak [Wed, 27 Aug 2014 09:11:08 +0000 (09:11 +0000)]
Merge "Bug 1443: Added support for misplaced augmentations."

9 years agoFixed incorrect instanceof in yang-data-operations. 14/10314/3
Tony Tkacik [Tue, 26 Aug 2014 14:35:19 +0000 (16:35 +0200)]
Fixed incorrect instanceof in yang-data-operations.

Intended check was to check for AugmentationIdentifier,
AugmentationNode was incorrectly checked.

Change-Id: Ice6f31407c1b8f0bb2400685730324503cd05e44
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1443: Added support for misplaced augmentations. 01/10301/5
Tony Tkacik [Tue, 26 Aug 2014 11:35:22 +0000 (13:35 +0200)]
Bug 1443: Added support for misplaced augmentations.

Binding Specification reuses elements inside groupings
as part of normal data tree. Augmentations and augmented
cases could be copied by user using copy builders
and may be used at incorrect place, where augmentation
with same data is present.

Binding Data Codec will treat this augmentations as
same, if augmentation definining same data subtree
is present at real location.

Change-Id: Ie232ef9b5e5bbe84f5562bfce612d8ea03b9a9a5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-650: improve toYangInstanceIdentifier() speed 41/10341/2
Robert Varga [Tue, 26 Aug 2014 20:06:01 +0000 (22:06 +0200)]
BUG-650: improve toYangInstanceIdentifier() speed

This removes a superfluous call to getCodecContextNode(), since that
call is already performed by the InstanceIdentifierCodec.

Change-Id: I2077e70517adf6795f805b6c37c0a7e29b4fb9e5
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-650: clarify BindingNormalizedNodeSerializer API contract 40/10340/2
Robert Varga [Tue, 26 Aug 2014 19:55:22 +0000 (21:55 +0200)]
BUG-650: clarify BindingNormalizedNodeSerializer API contract

Non-representable YangInstanceIdentifiers are properly reported via a
null return instead of raising an undocumented IllegalArgumentException.

Also does some implementation house-cleaning geared towards performance,
as ArrayList gives better locality.

Change-Id: Iea4717c19587fd2cc1e403aae4c5967811240e9a
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unused arguments from UnionTypeCodec.loader() 39/10339/1
Robert Varga [Tue, 26 Aug 2014 18:42:17 +0000 (20:42 +0200)]
Remove unused arguments from UnionTypeCodec.loader()

The two codecs passed in were unused, so remove them, fix the callsite
and remove the useless warnings suppression.

Change-Id: Ib3d052109303c1c18f9a4d58d2eafeefea37caba
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUnionTypeCodec should not throw raw Exception 38/10338/1
Robert Varga [Tue, 26 Aug 2014 18:39:29 +0000 (20:39 +0200)]
UnionTypeCodec should not throw raw Exception

This is a callable, and we know what types of exceptions can be thrown,
so get rid of the implied sonar warning.

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