yangtools.git
9 years agoBUG-1431: make sure (Yang)InstanceIdentifier is Serializable 34/11134/3
Robert Varga [Sat, 13 Sep 2014 14:25:51 +0000 (16:25 +0200)]
BUG-1431: make sure (Yang)InstanceIdentifier is Serializable

This works around the fact that an Iterable cannot be serialized by
forcing instantiation of the legacy path. The read side then just does
the opposite.

For InstanceIdentifier the situation is similar, except we perform the
writeout/read-in ourselves.

Bumps the serialization format for InstanceIdentifier and
YangInstanceIdentifier to 2 and 3 respectively.

Change-Id: I668e2aeebde20b99cfe3b41594b3925697295d05
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-650: use weakCompareAndSwap()"
Tony Tkacik [Mon, 15 Sep 2014 09:22:45 +0000 (09:22 +0000)]
Merge "BUG-650: use weakCompareAndSwap()"

9 years agoMerge "BUG-1813: rework the interface to allow multiple implementations"
Tony Tkacik [Mon, 15 Sep 2014 09:17:32 +0000 (09:17 +0000)]
Merge "BUG-1813: rework the interface to allow multiple implementations"

9 years agoBUG-1813: rework the interface to allow multiple implementations 66/11066/8
Robert Varga [Thu, 11 Sep 2014 18:12:07 +0000 (20:12 +0200)]
BUG-1813: rework the interface to allow multiple implementations

This introduces two largely independent implementations. Unfortunately
we cannot make DurationStatsTracker abstract, simply because users are
relying on the implicit empty constructor. We create
DurationStatisticsTracker to take that role and introduce two distinct
static factory methods to create a particular instance.

Change-Id: I0e4c6688e0d21066ae857647ba642b65073e8543
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-650: Use lazy set in YangInstanceIdentifier/SchemaPath caches 28/11128/2
Robert Varga [Fri, 12 Sep 2014 22:32:04 +0000 (00:32 +0200)]
BUG-650: Use lazy set in YangInstanceIdentifier/SchemaPath caches

These cached values are just derived from immutable state, so we do not
need to force them to be visible by other threads -- they can calculate
them on their own and at some point one of the versions wins.

Change-Id: I3ecf272d151c693ef3adc519c33a065aa9dba94b
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-650: improve modification sealing performance"
Tony Tkacik [Sat, 13 Sep 2014 15:06:33 +0000 (15:06 +0000)]
Merge "BUG-650: improve modification sealing performance"

9 years agoMerge "BUG-1851: fix potential visibility problem"
Tony Tkacik [Sat, 13 Sep 2014 15:05:52 +0000 (15:05 +0000)]
Merge "BUG-1851: fix potential visibility problem"

9 years agoBUG-650: improve modification sealing performance 26/11126/2
Robert Varga [Fri, 12 Sep 2014 21:47:17 +0000 (23:47 +0200)]
BUG-650: improve modification sealing performance

The seal operation is on a fast path, so performing synchronization is
not really advised. Downgrade synchronized blocks to volatile
modifications, which have better effects on the optimizer. We introduce
a SynchronizedDataTreeModification which the users can use when they
require a serialized thread-safe access.

Change-Id: Ieffcf1f5fef4d4df32fcdc30f992672d79dcf7bf
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1813: fix DurationStatsTracker performance 61/11061/6
Robert Varga [Thu, 11 Sep 2014 14:25:58 +0000 (16:25 +0200)]
BUG-1813: fix DurationStatsTracker performance

This fixes the performance issues without affecting the behaviour in the
contended case. This lowers the overhead by moving to an LongAdder,
splitting out the duration/timestamp structure and moving the division
into the read path.

A follow-up patch will rework the code organization to allow for two
different implementations, where this one is useful for highly-contented
deployments. The other implementation will use synchronized block and be
useful for things which are not likely to be contended.

Change-Id: Ic8a1d5df9d1d64460670723bac7e644733237ef7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1851: fix potential visibility problem 25/11125/1
Robert Varga [Fri, 12 Sep 2014 22:17:13 +0000 (00:17 +0200)]
BUG-1851: fix potential visibility problem

formattedRevision is a normal field, which may be reordered. Make it
volatile and initialize it as needed. Format operation is simple enough
so we do not require a full synchronization, worst that can happen is
that two racing threads will format it twice.

Change-Id: I52bf2f22cccd9dbb115858dd98f08bc63c3001b6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1818: Do not relly on xml.isNameSpaceRepairing 09/11109/3
Tony Tkacik [Fri, 12 Sep 2014 14:46:16 +0000 (16:46 +0200)]
Bug 1818: Do not relly on xml.isNameSpaceRepairing

Last code path which indirectly relied on name space
repairing was write out of writeStartElement.

This was converted to look into parent namespace
and writeStartElement and writeDefaultNamespace
when namespace change.

Change-Id: I511436e9eab98e0c35eb100dfe0627cd5edd53b6
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1761: Fixed missing module name prefix for augmentations. 43/11043/6
Tony Tkacik [Thu, 11 Sep 2014 11:53:45 +0000 (13:53 +0200)]
Bug 1761: Fixed missing module name prefix for augmentations.

Migration to more state tracking introduced regression
where module name prefix was left out for containers
and lists which were augmented, which was inconsistent
with case augmentations, which were serialized properly.

Draft draft-lhotka-netmod-yang-json-02 allows previous
behaviour (without module names for augmented items),
but that may cause changing textual representation
after conflicting augmentation is introduced,
so we opted to always report module name for top level
items of augmentation, which is also allowed from spec.

Change-Id: Icbb1b2aeed1a154a06e7f90f0dacc199a7df6bcc
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1770: emit proper namespaces"
Tony Tkacik [Fri, 12 Sep 2014 14:59:13 +0000 (14:59 +0000)]
Merge "BUG-1770: emit proper namespaces"

9 years agoMerge "Bug 1817 - Add in ietf-restonf to the yangtools-models feature."
Tony Tkacik [Fri, 12 Sep 2014 13:58:03 +0000 (13:58 +0000)]
Merge "Bug 1817 - Add in ietf-restonf to the yangtools-models feature."

9 years agoBUG-1770: emit proper namespaces 46/10946/5
Robert Varga [Tue, 9 Sep 2014 13:47:11 +0000 (15:47 +0200)]
BUG-1770: emit proper namespaces

We add calls to setPrefix() and only use the calls with explicit
namespace prefix to emit elements.

Change-Id: Ib603567b3080388c6016ece5e34cac6a723ef8c0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-865: migrate tests to use BindingGeneratorImpl(boolean)"
Tony Tkacik [Fri, 12 Sep 2014 11:11:13 +0000 (11:11 +0000)]
Merge "BUG-865: migrate tests to use BindingGeneratorImpl(boolean)"

9 years agoBUG-650: use weakCompareAndSwap() 69/11069/1
Robert Varga [Thu, 11 Sep 2014 20:55:39 +0000 (22:55 +0200)]
BUG-650: use weakCompareAndSwap()

The weak version is documented to be sufficient for statistics and does
not have happens-before effects.

Change-Id: Ic71ff280e8fe166ff4d9def7800be1ad8d1318cd
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1817 - Add in ietf-restonf to the yangtools-models feature. 63/11063/2
Devin Avery [Thu, 11 Sep 2014 17:53:06 +0000 (13:53 -0400)]
Bug 1817 - Add in ietf-restonf to the yangtools-models feature.

Change-Id: Ic50f22d678eadc3024abe9b1adeeb0308742e0d3
Signed-off-by: Devin Avery <devin.avery@brocade.com>
9 years agoBUG 1440 - additional tests for data-codec-gson 99/10999/4
Jozef Gloncak [Tue, 9 Sep 2014 14:03:09 +0000 (16:03 +0200)]
BUG 1440 - additional tests for data-codec-gson

Tests of transformation:
- json stream -> normalized node structure -
  JsonStreamToNormalizedNodeTest
- normalized node structure -> json stream -
  NormalizedNodeToJsonStreamTest
were added

Change-Id: Ieff2e565e776e5193219b07f6e0ab98165402237
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1800: restore QNameModule sharing in parser"
Tony Tkacik [Thu, 11 Sep 2014 09:23:58 +0000 (09:23 +0000)]
Merge "BUG-1800: restore QNameModule sharing in parser"

9 years agoMerge "BUG-1794: use QName.cachedReference in static references"
Tony Tkacik [Thu, 11 Sep 2014 09:10:34 +0000 (09:10 +0000)]
Merge "BUG-1794: use QName.cachedReference in static references"

9 years agoMerge "BUG-1793: make sure we cache QNameModule"
Tony Tkacik [Thu, 11 Sep 2014 09:10:20 +0000 (09:10 +0000)]
Merge "BUG-1793: make sure we cache QNameModule"

9 years agoMerge "BUG-1766: escape outbound strings"
Tony Tkacik [Thu, 11 Sep 2014 09:06:19 +0000 (09:06 +0000)]
Merge "BUG-1766: escape outbound strings"

9 years agoMerge "BUG-1774: degrade log message"
Tony Tkacik [Thu, 11 Sep 2014 09:03:46 +0000 (09:03 +0000)]
Merge "BUG-1774: degrade log message"

9 years agoMerge "BUG 1440 - incorrect inserting of augment node"
Robert Varga [Thu, 11 Sep 2014 09:02:58 +0000 (09:02 +0000)]
Merge "BUG 1440 - incorrect inserting of augment node"

9 years agoMerge "BUG-1796: implement SourceIdentifier/PotentialSchemaSource caching"
Tony Tkacik [Thu, 11 Sep 2014 09:02:01 +0000 (09:02 +0000)]
Merge "BUG-1796: implement SourceIdentifier/PotentialSchemaSource caching"

9 years agoBUG-1774: degrade log message 27/11027/1
Robert Varga [Thu, 11 Sep 2014 08:07:52 +0000 (10:07 +0200)]
BUG-1774: degrade log message

Due to the way controller starts up, this message is expected.

Change-Id: I043907b6b2a0ebc22abef143fa76139df0ae313c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1800: restore QNameModule sharing in parser 17/11017/1
Robert Varga [Wed, 10 Sep 2014 22:04:42 +0000 (00:04 +0200)]
BUG-1800: restore QNameModule sharing in parser

The refactor to eliminate use of QName.getPrefix() has lead to us not
sharing QNameModules anymore. Restore the capability to allow us to
operate at pea efficiency.

Change-Id: I9a23ca3396390eae0ffe9d954fb6fab3c7d1be55
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1719 - Formatting number in DurationStatsTracker 54/10854/4
Ladislav Borak [Fri, 5 Sep 2014 14:34:25 +0000 (16:34 +0200)]
Bug 1719 - Formatting number in DurationStatsTracker

- added format method which uses dot separator independently of default
  locale

Change-Id: Ia5447f56cab49ccdba7676516199d6bdaf84daf2
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoBUG-1796: implement SourceIdentifier/PotentialSchemaSource caching 13/11013/1
Robert Varga [Wed, 10 Sep 2014 20:32:49 +0000 (22:32 +0200)]
BUG-1796: implement SourceIdentifier/PotentialSchemaSource caching

Adds a global cache for both object types and uses it in the
AbstractSchemaSourceRepository.

Change-Id: I87ff4e5379a6d0f3b39f56d8d2197571cfa9325d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-865: migrate tests to use BindingGeneratorImpl(boolean) 12/11012/1
Robert Varga [Wed, 10 Sep 2014 19:35:13 +0000 (21:35 +0200)]
BUG-865: migrate tests to use BindingGeneratorImpl(boolean)

The implicit constructor has been deprecated due to optional 'verbose'
descriptions functionality. This migrates some old users while retaining
the same functionality.

Change-Id: Ic856b273487472b5632319806650ec22e8843403
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1794: use QName.cachedReference in static references 11/11011/1
Robert Varga [Wed, 10 Sep 2014 19:31:26 +0000 (21:31 +0200)]
BUG-1794: use QName.cachedReference in static references

When we emit generated classes, we add a static final reference to a
QName created via the usual string factory method. This leads to
less-than-optimal string sharing, so we go through a cachedReference
initializer to make sure we get maximum resource sharing.

Change-Id: Id75286410be4883736164c504dd6cb8f9d26383a
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1793: make sure we cache QNameModule 10/11010/1
Robert Varga [Wed, 10 Sep 2014 18:50:37 +0000 (20:50 +0200)]
BUG-1793: make sure we cache QNameModule

This fixes QName.cachedReference() to lookup
QNameModule.cachedReference(), so we get maximum QNameModule sharing.

Change-Id: I7234a1da4429c36db2ccaeade1a0c423a94aa006
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1790: detect existing unmodifiableMap encapsulation"
Tony Tkacik [Wed, 10 Sep 2014 17:40:08 +0000 (17:40 +0000)]
Merge "BUG-1790: detect existing unmodifiableMap encapsulation"

9 years agoBUG-1787: cleanup AsyncNotifyingListenableFutureTask 85/10985/3
Robert Varga [Wed, 10 Sep 2014 10:42:06 +0000 (12:42 +0200)]
BUG-1787: cleanup AsyncNotifyingListenableFutureTask

First move the 'listenerExecutor != null' case into a subclass,
replacing the check with proper OOP override.

Second switch to using SettableBoolean, so we bypass the need to use
ThreadLocal.set/remove in fast path. Also introduce an explicit remove
method, which can be used to cleanup the thread-local state (which was
not previously possible).

Change-Id: I6e68cb1ca791c3ea721cb3379a1e8aa6724ab9b8
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1786: fixup DeadlockDetectingListeningExecutorService 84/10984/3
Robert Varga [Wed, 10 Sep 2014 09:55:02 +0000 (11:55 +0200)]
BUG-1786: fixup DeadlockDetectingListeningExecutorService

This patch deprecates the use of a Function where a Supplier should be
used.

Furthermore it shifts the balance of the ThreadLocal interaction by
retaining switching a Boolean to a SettableBoolean and flipping the
field contained within it rather than setting/removing the thread local
value itself. This can leave a single object attached to a thread --
which can be removed by a call to cleanStateForCurrentThread(), but
improves the performance of the fast path by utilizing the
ThreadLocal.get() fastpath when used with threadpools.

Change-Id: I2d8897138f8719187425e3aa8121bdc0f1ff39b2
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1784: use AtomicLongFieldUpdater 81/10981/2
Robert Varga [Wed, 10 Sep 2014 08:46:57 +0000 (10:46 +0200)]
BUG-1784: use AtomicLongFieldUpdater

Brings down the cost of an instance down by 16 bytes.

Change-Id: I3aa6cef9494ddb39c02219f16905c256c9b78de8
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1783: fix thread safety issues 80/10980/2
Robert Varga [Wed, 10 Sep 2014 08:16:08 +0000 (10:16 +0200)]
BUG-1783: fix thread safety issues

A CAS can fail by a racing thread, which may record a lower number, thus
causing the real peak to not be recorded. Also the filed updater has to
be final and the size should be an integer, not a long.

Change-Id: I2069f703a6bdf2bf2c10ff135d0542176a2177fd
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG 1440 - incorrect inserting of augment node 97/10997/1
Jozef Gloncak [Wed, 10 Sep 2014 14:33:25 +0000 (16:33 +0200)]
BUG 1440 - incorrect inserting of augment node

Augment node was incorrectly inserted to normalized node structure in
cases when node was child of choice (case) or child of case.

This fix cause that for such cases augment will never found and therefore
children will be added to collection of children and not children which
were added via augmentation.

Change-Id: I9bb0e08def798ee387539bf57b60b4eea1cf65c2
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBUG-1790: detect existing unmodifiableMap encapsulation 95/10995/1
Robert Varga [Wed, 10 Sep 2014 14:22:03 +0000 (16:22 +0200)]
BUG-1790: detect existing unmodifiableMap encapsulation

Commit 9bcc82d107075da35c8cd01422481eaea395ba29 introduced a way to
reuse children map by builders. Unfortunately there is a codepath which
could see us receiving the returned collection in our constructor, and
the subsequent operation would wrap it again. If you stack these
operations, at some point the nesting becomes unmanageable.

The fix is to detect a previously-encapsulated collection and reusing
it. Analysis also shows that the children field is not needed, so remove
it as well.

Change-Id: I42d604d290326afca4564565760cbcf4586c2908
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1766: escape outbound strings 47/10947/2
Robert Varga [Tue, 9 Sep 2014 14:31:43 +0000 (16:31 +0200)]
BUG-1766: escape outbound strings

For non-numeric strings we need to make sure there are no stray
backslashes or double quotes are not left unescaped.

Change-Id: Ib2935ad7c4f483d4c592b3f8634d02c7383ba3aa
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge changes I3672c44d,I9ca6b66d
Tony Tkacik [Tue, 9 Sep 2014 14:49:01 +0000 (14:49 +0000)]
Merge changes I3672c44d,I9ca6b66d

* changes:
  BUG-1768: expose JSONCodecFactory for sharing
  BUG-1745, BUG-1746: remove needless quotes

9 years agoMerge "BUG-1704: rework state tracking"
Tony Tkacik [Tue, 9 Sep 2014 13:55:10 +0000 (13:55 +0000)]
Merge "BUG-1704: rework state tracking"

9 years agoMerge "Bug 1698: Updated handling of choice node inside choice node"
Robert Varga [Tue, 9 Sep 2014 13:02:51 +0000 (13:02 +0000)]
Merge "Bug 1698: Updated handling of choice node inside choice node"

9 years agoBUG-1768: expose JSONCodecFactory for sharing 41/10941/1
Robert Varga [Tue, 9 Sep 2014 12:58:47 +0000 (14:58 +0200)]
BUG-1768: expose JSONCodecFactory for sharing

Codecs can be cached for a particular schema context instance, and used
by multiple writers in parallel.

Change-Id: I3672c44d899d8d7e59d63bfbfa037298bac4900d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1704: rework state tracking 66/10866/5
Robert Varga [Fri, 5 Sep 2014 13:06:03 +0000 (15:06 +0200)]
BUG-1704: rework state tracking

In order to understand when a list (or container) is necessary, the
state tracking machinery needs to be reworked. This patch does exactly
that, adding a single-linked stack tracking nodes and their respective
output.

Change-Id: Iaf6ec6b25c05e0505a1dec6faad5fde2ecb791a0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1745, BUG-1746: remove needless quotes 36/10936/2
Robert Varga [Tue, 9 Sep 2014 09:27:34 +0000 (11:27 +0200)]
BUG-1745, BUG-1746: remove needless quotes

The class-based detection did not work because the encodec values are
always strings. Rework the codec factory to make that obvious. Add a
codec-type dispatch which will detect the need for quotes.

Change-Id: I9ca6b66d95522d2022db3f271f9fc40d213a8329
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1698: Updated handling of choice node inside choice node 40/10940/1
Tony Tkacik [Tue, 9 Sep 2014 12:18:16 +0000 (14:18 +0200)]
Bug 1698: Updated handling of choice node inside choice node

As it turned out, Composite Node to Binding codec
had problem with handling situations, where case
was augmented to choice and that case contained
another choice directly on first level.

Updated code to detect this situation and do proper lookup
to find choice in case in choice.

Change-Id: I2c39542520b842857884468dc0dcd28502ff41b3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "BUG-1718 Fix hasAttributes method in XmlStreamUtils"
Robert Varga [Mon, 8 Sep 2014 15:45:13 +0000 (15:45 +0000)]
Merge "BUG-1718 Fix hasAttributes method in XmlStreamUtils"

9 years agoMerge "Bug 650: Removed unnecessary and performance affecting String.format()"
Robert Varga [Mon, 8 Sep 2014 15:35:20 +0000 (15:35 +0000)]
Merge "Bug 650: Removed unnecessary and performance affecting String.format()"

9 years agoMerge "Bug 1743: Fixed resolving of Identityrefs in xml."
Robert Varga [Mon, 8 Sep 2014 15:27:53 +0000 (15:27 +0000)]
Merge "Bug 1743: Fixed resolving of Identityrefs in xml."

9 years agoBUG-1718 Fix hasAttributes method in XmlStreamUtils 08/10908/1
Maros Marsalek [Mon, 8 Sep 2014 15:24:23 +0000 (17:24 +0200)]
BUG-1718 Fix hasAttributes method in XmlStreamUtils

Change-Id: I5aefa3532f6b43ec746b4a1c1a11c9aa26820104
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBug 650: Removed unnecessary and performance affecting String.format() 07/10907/1
Tony Tkacik [Mon, 8 Sep 2014 15:13:50 +0000 (17:13 +0200)]
Bug 650: Removed unnecessary and performance affecting String.format()

Change-Id: I2cbe17c6a0ea5ca119a1422e625cfe7ceb9c2f5e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-1742: do not use RemovalListener 04/10904/1
Robert Varga [Mon, 8 Sep 2014 14:22:03 +0000 (16:22 +0200)]
BUG-1742: do not use RemovalListener

RemovalListener with softvalues does not give us the value which expired
(rightly so), so we need to use a phantom reference to remove the
registration.

Change-Id: Ia693bd3b738528446d497fca54d2ff6e52e8d7f2
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1743: Fixed resolving of Identityrefs in xml. 02/10902/1
Lukas Sedlak [Mon, 8 Sep 2014 12:46:42 +0000 (14:46 +0200)]
Bug 1743: Fixed resolving of Identityrefs in xml.

Fixed resolving of Identityrefs when DataSchemaNode is defined as LeafListSchemaNode.
This is bugfix for: https://bugs.opendaylight.org/show_bug.cgi?id=1743

The overloaded methods toSimpleNodeWithType were refactored with resolveValueFromSchemaType method.
No code duplicity anymore which should prevent similiar bugs in future.

Change-Id: I6d974059369b46470ea81bdfc7694157d09bd2ed
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoMerge "Bug 1672 - Generated javadoc contains symbols of javadoc comment tags"
Tony Tkacik [Mon, 8 Sep 2014 08:42:39 +0000 (08:42 +0000)]
Merge "Bug 1672 - Generated javadoc contains symbols of javadoc comment tags"

9 years agoMerge "BUG-1486: Pick Javassist version from odlparent"
Tony Tkacik [Mon, 8 Sep 2014 08:42:07 +0000 (08:42 +0000)]
Merge "BUG-1486: Pick Javassist version from odlparent"

9 years agoMerge "Bug 1733: Added guava dependency to common/feature/pom.xml"
Tony Tkacik [Mon, 8 Sep 2014 08:35:34 +0000 (08:35 +0000)]
Merge "Bug 1733: Added guava dependency to common/feature/pom.xml"

9 years agoMerge "BUG-1704: expose proper SchemaNode subclasses"
Tony Tkacik [Mon, 8 Sep 2014 08:23:59 +0000 (08:23 +0000)]
Merge "BUG-1704: expose proper SchemaNode subclasses"

9 years agoBug 1733: Added guava dependency to common/feature/pom.xml 88/10888/1
Ed Warnicke [Sun, 7 Sep 2014 17:13:05 +0000 (12:13 -0500)]
Bug 1733: Added guava dependency to common/feature/pom.xml

common/features/pom.xml is lacking a dependency on guava, even though it is referenced in the common/features/src/main/resources/features.xml

This is causing breakage downstream in integration.  See thread:

https://lists.opendaylight.org/pipermail/integration-dev/2014-September/001533.html

Change-Id: Ib18b445ccd0c72cba914833da6147a2ca2fff23e
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoMerge "BUG-1718 Fix missing attributes for empty nodes in XmlStremUtils"
Robert Varga [Fri, 5 Sep 2014 22:27:51 +0000 (22:27 +0000)]
Merge "BUG-1718 Fix missing attributes for empty nodes in XmlStremUtils"

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 agoBUG-1718 Fix missing attributes for empty nodes in XmlStremUtils 50/10850/2
Maros Marsalek [Fri, 5 Sep 2014 13:48:39 +0000 (15:48 +0200)]
BUG-1718 Fix missing attributes for empty nodes in XmlStremUtils

Change-Id: Ia03352c9c7fec2b5ab5bf72be284b843014ba905
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1704: expose proper SchemaNode subclasses 65/10865/1
Robert Varga [Fri, 5 Sep 2014 21:20:06 +0000 (23:20 +0200)]
BUG-1704: expose proper SchemaNode subclasses

SchemaTracker users may actually need the correct subclasses. Since the
tracker already does the proper checks, this is a simple, compatible
change.

Change-Id: I24e2bb0f7a0598435879d5ed234bc4ab75da571a
Signed-off-by: Robert Varga <rovarga@cisco.com>
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 agoBUG-1486: Pick Javassist version from odlparent 45/10845/2
Robert Varga [Fri, 5 Sep 2014 11:12:27 +0000 (13:12 +0200)]
BUG-1486: Pick Javassist version from odlparent

Rather than defining it ourselves, pick the one from global project
settings.

Change-Id: I1c672ff3f09e87b156a65a368635cfff95979684
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1672 - Generated javadoc contains symbols of javadoc comment tags 53/10753/6
Ladislav Borak [Wed, 3 Sep 2014 13:16:40 +0000 (15:16 +0200)]
Bug 1672 - Generated javadoc contains symbols of javadoc comment tags

- added extension method into BaseTemplate to replace javadoc comment tags
  in description:
  used &#42;&#47; instaed of */

Change-Id: I754812fac0be45d037fe3a65c60c63c11150b5c8
Signed-off-by: Ladislav Borak <lborak@cisco.com>
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>