mdsal.git
9 years agoMerge changes I7aea2237,Ie8e125e5
Tony Tkacik [Thu, 5 Feb 2015 09:51:22 +0000 (09:51 +0000)]
Merge changes I7aea2237,Ie8e125e5

* changes:
  Remove ietf-netconf
  Eliminate unused pluginManagement section

9 years agoMerge "Optimize Types instantiation"
Tony Tkacik [Thu, 5 Feb 2015 09:48:13 +0000 (09:48 +0000)]
Merge "Optimize Types instantiation"

9 years agoMerge "Improve codec performance"
Tony Tkacik [Thu, 5 Feb 2015 09:47:55 +0000 (09:47 +0000)]
Merge "Improve codec performance"

9 years agoRemove ietf-netconf
Robert Varga [Tue, 27 Jan 2015 13:18:30 +0000 (14:18 +0100)]
Remove ietf-netconf

We never built it, so remove it completely from repository.

Change-Id: I7aea2237e68ed9c945d70f1a91dd83c7031a4f03
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoEliminate unused pluginManagement section
Robert Varga [Tue, 27 Jan 2015 13:07:49 +0000 (14:07 +0100)]
Eliminate unused pluginManagement section

This is an aggregator, no need to define further plugins.

Change-Id: Ie8e125e54ff68434a4c976a19b534268b2749d5f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoImprove codec performance
Robert Varga [Thu, 22 Jan 2015 20:18:22 +0000 (21:18 +0100)]
Improve codec performance

Convert the codecs from reflection to invocation API. Invoking
constructors and getters via reflection seems to be causing around
2% overhead which can be avoided if the call site is properly bound.

Change-Id: I0c303773a21913d9d1a6de952d37eb0dd022cbd1
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOptimize Types instantiation
Robert Varga [Mon, 26 Jan 2015 17:08:36 +0000 (18:08 +0100)]
Optimize Types instantiation

Instead of using Arrays.copyOf(), use a simple array clone -- it has
better performance characteristics.

Change-Id: I2261f54c2a867dd09fd2f2655a0665492489215f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 865: ModuleInfoBackedContext is no more SchemaSourceProvider."
Robert Varga [Tue, 27 Jan 2015 09:33:21 +0000 (09:33 +0000)]
Merge "Bug 865: ModuleInfoBackedContext is no more SchemaSourceProvider."

9 years agoBUG-1434: fix NPEs when using null byte arrays
Robert Varga [Mon, 26 Jan 2015 16:42:35 +0000 (17:42 +0100)]
BUG-1434: fix NPEs when using null byte arrays

Commit introduced a regression, which caused NPEs being thrown when the
byte array was null (and hence failed to copy). Guard the copy with an
explicit null check and do not use Arrays.copyOf(), but clone().

Change-Id: I832ccae7a269548954705b2c1cdb1a42f83f71a4
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 865: ModuleInfoBackedContext is no more SchemaSourceProvider.
Tony Tkacik [Fri, 23 Jan 2015 11:29:09 +0000 (12:29 +0100)]
Bug 865: ModuleInfoBackedContext is no more SchemaSourceProvider.

ModuleInfoBackedContext is only used as only class-loader registry
for generated classes and and utility class to create Schema Context
from Binding v1 jar artefacts.

Thus it is safely remove implementation of unused and now deprecated
interface SchemaSourceProvider.

Change-Id: Iee9abf7d35a1a0c64878005c17a6ab82a1857eb3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Cleanup warning suppressions"
Tony Tkacik [Mon, 26 Jan 2015 09:16:48 +0000 (09:16 +0000)]
Merge "Cleanup warning suppressions"

9 years agoMerge "Remove unused imports"
Tony Tkacik [Mon, 26 Jan 2015 09:16:15 +0000 (09:16 +0000)]
Merge "Remove unused imports"

9 years agoMerge "Migrate ClassLoaderUtils callers"
Tony Tkacik [Mon, 26 Jan 2015 09:15:37 +0000 (09:15 +0000)]
Merge "Migrate ClassLoaderUtils callers"

9 years agoMerge "Bug 1434 - Make arrays non-mutable"
Robert Varga [Sun, 25 Jan 2015 09:13:59 +0000 (09:13 +0000)]
Merge "Bug 1434 - Make arrays non-mutable"

9 years agoCleanup warning suppressions
Robert Varga [Fri, 23 Jan 2015 07:36:12 +0000 (08:36 +0100)]
Cleanup warning suppressions

Some of these are implied by context, some are needed down the stack.

Change-Id: Ifc090d3dce1a99fc5624d312f16f1046705dd285
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unused imports
Robert Varga [Fri, 23 Jan 2015 07:34:24 +0000 (08:34 +0100)]
Remove unused imports

The usual spring cleaning of unused import warnings.

Change-Id: Ia9d2d178fd1bc8f3468eab467cd434b34455c7a5
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMigrate ClassLoaderUtils callers
Robert Varga [Fri, 23 Jan 2015 07:32:26 +0000 (08:32 +0100)]
Migrate ClassLoaderUtils callers

oeg.opendaylight.yangtools.yang.util.ClassLoaderUtils is deprecated in
favor of the util package. This switches over some users.

Change-Id: I5c7035b70e23b37397b31e36616a973d8decbc01
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Split out codecs from BindingCodecContext"
Tony Tkacik [Fri, 23 Jan 2015 11:07:25 +0000 (11:07 +0000)]
Merge "Split out codecs from BindingCodecContext"

9 years agoMerge "Fixed incorrect serialization of multiple nested UnionTypes."
Tony Tkacik [Fri, 23 Jan 2015 11:05:43 +0000 (11:05 +0000)]
Merge "Fixed incorrect serialization of multiple nested UnionTypes."

9 years agoBug 1434 - Make arrays non-mutable
Ladislav Borak [Tue, 5 Aug 2014 11:13:58 +0000 (13:13 +0200)]
Bug 1434 - Make arrays non-mutable

- changed getters, if fields return type is array,
  create local copy and send temporary reference
- constructor which has field of type array,
  save this array by temporary reference

Change-Id: Ifd96bd8f16eabec95409675723d5c13684914e16
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoMerge "Bug 2480: Union objects are generated incorrectly when using bits type"
Robert Varga [Fri, 23 Jan 2015 07:09:26 +0000 (07:09 +0000)]
Merge "Bug 2480: Union objects are generated incorrectly when using bits type"

9 years agoSplit out codecs from BindingCodecContext
Robert Varga [Thu, 22 Jan 2015 20:35:23 +0000 (21:35 +0100)]
Split out codecs from BindingCodecContext

Static inner classes reduce code clarity, so split them out before we
start making changes.

Change-Id: Iba235f74ff13f89c21371c913c76bf3a571499a4
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2404: RPC and Notification support for Binding Data Codec"
Robert Varga [Thu, 22 Jan 2015 18:31:33 +0000 (18:31 +0000)]
Merge "Bug 2404: RPC and Notification support for Binding Data Codec"

9 years agoFixed incorrect serialization of multiple nested UnionTypes.
Tomas Cere [Wed, 21 Jan 2015 17:59:05 +0000 (18:59 +0100)]
Fixed incorrect serialization of multiple nested UnionTypes.

Change-Id: I2bf4153fc3b931fd6f80f2683b8abb47a1e12c7b
Signed-off-by: Tomas Cere <tcere@cisco.com>
9 years agoMerge "Improve BaseTemplate speed"
Tony Tkacik [Wed, 21 Jan 2015 14:37:52 +0000 (14:37 +0000)]
Merge "Improve BaseTemplate speed"

9 years agoBUG-2606: add support for removing augmentations
Robert Varga [Mon, 19 Jan 2015 16:15:44 +0000 (17:15 +0100)]
BUG-2606: add support for removing augmentations

This patch adds an explicit removeAugmentation() method to the builder.

Change-Id: I2111da008485512930dc2cfe551a787106c5f599
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-2606: formalize the augmentation removal"
Tony Tkacik [Tue, 20 Jan 2015 09:39:18 +0000 (09:39 +0000)]
Merge "BUG-2606: formalize the augmentation removal"

9 years agoBUG-2606: formalize the augmentation removal
Robert Varga [Mon, 19 Jan 2015 16:11:36 +0000 (17:11 +0100)]
BUG-2606: formalize the augmentation removal

Setting an augmentation to null has the same effect as removing it,
when accessing it via getAugmentation(). Formalize this actually
removing the mapping, which is more space-efficient.

Change-Id: I994b459161d9d374c80a353b82763dfb31faaf3d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2606: Fixed serialization of null augmentations."
Robert Varga [Mon, 19 Jan 2015 16:03:04 +0000 (16:03 +0000)]
Merge "Bug 2606: Fixed serialization of null augmentations."

9 years agoBug 2404: RPC and Notification support for Binding Data Codec
Tony Tkacik [Fri, 19 Dec 2014 15:48:14 +0000 (16:48 +0100)]
Bug 2404: RPC and Notification support for Binding Data Codec

Added support for serialization and deserialization of RPC
and Notification data from Binding representation to Normalized
Representation.

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

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

Added explicit ommision of null augmentations.

Change-Id: Ib16f3a18e6b09ab970dcaef83e3fca4f490c9ec3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoRevert "Added generated convenience setters that take Builder<T>"
Robert Varga [Sat, 17 Jan 2015 10:41:18 +0000 (10:41 +0000)]
Revert "Added generated convenience setters that take Builder<T>"

This reverts commit 0bede1b3a817175f7db70fd5347c08c3f0ff1af1, as it breaks
the controller build. The problem is that it breaks current code which passes
in null argument -- which is ambiguous.

Change-Id: Ie6b8882d7790fc21a6a798f3fa94bca40dc71bd5
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdded generated convenience setters that take Builder<T>
Ed Warnicke [Mon, 12 Jan 2015 01:14:53 +0000 (19:14 -0600)]
Added generated convenience setters that take Builder<T>

Basically, if we previously had

FooBuilder.setBar(Bar value)

we now also have

FooBuilder.setBar(Builder<Bar> value)

That just calls value.build() and calls the original setter.

Change-Id: I99e19f7a8a51af5c4a48ecb8813c6e6202546857
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoImprove BaseTemplate speed
Robert Varga [Fri, 16 Jan 2015 16:53:54 +0000 (17:53 +0100)]
Improve BaseTemplate speed

String processing is sub-optimal in these aspects:
- string-based methods used when character-based ones are available,
- inefficient use of String.replace() for single-character filtering,
- inefficient use of String.replaceAll() where a pre-compiled Pattern
  should be used.
- inefficient use of StringTokenizer where a Splitter can be used

Change-Id: Iee446a4279b9be343891192d93a84a420b32526c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2258: Fixed Type Definition search in runtime generated codecs"
Robert Varga [Fri, 16 Jan 2015 16:40:46 +0000 (16:40 +0000)]
Merge "Bug 2258: Fixed Type Definition search in runtime generated codecs"

9 years agoBug 2480: Union objects are generated incorrectly when using bits type
Martin Ciglan [Wed, 10 Dec 2014 13:29:05 +0000 (14:29 +0100)]
Bug 2480: Union objects are generated incorrectly when using bits type

In case of bits typedef within union, method getValue() returning array
of booleans was missing.

Change-Id: If4b0f98d3889facff819d02f44566e816674528d
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoBug 2258: Fixed Type Definition search in runtime generated codecs
Tony Tkacik [Mon, 27 Oct 2014 13:11:37 +0000 (14:11 +0100)]
Bug 2258: Fixed Type Definition search in runtime generated codecs

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

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

Change-Id: I3860c2f70b5e0ba3d265b7f2b032e89eadaced08
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoAdd marker interface Builder<T> to generated Builders
Ed Warnicke [Mon, 5 Jan 2015 23:02:19 +0000 (17:02 -0600)]
Add marker interface Builder<T> to generated Builders

Change-Id: I6e6e7f33143982e4a719ea6d6399947587a627a3
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2159: fix wrong javadocs
Robert Varga [Thu, 15 Jan 2015 21:36:14 +0000 (22:36 +0100)]
BUG-2159: fix wrong javadocs

Java 8 javadoc generation is a lot stricter than previous versions. This
patch fixes the offenders.

Change-Id: I8a6d7f11a8fb38919d5fa34ab01c3a82849bfa8f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2159: make sure generated comments are Java-8-safe
Robert Varga [Fri, 16 Jan 2015 09:47:52 +0000 (10:47 +0100)]
BUG-2159: make sure generated comments are Java-8-safe

The javadoc generator produced output which was not compliant with
default Java 8 javadoc settings. This patch fixes that.

Change-Id: I102e1398d49042d785ce451846aeebc20d5eed58
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Shift Builder<P> from toInstance() to build()"
Robert Varga [Thu, 15 Jan 2015 19:11:48 +0000 (19:11 +0000)]
Merge "Shift Builder<P> from toInstance() to build()"

9 years agoShift Builder<P> from toInstance() to build()
Ed Warnicke [Mon, 12 Jan 2015 00:25:53 +0000 (18:25 -0600)]
Shift Builder<P> from toInstance() to build()

In order to be able to use Builder<P> as a marker
on generated Builders, it needed to shift to build()

All 'internal' uses for Builder have been changed
to use build().  For things used outside of yangtools,
a depracted toInstance() is maintained on child
interfaces/classes.

Change-Id: I43662296e328133a5b5267be54d407e2ad4b95e8
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoBug 1573: Fixed deserialization of not representable Instance Identifier
Tony Tkacik [Thu, 8 Jan 2015 15:30:59 +0000 (16:30 +0100)]
Bug 1573: Fixed deserialization of not representable Instance Identifier

Not all YangInstanceIdentifier are representable in Binding form,
codecs were designed to handle this and omit such cases,
but one ommision case was missing in deserializing Instance Identifier
without data and this resulted into returning incorrectly
constructed InstanceIdentifier.

Updated test which was testing incorrect behaviour to test correct
behaviour.

Change-Id: I97215f674f7ff164bc2c87d9eef4a254510b0280
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge changes Ic65eb07d,Iab2814f6
Tony Tkacik [Wed, 7 Jan 2015 12:56:50 +0000 (12:56 +0000)]
Merge changes Ic65eb07d,Iab2814f6

* changes:
  BUG-2350: introduce KeyedListNodeCodecContext
  Drop a FIXME for partially-overwritten writes

9 years agoMerge "Fix whitespace in binding-parent"
Tony Tkacik [Wed, 7 Jan 2015 12:54:10 +0000 (12:54 +0000)]
Merge "Fix whitespace in binding-parent"

9 years agoBUG-2350: introduce KeyedListNodeCodecContext
Robert Varga [Thu, 25 Dec 2014 17:53:36 +0000 (18:53 +0100)]
BUG-2350: introduce KeyedListNodeCodecContext

Instead of special-casing calls within ListNodeCodecContext, introduce a
subclass which holds the logic specific to keyed items. Improves memory
overhead very slightly by saving two null fields for unkeyed lists.

Change-Id: Ic65eb07d2ee75c583e39cf458ec7e663dd98d335
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1382: eliminate QName.getPrefix()"
Tony Tkacik [Wed, 7 Jan 2015 09:36:26 +0000 (09:36 +0000)]
Merge "BUG-1382: eliminate QName.getPrefix()"

9 years agoFix whitespace in binding-parent
Robert Varga [Wed, 24 Dec 2014 12:44:54 +0000 (13:44 +0100)]
Fix whitespace in binding-parent

Whitespace should be four spaces, as it is the norm across project.

Change-Id: Iba62064a397cb8b28713eb45eabdd8d1ad5d928e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Update xtend and embed it"
Tony Tkacik [Wed, 7 Jan 2015 09:28:23 +0000 (09:28 +0000)]
Merge "Update xtend and embed it"

9 years agoMerge "BUG-2159: ensure test survies Java 8"
Tony Tkacik [Wed, 7 Jan 2015 09:27:24 +0000 (09:27 +0000)]
Merge "BUG-2159: ensure test survies Java 8"

9 years agoMerge "Use predictable class order"
Tony Tkacik [Wed, 7 Jan 2015 09:23:14 +0000 (09:23 +0000)]
Merge "Use predictable class order"

9 years agoMerge "Add a failure message when compilation test fails"
Tony Tkacik [Wed, 7 Jan 2015 09:22:57 +0000 (09:22 +0000)]
Merge "Add a failure message when compilation test fails"

9 years agoMerge "Limit the references IdentityCodec retains"
Tony Tkacik [Wed, 7 Jan 2015 09:19:53 +0000 (09:19 +0000)]
Merge "Limit the references IdentityCodec retains"

9 years agoMerge "Migrate ClassLoaderUtils user to new package"
Tony Tkacik [Wed, 7 Jan 2015 09:15:20 +0000 (09:15 +0000)]
Merge "Migrate ClassLoaderUtils user to new package"

9 years agoMerge topic 'stable/helium'
Tony Tkacik [Wed, 7 Jan 2015 09:13:09 +0000 (09:13 +0000)]
Merge topic 'stable/helium'

* changes:
  BUG-2350: optimize BindingRuntimeContext.getIdentityClass()
  BUG-2350: optimize SchemaRootCodecContext.getYangIdentifierChild()

9 years agoMerge "Add yang-binding dependency to binding-parent."
Jan Medved [Mon, 5 Jan 2015 20:41:40 +0000 (20:41 +0000)]
Merge "Add yang-binding dependency to binding-parent."

9 years agoBUG-1382: eliminate QName.getPrefix()
Robert Varga [Fri, 31 Oct 2014 10:19:21 +0000 (11:19 +0100)]
BUG-1382: eliminate QName.getPrefix()

QName should not be carrying a prefix entry. Its presence is a
historical leak from yang parser, where it was used as a hack to have aa
QName before a module import was resolved. This is an invalid case, as
an uresolved QName should never be leaked. The parser no longer needs
this and it has been deprecated in the last release -- so prune it.

Change-Id: I467cc9afb65609d160e67d47fa94cd0332b98025
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Remove unused import statements in binding-generator-impl"
Robert Varga [Mon, 5 Jan 2015 19:35:54 +0000 (19:35 +0000)]
Merge "Remove unused import statements in binding-generator-impl"

9 years agoAdd yang-binding dependency to binding-parent.
Ed Warnicke [Mon, 5 Jan 2015 19:24:02 +0000 (13:24 -0600)]
Add yang-binding dependency to binding-parent.

Change-Id: I2324918362b8d66bfc7fc5f49185cd449a10c491
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoMerge "Use profile in binding-parent to not break without src/main/yang"
Jan Medved [Mon, 5 Jan 2015 16:44:03 +0000 (16:44 +0000)]
Merge "Use profile in binding-parent to not break without src/main/yang"

9 years agoUse profile in binding-parent to not break without src/main/yang
Ed Warnicke [Wed, 24 Dec 2014 03:49:43 +0000 (21:49 -0600)]
Use profile in binding-parent to not break without src/main/yang

Whitespace has been fixed to use 4 spaces for indent in keeping
with yangtools convention.

Change-Id: Id6f5d7459590b189086c4cc6046d8c60fafb381e
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoRemove unused import statements in binding-generator-impl
Thanh Ha [Wed, 17 Dec 2014 03:41:34 +0000 (22:41 -0500)]
Remove unused import statements in binding-generator-impl

Change-Id: I094a012432ddb68e75bd6a64dc55c48caa0dcb2b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoUpdate xtend and embed it
Robert Varga [Wed, 24 Dec 2014 13:28:27 +0000 (14:28 +0100)]
Update xtend and embed it

Rather than requiring an osgified version of xtend, let's embed that
dependency. Also upgrade it do 2.7.3 to make things work with Java 8.

Change-Id: I975d9431f3e9bb31a0a364e7b7abfd4155191548
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2159: ensure test survies Java 8
Robert Varga [Wed, 24 Dec 2014 19:14:46 +0000 (20:14 +0100)]
BUG-2159: ensure test survies Java 8

Java 8 has slightly enhanced runtime, which trips the strict checking
done in tests. Fixe them up to pass.

Change-Id: Ia2fcd33c7831d4a1ff7171e6528ee6af5bc22d36
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUse predictable class order
Robert Varga [Wed, 24 Dec 2014 16:00:42 +0000 (17:00 +0100)]
Use predictable class order

HashSet has unpredictable iteration order, potentially causing
non-repeatable tests. Use an ImmutableSet to guard against that.

Change-Id: I1d774df0992ef4fc795558c46ae4e37349693fdf
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdd a failure message when compilation test fails
Robert Varga [Wed, 24 Dec 2014 16:00:14 +0000 (17:00 +0100)]
Add a failure message when compilation test fails

Rather than emitting a cryptic null message, explain that the
compilation failed. The compiler emits errors by default, so it still is
diagnosable.

Change-Id: I32bfddef0c30cca96d225702a516b30c4e4d7040
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2350: optimize BindingRuntimeContext.getIdentityClass()
Robert Varga [Sat, 20 Dec 2014 23:47:12 +0000 (00:47 +0100)]
BUG-2350: optimize BindingRuntimeContext.getIdentityClass()

BGP traces show this method can take upto 35% of CPU time in some use
cases. Instantiate a LoadingCache to bypass the cost of loading a class.

Change-Id: Iaa49dae655f3987add427e2d9da303b2278f00cb
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2350: optimize SchemaRootCodecContext.getYangIdentifierChild()
Robert Varga [Sat, 20 Dec 2014 23:15:39 +0000 (00:15 +0100)]
BUG-2350: optimize SchemaRootCodecContext.getYangIdentifierChild()

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

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

Change-Id: I45c3f4acd67d85da30f26b71f73226a5beaf2876
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoIntroducing binding-parent
Ed Warnicke [Sun, 21 Dec 2014 17:00:16 +0000 (11:00 -0600)]
Introducing binding-parent

Change-Id: Ib10d4505ea3fe3238d029da3aebdabd9d3241397
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoLimit the references IdentityCodec retains
Robert Varga [Sat, 20 Dec 2014 23:33:31 +0000 (00:33 +0100)]
Limit the references IdentityCodec retains

IdentityCodec does not really need the codec context -- the runtime
context is enough.

Change-Id: I9dcef7e64f326491030b969b53d7b3c61d0bcd04
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMigrate ClassLoaderUtils user to new package
Robert Varga [Sat, 20 Dec 2014 23:26:22 +0000 (00:26 +0100)]
Migrate ClassLoaderUtils user to new package

ClassLoaderUtils was moved to org.opendaylight.yangtools.util.
Functionality was retained.

Change-Id: I1405cd3be9a2a8aa295eeb20e0d7bd661fe0a82c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Cleanup binding proxy instantiation"
Tony Tkacik [Fri, 19 Dec 2014 15:41:44 +0000 (15:41 +0000)]
Merge "Cleanup binding proxy instantiation"

9 years agoCleanup binding proxy instantiation
Robert Varga [Fri, 19 Dec 2014 14:04:34 +0000 (15:04 +0100)]
Cleanup binding proxy instantiation

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

Change-Id: Icb76f232df8223925fa802859313bbf63ee58eeb
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Clarify NotificationListener purpose"
Tony Tkacik [Fri, 19 Dec 2014 08:59:22 +0000 (08:59 +0000)]
Merge "Clarify NotificationListener purpose"

9 years agoMerge "Fix checkstyle if-statements must use braces in binding-generator"
Tony Tkacik [Mon, 15 Dec 2014 08:47:49 +0000 (08:47 +0000)]
Merge "Fix checkstyle if-statements must use braces in binding-generator"

9 years agoFix checkstyle if-statements must use braces in binding-generator
Thanh Ha [Sun, 14 Dec 2014 16:38:03 +0000 (11:38 -0500)]
Fix checkstyle if-statements must use braces in binding-generator

Change-Id: I929ee367d7263ba22eecd788d39688fd719bfd6b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoMerge "BUG-1914: bump API requirement"
Tony Tkacik [Wed, 10 Dec 2014 15:33:45 +0000 (15:33 +0000)]
Merge "BUG-1914: bump API requirement"

9 years agoMerge "BUG-2498: optimize enum's forValue() method"
Tony Tkacik [Wed, 10 Dec 2014 15:33:31 +0000 (15:33 +0000)]
Merge "BUG-2498: optimize enum's forValue() method"

9 years agoBUG-2498: optimize enum's forValue() method
Robert Varga [Wed, 10 Dec 2014 11:12:13 +0000 (12:12 +0100)]
BUG-2498: optimize enum's forValue() method

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

Change-Id: I01591e56646705891fcc3fb8b871071169d35093
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1914: bump API requirement
Robert Varga [Thu, 9 Oct 2014 23:45:55 +0000 (01:45 +0200)]
BUG-1914: bump API requirement

This bumps the required maven API version 3.1.1 and removes the manual
override needed with previous versions.

Change-Id: If3b85169dccc9583ee93114c2b0c4f3fc9e17eb2
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoClarify NotificationListener purpose
Robert Varga [Mon, 8 Dec 2014 13:02:51 +0000 (14:02 +0100)]
Clarify NotificationListener purpose

This adds a comment about what the intended use of NotificationListener.

Change-Id: I84116fda4f7f68d63e8ad0e97365087df01b564a
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Remove xtend plugin binding-data-codec"
Tony Tkacik [Wed, 3 Dec 2014 10:26:58 +0000 (10:26 +0000)]
Merge "Remove xtend plugin binding-data-codec"

9 years agoDo not use deprecated ClassLoaderUtils
Robert Varga [Mon, 1 Dec 2014 17:47:16 +0000 (18:47 +0100)]
Do not use deprecated ClassLoaderUtils

Migrates to the class provided from the util package instead.

Change-Id: I988c4cc0d04062780ebd842ab596604b0c7cf287
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove PropertyPair
Robert Varga [Mon, 1 Dec 2014 17:23:03 +0000 (18:23 +0100)]
Remove PropertyPair

This holder is unused, so remove it, reducing clutter.

Change-Id: Ib808582faf11cfa9937e76a7d025ed2a66a5becf
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove xtend plugin binding-data-codec
Robert Varga [Mon, 1 Dec 2014 16:57:54 +0000 (17:57 +0100)]
Remove xtend plugin binding-data-codec

The code does not use it, so save some time by not invoking it at all.

Change-Id: I633516da5cb152ea6c253a276d369bef002744ec
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Allow {Class,Method}Generator.process() to throw CannotCompileException"
Tony Tkacik [Mon, 1 Dec 2014 10:52:38 +0000 (10:52 +0000)]
Merge "Allow {Class,Method}Generator.process() to throw CannotCompileException"

9 years agoMerge "Bug 2271 - NPE during generation of java binding for case list-grouping-choice"
Tony Tkacik [Mon, 1 Dec 2014 08:32:39 +0000 (08:32 +0000)]
Merge "Bug 2271 - NPE during generation of java binding for case list-grouping-choice"

9 years agoAllow {Class,Method}Generator.process() to throw CannotCompileException
Robert Varga [Fri, 28 Nov 2014 07:08:42 +0000 (08:08 +0100)]
Allow {Class,Method}Generator.process() to throw CannotCompileException

This exception is naturally thrown by Javassist, so allowing our users
to not encapsulate it is a Good Thing.

Change-Id: Ibc558501e799a2c4c6599d6d7c5da668335c7270
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2271 - NPE during generation of java binding for case list-grouping-choice
pkajsa [Thu, 6 Nov 2014 12:24:25 +0000 (13:24 +0100)]
Bug 2271 - NPE during generation of java binding for case list-grouping-choice

The SchemaContextUtil class does not find some types of schema elements nested
in other elements (e.g. groupings in groupings - Bug 2117, groupings in lists,
groupings in Rpcs, groupings in rpc outputs and inputs, groupings in
notifications etc...). Therefore complete rework of findNodeInModule and
related methods has been performed. This version of patch set (i.e. 5) works
also with yang modules containing siblings with the same name.

Change-Id: Ia5f9d437c05ace6d94999eac17308a756c439f82
Signed-off-by: pkajsa <pkajsa@cisco.com>
9 years agoResolved some sonar issues: Hide Utility Class Constructor
Ladislav Borak [Mon, 13 Oct 2014 18:12:49 +0000 (20:12 +0200)]
Resolved some sonar issues: Hide Utility Class Constructor

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

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

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

9 years agoMerge "Bug 2157 - Race condition when adding a RPC implementation with an output"
Tony Tkacik [Thu, 20 Nov 2014 08:51:58 +0000 (08:51 +0000)]
Merge "Bug 2157 - Race condition when adding a RPC implementation with an output"

9 years agoMerge "Improve InstanceIdentifier.keyOf()"
Tony Tkacik [Thu, 20 Nov 2014 08:44:04 +0000 (08:44 +0000)]
Merge "Improve InstanceIdentifier.keyOf()"

9 years agoImprove InstanceIdentifier.keyOf()
Robert Varga [Wed, 19 Nov 2014 17:04:10 +0000 (18:04 +0100)]
Improve InstanceIdentifier.keyOf()

Rather than throwing a ClassCastException, this documents that the
keyOf() method can throw an IllegalArgumentException.

Change-Id: I5d5b9e10c7329c6bc909b28b07c7bc6500cfcd5a
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2157 - Race condition when adding a RPC implementation with an
Jan Hajnar [Wed, 12 Nov 2014 09:21:03 +0000 (10:21 +0100)]
Bug 2157 - Race condition when adding a RPC implementation with an
output

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

Change-Id: I2baa71f4237a1125db9a6e5ec8077237dc8ef544
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoMerge "ISIS Yang model compilation issue"
Robert Varga [Mon, 10 Nov 2014 22:05:29 +0000 (22:05 +0000)]
Merge "ISIS Yang model compilation issue"

9 years agoISIS Yang model compilation issue
Reinaldo Penno [Thu, 6 Nov 2014 06:30:45 +0000 (22:30 -0800)]
ISIS Yang model compilation issue

Change-Id: Ib4bc98ad68237ebea4eccf5522dfd79db88a7906
Signed-off-by: Reinaldo Penno <rapenno@gmail.com>
9 years agoEliminate warnings
Robert Varga [Fri, 31 Oct 2014 14:01:52 +0000 (15:01 +0100)]
Eliminate warnings

- unused imports
- unused warning suppression
- legacy class usage

Change-Id: Ibcd4debf265c04ad45846ba087a2400376e6e08c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 584: Increate test coverage in binding-generator-util"
Tony Tkacik [Wed, 29 Oct 2014 12:06:02 +0000 (12:06 +0000)]
Merge "Bug 584: Increate test coverage in binding-generator-util"

9 years agoBug 584: Increate test coverage in binding-generator-util
Ladislav Borak [Tue, 23 Sep 2014 06:30:26 +0000 (08:30 +0200)]
Bug 584: Increate test coverage in binding-generator-util

Change-Id: I3b6d4b5d579b77b89fc6acf058c5bce277609027
Signed-off-by: Ladislav Borak <lborak@cisco.com>