Tony Tkacik [Wed, 7 Jan 2015 09:36:26 +0000 (09:36 +0000)]
Merge "BUG-1382: eliminate QName.getPrefix()"
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>
Tony Tkacik [Wed, 7 Jan 2015 09:28:23 +0000 (09:28 +0000)]
Merge "Update xtend and embed it"
Tony Tkacik [Wed, 7 Jan 2015 09:27:24 +0000 (09:27 +0000)]
Merge "BUG-2159: ensure test survies Java 8"
Tony Tkacik [Wed, 7 Jan 2015 09:23:14 +0000 (09:23 +0000)]
Merge "Use predictable class order"
Tony Tkacik [Wed, 7 Jan 2015 09:22:57 +0000 (09:22 +0000)]
Merge "Add a failure message when compilation test fails"
Tony Tkacik [Wed, 7 Jan 2015 09:19:53 +0000 (09:19 +0000)]
Merge "Limit the references IdentityCodec retains"
Tony Tkacik [Wed, 7 Jan 2015 09:15:20 +0000 (09:15 +0000)]
Merge "Migrate ClassLoaderUtils user to new package"
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()
Jan Medved [Mon, 5 Jan 2015 20:41:40 +0000 (20:41 +0000)]
Merge "Add yang-binding dependency to binding-parent."
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>
Robert Varga [Mon, 5 Jan 2015 19:35:54 +0000 (19:35 +0000)]
Merge "Remove unused import statements in binding-generator-impl"
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>
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"
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Tony Tkacik [Fri, 19 Dec 2014 15:41:44 +0000 (15:41 +0000)]
Merge "Cleanup 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>
Tony Tkacik [Fri, 19 Dec 2014 08:59:22 +0000 (08:59 +0000)]
Merge "Clarify NotificationListener purpose"
Tony Tkacik [Mon, 15 Dec 2014 08:47:49 +0000 (08:47 +0000)]
Merge "Fix 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>
Tony Tkacik [Wed, 10 Dec 2014 15:33:45 +0000 (15:33 +0000)]
Merge "BUG-1914: bump API requirement"
Tony Tkacik [Wed, 10 Dec 2014 15:33:31 +0000 (15:33 +0000)]
Merge "BUG-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>
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>
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>
Tony Tkacik [Wed, 3 Dec 2014 10:26:58 +0000 (10:26 +0000)]
Merge "Remove xtend plugin binding-data-codec"
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>
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>
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>
Tony Tkacik [Mon, 1 Dec 2014 10:52:38 +0000 (10:52 +0000)]
Merge "Allow {Class,Method}Generator.process() to throw CannotCompileException"
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"
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>
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>
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>
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)
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"
Tony Tkacik [Thu, 20 Nov 2014 08:44:04 +0000 (08:44 +0000)]
Merge "Improve 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>
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>
Robert Varga [Mon, 10 Nov 2014 22:05:29 +0000 (22:05 +0000)]
Merge "ISIS 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>
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>
Tony Tkacik [Wed, 29 Oct 2014 12:06:02 +0000 (12:06 +0000)]
Merge "Bug 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>
Ladislav Borak [Wed, 22 Oct 2014 13:37:30 +0000 (15:37 +0200)]
Fix for resolving leafSchemaNode asProperty in BindingGeneratorImpl
Change-Id: Ia844e18de49ff569a027cba7df77551ba2fa763d
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Robert Varga [Wed, 22 Oct 2014 19:51:49 +0000 (19:51 +0000)]
Merge "BUG-1954: Fix useless Boolean instantiation"
Lukas Sedlak [Wed, 22 Oct 2014 13:18:01 +0000 (13:18 +0000)]
Merge "Bug 584: Increase test coverage"
Lukas Sedlak [Wed, 22 Oct 2014 12:58:46 +0000 (12:58 +0000)]
Merge "Resolved some sonar issues: Simplify Boolean Expression"
Robert Varga [Thu, 18 Sep 2014 09:40:15 +0000 (11:40 +0200)]
BUG-1954: Fix useless Boolean instantiation
No need to instantiate booleans for string, just use Boolean.TRUE.
Change-Id: I5156d4a8cafd08ced0802c55812cded7bdbe1cee
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit
61b4fa02e7b89bba37ac906c05605c79dead57b2)
Tony Tkacik [Wed, 22 Oct 2014 11:50:54 +0000 (11:50 +0000)]
Merge "Fixed potentional NPE in generateTypesFromChoiceCases"
Ladislav Borak [Wed, 22 Oct 2014 11:04:07 +0000 (13:04 +0200)]
Bug 584: Increase test coverage
Change-Id: Iabd86a3e7f72d99e227d76ff563a60d031ef0a86
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Lukas Sedlak [Tue, 21 Oct 2014 14:17:35 +0000 (16:17 +0200)]
Fixed potentional NPE in generateTypesFromChoiceCases
Added check to verify if parent is not null since not all GeneratedTypes can implement ChildOf<parent> definition.
Change-Id: I9b01dc154fa767e2411c563540135051c3aab678
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Lukas Sedlak [Mon, 20 Oct 2014 14:14:55 +0000 (14:14 +0000)]
Merge "Bug 584 - Milestone : Increasing unit test coverage, from 44.9% to 60%"
Peter Bandzi [Wed, 1 Oct 2014 11:15:46 +0000 (13:15 +0200)]
Bug 584 - Milestone : Increasing unit test coverage, from 44.9% to 60%
Change-Id: I4bab0d83892c15fa198d72e99c262ee2011d9830
Signed-off-by: Peter Bandzi <pbandzi@cisco.com>
Lukas Sedlak [Mon, 20 Oct 2014 08:50:40 +0000 (08:50 +0000)]
Merge "Bug 2172 - AbstractGeneratedTypeBuilder check for duplicate elements."
Tony Tkacik [Fri, 17 Oct 2014 09:04:12 +0000 (09:04 +0000)]
Merge "Bug 584: Test coverage increase"
Tony Tkacik [Fri, 17 Oct 2014 09:04:00 +0000 (09:04 +0000)]
Merge "Bug 584: test coverage increase"
Tony Tkacik [Fri, 17 Oct 2014 09:03:39 +0000 (09:03 +0000)]
Merge "BUG-1902: reuse ConcreteTypeImpl instances"
Tony Tkacik [Fri, 17 Oct 2014 09:03:00 +0000 (09:03 +0000)]
Merge "Bug 584: Test coverage increase"
pkajsa [Fri, 17 Oct 2014 09:00:56 +0000 (11:00 +0200)]
Bug 2172 - AbstractGeneratedTypeBuilder check for duplicate elements.
Check for duplicity of added elements has been added into add* methods
in the AbstractGeneratedTypeBuilder class.
Change-Id: I9ef4caef0a835c0e171e86c2b322c3452bdaada0
Signed-off-by: pkajsa <pkajsa@cisco.com>
Tony Tkacik [Thu, 16 Oct 2014 12:55:03 +0000 (12:55 +0000)]
Merge "Bug 2176 - add property with name == null fix."
Tony Tkacik [Thu, 16 Oct 2014 12:51:48 +0000 (12:51 +0000)]
Merge "Bug 2183: ClassCastException in AbstractTypeMemberBuilder fix"
pkajsa [Thu, 16 Oct 2014 06:45:01 +0000 (08:45 +0200)]
Bug 2176 - add property with name == null fix.
The Preconditions.checkArgument(name != null,..) check has been added into the
addProperty(String name) method in the AbstractGeneratedTypeBuilder class.
Change-Id: I9db2b718011fa397cf1cd659ae56f8764bb8316e
Signed-off-by: pkajsa <pkajsa@cisco.com>
pkajsa [Wed, 15 Oct 2014 11:08:22 +0000 (13:08 +0200)]
Bug 584: Test coverage increase
Unit tests for:
BindingGeneratorUtil
GeneratedPropertyBuilderImpl
GeneratedPropertyImpl
Change-Id: Ibe6811b8dfafd3cef584ed234ee0e85b7dbeae33
Signed-off-by: pkajsa <pkajsa@cisco.com>
Martin Ciglan [Tue, 14 Oct 2014 14:46:17 +0000 (16:46 +0200)]
Bug 2183: ClassCastException in AbstractTypeMemberBuilder fix
Change-Id: I0d5a21653f958c630c2a573b9cb90af28e59a627
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Ladislav Borak [Tue, 14 Oct 2014 11:46:29 +0000 (13:46 +0200)]
Resolved some sonar issues: Simplify Boolean Expression
Change-Id: Ie4d9efb2a00330bede69aac80789065cac895710
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Robert Varga [Tue, 16 Sep 2014 09:53:44 +0000 (11:53 +0200)]
BUG-1902: reuse ConcreteTypeImpl instances
Instantiate a cache which will act as a lookup for commonly-shared
instances. Also creates shared instances for byte[] and char[] primitive
types and reuses them as much as possible.
Change-Id: Ia70f0e9022c3b19e0f9b0eff34e0cf69958e25f0
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 8 Oct 2014 22:26:58 +0000 (00:26 +0200)]
Rework version artifact version tracking
This patch reworks the way we track our internal artifacts by moving the
definitions from the aprent pom into a dedicated yangtools-artifacts
versions.
This artifact's dependencyManagement section is then imported into the
parent. This may look unnecessary, but it allows our downstream users to
import the same file and have the versioning work.
An interesting side-effect of that is that the properties cannot be
relied on carrying versions of artifacts and then be picked up by the
features.xml file.
This patch fixes that by introducing a script into the build cycle,
which looks at a template features.xml and resolves the versions as
currently visible in the dependency tree of the artifact.
Change-Id: I193586f777478c12520358b9909cfb61e40d14b4
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Ciglan [Tue, 14 Oct 2014 09:45:48 +0000 (11:45 +0200)]
Bug 584: test coverage increase
MethodSignatureBuilderImpl.java
MethodSignatureImpl.java
Change-Id: Ifdeb3ba32e751625b212d2e93f66bbedbf76ddfc
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
pkajsa [Tue, 14 Oct 2014 07:04:55 +0000 (09:04 +0200)]
Bug 584: Test coverage increase
Unit tests for:
AnnotationTypeBuilderImpl
GeneratedTypeBuilderImpl
AbstractGeneratedTypeBuilder
ConstantImpl
Change-Id: I2956ff8a787a1e1db9e6e7db27aa50a5cc159bb5
Signed-off-by: pkajsa <pkajsa@cisco.com>
Robert Varga [Mon, 13 Oct 2014 09:05:34 +0000 (09:05 +0000)]
Merge "Bug 584: GeneratedTOBuilder test coverage increase"
Martin Ciglan [Fri, 10 Oct 2014 12:29:34 +0000 (14:29 +0200)]
Bug 584: MethodParameterImpl test coverage increase
Change-Id: I63ecbdb35266f4549ebc51c49d9a8009f8b57dcb
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Martin Ciglan [Fri, 10 Oct 2014 08:45:07 +0000 (10:45 +0200)]
Bug 584: GeneratedTOBuilder test coverage increase
Change-Id: Ifb6d377a6d1911f2f12bb178efdea8809916c26a
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Tony Tkacik [Thu, 9 Oct 2014 16:07:24 +0000 (16:07 +0000)]
Merge "BUG-2159: fix sort() conflict"
Tony Tkacik [Thu, 9 Oct 2014 16:07:03 +0000 (16:07 +0000)]
Merge "BUG-2159: compilation failure with generics"
Robert Varga [Wed, 8 Oct 2014 16:21:01 +0000 (18:21 +0200)]
BUG-2159: fix sort() conflict
Java 8 introduces a default method into java.util.List, which has a
different signature (and semantics) than the xtend extension. This patch
changes the code to not use the syntactic sugar while retaining the use
of the extension.
Change-Id: I4685937ab4da64cfe384db9aad31859ca51e97d7
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 8 Oct 2014 16:12:29 +0000 (18:12 +0200)]
BUG-2159: compilation failure with generics
http://mail.openjdk.java.net/pipermail/compiler-dev/2013-October/007726.html
seems to be describing why this patch is needed.
Change-Id: Ib23f51e0f319327c3c6a04ff86fb4c89b745e4ae
Signed-off-by: Robert Varga <rovarga@cisco.com>
Lukas Sedlak [Fri, 5 Sep 2014 08:58:14 +0000 (10:58 +0200)]
Added Test suite for testing of TypeProviderImpl.
Removed commented out blocks of code from TypeProviderImpl.
Fixed invalid typecast in getTypeDefaultConstruction(LeafSchemaNode, defaultValue) in else branch of BitsTypeDefinition processing. The parent value is of type ModuleImpl which cannot
be cast to SchemaNode as originaly was. Instead of we can extract QName direclty from parent value -> no need to typecast at all.
Fixed leafrefToDef method in TypeProviderImpl. This method will now process defaultValue from method parameter instead of parent node. Method leafrefToDef has been called only via getTypeDefaultConstruction(LeafSchemaNode, defaultValue) method where default value has been added implicitly. In case that user calls getTypeDefaultConstruction for leafref schema node
and specifies defaultValue as parameter and not in yang model the method will throw exception. Now behaviour of leafrefToDef depends only and only on parameter passed in getTypeDefaultConstruction.
Created TypeProviderTest which contains whole test suite for testing of TypeProviderImpl class.
TestIntegerTypeDefinition is mock implementation of IntegerTypeDefinition in order to testing null references returned by TypeDefinition object.
TypeProviderModel contains methods for provisiononing of YANG test models from test/resources folder.
Created Mock implementations of LeafrefTypeWithNullToStringInXpath, LeafrefTypeWithNullXpath, TestIntegerTypeDefinition and TestLeafSchemaNode designated
to increase branch coverage in tests and provide fail scenarios.
Change-Id: I5599c9b1e8f02a8553fab27c1771e32f88c38bc6
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Ladislav Borak [Tue, 12 Aug 2014 09:36:09 +0000 (11:36 +0200)]
Bug 1423 - Yangtools parser allows 2 cases with same child elements
- added check in YangParserImpl if two choice cases childs are same
- rework printSchemaNodeInfo() in GeneratorImpl.xtend, where was
problem after generating java file with uncompatible types Set<TypeDefinition<? extends Object>>
instead of Set<TypeDefinition<?>>, problem was fixed adding another
variable with correct type.
Change-Id: I0a612ea9143c6f29ffe3a8ceef7e703136157641
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Tony Tkacik [Wed, 17 Sep 2014 12:45:33 +0000 (14:45 +0200)]
Bug 1906: Fixed bug in Binding leafref to union codec
In models, where leafref was used to reference type, incorrect
codec (EncapsulatedValueCodec) was used for all cases with
derived type instead of actual codec. EncapsulatedValueCodec
covered most cases except Union and Bits.
Added special handling for leafref, where type definition
for referenced leaf is fetched and codec is used based
on that notion.
Change-Id: Id790554e1e84bcf01179add4f5327a4e7380ebe1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit
697925b94246e725412b88151ec097c812a65b39)
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 17 Sep 2014 11:46:44 +0000 (13:46 +0200)]
Bump versions for Lithium
Bumps everything to 0.7.0, models get a .7 suffix.
Change-Id: I63d2f6b3782769043b8efa73ef64abe34e57b97a
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Mon, 15 Sep 2014 14:52:52 +0000 (14:52 +0000)]
Merge "Bug 576 Fixes of critical issues for YT components"
Lukas Sedlak [Thu, 4 Sep 2014 14:38:23 +0000 (16:38 +0200)]
Bug 576 Fixes of critical issues for YT components
This is fix for https://bugs.opendaylight.org/show_bug.cgi?id=576
Added Nonnull annotations and preconditions checks for annonymous apply methods.
Fixed never reachable if statement in writeValue(final XMLStreamWriter writer, final @Nonnull Node<?> data, final SchemaNode schema) in XmlStreamUtils
since instanceof is doing already null check.
Removed empty if statement in NormalizedNodeContainerModificationStrategy in verifyStructure method.
Removed dead code from in PerRepoTestRunner runnersFromFeatures method.
Change-Id: Icec2a30149a17d8b76497d95ac0054297369e985
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Tony Tkacik [Mon, 15 Sep 2014 10:45:46 +0000 (10:45 +0000)]
Merge "Bug 1512 - generated builder java file for a leaf containing a union"
Tony Tkacik [Mon, 15 Sep 2014 10:09:50 +0000 (10:09 +0000)]
Merge "BUG-1431: make sure (Yang)InstanceIdentifier is Serializable"
Robert Varga [Mon, 15 Sep 2014 10:04:56 +0000 (10:04 +0000)]
Merge "yangtools cannot release, so fixing it"
Robert Varga [Mon, 15 Sep 2014 09:47:38 +0000 (09:47 +0000)]
Merge "Bug 1869: Fixed binding-data-codec to work with empty type"
Ladislav Borak [Fri, 15 Aug 2014 07:41:59 +0000 (09:41 +0200)]
Bug 1512 - generated builder java file for a leaf containing a union
- added clarification for location of builder class for union types
into javadoc
- remove redundant check in YangTempla.writeRpcInput() and
YangTemplate.writeRpcOutput() methods
- added return type for GeneratorImpl.printAugmentedNode() method
(problem to infer return type in recursivecalled method)
- added local set of typedefinitions into
GeneratorImpl.printSchemaNodeInfo() to to remove error in geterated java
file
Change-Id: If4ad960a998254868a0347bb836c79aac7dd19d8
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Robert Varga [Mon, 15 Sep 2014 09:39:03 +0000 (09:39 +0000)]
Merge "Added Nonnull annotation for get operation"
Giovanni Meo [Fri, 5 Sep 2014 15:50:19 +0000 (17:50 +0200)]
yangtools cannot release, so fixing it
- yangtools cannot release because the projetc.version dependency in
dependency management keep changing with the project that includes it,
so fixing it
- restconf dependency and other version should not be duplicated in
multiple poms
- the version property in the common/parent/pom.xml file need to be
the authoritative versions else the features file cannot relay on it
Change-Id: Ic99c1f3818efbdf6ff9c514d4c842164d4228fc4
Signed-off-by: Giovanni Meo <gmeo@cisco.com>