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, 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>
Robert Varga [Mon, 15 Sep 2014 09:36:01 +0000 (09:36 +0000)]
Merge "very basic tests for yang-binding-util"
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>
Tony Tkacik [Mon, 15 Sep 2014 08:39:43 +0000 (10:39 +0200)]
Bug 1869: Fixed binding-data-codec to work with empty type
Empty type is special case, which does not contain value,
but has only presence characteristic and in Binding Specification v1
it was converted to boolean (true = present, false or null not present)
but new codecs did not have that special handling for empty type
which caused some models to fail.
Fixed places affected by this bug and added test case which now
explicitly tests empty type support.
Change-Id: Idec541dc9da987cebcd46ee65d24c17b7cf9a567
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Fri, 12 Sep 2014 11:11:13 +0000 (11:11 +0000)]
Merge "BUG-865: migrate tests to use BindingGeneratorImpl(boolean)"
Peter Bandzi [Thu, 11 Sep 2014 12:04:41 +0000 (14:04 +0200)]
very basic tests for yang-binding-util
Change-Id: I7f5b646062dcb3619cd7912d37ef8574db56c5c6
Signed-off-by: Peter Bandzi <pbandzi@cisco.com>
Tony Tkacik [Thu, 11 Sep 2014 09:10:34 +0000 (09:10 +0000)]
Merge "BUG-1794: use QName.cachedReference in static references"
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>
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>
Robert Varga [Tue, 9 Sep 2014 13:02:51 +0000 (13:02 +0000)]
Merge "Bug 1698: Updated handling of choice node inside choice node"
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>
Tony Tkacik [Mon, 8 Sep 2014 08:42:39 +0000 (08:42 +0000)]
Merge "Bug 1672 - Generated javadoc contains symbols of javadoc comment tags"
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 */ instaed of */
Change-Id: I754812fac0be45d037fe3a65c60c63c11150b5c8
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Lukas Sedlak [Fri, 5 Sep 2014 08:36:27 +0000 (10:36 +0200)]
Added Nonnull annotation for get operation
Added Nonnull annotation for get operation in NodeContextSupplier to harden contract and
preventing of retrieving null reference from get method.
Change-Id: Ibcd8e601d5eec2bf192f8d3c779c7bab668d3a26
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Tony Tkacik [Fri, 5 Sep 2014 07:55:28 +0000 (07:55 +0000)]
Merge "Added safe copy of array."
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>
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
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>
Tony Tkacik [Tue, 2 Sep 2014 12:37:20 +0000 (12:37 +0000)]
Revert "Bug 1478 - Autoboxing support"
Autoboxing support did not compiled properly with
extensive uses of cases and grouping.
This was found in integration with models
from other projects.
This reverts commit
473b1615dd9b523b96aef8b92424e7664eb7c089.
Change-Id: I65eee5078ca856f16d5740b7507bfade6c6aeadc
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Mon, 1 Sep 2014 19:54:27 +0000 (19:54 +0000)]
Merge "Bug 1478 - Autoboxing support"
Tony Tkacik [Mon, 1 Sep 2014 18:35:57 +0000 (18:35 +0000)]
Merge "Improve TypeProviderImpl.sortTypeDefinitionAccordingDepth()"
Tony Tkacik [Wed, 20 Aug 2014 15:17:02 +0000 (17:17 +0200)]
Bug 1443: Make sure that LazyDataObject hashCode computation is consistent
Change-Id: Ib430dabc445975c02d6176e23e4fb9c85b43f906
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Ladislav Borak [Wed, 6 Aug 2014 12:48:49 +0000 (14:48 +0200)]
Bug 1478 - Autoboxing support
Change-Id: Id9c812f238c16d6bae2894364a366f6781a986e3
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 29 Aug 2014 21:47:37 +0000 (23:47 +0200)]
Remove explicit final keywords
These context use the filan modifier needlessly, so remove them to get
rid of sonar warnings.
Change-Id: I1ec3133c3978b0cfaa31c74ba57393ff9973ddc6
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 29 Aug 2014 21:26:53 +0000 (23:26 +0200)]
IdentifiableItemCodec should be a static inner class
Headline really says it all. There is no reason for
IdentifiableItemCodec to be non-static.
Change-Id: I713625dbea7201a9f11d5431d81584528ddb74aa
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 29 Aug 2014 20:54:16 +0000 (20:54 +0000)]
Merge "BUG-576: fixed possible null pointer dereference in BindingGeneratorImpl"
Robert Varga [Fri, 29 Aug 2014 20:52:17 +0000 (20:52 +0000)]
Merge "BUG-1433: augmentation field visibility changed to default"
Tony Tkacik [Thu, 28 Aug 2014 16:19:22 +0000 (16:19 +0000)]
Merge "Bug 1505 - Provide test coverage for binding-data-codec using sal-test-model"
Tony Tkacik [Thu, 28 Aug 2014 14:39:35 +0000 (14:39 +0000)]
Merge "BUG-576: added support for handling nested groupings in code generator."
Tony Tkacik [Thu, 28 Aug 2014 14:39:09 +0000 (14:39 +0000)]
Merge "BUG-576: fixed invalid if conditions in LazyGeneratedCodecRegistry."
Tony Tkacik [Thu, 28 Aug 2014 12:18:31 +0000 (12:18 +0000)]
Merge "BUG-576: fixed test sources loading in YangModuleInfoCompilationTest."
Martin Vitez [Thu, 28 Aug 2014 09:03:39 +0000 (11:03 +0200)]
BUG-576: fixed invalid if conditions in LazyGeneratedCodecRegistry.
1. fixed check to 'previous instanceof DataNodeContainer' - this check always return true
2. fixed incorrect equals parameter: expected URI but was QName
Change-Id: Ib67ac5b1fc87296bcaa117e9bf1d5f04185c367b
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Robert Varga [Mon, 25 Aug 2014 20:13:20 +0000 (22:13 +0200)]
Improve TypeProviderImpl.sortTypeDefinitionAccordingDepth()
Follow-up patch to . We do not actually need the key, so just use
values() instead of full entries.
Change-Id: Ibb5679bdf0caca140d73eb9ef065db6a58505532
Signed-off-by: Robert Varga <rovarga@cisco.com>
Jan Hajnar [Thu, 21 Aug 2014 13:07:33 +0000 (15:07 +0200)]
Bug 1505 - Provide test coverage for binding-data-codec using
sal-test-model
* added test yang modules to bindig-test-model
* added tests for serialization/deserialization of normalized nodes and
paths to binding-data-codec
Change-Id: Ibdf24dd9e51281be488fb40481a79d6f086a2115
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Martin Vitez [Wed, 27 Aug 2014 08:42:57 +0000 (10:42 +0200)]
BUG-576: fixed test sources loading in YangModuleInfoCompilationTest.
Fixed test to parse File sources with relative test.
Change-Id: I4af05166a2c26cf4a3f673b1651ac28c717dd43e
Signed-off-by: Martin Vitez <mvitez@cisco.com>