Tony Tkacik [Fri, 1 Aug 2014 17:28:13 +0000 (19:28 +0200)]
Bug 1439, Bug 1443 Binding Codec NormalizedNodeWriter support
Added initial implementation of Code generator for Binding Stream Writers
which uses NormalizedNodeStreamWriter on the backend
to write data.
Change-Id: Icae22fd1b9ed4256022650d3ad16b38c577f3d3a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Mon, 4 Aug 2014 18:15:00 +0000 (18:15 +0000)]
Merge "BUG-865: Remove SchemaServiceListener"
Ladislav Borak [Thu, 31 Jul 2014 22:59:32 +0000 (00:59 +0200)]
Bug 1232 - Add snippet of yang file into comments
- reworked all proposals from Tom Pantelis
- tested with toaster.yang, generated javadoc files added
as attachment into bugzilla
Change-Id: I6a6c8a6f6592b1abf9368e9b8232263a029460a8
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Martin Vitez [Mon, 4 Aug 2014 08:15:17 +0000 (08:15 +0000)]
Merge "Bug 1475: Correctly handle case of typedef that extends boolean"
Robert Varga [Sun, 3 Aug 2014 12:04:17 +0000 (14:04 +0200)]
Remove unused imports
Lowers the number of warnings a bit.
Change-Id: I9cbb9f0bd2f711fa4f7410a5023c73497a59f35e
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 31 Jul 2014 13:08:17 +0000 (15:08 +0200)]
BUG-865: Remove SchemaServiceListener
Eradicates the long-deprecated SchemaServiceListener.
SchemaContextListener is the new name for the equivalent service.
Requires controller to merge I15d495d805eb7a08c3bcd3ab0cf8b5a8d2797db5.
Change-Id: I38185b131e9745c0cad366c38428e8be9a8fb4fe
Signed-off-by: Robert Varga <rovarga@cisco.com>
Ed Warnicke [Sun, 3 Aug 2014 20:09:14 +0000 (15:09 -0500)]
Bug 1475: Correctly handle case of typedef that extends boolean
Change-Id: I892ddb39b56cbd17ea22f07a94f4c2c2dd9ed448
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Robert Varga [Sun, 3 Aug 2014 10:36:24 +0000 (10:36 +0000)]
Merge "Updated creation of Binding Spec Context to provide additional information."
Robert Varga [Sun, 3 Aug 2014 10:33:48 +0000 (10:33 +0000)]
Merge "Runtime Codec cleanup"
Tony Tkacik [Fri, 1 Aug 2014 17:18:28 +0000 (19:18 +0200)]
Updated creation of Binding Spec Context to provide additional information.
Change-Id: I0c71d8b3cb3a569b340fc0ef0c71283382fe2ac6
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Fri, 1 Aug 2014 17:15:36 +0000 (19:15 +0200)]
Runtime Codec cleanup
- Extracted Augmentation getter to Bidning Reflections
- Fixed retrieval of IdenfierCodec
Change-Id: Ib6b6f45349bd8b5b055dccd036549ec727c0186d
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Robert Varga [Fri, 1 Aug 2014 15:38:01 +0000 (15:38 +0000)]
Merge "Bug 1119 - Optimize generated range checks"
Ladislav Borak [Wed, 30 Jul 2014 21:56:02 +0000 (23:56 +0200)]
Bug 1119 - Optimize generated range checks
- moved initialization of range and length constraints list
into static initialization block
Change-Id: I2f5631fceb0e776fe3172e9a05ee97b7fe81252b
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Robert Varga [Fri, 1 Aug 2014 13:50:22 +0000 (13:50 +0000)]
Merge "Bug 1436: Introduced BindingStreamEventWriter interface"
Tony Tkacik [Mon, 28 Jul 2014 11:36:48 +0000 (13:36 +0200)]
Bug 1436: Introduced BindingStreamEventWriter interface
Introduced BindingStreamEventWriter interface,
which allows to implement Binding codecs
with plugable backend for actual serialization.
This interface needs to present in yang.binding
package, since this in only package which
is imported by all generated YANG Java Bindings
and thus visible for them.
Change-Id: I2d235cd63ecda1d63c8077854a38a5dc9d184d2d
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Fri, 1 Aug 2014 07:54:20 +0000 (07:54 +0000)]
Merge changes Ic9936326,I9b600761
* changes:
BUG-865: move ClassLoaderUtils into util package
BUG-865: prepare to move ListenerRegistry
Robert Varga [Wed, 30 Jul 2014 06:42:45 +0000 (08:42 +0200)]
BUG-865: move ClassLoaderUtils into util package
Removes the two previously-deprecated instances, deprecate the third one
and instantiate the utility at the proper place.
Change-Id: Ic9936326fb0f4d4b2129562ae84b131b79746c23
Signed-off-by: Robert Varga <rovarga@cisco.com>
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>
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>
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: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>
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, 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 [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: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."
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 [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: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: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."
Martin Vitez [Mon, 21 Jul 2014 09:46:04 +0000 (09:46 +0000)]
Merge "Bug 626 - It should be possible to create java doc"
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."
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>
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>
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"
tpantelis [Sat, 10 May 2014 16:04:46 +0000 (12:04 -0400)]
Output generated codec source to files
- Added SourceCodeGenerator helper class that holds the generated
field/method source code until outputGeneratedSource is called to
generate the source for the entire class and output to a file
under generated-sources.
- Modified TransformerGenerator and JavassistUtils to use the
SourceCodeGenerator.
- Other pom changes to eliminate Eclipse errors.
Change-Id: Id910161569835d0cf9659ddf806e21f2545c713b
Signed-off-by: tpantelis <tpanteli@brocade.com>
Martin Vitez [Wed, 9 Jul 2014 06:54:21 +0000 (08:54 +0200)]
BUG-979: reworked data schema nodes ordering
This patch changes ordering of child nodes - nodes are ordered as they are declared in
yang file (before they were sorted in alphabetical order). This ordering is applied for
schema node builders and also for schema node instances.
Change-Id: I628d40be638fc56ee3e4e1ff9c161ab1cf88ae19
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Wed, 16 Jul 2014 08:03:41 +0000 (10:03 +0200)]
BUG-532: implemented copy constructor for generated builder classes.
Added test.
Change-Id: Ic9d6b4c80b431978a624c7a0d7cd0f7f71d4bb8c
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Robert Varga [Tue, 15 Jul 2014 21:04:23 +0000 (23:04 +0200)]
BUG-1270: be smart about Restrictions
Restrictions are based on type definitions, which are constant. For base
types they always are. For extended types, they are usually empty.
Optimize memory usage by reusing the lists anchored in types and also by
having a singleton instance for the all-empty case.
Change-Id: Ie9773d7efb57d403a008b82716eb22d97fefb224
Signed-off-by: Robert Varga <rovarga@cisco.com>
Martin Vitez [Wed, 9 Jul 2014 14:17:59 +0000 (16:17 +0200)]
BUG-1276: fixed generated union constructor
Current generated definition of union constructor
public UnionType(Arg1 _arg1) {
super();
this._arg1 = _arg1;
this._arg2 = null;
this._value = null;
}
was incorrect and setting this._value == null was replaced with setting _value to correct value, for example:
this._value = arg1.getValue()
or
this._value = _arg1.getValue().toString().toCharArray()
Change-Id: I837e5e1fc6845937d19abcdc8e2f8d52b410d316
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Tue, 15 Jul 2014 11:20:38 +0000 (11:20 +0000)]
Merge "Bug 865: Fixed incorrect conversion to new APIs."
Tony Tkacik [Tue, 15 Jul 2014 10:42:37 +0000 (12:42 +0200)]
Bug 865: Fixed incorrect conversion to new APIs.
Change-Id: I585e4d9142dc261317661c4442c771db791a46de
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Mon, 14 Jul 2014 15:04:52 +0000 (17:04 +0200)]
Bug 1329: Use original definition for searching for java class.
Change-Id: I667c5370e45353626c65099c57876b2f8c60ab91
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Tue, 15 Jul 2014 09:46:17 +0000 (09:46 +0000)]
Merge "BUG-1347: fixed bug in generation constraints for decimal64 type."
Martin Vitez [Tue, 15 Jul 2014 09:37:35 +0000 (09:37 +0000)]
Merge "Bug 865: Removed uses of packageNameFromModule"
Martin Vitez [Tue, 15 Jul 2014 09:36:49 +0000 (09:36 +0000)]
Merge "Bug 1366: Fallback scenario for IdentityCodec to work without schema."
Martin Vitez [Tue, 15 Jul 2014 09:35:37 +0000 (09:35 +0000)]
Merge "API Cleanup: Moved package name computation to BindingMapping."
Tony Tkacik [Tue, 15 Jul 2014 09:14:52 +0000 (11:14 +0200)]
Bug 865: Removed uses of packageNameFromModule
Change-Id: I49d16e69943777acb34ac904ce2559302d0ac39c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Tue, 15 Jul 2014 09:10:33 +0000 (11:10 +0200)]
Bug 1366: Fallback scenario for IdentityCodec to work without schema.
Change-Id: Ife4c3c15db1397829c5b5a46575785121bf41ed1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Tue, 15 Jul 2014 09:02:39 +0000 (11:02 +0200)]
API Cleanup: Moved package name computation to BindingMapping.
Change-Id: I8e9016c4cadd7bee36ec440b960891503b645f4a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Vitez [Thu, 10 Jul 2014 13:51:32 +0000 (15:51 +0200)]
BUG-1347: fixed bug in generation constraints for decimal64 type.
Added test.
Change-Id: I52a539ea7c5ff6b36b9bc362660188f9627bff7d
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Wed, 9 Jul 2014 10:38:13 +0000 (10:38 +0000)]
Merge "Bug 1339: Decreased anyxml warning to debug."
Tony Tkacik [Wed, 9 Jul 2014 07:25:33 +0000 (09:25 +0200)]
Bug 1339: Decreased anyxml warning to debug.
Change-Id: I9f21f1fd181229a6b3dccd7aa7dc9c53ab4e5db0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Tue, 8 Jul 2014 16:46:31 +0000 (16:46 +0000)]
Merge "BUG-1304: rework BindingGeneratorImpl from xtend to java"
Martin Vitez [Fri, 4 Jul 2014 13:22:02 +0000 (15:22 +0200)]
BUG-1304: rework BindingGeneratorImpl from xtend to java
Change-Id: Idc09bca749951fb8c075b9ffb291c2a6a362dbe2
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Fri, 4 Jul 2014 08:04:38 +0000 (08:04 +0000)]
Merge "Bug 560: Fixed incoherent API implementation."
Martin Vitez [Fri, 4 Jul 2014 07:31:01 +0000 (09:31 +0200)]
BUG-579: Remove the dependency on GeneratedTOBuilderImpl to break a package cycle.
Change-Id: Ibcdd7bcb0cdf44d5d7ef30105624bede15bcd50e
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Robert Varga [Thu, 3 Jul 2014 21:43:03 +0000 (23:43 +0200)]
Use CharMatcher in packageNameForGeneratedType()
Instead of performing up to two string copies, use a single replacement
pass, taking into account two characters using a CharMatcher.
Change-Id: I305d384eff2da5d0bfb3b1b820270f4480a800a4
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 3 Jul 2014 21:38:47 +0000 (23:38 +0200)]
Optimize BindingMapping.toCamelCase()
Instead of replacing characters, we use a CharMatcher in the Splitter.
This elides the need to copy strings and search them multiple times.
Change-Id: Iff0e580f927a5f983a3eb6e2e3b318f33a1b2217
Signed-off-by: Robert Varga <rovarga@cisco.com>
Lukas Sedlak [Fri, 4 Jul 2014 06:41:30 +0000 (08:41 +0200)]
Bug 560: Fixed incoherent API implementation.
Fixed bug in getRpcServiceClassFor method. Now method follows API contract and will return class
for specified module namespace and module revision.
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Robert Varga [Thu, 3 Jul 2014 21:17:59 +0000 (23:17 +0200)]
Do not use "".equals(String)
This is an ugly shorthand for String.isEmpty(), so let's not use it.
Change-Id: I6f00cc0676f982e99690294a11e703832b404977
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Thu, 3 Jul 2014 11:59:46 +0000 (11:59 +0000)]
Merge "BUG-1119: optimize length and range checks in generated sources."
Tony Tkacik [Thu, 3 Jul 2014 11:55:58 +0000 (11:55 +0000)]
Merge "BUG-597: removed dependency on GeneratedTOBuilderImpl from BindingGeneratorUtil to break a package cycle."
Tony Tkacik [Thu, 3 Jul 2014 11:52:17 +0000 (11:52 +0000)]
Merge "BUG-1143: binding-generator-impl: tests refactoring."
Robert Varga [Wed, 2 Jul 2014 10:58:22 +0000 (12:58 +0200)]
BUG-1275: do not copy arrays in XmlDocumentUtilsforEachChild()
ImmutableList.Builder() has a nasty habit of performing poorly for
anything that is larger than 2 elements. Let's elide it by following
smarts:
- check if the list of children is empty
- pre-allocate an arraylist, thus copying the array at most once
Change-Id: I08825e15fba92e256bd415c192d3f30d52d6d8eb
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 2 Jul 2014 11:17:41 +0000 (13:17 +0200)]
Optimize BindingGeneratorUtil.parseToCamelCase()
This replaces the relatively expensive replace operation with
CharMatcher.removeFrom().
Change-Id: I74123797427c76b3584394a3a203500bb9dea73b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Martin Vitez [Wed, 2 Jul 2014 11:03:20 +0000 (11:03 +0000)]
Merge "BUG-868: do not use InstanceIdentifier constructor"
Robert Varga [Wed, 2 Jul 2014 08:37:43 +0000 (10:37 +0200)]
BUG-868: do not use InstanceIdentifier constructor
Change-Id: Iffe519a5720d50c3ad6a88c747e36019507b6781
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Wed, 2 Jul 2014 08:22:57 +0000 (08:22 +0000)]
Merge "Improvements REST documentation generation"
Martin Vitez [Thu, 12 Jun 2014 10:46:14 +0000 (12:46 +0200)]
BUG-597: removed dependency on GeneratedTOBuilderImpl from BindingGeneratorUtil to break a package cycle.
Change-Id: I6dfbf217982e1128ab22db70af261ade250642c3
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Tue, 10 Jun 2014 13:40:43 +0000 (15:40 +0200)]
BUG-1119: optimize length and range checks in generated sources.
Constraints are generated only once (by double-checked locking) and stored as immutable static variable.
BigInteger and BigDecimal values 0, 1 and 10 are represented as Big*.ZERO, ONE or TEN.
BigInteger values are created via BigInteger.valueOf(long) call.
Change-Id: Idb54d841fe64fd5a32af38b30126a314d6bc7a0d
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Fri, 27 Jun 2014 08:00:38 +0000 (10:00 +0200)]
BUG-1143: binding-generator-impl: tests refactoring.
Optimalized existing tests, removed useless test files.
Change-Id: I5dbe03b66b6d3251b87bc9eb1f1c89ebe6f03c3d
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Wed, 2 Jul 2014 07:45:26 +0000 (07:45 +0000)]
Merge "RevisionIdentifier.getDefaultInstance() is static"
Tony Tkacik [Tue, 1 Jul 2014 14:51:27 +0000 (14:51 +0000)]
Merge "Bug 762: Verify input in typedef codecs"
Robert Varga [Tue, 1 Jul 2014 14:13:00 +0000 (16:13 +0200)]
RevisionIdentifier.getDefaultInstance() is static
This fixes warnings about static method being invoked on an instance,
plus it removes the now-unused instance.
Change-Id: I7c4594908d6b3a5c10e9b3f12e32ca203d3aa3d2
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Tue, 1 Jul 2014 14:48:35 +0000 (14:48 +0000)]
Merge "Cleanup pom.xml"
Tony Tkacik [Tue, 1 Jul 2014 14:46:36 +0000 (14:46 +0000)]
Merge "BUG-994: use SchemaPath.getPathTowardRoot()"
Robert Varga [Tue, 1 Jul 2014 14:08:37 +0000 (16:08 +0200)]
Cleanup pom.xml
This cleans up eclipse warnings about duplicate groupIds and overriding
versions.
Change-Id: Id920e7bb01814c5184f1157b093e3f449cfdf955
Signed-off-by: Robert Varga <rovarga@cisco.com>
Martin Vitez [Tue, 1 Jul 2014 14:07:31 +0000 (16:07 +0200)]
BUG-865: removed deprecated code from binding-java-api-generator tests.
Fixed warning in ClassTemplate.xtend.
Change-Id: I4add39082ab10c8b8ddb6dc7c4062470b198e2f6
Signed-off-by: Martin Vitez <mvitez@cisco.com>