mdsal.git
9 years agoFix constant names
Robert Varga [Sat, 11 Apr 2015 15:03:58 +0000 (17:03 +0200)]
Fix constant names

Constants should have capitalized names. Fixes a few sonar warnings.

Change-Id: I600b482a817055784874e91f9cb8c5b06b948302
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Make sure LOOKUP is a proper constant"
Tony Tkacik [Thu, 9 Apr 2015 12:33:42 +0000 (12:33 +0000)]
Merge "Make sure LOOKUP is a proper constant"

9 years agoMerge "Fix modifier ordering"
Tony Tkacik [Thu, 9 Apr 2015 12:32:56 +0000 (12:32 +0000)]
Merge "Fix modifier ordering"

9 years agoMake sure LOOKUP is a proper constant
Robert Varga [Thu, 9 Apr 2015 11:23:22 +0000 (13:23 +0200)]
Make sure LOOKUP is a proper constant

Change-Id: I684ead0df12bdc5c012f8a20e04f4508c5bbb429
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix modifier ordering
Robert Varga [Thu, 9 Apr 2015 11:11:05 +0000 (13:11 +0200)]
Fix modifier ordering

JLS specifies annotations need to to come before other modifiers, of
which visbility should be first.

Change-Id: I754ef08c13256647d024c121e75fd3617ef6d064
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Fixed incorrect signature in NotificationListenerInvoker"
Robert Varga [Wed, 8 Apr 2015 22:55:45 +0000 (22:55 +0000)]
Merge "Fixed incorrect signature in NotificationListenerInvoker"

9 years agoFixed incorrect signature in NotificationListenerInvoker
Tony Tkacik [Wed, 8 Apr 2015 17:42:29 +0000 (19:42 +0200)]
Fixed incorrect signature in NotificationListenerInvoker

Change-Id: I01e54f6193e54b1488a506ae47d24ba8c808281a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Fixed NPE in BindingCodecTree#getSubtreeCodec(YangInstanceIdentifier)"
Robert Varga [Thu, 2 Apr 2015 14:21:46 +0000 (14:21 +0000)]
Merge "Fixed NPE in BindingCodecTree#getSubtreeCodec(YangInstanceIdentifier)"

9 years agoFixed NPE in BindingCodecTree#getSubtreeCodec(YangInstanceIdentifier)
Tony Tkacik [Thu, 2 Apr 2015 13:35:03 +0000 (15:35 +0200)]
Fixed NPE in BindingCodecTree#getSubtreeCodec(YangInstanceIdentifier)

Change-Id: If77807004779ce6ade106f1bacc9918f98f996ee
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-869: kill more sonar warnings
Robert Varga [Tue, 31 Mar 2015 21:11:08 +0000 (23:11 +0200)]
BUG-869: kill more sonar warnings

Empty statement, mis-ordered annotations and keywords, unneeded
keywords.

Change-Id: I88a7ba62b5fe22cda96a1b5243a2ae4968c31ab3
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-869: remove public modifier
Robert Varga [Tue, 31 Mar 2015 20:55:31 +0000 (22:55 +0200)]
BUG-869: remove public modifier

Public is implied for all methods in an interface, do not specify it
explicitly.

Change-Id: Ic673b60111f9ecf62a6242d3bedf8607036a3403
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2924: DataCodecTree expose (de)serialization methods for path arguments."
Robert Varga [Tue, 31 Mar 2015 11:19:49 +0000 (11:19 +0000)]
Merge "Bug 2924: DataCodecTree expose (de)serialization methods for path arguments."

9 years agoBug 2924: DataCodecTree expose (de)serialization methods for path arguments.
Tony Tkacik [Tue, 31 Mar 2015 08:39:37 +0000 (10:39 +0200)]
Bug 2924: DataCodecTree expose (de)serialization methods for path arguments.

Change-Id: I21129df70829a6b9a35af8350352907d46d27de2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-869: remove unused assignment
Robert Varga [Mon, 30 Mar 2015 15:34:59 +0000 (17:34 +0200)]
BUG-869: remove unused assignment

This assignment in return does not make sense, remove it.

Change-Id: Ie999973df471af9f5364ddf2154a24ce237278dc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-869: do not use StringBuffer
Robert Varga [Mon, 30 Mar 2015 15:33:17 +0000 (17:33 +0200)]
BUG-869: do not use StringBuffer

StringBuilder is the right one, so let's use that one.

Change-Id: Ic84383c05c3cd6bb0eacf9df0bbb3ed9ae46ee3f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-869: remove public modifier
Robert Varga [Mon, 30 Mar 2015 15:23:40 +0000 (17:23 +0200)]
BUG-869: remove public modifier

public is implied to all identifiers within the enclosing interface.

Change-Id: I43a50c7d51b73074df6d0456cf0d9d9aab24b819
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-869: remove empty statements
Robert Varga [Mon, 30 Mar 2015 15:13:29 +0000 (17:13 +0200)]
BUG-869: remove empty statements

Sonar warnings point to semicolons after method definitions and ;;.
Remove all instances.

Change-Id: I1ba067720abd4c9df3a0c457b947736c9bc6313e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2906 - Added support of entering notification by #streamChild()"
Robert Varga [Fri, 27 Mar 2015 10:52:48 +0000 (10:52 +0000)]
Merge "Bug 2906 - Added support of entering notification by #streamChild()"

9 years agoBug 2906 - Added support of entering notification by #streamChild()
Tony Tkacik [Fri, 27 Mar 2015 10:04:50 +0000 (11:04 +0100)]
Bug 2906 - Added support of entering notification by #streamChild()

Root Tree Node context did not allowed to enter notification
using binding classes by #streamChild method, since
notifications were cached in different collection.

Added support for entering notifications using such method.

Change-Id: I28779e763a81519d25d71e319776cdc6f179ef33
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoCleanup checkstyle warnings
Robert Varga [Wed, 25 Mar 2015 07:01:57 +0000 (08:01 +0100)]
Cleanup checkstyle warnings

We have various reported problems, from missing spaces, javadocs to
undocumented classes and parameters.

Change-Id: I38a15258ea5ba8eb8d97f257a36a4d890165b5a0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoextended test coverage of InstanceIdentifier
Kinsey Nietzsche [Wed, 12 Nov 2014 13:47:30 +0000 (14:47 +0100)]
extended test coverage of InstanceIdentifier

Change-Id: Id18ae2ec969612e6c52a19449453f47e4e7e5fff
Signed-off-by: Kinsey Nietzsche <kinsey.nietzsche@pantheon.sk>
9 years agoMerge "Bug 868: Removed Binding to Composite Node codecs."
Robert Varga [Fri, 20 Mar 2015 07:17:23 +0000 (07:17 +0000)]
Merge "Bug 868: Removed Binding to Composite Node codecs."

9 years agoBug 868: Removed Binding to Composite Node codecs.
Tony Tkacik [Thu, 19 Mar 2015 14:29:06 +0000 (15:29 +0100)]
Bug 868: Removed Binding to Composite Node codecs.

Change-Id: Ia54519c88870fada74bd2d7ce579c0e77d687157
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG 2868: Update iana-if-type with RFC 7224
Vishal Thapar [Wed, 18 Mar 2015 13:49:13 +0000 (19:19 +0530)]
BUG 2868: Update iana-if-type with RFC 7224

Change-Id: Ide79db6c34fb23bd2c773a614c35d1e436b7d237
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
9 years agoMerge "Bug 2857: Tied pre-existing implementation to BindingCodecTree."
Robert Varga [Wed, 18 Mar 2015 09:34:56 +0000 (09:34 +0000)]
Merge "Bug 2857: Tied pre-existing implementation to BindingCodecTree."

9 years agoBug 2857: Tied pre-existing implementation to BindingCodecTree.
Tony Tkacik [Thu, 12 Mar 2015 11:06:00 +0000 (12:06 +0100)]
Bug 2857: Tied pre-existing implementation to BindingCodecTree.

BindingCodecTree provides public view into backing structure
of binding-data-codec, which was designed and already implemented
as data tree.

By exposing these power-users could build their own
Binding to DOM adapters, where they could customize some aspects
of serialization or precache over-used codecs in order
to speed up performance.

Change-Id: I827eb6014b28d0b6d4256b677ee56d3081ff80b0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 2859: Key generation when anonymous Enum was used.
Tony Tkacik [Mon, 16 Mar 2015 13:31:50 +0000 (14:31 +0100)]
Bug 2859: Key generation when anonymous Enum was used.

Binding list key was generated with incorrect type,
when anonymous enumeration was defined in leaf in grouping
and that leaf was used for list.

Change-Id: Idcb114be49280f77af8054d8d83c5d8e6f453665
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Migrate from BindingGeneratorUtil"
Tony Tkacik [Mon, 16 Mar 2015 07:28:07 +0000 (07:28 +0000)]
Merge "Migrate from BindingGeneratorUtil"

9 years agoMerge "BUG-2829: make static QName field hold a cached reference"
Tony Tkacik [Mon, 16 Mar 2015 07:13:14 +0000 (07:13 +0000)]
Merge "BUG-2829: make static QName field hold a cached reference"

9 years agoAdd ietf-interfaces to model.
Deepthi V V [Tue, 10 Mar 2015 10:46:23 +0000 (16:16 +0530)]
Add ietf-interfaces to model.

ietf-interfaces is a standard ietf yang model. This will be used by
vpnservice project.

Signed-off-by: Deepthi V V <deepthi.v.v@ericsson.com>
Change-Id: I787e945a39417cc85c79b11cb28264b82cd168e6
Signed-off-by: Deepthi V V <deepthi.v.v@ericsson.com>
9 years agoMigrate from BindingGeneratorUtil
Robert Varga [Thu, 12 Mar 2015 22:50:52 +0000 (23:50 +0100)]
Migrate from BindingGeneratorUtil

BindingMapping is the new home for mapping module namespaces to java
package names.

Change-Id: I61ecf91c2ffa78a6e62c00feaf5fd7879dd89cf9
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2287 - TypeProviderImpl retains empty HashMaps
Ladislav Borak [Tue, 9 Dec 2014 11:32:24 +0000 (12:32 +0100)]
Bug 2287 - TypeProviderImpl retains empty HashMaps

Allocating default HashMaps is wasteful, especially if we end up not
storing anything in them. This fixes that case by making sure we
allocate a map only after we are sure we are going to put something into
it. Also be conservative about the size, so we do not waste too much
space.

Change-Id: I85ad1506e732a5c3728ef3529e7e0b5b430d758a
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2829: make static QName field hold a cached reference
Robert Varga [Thu, 12 Mar 2015 19:49:11 +0000 (20:49 +0100)]
BUG-2829: make static QName field hold a cached reference

A QName (and QNameModule) exposes an API to obtain a system-wide
shared reference to an object. Use this facility to share QNameModules
across all generated classes, as well as sharing potentially duplicate
QNames.

Change-Id: Icfd0c48edbd37e54be1a436480d5808d4efaf29d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Eliminate all trailing whitespace in xtend"
Tony Tkacik [Thu, 12 Mar 2015 17:10:46 +0000 (17:10 +0000)]
Merge "Eliminate all trailing whitespace in xtend"

9 years agoMerge "Make sure we do not generate trailing whitespace"
Tony Tkacik [Thu, 12 Mar 2015 17:10:41 +0000 (17:10 +0000)]
Merge "Make sure we do not generate trailing whitespace"

9 years agoEliminate all trailing whitespace in xtend
Robert Varga [Thu, 12 Mar 2015 16:44:31 +0000 (17:44 +0100)]
Eliminate all trailing whitespace in xtend

The API generator output should not contain trailing whitespace --
cleanup the templates to make sure we do not pollute output.

Change-Id: Ia312d1e2a0218a51eac42a62446bb6af63d69ee6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMake sure we do not generate trailing whitespace
Robert Varga [Thu, 12 Mar 2015 16:42:08 +0000 (17:42 +0100)]
Make sure we do not generate trailing whitespace

If we get an empy line in description, it is possible for us to generate
trailing whitespace. Make sure we don't do that and also clean any
trailing whitespace from the source file itself.

Change-Id: I8ea20c92cce5a6dccc1c107af97b959af4264f84
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2248 - mvn clean install is failing due to checkstyle"
Robert Varga [Thu, 12 Mar 2015 14:50:26 +0000 (14:50 +0000)]
Merge "Bug 2248 - mvn clean install is failing due to checkstyle"

9 years agoMerge "Fixed generation of UnionBuilders for anonymous unions."
Robert Varga [Thu, 12 Mar 2015 14:47:15 +0000 (14:47 +0000)]
Merge "Fixed generation of UnionBuilders for anonymous unions."

9 years agoIntroduction of more powerful binding codec APIs
Tony Tkacik [Tue, 3 Mar 2015 11:06:31 +0000 (12:06 +0100)]
Introduction of more powerful binding codec APIs

Introduces new more expresive APIs, which allows
user to customize serialization / deserialization.

Introduced new concepts:

 - Subtree codecs
    - Tree and cursor based APIs for locating subtree
 - Caching Codec - codec which uses cache for serialization

Change-Id: If4868c9cd20c56d2ce0498bd2ded90b1265f7b67
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoFixed generation of UnionBuilders for anonymous unions.
Tony Tkacik [Thu, 12 Mar 2015 13:27:22 +0000 (14:27 +0100)]
Fixed generation of UnionBuilders for anonymous unions.

Change-Id: I18e90e7d7227efe31767734df1ce525df60104d5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 2248 - mvn clean install is failing due to checkstyle
Ladislav Borak [Thu, 11 Dec 2014 12:07:59 +0000 (13:07 +0100)]
Bug 2248 - mvn clean install is failing due to checkstyle

- added check in BaseTemplate.imports() if imported type has same package
  as generated type

Change-Id: Ifefb4be88c145aa222541cbb901aa9cab63b510d
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoBUG-1513: introduce ChoiceSchemaNode
Robert Varga [Tue, 10 Mar 2015 12:03:32 +0000 (13:03 +0100)]
BUG-1513: introduce ChoiceSchemaNode

This introduces the alternative name, which does not clash with
yang-data-api. Also deprecated ChoiceNode.

Change-Id: I42e93c45804dc8e3952d08c697f772d776c303c3
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Fix a generic warning"
Tony Tkacik [Tue, 10 Mar 2015 15:27:24 +0000 (15:27 +0000)]
Merge "Fix a generic warning"

9 years agoFix a generic warning
Robert Varga [Tue, 10 Mar 2015 14:47:32 +0000 (15:47 +0100)]
Fix a generic warning

Add generic arguments to fix a warning.

Change-Id: I249258370efe32d26189cf236818c483b8f0d915
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoIntroduced MethodHandle based invokers for Notification and RPCs
Tony Tkacik [Thu, 5 Mar 2015 21:04:43 +0000 (22:04 +0100)]
Introduced MethodHandle based invokers for Notification and RPCs

This invokers are used to provide genereralized access to any
generated callback / rpc method using one approach for
any RPC.

Change-Id: I4d6ce7c71f658b5e2c6e805479aa47a8f09fb989
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Remove unnecessary casts"
Tony Tkacik [Sun, 8 Mar 2015 10:37:07 +0000 (10:37 +0000)]
Merge "Remove unnecessary casts"

9 years agoMerge "Remove unnecessary casts"
Tony Tkacik [Sun, 8 Mar 2015 10:36:48 +0000 (10:36 +0000)]
Merge "Remove unnecessary casts"

9 years agoMerge "Remove unnecessary casts"
Tony Tkacik [Sun, 8 Mar 2015 10:36:37 +0000 (10:36 +0000)]
Merge "Remove unnecessary casts"

9 years agoMerge "Do not rely on transitive dependencies"
Tony Tkacik [Sun, 8 Mar 2015 10:36:28 +0000 (10:36 +0000)]
Merge "Do not rely on transitive dependencies"

9 years agoRemove unnecessary casts
Robert Varga [Thu, 5 Mar 2015 13:30:24 +0000 (14:30 +0100)]
Remove unnecessary casts

xtend 2.7.x makes instanceof check an implicit cast for subsequent
variable usage, so these generate warnings. Also remove use of
deprecated types and speed up stringuilder usage by passing characters
instead of strings where possible.

Change-Id: I3131166a2fedf09743e6baf4159ba15357a37993
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unnecessary casts
Robert Varga [Thu, 5 Mar 2015 13:30:02 +0000 (14:30 +0100)]
Remove unnecessary casts

xtend 2.7.x makes instanceof check an implicit cast for subsequent
variable usage, so these generate warnings.

Change-Id: I88f7b68cd2fdddf0bb39c2bbc8f2c8533de22006
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unnecessary casts
Robert Varga [Thu, 5 Mar 2015 13:28:51 +0000 (14:28 +0100)]
Remove unnecessary casts

xtend 2.7.x makes instanceof check an implicit cast for subsequent
variable usage, so these generate warnings.

Change-Id: Ic28a868eeef8167a1f7e8b3946c2ea13526818dc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not rely on transitive dependencies
Robert Varga [Thu, 5 Mar 2015 13:00:23 +0000 (14:00 +0100)]
Do not rely on transitive dependencies

Maven core and build API should have scope=provided.

Change-Id: Id34b075fb92247507a61b79daee6c4ab73647f53
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUse Collection.size() instead of Iterables.size()
Robert Varga [Sat, 28 Feb 2015 21:03:00 +0000 (22:03 +0100)]
Use Collection.size() instead of Iterables.size()

Now that NormalizedNodeContainer returns a Collection of children, we
can use its size() method directly, speeding things up just a little
bit.

Change-Id: I7b336d0029084140ea853716a38f8abb87da7c26
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2539: Properly report incorrect Instance Identifiers"
Tony Tkacik [Thu, 26 Feb 2015 15:36:36 +0000 (15:36 +0000)]
Merge "Bug 2539: Properly report incorrect Instance Identifiers"

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

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

Change-Id: Ia47c83925a18f029c70b2816e2fcb58632027e3c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge changes I4f081454,Ibe6f283d,I83acfee3,If7a08ff1,Ia0f847dd, ...
Tony Tkacik [Thu, 26 Feb 2015 08:29:44 +0000 (08:29 +0000)]
Merge changes I4f081454,Ibe6f283d,I83acfee3,If7a08ff1,Ia0f847dd, ...

* changes:
  Spellcheck AugmentableDataNodeContainerEmitterSource
  Use simple string concat in DataObjectSerializerSource
  Fix BindingNormalizedNodeCodecRegistry thread safety
  Compact BitsCodec
  Do not declare Exception as thrown
  DataContainerCodecPrototype should be final
  Fix code alignment

9 years agoSpellcheck AugmentableDataNodeContainerEmitterSource
Robert Varga [Wed, 25 Feb 2015 22:34:26 +0000 (23:34 +0100)]
Spellcheck AugmentableDataNodeContainerEmitterSource

Simple rename of an internal class to fix a typo.

Change-Id: I4f081454b5612d2960ff85158ca5cdf2adf17519
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUse simple string concat in DataObjectSerializerSource
Robert Varga [Wed, 25 Feb 2015 22:32:40 +0000 (23:32 +0100)]
Use simple string concat in DataObjectSerializerSource

Allocating a default-sized StringBuilder is not optimal, we'd really
want to preallocate it with the initial string, at which point it
becomes not much more than a simple concat.

Change-Id: Ibe6f283dccebb347982561c4acacf615a8fff4cf
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix BindingNormalizedNodeCodecRegistry thread safety
Robert Varga [Wed, 25 Feb 2015 16:16:36 +0000 (17:16 +0100)]
Fix BindingNormalizedNodeCodecRegistry thread safety

Registry has a codecContext, which can be asynchronously updated. Make
sure it is volatile, so that any changes are guaranteed to propagate.

Change-Id: I83acfee3bb5f3bf3de6873161dd491e7d5882988
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoCompact BitsCodec
Robert Varga [Wed, 25 Feb 2015 16:19:56 +0000 (17:19 +0100)]
Compact BitsCodec

Instead of an if/else block, just use the result and store it directly
into array.

Change-Id: If7a08ff1a644b8bfbf023d8e5393896eb4e9b643
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not declare Exception as thrown
Robert Varga [Wed, 25 Feb 2015 16:28:42 +0000 (17:28 +0100)]
Do not declare Exception as thrown

This Callable never throws, so do not declare the exception, fixing a
sonar warning.

Change-Id: Ia0f847dd31ebc09d91993ded5e5bb2fc6486b7d6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDataContainerCodecPrototype should be final
Robert Varga [Wed, 25 Feb 2015 16:19:01 +0000 (17:19 +0100)]
DataContainerCodecPrototype should be final

Let's help the runtime by declaring the class final, as it is
package-private and does not have descendants.

Change-Id: I8d994dc307c0d831b92a95775fd21e39f3ef1fd0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix code alignment
Robert Varga [Wed, 25 Feb 2015 16:18:13 +0000 (17:18 +0100)]
Fix code alignment

Declaration and comment missed one leading space, fix that.

Change-Id: I198a96668ec0ad94b1b1118949988e88321f8b43
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMark classes/fields as final
Robert Varga [Wed, 25 Feb 2015 13:43:26 +0000 (14:43 +0100)]
Mark classes/fields as final

Making sure that we follow coding patterns, will actually improve what
the JIT can do for us.

Change-Id: I125a6c058ea603d2e9545c42ff8ab969372c371d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoSkip ArrayList instantiation during deserialization
Robert Varga [Wed, 25 Feb 2015 11:24:36 +0000 (12:24 +0100)]
Skip ArrayList instantiation during deserialization

We use the ArrayList just as an index holder, after which we just
extract the underlying array. The libraries by default perform a copy
and then JIT has to prove what is going on to remove that overhead.

Let's make it super-easy instead by filling the array ourselves.

Change-Id: Ib48992538b3cd8a9a0c11011fe444e24b23dc825
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2689: Cast exception when serializing L3Address from groupbasedpolicy policy...
Martin Ciglan [Fri, 20 Feb 2015 15:10:15 +0000 (16:10 +0100)]
BUG-2689: Cast exception when serializing L3Address from groupbasedpolicy policy.yang

When deserializing L3AddressKey, alphabetical order of key arguments
didn't match with order of related QNames as defined in yang model.

The binding-independent world retains the ordering specified in model,
while the binding-aware world requires constructor arguments to be
alpha-sorted.

Change-Id: Icb277fed97d0984ca1a60aa7add7817db727facc
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Fix supporting-node in topology model so it can actually be used."
Robert Varga [Wed, 25 Feb 2015 06:07:52 +0000 (06:07 +0000)]
Merge "Fix supporting-node in topology model so it can actually be used."

9 years agoFix supporting-node in topology model so it can actually be used.
Ed Warnicke [Wed, 18 Feb 2015 19:09:39 +0000 (12:09 -0700)]
Fix supporting-node in topology model so it can actually be used.

supporting-node in the topology model *only* has a node-ref
The node-ref is a leafref, which only provides the node-id
for the node.  Since we have no notion of what topology the supporting node
is in, we can't find it.

Change-Id: Ibc5829a45d97bb5a95abee07b397447a4cd509e0
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoBUG-2179: split logging out of CodeGenerator
Robert Varga [Mon, 16 Feb 2015 22:10:12 +0000 (23:10 +0100)]
BUG-2179: split logging out of CodeGenerator

Currently SPI requires downstream users to import maven infrastructure
even if they are not using it. Split the two maven-related injection
methods into dedicated interfaces.

MavenLogAware is automatically deprecated, as maven 3.1+ works with
slf4j out of the box, hence Log injection is no longer needed.

Change-Id: Ibedc158d9bdbcf66c2df94fd578929729fa26821
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2179: remove plexus-slf4j-logging
Robert Varga [Mon, 16 Feb 2015 21:46:01 +0000 (22:46 +0100)]
BUG-2179: remove plexus-slf4j-logging

Maven 3.1.1 already supports slf4j as its native logging API, no need to
pull in the bridge.

Change-Id: Ia436a7e806aba46290c46d8389eb8d017b78f512
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Update Objects->MoreObjects"
Tony Tkacik [Mon, 16 Feb 2015 14:55:57 +0000 (14:55 +0000)]
Merge "Update Objects->MoreObjects"

9 years agoUpdate Objects->MoreObjects
Robert Varga [Sat, 14 Feb 2015 20:34:11 +0000 (21:34 +0100)]
Update Objects->MoreObjects

Guava 18 introduces MoreObjects so it does not clash on naming with
Java7 or later. Also migrate Objects.equal() to Objects.equals().

Change-Id: I467c27b4f3a25c98df68facd9f9a566126c99096
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMark yang generated source location as a source directory.
Nathan Harmon [Mon, 9 Feb 2015 21:19:39 +0000 (13:19 -0800)]
Mark yang generated source location as a source directory.

Change-Id: I958affa226e9e34a795ffea42450976ca9ef4697
Signed-off-by: Nathan Harmon <nathan.harmon@hp.com>
9 years agoMake dependencyManagement mandatory
Robert Varga [Tue, 10 Feb 2015 07:09:02 +0000 (08:09 +0100)]
Make dependencyManagement mandatory

Activating on existence of src/main/yang leads to different things being
defined when this pom is used in build vs. offlne.

Change-Id: I86cf9b2e9fc77fcad1c3868137eec5082766ae90
Signed-off-by: Robert Varga <rovarga@cisco.com>
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>