Robert Varga [Mon, 21 Jul 2014 13:43:59 +0000 (15:43 +0200)]
BUG-997: introduce base SchemaRepository
Change-Id: I51d6c14a217b008afd0fa73c18c6dfc6cc8909b7
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 28 Jul 2014 10:47:21 +0000 (12:47 +0200)]
BUG-997: Rework URLSchemaContextResolver
This patch introduces an alternative implementation of
URLSchemaContextResolver, which takes advantage of the newly-created
APIs. The core improvement lies in the fact that it pre-validates
registered sources, thus eliding multiple parse actions.
Change-Id: I3311a3f0251868f91c385d0291365934ccfb9ede
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 25 Jul 2014 02:45:53 +0000 (04:45 +0200)]
BUG-997: Introduce ASTSchemaSource
ASTSchemaSource represents an intermediate processing step, where we
have parsed the YANG text and extracted dependency information.
Change-Id: Ice0b841404a28912787b83f88f9b2d28c68497d5
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Thu, 31 Jul 2014 09:24:41 +0000 (09:24 +0000)]
Merge "Composite node <-> normalized node serializer and deserializer"
Martin Vitez [Thu, 31 Jul 2014 07:09:08 +0000 (09:09 +0200)]
BUG-1457: fixed parsing of max-elements statement.
If max-elements was set to "unbounded", parser throws an exception.
Added test.
Change-Id: I37df99b504e989353f5a0b33f0a2d99e6c796668
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Jozef Gloncak [Fri, 11 Jul 2014 08:40:11 +0000 (10:40 +0200)]
Composite node <-> normalized node serializer and deserializer
- add AnyXmlNodeBase parser and serializer
- in ContainerNodeCnSnSerializer and MapEntryNodeCnSnSerializer was used
MutableCompositeNodeTOImpl which uses init() method which is deprecated
therefore it was rewritten and also whole package was renamed.
- support for AnyXml yang type to yang-data-composite-node
Change-Id: Icef3549e402eee0da074900a3db6e2959a5a67a5
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Tony Tkacik [Wed, 30 Jul 2014 09:14:36 +0000 (09:14 +0000)]
Merge "Bug 1354: Added rpcReplyToDomNodes method."
Robert Varga [Fri, 18 Jul 2014 09:48:42 +0000 (11:48 +0200)]
Optimize binding types memory usage
Profiling SP edition shows that we have ~30000 empty ArrayList instances
retained by binding.generator.generated.type.builder objects, wasting
around 800kB of memory.
This patch introduces LazyCollections, which allow us to build up these
lists in a manner which uses minimal collections to support the elements
currently present.
Change-Id: I4676356f7684c9cdd152c98a65a240d0c5b94259
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Tue, 29 Jul 2014 15:15:24 +0000 (15:15 +0000)]
Merge "BUG-1281: fix SchemaContext module ordering"
Tony Tkacik [Tue, 29 Jul 2014 13:35:08 +0000 (13:35 +0000)]
Merge "BUG-1305: improved antlr grammar handling of unknown nodes."
Robert Varga [Mon, 28 Jul 2014 21:47:18 +0000 (23:47 +0200)]
BUG-1281: fix SchemaContext module ordering
This patch fixes the wildcard lookup and optimizes it by precomputing
the revision.
Change-Id: Icad0a9435aacc4b5401130608833d2cb45e3624f
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 29 Jul 2014 10:13:03 +0000 (12:13 +0200)]
BUG-1092: rename data.api.InstanceIdentifier to YangInstanceIdentifier
On popular request to clear up confusion between
yang.binding.InstanceIdentifier and yang.data.api.InstanceIdentifier, we
rename the latter (which is the low-level one). This will make it clear
for users of GUIs, who were confused by the tools giving them the choice
between the two.
Change-Id: I1e30a0df93d8bfb891d047c58abcb117d4006c76
Signed-off-by: Robert Varga <rovarga@cisco.com>
Martin Vitez [Mon, 28 Jul 2014 16:38:16 +0000 (18:38 +0200)]
BUG-1305: improved antlr grammar handling of unknown nodes.
Removed useless unknown_statement2 and unknown_statement3 definitions
Improved antlr parser to propertly handle extension description by moving unknown_statement definition as last
statement in extension_stmt definition to properly handle description.
Change-Id: I9d8da69ac9336feee07855e85fad5ee2e4033f12
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Tue, 29 Jul 2014 09:25:01 +0000 (09:25 +0000)]
Merge "BUG-461 Test transformation of rpc input using XmlDocumentUtils"
Tony Tkacik [Tue, 29 Jul 2014 09:14:02 +0000 (09:14 +0000)]
Merge "BUG-1413: fixed bug in antlr grammar."
Lukas Sedlak [Fri, 18 Jul 2014 09:11:29 +0000 (11:11 +0200)]
Bug 1354: Added rpcReplyToDomNodes method.
Added rpcReplyToDomNodes method into XmlDocumentUtils to convert XML Payload from Rpc Reply message into
Composite Node structures.
Added test and test files (schema, test payloads) for rpcReplyToDomNodes method.
Change-Id: I45e01d58689ad448cdf6e8541cb680db62667d7c
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Robert Varga [Mon, 28 Jul 2014 20:43:38 +0000 (22:43 +0200)]
BUG-1431: make InstnaceIdentifier serializable
Straightforward fix for serializability.
Change-Id: I6681e6c85a4ebb8bf23d4dc239204b3a757ea942
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 25 Jul 2014 13:37:26 +0000 (15:37 +0200)]
BUG-1381: remove getLock() and deprecated constructor
All users have been updated to synchronize properly, now remove
getLock(). At the same time, shed the deprecated contructor, too.
Requires I3e962f284132b376f77e9e2665b3fbb47f246514 to go into controller
first.
Change-Id: Ic8b62468a4e829f035e45b3c715966315b3103a0
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Mon, 28 Jul 2014 15:03:00 +0000 (15:03 +0000)]
Merge "Degrade DataNodeContainer.getChildNodes() from Set to Collection"
Tony Tkacik [Mon, 28 Jul 2014 15:01:43 +0000 (15:01 +0000)]
Merge "Improve performance of SchemaContext.findModuleByName()"
Tony Tkacik [Mon, 28 Jul 2014 15:01:27 +0000 (15:01 +0000)]
Merge "Fix Ip{Address,Prefix}Builder performance"
Robert Varga [Sat, 26 Jul 2014 02:17:52 +0000 (04:17 +0200)]
Degrade DataNodeContainer.getChildNodes() from Set to Collection
Datastore-geared workload shows that around 1% of CPU is being used by
AbstractDocumentedDataNodeContainer.getChildNodes(). Of that, around 72%
is spent in ImmutableSet.copyOf(). We could perform that copy in the
constructor, but we can actually do better.
As it turns out, there is already a childNodes map, which is immutable
and indexed via QName present. That indexing guarantees that the values
compare as distinct, so we can reuse childNodes.values(), except for the
contract.
None of the callers care if the return is a Collection, so downgrade the
return, such that we can elide copying the stuff completely. Also fixup
all the callers. Requires https://git.opendaylight.org/gerrit/#/c/9340/
to fix controller-based users.
Change-Id: I310b351d80955a37f6672064dd238bb9cb1e16b1
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sat, 26 Jul 2014 05:24:38 +0000 (07:24 +0200)]
Improve performance of SchemaContext.findModuleByName()
Maintaining an index multimap allows us to heavily optimize lookups,
especially when coming from restconf, which accepts the latest revision
of a particular module.
Change-Id: I615a3c08508111d9389821d24f51cd35c06b5eb1
Signed-off-by: Robert Varga <rovarga@cisco.com>
Maros Marsalek [Mon, 28 Jul 2014 12:46:08 +0000 (14:46 +0200)]
BUG-461 Test transformation of rpc input using XmlDocumentUtils
Change-Id: I5d1a8c5e2360fc3cfd47c72facac9007c8a2cc4b
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Robert Varga [Sat, 26 Jul 2014 05:23:32 +0000 (07:23 +0200)]
Reuse comparator between sort invocations
Change-Id: Ic7b36c76424a910df6f958ce468d58aef6bcd1fd
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 28 Jul 2014 09:50:14 +0000 (09:50 +0000)]
Merge "Convert SchemaSourceRegistration to extend ObjectRegistration"
Tony Tkacik [Mon, 28 Jul 2014 09:39:04 +0000 (09:39 +0000)]
Merge "BUG-1412: fixed bug in antlr grammar."
Tony Tkacik [Mon, 28 Jul 2014 09:35:35 +0000 (11:35 +0200)]
Convert SchemaSourceRegistration to extend ObjectRegistration
Change-Id: I86a48fb4846fa88fcd459ebe06fa5bcbbe0918a4
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Mon, 28 Jul 2014 08:54:21 +0000 (08:54 +0000)]
Merge "BUG-432: remove type argument from Registration"
Tony Tkacik [Mon, 28 Jul 2014 08:39:42 +0000 (08:39 +0000)]
Merge "Cache public view of children of AbstractImmutableDataContainerNode"
Tony Tkacik [Mon, 28 Jul 2014 08:39:30 +0000 (08:39 +0000)]
Merge "Optimize AbstractDocumentedDataNodeContainer.getDataChildByName()"
Tony Tkacik [Mon, 28 Jul 2014 08:37:55 +0000 (08:37 +0000)]
Merge "BUG-997: Introduce SchemaSource respository and related APIs"
Tony Tkacik [Mon, 28 Jul 2014 08:15:17 +0000 (08:15 +0000)]
Merge "BUG-865: remove InstanceIdentifier.Builder.getIdentifier()"
Tony Tkacik [Mon, 28 Jul 2014 08:13:43 +0000 (08:13 +0000)]
Merge "Rework data.api.InstanceIdentifier to work on Iterables"
Martin Vitez [Mon, 28 Jul 2014 07:20:10 +0000 (07:20 +0000)]
Merge changes I1a5340f1,I9bb2bdd9
* changes:
Implement DatastoreIdentifierBuilder
Add String to known-immutable classes
Robert Varga [Sat, 19 Jul 2014 09:05:53 +0000 (11:05 +0200)]
BUG-997: Introduce SchemaSource respository and related APIs
Change-Id: I9cddf1ca0d1df4360b6110663c0c5eb89bd8f51c
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 28 Jul 2014 06:41:03 +0000 (06:41 +0000)]
Merge "Bug 1392: New yang-common/util classes"
Robert Varga [Mon, 28 Jul 2014 06:40:52 +0000 (06:40 +0000)]
Merge "Bug 1386: Added DeadlockDetectingListeningExecutorService"
Thomas Pantelis [Mon, 14 Jul 2014 16:13:08 +0000 (12:13 -0400)]
Bug 1392: New yang-common/util classes
Needed for https://git.opendaylight.org/gerrit/#/c/9178/
OperationFailedException:
Generalized exception class that contains an RpcError list.
MappingCheckedFuture:
Futures#addCallback and Futures#transform call Future#get but
CheckedFuture doesn't override the get methods to translate exceptions
to the checked type. Thus you don't get the checked exception when using
those Futures methods. This kind of defeats the purpose of CheckedFuture.
The new MappingCheckedFuture class overrides the get methods to translate exceptions.
ExceptionMapper:
Generalized class for use with CheckedFuture to translate exceptions to a
specified exception type.
Change-Id: Idb4c7e8b5c2cf17795de2f3af4278989ac7bd116
Signed-off-by: tpantelis <tpanteli@brocade.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
Martin Vitez [Fri, 25 Jul 2014 12:10:51 +0000 (14:10 +0200)]
BUG-1413: fixed bug in antlr grammar.
Parser was not able to parse unknown node in extension argument declaration.
Added test.
Change-Id: I834cc47bbae8834484ff024f97dcf77f3c5ddbf9
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Fri, 25 Jul 2014 10:28:26 +0000 (12:28 +0200)]
BUG-1412: fixed bug in antlr grammar.
Parser was not able to handle description statement inside unknown statement.
Added test.
Change-Id: I7e3e68ac20694c415bc7bbbc5406967727394967
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Thomas Pantelis [Mon, 14 Jul 2014 04:12:45 +0000 (00:12 -0400)]
Bug 1386: Added DeadlockDetectingListeningExecutorService
Change-Id: I1da4c9ae118e0dd5248d42adccb3dcfff23fe0dd
Signed-off-by: tpantelis <tpanteli@brocade.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sun, 27 Jul 2014 19:56:46 +0000 (21:56 +0200)]
BUG-432: remove type argument from Registration
Change-Id: I5899328c96de8f6f473c1ab8767df10e614b41e0
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sat, 26 Jul 2014 02:30:13 +0000 (04:30 +0200)]
Cache public view of children of AbstractImmutableDataContainerNode
Tracing of a datastore-heavy workload shows about 1% CPU being spent
in getValue(). This allocates 1.8M objects, just to throw them away.
Rather than that, let's wrap the map itself, which guarantes .values()
to be immutable, thus eliding the CPU cost.
Change-Id: Ieef0a2bb791ffd99f934457444d168f1a6c9fd77
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sat, 26 Jul 2014 01:55:20 +0000 (03:55 +0200)]
Optimize AbstractDocumentedDataNodeContainer.getDataChildByName()
Datastore-intensive workload shows 2% CPU expended in this method, with
three quarters of that actually eaten up by the iterator (and the rest by
1M invocations of QName.equals()). Given that we know that childNodes
are keyed by the QName, this is utterly wasteful, so let's do a simple
lookup.
Change-Id: I44688cb92031b2d75a09d58bd76c63bb28ccbfae
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sat, 26 Jul 2014 00:58:31 +0000 (02:58 +0200)]
BUG-865: remove InstanceIdentifier.Builder.getIdentifier()
This method has been long-deprecated, so let's just remove it.
Change-Id: Ib4ab7be5c463729607ae75c10d0ae6c500c5990b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 3 Jul 2014 16:22:25 +0000 (18:22 +0200)]
Rework data.api.InstanceIdentifier to work on Iterables
Profiling storage-dominated workloads shows that
InstanceIdentifier.node() is dominating by taking up 16% of the CPU
cycles, with 82% of that being spent in ImmutableList$Builder.addAll().
All of these calls occur in the data change resolution path, where they
account for 53% of CPU time.
This patch removes the ImmutableList at the heart of InstanceIdentifier
with an Iterable, along with all the machinery we know and love from the
binding InstanceIdentifier.
While we are at it, perform complete house-cleaning, compacting code and
tuning it for perfomance.
Change-Id: I52884d5660086ac53647a2a39127578017449b2d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sat, 26 Jul 2014 15:50:13 +0000 (17:50 +0200)]
Implement DatastoreIdentifierBuilder
This is straightforward enough, so make it work with BA clients.
Change-Id: I1a5340f1ac72148e11cb54554acbb49540251f88
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sat, 26 Jul 2014 00:04:44 +0000 (02:04 +0200)]
Add String to known-immutable classes
All instances of String are guaranteed to be immutable, not sure why
that was not captured anywhere.
Change-Id: I9bb2bdd91a0f54e6a8083c047cfd99c0cd029b4b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 25 Jul 2014 19:09:23 +0000 (21:09 +0200)]
Improve QNameModule.equals() performance
URI.equals() is slower than Date.equals(), so let's compare revision
first, hopefully eliding the costlier equality check.
Change-Id: Ia42e13917432c696c756758c95c3f6a668396ff9
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 25 Jul 2014 15:58:48 +0000 (17:58 +0200)]
Fix Ip{Address,Prefix}Builder performance
Using String.matches() incurs major overhead of almost 4ms. Precompile
the pattern and be smart about the use of it. At the same time do a
small optimization to HostBuilder in the form of not instantiating
multiple matchers.
Change-Id: Ifc7f5ff90e71c545acc00275d84780cebe02ec1c
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Fri, 25 Jul 2014 11:17:10 +0000 (11:17 +0000)]
Merge "BUG-1381: guide users to use external synchronized block"
Martin Sunal [Fri, 25 Jul 2014 09:39:42 +0000 (11:39 +0200)]
Codecs can handle the same yang "case" from multiple resources
- resolves a problem when the same case statements are augmented through different paths
Change-Id: I85a0972e352556c525ab64e093e77ad33abeedba
Signed-off-by: Martin Sunal <msunal@cisco.com>
Tony Tkacik [Fri, 25 Jul 2014 08:16:26 +0000 (08:16 +0000)]
Merge "Fix XmlStreamUtils writing attributes."
Tony Tkacik [Fri, 25 Jul 2014 08:10:53 +0000 (08:10 +0000)]
Merge "BUG-1414: fix InstanceIdentifier.child(Class, Object)"
Tony Tkacik [Fri, 25 Jul 2014 07:58:43 +0000 (07:58 +0000)]
Merge "BUG-1407 fix."
Maros Marsalek [Thu, 24 Jul 2014 15:06:09 +0000 (17:06 +0200)]
Fix XmlStreamUtils writing attributes.
The prefix for attributes was no set.
This would result in an exception when no prefix was available by default.
Using RandomPrefix now.
Change-Id: I6110293b262a77f987534fe98abf51755a066be0
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Alex Fan [Thu, 24 Jul 2014 21:04:15 +0000 (14:04 -0700)]
BUG-1407 fix.
Change-Id: I4a7dbcbdbed61593d0096fa01a32af41a4cec4da
Signed-off-by: Alex Fan <railor33@gmail.com>
Robert Varga [Wed, 16 Jul 2014 20:56:41 +0000 (22:56 +0200)]
BUG-1381: guide users to use external synchronized block
This will prevent potential misuses and allow us to scale the utility
class further.
Change-Id: I14bbbf76ccfc7e0ff7942880b25d1f6d5964283e
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 24 Jul 2014 11:42:18 +0000 (13:42 +0200)]
BUG-1414: fix InstanceIdentifier.child(Class, Object)
The result of the method is always a KeyedInstanceIdentifier, so let's
not force users to use casts.
Change-Id: Icabb8999445ff64936e7a32a69eacfc2c9647c64
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 24 Jul 2014 11:08:37 +0000 (13:08 +0200)]
Speed up augmentable class serialization
During debugging an unrelated issue, we have noticed the following
cropping up in thread dumps quite often:
java.lang.Thread.State: RUNNABLE
at sun.reflect.Reflection.getCallerClass(Native Method)
at java.lang.Class.getDeclaredField(Unknown Source)
at org.opendaylight.yangtools.sal.binding.generator.impl.LazyGeneratedCodecRegistry$AugmentableDispatchCodec.getAugmentations(LazyGeneratedCodecRegistry.java:977)
at org.opendaylight.yangtools.sal.binding.generator.impl.LazyGeneratedCodecRegistry$AugmentableDispatchCodec.serialize(LazyGeneratedCodecRegistry.java:968)
at org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.bandwidth.object.Bandwidth$Broker$Codec$DOM.toDomStatic(Bandwidth$Broker$Codec$DOM.java)
at org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.path.computation.client.reported.lsp.Path$Broker$Codec$DOM.toDomStatic(Path$Broker$Codec$DOM.java)
Leading to conjecture that the native call is pretty costly. This
patch introduces a weakly-keyed cache of reflection handles, which
should improve performance.
Change-Id: Ie7001df912c47c77bee8127a2258e8a6a4dce469
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 24 Jul 2014 10:29:16 +0000 (10:29 +0000)]
Merge "Documented Augmentable Codec"
Tony Tkacik [Thu, 24 Jul 2014 08:01:24 +0000 (10:01 +0200)]
Documented Augmentable Codec
Change-Id: Icecb78a557d41b49bce4af673aeae247c8b258d3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Wed, 16 Jul 2014 11:50:53 +0000 (13:50 +0200)]
Bug 1363: Introduced ModifiedNodeDoesNotExistsException.
Introduced new checked exception ModifiedNodeDoesNotExists.
This exception is thrown when node which has subtree
modification did not exist at time of transaction allocation
and also do not exist when allocation was processed
to be commited.
Change-Id: I54f040034b43bfaf4bdda089ad9d2378ddd6ab09
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Robert Varga [Wed, 9 Jul 2014 18:43:27 +0000 (20:43 +0200)]
Remove XmlDocumentUtils.fromElement()
This method is completely unused, so let's remove it.
Change-Id: I5aa8fd646e925c3a92b0acec5041127be954a06d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Tue, 22 Jul 2014 09:30:32 +0000 (09:30 +0000)]
Merge "BUG-979: reworked data schema nodes ordering"
Tony Tkacik [Mon, 21 Jul 2014 15:54:59 +0000 (15:54 +0000)]
Merge "Revert "BUG-1097: implemented check for null or empty list in builder classes.""
Tony Tkacik [Mon, 21 Jul 2014 14:59:20 +0000 (16:59 +0200)]
Fixed uninitialized DOMResult in XML codecs.
Change-Id: I8c0833985b42be304edc445c40a5528ed8a2dcbe
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Mon, 21 Jul 2014 14:03:50 +0000 (14:03 +0000)]
Revert "BUG-1097: implemented check for null or empty list in builder classes."
This reverts commit
883ae26ee98953a5df7cc0956afa807a82d58a3a
which was breakage in Binding Specification and should not
be merged without community-wide discussion.
Change-Id: Ifda1124d974b1ce299551be80a84c45b85b4155a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Mon, 21 Jul 2014 13:29:31 +0000 (13:29 +0000)]
Merge "BUG-1281: move the default codec"
Tony Tkacik [Mon, 21 Jul 2014 13:29:04 +0000 (13:29 +0000)]
Merge "Move XmlDocumentUtils.writeValueByType()"
Tony Tkacik [Mon, 21 Jul 2014 13:12:05 +0000 (13:12 +0000)]
Merge "BUG-865: get rid of InstanceIdentifier-related warnings"
Martin Vitez [Mon, 21 Jul 2014 12:45:43 +0000 (12:45 +0000)]
Merge "Bug 1329: Use original definition for searching for java class."
Robert Varga [Tue, 15 Jul 2014 14:36:28 +0000 (16:36 +0200)]
BUG-1281: move the default codec
This moves the default codec such that it can be shared between various
utility classes.
Change-Id: I570f6fe36a70fe50c35569538d4db29ea4775ce7
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 9 Jul 2014 18:39:04 +0000 (20:39 +0200)]
Move XmlDocumentUtils.writeValueByType()
Now that we're using XMLStreamWriter, the only user lives in DomUtils,
so let's move the functionality over there.
Change-Id: Ia3cb69f5222ffb9c645bc91f79d1aa908b4fe971
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Mon, 21 Jul 2014 10:28:09 +0000 (12:28 +0200)]
Fixed missing root document node for XmlStreamWriter
Change-Id: I875ce7a77b646cedc4680c150243f5d74de9eebb
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Vitez [Mon, 21 Jul 2014 09:46:04 +0000 (09:46 +0000)]
Merge "Bug 626 - It should be possible to create java doc"
Tony Tkacik [Mon, 21 Jul 2014 09:15:25 +0000 (09:15 +0000)]
Merge "BUG-865: removed use of deprecated code in yang-parser-impl tests."
Tony Tkacik [Mon, 21 Jul 2014 09:15:06 +0000 (09:15 +0000)]
Merge "BUG-865: removed use of deprecated schema path creation."
Tony Tkacik [Mon, 21 Jul 2014 09:11:21 +0000 (09:11 +0000)]
Merge "Tests for TreeNodeUtils"
Tony Tkacik [Mon, 21 Jul 2014 09:08:41 +0000 (09:08 +0000)]
Merge "BUG-865: prune deprecated constructors"
Tony Tkacik [Mon, 21 Jul 2014 09:07:11 +0000 (09:07 +0000)]
Merge "BUG-1281: switch serialization to use StAX APIs"
Robert Varga [Mon, 21 Jul 2014 09:04:12 +0000 (11:04 +0200)]
BUG-865: get rid of InstanceIdentifier-related warnings
InstanceIdentifier has a few deprecated methods, which are still used
all over the place. Migrate their users to new equivalents.
Change-Id: Ifba5dbaee9e3f2a74bc084b085095712f422fb46
Signed-off-by: Robert Varga <rovarga@cisco.com>
Ladislav Borak [Thu, 10 Jul 2014 12:39:45 +0000 (14:39 +0200)]
Bug 626 - It should be possible to create java doc
- added interface for documented types
- added fieldto for builders GTO and GT
- modified print method in BaseTemplate, EnumTemplate, ClassTemplate and
and Interface template
- fix for Bug 1001 - added description for enum constants
- fix for Bug 1002 - changed formatting of type description
Change-Id: I5b0ea61369ff86243740d83282a2c4a3115be733
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Martin Vitez [Thu, 17 Jul 2014 14:18:00 +0000 (16:18 +0200)]
BUG-1097: implemented check for null or empty list in builder classes.
If one of builder variable is List, do following:
- for null value create Collections.emptyList()
- for empty list create Collections.emptyList()
- for any other list create ImmutableList.copyOf(<arg>)
Added test.
Change-Id: I83e5aaf4f4253aa2e195c23ff5b48b04fc883052
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Mon, 21 Jul 2014 08:21:35 +0000 (08:21 +0000)]
Merge changes Ibfbb4deb,I96e28324
* changes:
BUG-1377: fixed code generation for nodes defined under grouping.
BUG-865: removed unused utility methods from SchemaContextUtil
Tony Tkacik [Mon, 21 Jul 2014 08:15:04 +0000 (08:15 +0000)]
Merge "BUG-1276: fixed generated union constructor"
Tony Tkacik [Mon, 21 Jul 2014 08:13:14 +0000 (08:13 +0000)]
Merge "BUG-532: implemented copy constructor for generated builder classes."
Tony Tkacik [Mon, 21 Jul 2014 07:19:17 +0000 (07:19 +0000)]
Merge "While the controller is starting up, we see the following info messages which seems redundant. o.o.y.y.d.i.s.tree.InMemoryDataTree - Attempting to install schema context SchemaContextImpl<snip>"
Tony Tkacik [Mon, 21 Jul 2014 07:17:31 +0000 (07:17 +0000)]
Merge "Making javadoc actually get flagged as javadoc"
Timotej Kubas [Fri, 18 Jul 2014 14:12:49 +0000 (16:12 +0200)]
BUG-1346: fix wrong prefix generation
Java promotion rules are slightly different than C, so the expression
got promoted to int, which obviously did the wrong thing. Add an
explicit cast to prevent it.
+test
Change-Id: Id9e708ca86b7267b84b2a3db5ad52aeef651763d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Timotej Kubas <tkubas@cisco.com>
Robert Varga [Fri, 18 Jul 2014 14:04:25 +0000 (14:04 +0000)]
Merge "BUG-1388: fixed ClassTemplate to avoid unused import of BigInteger."
Robert Varga [Fri, 18 Jul 2014 09:21:55 +0000 (11:21 +0200)]
BindingGeneratorUtil.computeDefaultSUID() should not modify lists
This prevents the utility from churning the lists passed in. Also
shares the comparator.
Change-Id: Iaded850b5b0fa98d79e4e4fdbed52175c669e8a4
Signed-off-by: Robert Varga <rovarga@cisco.com>
Martin Vitez [Fri, 18 Jul 2014 08:43:36 +0000 (10:43 +0200)]
BUG-1388: fixed ClassTemplate to avoid unused import of BigInteger.
Change-Id: I88e3aa6c9456603360de2053b5a2bbeca4877aa7
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Robert Varga [Thu, 17 Jul 2014 22:16:31 +0000 (00:16 +0200)]
BUG-865: prune deprecated constructors
This patch removes long-deprecated QName constructors in favor of static
factory methods.
Change-Id: I818cdcd8f1a71a1318c1a688b3594de62581a535
Signed-off-by: Robert Varga <rovarga@cisco.com>
Martin Vitez [Thu, 17 Jul 2014 10:23:54 +0000 (12:23 +0200)]
BUG-1377: fixed code generation for nodes defined under grouping.
If node was defined in choice case which parent choice was defined in grouping,
node does not implement ChildOf interface. Fixed by adding search for parent node
also from groupings.
Added test.
Change-Id: Ibfbb4deb719804fd16cce5c091cc0969aeaf821e
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Thu, 17 Jul 2014 11:41:16 +0000 (11:41 +0000)]
Merge "BUG-1281: rework XmlStreamUtils a bit more"
Martin Vitez [Thu, 17 Jul 2014 07:38:40 +0000 (09:38 +0200)]
BUG-865: removed unused utility methods from SchemaContextUtil
By using getOriginal method from DerivableSchemaNode we can avoid searching for original node from grouping. This causes
that some of utility methods from SchemaContextUtil become redundant.
Change-Id: I96e2832436331b2f454e21aedb01fb552e2e2d6e
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Thu, 17 Jul 2014 08:02:25 +0000 (10:02 +0200)]
Turned off codec source code generation by default.
Change-Id: Iad6eda63c109e3d813c704e2eda56b067c7d1688
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 17 Jul 2014 07:17:22 +0000 (07:17 +0000)]
Merge "Output generated codec source to files"