Kiran Agrahara Sreenivasa [Thu, 10 Jul 2014 13:41:19 +0000 (06:41 -0700)]
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>
I've moved the details about the schema contexts to a debug message.
Change-Id: I9b9425449d1f679fc080d5b33d96e2d865c25973
Signed-off-by: Kiran Agrahara Sreenivasa <kkoushik@brocade.com>
Kiran Agrahara Sreenivasa [Wed, 9 Jul 2014 12:58:58 +0000 (05:58 -0700)]
Fixing typo in log message
Change-Id: I6fc546f7319c13b09db1754dce5e6d49446531f3
Signed-off-by: Kiran Agrahara Sreenivasa <kkoushik@brocade.com>
Robert Varga [Tue, 8 Jul 2014 22:01:01 +0000 (00:01 +0200)]
BUG-865: do not use InstanceIdentifier.getPath()
The method was only used to speed up an ArrayList, which in turn was only
ever used for debugging. Instead of using a precodintion which forces us
to do this, just track the offset of the offending entry. If we find
ourselves in the error territory, we can then take getPathArguments(),
limit it to proper size and print it out.
Change-Id: I3c1786fe77cef005a6463c22b5be8bb8672c26bb
Signed-off-by: Robert Varga <rovarga@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 08:47:04 +0000 (08:47 +0000)]
Merge "Bug 1331 - Generate SPIs and yangs to target/generated-sources/ subfolders"
Tony Tkacik [Wed, 9 Jul 2014 07:50:08 +0000 (07:50 +0000)]
Merge "BUG-579: improve code readability in RestconfUtils."
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"
Tomas Olvecky [Tue, 8 Jul 2014 12:44:40 +0000 (14:44 +0200)]
Bug 1331 - Generate SPIs and yangs to target/generated-sources/ subfolders
Instead of putting SPIs to target/generated-resources and yangs to target/yangs
use standard target-generated-sources/{spi,yang}
This change allows IDEs with auto detection capabilities to pick
up all resources that will be packaged into JAR with correct path.
Change-Id: If9f0367732baddf66e22135ccf3a59124455335f
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
Martin Vitez [Tue, 1 Jul 2014 11:51:34 +0000 (13:51 +0200)]
BUG-1210: refactored imports handling in parser.
Currently builder for module has no information about imported modules. This causes overhead because before resolving any of imported nodes
(uses, typedef, identities, augment path, deviation path...) parser needs to search whole collection of available modules to find target
module of imported node.
This patch adds information about imported modules to ModuleBuilder, so they can be available without search. Searching is performed only
once when resolving imports.
Change-Id: Ifcd4e995431165820c142e486da0466edc6abca0
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Tue, 8 Jul 2014 09:10:55 +0000 (09:10 +0000)]
Merge changes I9886ddb7,I851fa16e,I3b7b0bf5,Ib7f2ce87,I7d0cf295,I35ae6fcb,I14c86257,Ic4af26d7
* changes:
LazyNodeToNodeMap: use a ArrayDeque instead of a Stack
XmlTreeBuilder: ensure thread safety
NodeFactory: use an ArrayDeque instead of a Stack
NodeUtils: Use an ArrayDeque instead of a Stack
Optimize YangParserListenerImpl logging
BUG-865: migrate to Optional<>
Refactor SchemaPathStack
Migrate the conceptual stack into a utility class
Martin Vitez [Tue, 8 Jul 2014 06:56:03 +0000 (08:56 +0200)]
BUG-1170: removed hardcoding of test build directory.
Change-Id: I1410b84d7a7a1f9720e0414cf799f42f90b1ed16
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Martin Vitez [Fri, 4 Jul 2014 08:06:22 +0000 (10:06 +0200)]
BUG-579: improve code readability in RestconfUtils.
Change-Id: Ia7d06c95f4237a2f6a1b64cc9c7d612bac8df413
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Robert Varga [Mon, 7 Jul 2014 21:07:59 +0000 (23:07 +0200)]
LazyNodeToNodeMap: use a ArrayDeque instead of a Stack
The thread safety feature is not needed and it should be faster.
Change-Id: I9886ddb7bdc69d27e489f5bff1cced5876d32aaa
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 7 Jul 2014 21:05:14 +0000 (23:05 +0200)]
XmlTreeBuilder: ensure thread safety
Having a static field is a multi-threading show-stopper. Propagate the
state required via method argumets instead. Also convert Stack to
ArrayDeque.
Change-Id: I851fa16e648c0eb94ddc19f8ae9809b977c68564
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 7 Jul 2014 21:00:39 +0000 (23:00 +0200)]
NodeFactory: use an ArrayDeque instead of a Stack
Thread safety is not needed and it's likely to be faster.
Change-Id: I3b7b0bf5f16f5e5c587baacb40f403723775034b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 7 Jul 2014 20:55:50 +0000 (22:55 +0200)]
NodeUtils: Use an ArrayDeque instead of a Stack
Thread-safety is not needed and it's likely to be faster.
Change-Id: Ib7f2ce87056d134fe8e7fc9695ec46da22058c8a
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 7 Jul 2014 20:44:53 +0000 (22:44 +0200)]
Optimize YangParserListenerImpl logging
- make util methods static
- do not use string concat in warnings
- do not concat strings for trace
Change-Id: I7d0cf2958df5fb54b159c205ee33f75afe2fe23a
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 7 Jul 2014 20:34:23 +0000 (22:34 +0200)]
BUG-865: migrate to Optional<>
Change-Id: I35ae6fcb9b4a1445d06d4688ffea38b828f1a3c8
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 7 Jul 2014 20:25:17 +0000 (22:25 +0200)]
Refactor SchemaPathStack
With proper encapsulation it becomes clear how SchemaPaths can be
directly applied. Do just that, using
SchemaPath.createChild()/getParent() and use a Deque (backed by a
LinkedList) instead of an explicit Stack.
Change-Id: I14c86257c10228acd9d113f382f9fb891d6033b6
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 7 Jul 2014 19:56:17 +0000 (21:56 +0200)]
Migrate the conceptual stack into a utility class
Introduces SchemaPathStack -- which is precisely what the concept is.
This hides away the implementation details, so they can be refactored as
needed.
Change-Id: Ic4af26d7fa3ed5fce04227b6c5963b542f0575ad
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 7 Jul 2014 19:33:28 +0000 (21:33 +0200)]
Introduce moduleQName for sharing
If we stire namespace/revision/prefix in a QName, we are able to create
related QNames using a utility method, which will automatically share
the resulting QNameModule.
Change-Id: I53fbf10cf853cb3a4b265fd1f9823f604f148e73
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 7 Jul 2014 12:46:49 +0000 (14:46 +0200)]
Encapsulate SchemaPath creation
When we look at actualPath, we always want the SchemaPath -- so let's do
precisely that.
Change-Id: Ibe65adfb841cd1422b3fbc6945b3a87a3cdce62d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 7 Jul 2014 12:39:46 +0000 (14:39 +0200)]
Update ParserListenerUtils to use SchemaPath
Instead of relying on Stack<QName>, take a SchemaPath, which makes the
operations more efficient.
Change-Id: I18fcf20f5c164be53bae3487768cab472502ec74
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 7 Jul 2014 12:01:38 +0000 (14:01 +0200)]
Reuse last QName in ParserListener
Given a base QName, a new QName can be costructed such that it shares
its QNameModule. Take advantage of that.
Change-Id: I155b55a0384c90dca65dda6222a186041c691250
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 7 Jul 2014 11:54:01 +0000 (13:54 +0200)]
Use global well-known QNames
Basetypes define QNames for all the base types, so no need to create
them all over again.
Change-Id: I732a8a9694b9aedf72bd0a78bb7ed62c1f98a3ed
Signed-off-by: Robert Varga <rovarga@cisco.com>
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>
Robert Varga [Fri, 4 Jul 2014 15:26:03 +0000 (17:26 +0200)]
Optimize ParserListenerUtils()
- instanceof check implies null check
- use direct return instead of a break when returning things
Change-Id: Ibcd9198a3505da72d2abb90ce348f2ddf2e1e35b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 4 Jul 2014 13:00:25 +0000 (15:00 +0200)]
BUG-865: eliminate the use of YangTypesConverter
Uses BaseTypes instead.
Change-Id: I7c1f71f986813872a5680147e87c800f9764b868
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 4 Jul 2014 12:57:10 +0000 (14:57 +0200)]
Eliminate use of String.split()
Another round of optimizations, centered about not instantiating
implicit pattern matchers, but rather using Splitters.
Change-Id: I9ebba19fd9f211e7fa55e9bb55e35ae5e2a7b379
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 4 Jul 2014 10:26:30 +0000 (12:26 +0200)]
Optimize string operations
This removes the excessive splitting and string replacement with proper
splitters. We also add better length/range constraint validation.
Change-Id: Ia69d29a307cc23b22bf282ed17e9f585a41ae336
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 4 Jul 2014 08:34:26 +0000 (10:34 +0200)]
BUG-865: do not use obsolete contructors
This removes the use of obsoleted constructors exposed from model API.
Change-Id: Ia537614855a7d4677bbb39b1d3bf9da984d23187
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 4 Jul 2014 08:05:03 +0000 (10:05 +0200)]
BUG-865: Do not use QName constructor
Change-Id: I7842fc9f0f2e4164504ba0f8aed8267eae1581b5
Signed-off-by: Robert Varga <rovarga@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>
Robert Varga [Thu, 3 Jul 2014 20:45:43 +0000 (22:45 +0200)]
BUG-1270: optimize Builders with QName(Module)
Now that we are exposing QNameModule, we can optimize QName
instantiation heavily by passing parent QName and QNameModule instances,
so they will get massively reused.
Change-Id: If67883ea3873a55b563136b743a7453c365475a9
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 3 Jul 2014 20:28:43 +0000 (22:28 +0200)]
BUG-1270: use QNameModule where possible
This converts a couple of callsites, which will hopefully result in more
sharing.
Change-Id: If77948d6cf16b56d3d05eeb5a6dc37d20b0ab1ae
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 20:27:38 +0000 (22:27 +0200)]
BUG-1270: expose QName.create(QNameModule, String)
We have had the constructor to go with this a long time ago, expose it
via a static factory method.
Change-Id: If198764ba51ada19527b484b420ad843236fbcf3
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 1 Jul 2014 21:41:32 +0000 (23:41 +0200)]
BUG-1270: introduce getQNameModule()
Introduces a new getNsRevision() method, which returns a reusable
QNameModule instance.
Change-Id: Ie3590c245494143fe2c6d2d37766f29ecc4e4d9a
Signed-off-by: Robert Varga <rovarga@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>
Robert Varga [Thu, 3 Jul 2014 21:08:14 +0000 (23:08 +0200)]
Reuse a single QNameModule for NULL
QNameModules with null namespace/revision are an easy pick -- reuse a
single instance for all of them.
Change-Id: I1f519ad5a46c82da3daf17122087af89c97e5df8
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 3 Jul 2014 20:54:38 +0000 (22:54 +0200)]
Optimize BuilderUtils
- reuse Date(0L)
- skip empty strings in SLASH_SPLITTER
- check just the first character to determine if XPath is absolute
Change-Id: Ia4a4d30ebe5e4d2e3866761a4393ebf564f6cf38
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 3 Jul 2014 12:33:07 +0000 (14:33 +0200)]
BUG-865: do not use QName constructor
This is a mas replace of 'new QName()'.
Change-Id: I810be523769f13b7eb10a2161e28499d17aa1378
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:54:28 +0000 (11:54 +0000)]
Merge "BUG-865: fixed formatting of pom.xml"
Tony Tkacik [Thu, 3 Jul 2014 11:52:17 +0000 (11:52 +0000)]
Merge "BUG-1143: binding-generator-impl: tests refactoring."
Tony Tkacik [Thu, 3 Jul 2014 11:08:52 +0000 (11:08 +0000)]
Merge "BUG-1288: improve InstanceIdentifier API"
Robert Varga [Thu, 3 Jul 2014 09:04:37 +0000 (11:04 +0200)]
BUG-1288: improve InstanceIdentifier API
Introduces getLastPathArgument and getReversePathArguments, which are
useful for some users, who open-code the equivalent methods.
Also removes the use of deprecated constructor, opting for an Iterables
utility class for intering instantiation.
Change-Id: I364e41dc7efdd1b3c56d03e626c8671b2c20ae8d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 2 Jul 2014 16:42:18 +0000 (18:42 +0200)]
BUG-1275: optimize AugmentationSchemaProxy for lookup speed
This patch uses ImmutableMap to bias the map from creation speed to
lookup performance. Also, in the lookup path we perform a single lookup,
and check the null result, instead of contains() followed by a lookup.
Change-Id: Iba50dc5fae7ef87da79072be4936690587f46018
Signed-off-by: Robert Varga <rovarga@cisco.com>
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 10:12:45 +0000 (12:12 +0200)]
BUG-1275: speedup toPredicateValue()
Instead of performing startsWith/endsWith, we first check the first
character and based on that we optinally trim the string to the matching
character. Also fixes a bug, where string like 'abc" would be accepted.
Change-Id: I683074ec53a7924812d9fe77b669e7cab5f32ea8
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 2 Jul 2014 10:03:28 +0000 (12:03 +0200)]
BUG-1275: move InstanceIdentifierForXmlCodec
Move the class into the appropriate package and makes it a utility class
without an instance.
Change-Id: Ibaa03e5452fb4890815a11592e8a4787844c32f1
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 2 Jul 2014 08:38:21 +0000 (10:38 +0200)]
BUG-1275: optimize InstanceIdentifierForXmlCodec
First batch of optimizations:
- use Splitter instead of String.split()
- use characters instead of Strings
- use ThreadLocalRandom
- sue SchemaContext.findModuleByNamespace()
Various optimizations revolving around precompiling Patterns, using
characters instead of strings,
Change-Id: Id2befcc49d4346917a39d434b005b07fe3f50b7c
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 2 Jul 2014 11:42:19 +0000 (13:42 +0200)]
BUG-1275: optimized set instantiation ChoiceNodeBaseSerializer
The hashset used in getRealSchemasForAugment() can be initialized when
allocated, potentially saving some reallocation.
Change-Id: Ib848074716f5f4de108e6b348f0fed2f20bc6dcf
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 2 Jul 2014 11:41:05 +0000 (13:41 +0200)]
BUG-1275: use singletonLists
There is no need to instantiate wasteful ArrayLists to hold a single
element -- use Collections.singletonList() for that.
Change-Id: I57c2149acdb8b44b245418cf0437e5f7f05a24ef
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 2 Jul 2014 10:26:02 +0000 (12:26 +0200)]
BUG-1275: optimize TypeDefinitionAwareCodec.normalizeHexadecimal()
normalizeHexadecimal() used non-optimal combination of searching for a
substring and a non-compiled regex replace. Optimize this by using
a precomputed CharMatcher instead.
Change-Id: Ie388735244c779d0e80ed98d8c6ce71bf2f4fbf6
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"
Tomas Olvecky [Tue, 1 Jul 2014 11:08:57 +0000 (13:08 +0200)]
Bug 1131 - yang-parser-impl cleanup
Fix small bugs (equals comparing incompatible types), null checks etc.
Fix import ordering.
Change-Id: I8c9f37e98542c63192ca8572edfd0de3643691cf
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
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"
Martin Vitez [Wed, 2 Jul 2014 07:44:42 +0000 (07:44 +0000)]
Merge "Add serial version"
Martin Vitez [Tue, 1 Jul 2014 14:29:40 +0000 (16:29 +0200)]
BUG-865: fixed formatting of pom.xml
Change-Id: I82a5a47f3c870ad8c51277abead71a0ae7281b40
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Tony Tkacik [Tue, 1 Jul 2014 16:51:57 +0000 (18:51 +0200)]
Bug 762: Fixed accidental type change for union.
Previous patch used Java type derived from
subtypes from typedefinition, but most
of DOM code base were expecting string,
since in some cases it is hard to decide
between two subtypes.
Change-Id: I04355037047e742dc1e2a044dd7a5c48bc0dc0b7
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
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>
Robert Varga [Tue, 1 Jul 2014 14:12:16 +0000 (16:12 +0200)]
Add serial version
Exceptions are serializable, thus have to have serialVersionUUID.
Change-Id: I313174518bdc8fc358e6cdc5a7d2c42cac7add92
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Tue, 1 Jul 2014 14:49:41 +0000 (14:49 +0000)]
Merge "BUG-1258: Mark FIXME for implementation"
Tony Tkacik [Tue, 1 Jul 2014 14:48:49 +0000 (14:48 +0000)]
Merge "BUG-868: do not use InstanceIdentifier.getPath()"
Tony Tkacik [Tue, 1 Jul 2014 14:48:35 +0000 (14:48 +0000)]
Merge "Cleanup pom.xml"
Tony Tkacik [Tue, 1 Jul 2014 14:47:04 +0000 (14:47 +0000)]
Merge "BUG-994: introduce SchemaPath.getLastComponent()"
Tony Tkacik [Tue, 1 Jul 2014 14:46:49 +0000 (14:46 +0000)]
Merge "BUG-994: improve CopyUtils performance"
Tony Tkacik [Tue, 1 Jul 2014 14:46:36 +0000 (14:46 +0000)]
Merge "BUG-994: use SchemaPath.getPathTowardRoot()"
Tony Tkacik [Tue, 1 Jul 2014 14:46:24 +0000 (14:46 +0000)]
Merge "BUG-994: remove open-coded SchemaPath.createChild"
Robert Varga [Mon, 30 Jun 2014 09:36:03 +0000 (11:36 +0200)]
BUG-1258: Mark FIXME for implementation
This is not a fix, but rather a marker for the place in code where we
have enough information to improve efficiency.
Change-Id: I26838baed3a8e0769fecd0e56c4e8a974fe6c971
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 30 Jun 2014 09:19:45 +0000 (11:19 +0200)]
BUG-868: do not use InstanceIdentifier.getPath()
We only iterate through it, so we can use getPathArguments() instead.
Change-Id: I47a8655294c46ddd00626f72dae64218c6831753
Signed-off-by: Robert Varga <rovarga@cisco.com>
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>
Robert Varga [Thu, 26 Jun 2014 18:59:02 +0000 (20:59 +0200)]
BUG-994: introduce SchemaPath.getLastComponent()
As it turns out we access the last component quite frequently. Let's
just expose it to the users, so they do not have to go through hoops to
find it.
Change-Id: I434f729f08196ad768e9326ffdc1cf9409ea8f07
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 26 Jun 2014 17:51:28 +0000 (19:51 +0200)]
BUG-994: improve CopyUtils performance
Instead of copying schemapath's components and juggling with them, use
the new utility functions to instantiate the paths more efficiently.
Change-Id: I86dca53150b46f25de8c5261c17332e9ee5d8533
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 26 Jun 2014 17:43:13 +0000 (19:43 +0200)]
BUG-994: use SchemaPath.getPathTowardRoot()
Instead of dereferencing the old API, use the new API, which gives the
same information more conveniently.
Change-Id: I485bae608bfb4aa1f6dae9838458a58ff4b23793
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 26 Jun 2014 16:58:30 +0000 (18:58 +0200)]
BUG-994: remove open-coded SchemaPath.createChild
This is just cleanup to use the common utility methods.
Change-Id: Icc0ed86e585ceb73c7f2f0a38da7525c40bd4303
Signed-off-by: Robert Varga <rovarga@cisco.com>
Martin Vitez [Tue, 1 Jul 2014 12:35:16 +0000 (12:35 +0000)]
Merge "Bug 1027: Decreased log level from INFO to DEBUG."
Tomas Olvecky [Wed, 18 Jun 2014 13:16:35 +0000 (15:16 +0200)]
Bug 1198: Make URLSchemaContextResolver thread safe
Make YangModelParser interface deprecated as recommended methods are in
YangContextParser.
yang-parser-impl - Introduce dependency on findbugs for documentation.
URLSchemaContextResolver - first round of refactoring, add
synchronized everywhere where data is changed.
Change-Id: Id53f165740301d085ad8374fc02897a0a19faa38
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
Tony Tkacik [Tue, 1 Jul 2014 09:20:33 +0000 (09:20 +0000)]
Merge "BUG 428 remove importing unnecessary imports"
Ladislav Borak [Tue, 1 Jul 2014 08:27:58 +0000 (10:27 +0200)]
Improvements REST documentation generation
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Tony Tkacik [Tue, 1 Jul 2014 08:06:53 +0000 (08:06 +0000)]
Merge "Revert "Revert "BUG-994: reorganize SchemaPath into a tree"""
Robert Varga [Mon, 30 Jun 2014 19:33:26 +0000 (19:33 +0000)]
Merge "BUG-994: do not use SchemaPath.getPath()"
Tony Tkacik [Mon, 30 Jun 2014 12:57:28 +0000 (14:57 +0200)]
Bug 1027: Decreased log level from INFO to DEBUG.
Change-Id: I79452e344c23aa593505ac41337c9d9306b6f1d5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Jozef Gloncak [Mon, 28 Apr 2014 11:41:40 +0000 (13:41 +0200)]
BUG 428 remove importing unnecessary imports
List of imports is created from all GeneratedTypes which were used while
generating interface or class.
Fully qualified name is always used for classes which belongs to
java.lang.* package
Change-Id: I14dcf1bd852ef596c6001c5bf2ffeac9a65d962b
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Tomas Olvecky [Tue, 24 Jun 2014 11:09:12 +0000 (13:09 +0200)]
BUG 1131: Introduced sealing of builder, initial clean up of ModuleBuilder.
Introduced sealing of builders, which makes sure builder is not
modified once the product of build was created.
Logic in parser prevented this already, but it was external
check to builders, not internal.
Sealing of builders is critical for implementing safe
instantiation since once you create copy of builder
(eg.instantiation of grouping) you do NOT want
to have grouping definition accidentally change.
This should prevent introducing regressions as described above.
Change-Id: Iad2dfc8036d27f3538e48315eb1fc17a5481f67b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
Tomas Olvecky [Wed, 25 Jun 2014 12:22:30 +0000 (14:22 +0200)]
BUG 1131: Removed duplicate code in builders.
Sonar Analysis showed that concrete implementations of builders have
number of similar code blocks, which deals with creating instance
of schema node.
This functionality should have only one implementiation (this
increases readibility and reduces potential places for bugs)
moved common shared functionality to Abstract*Builder and
Abstract implementaitons of SchemaNodes.
Change-Id: Ie9d87eaa728612090f9ad3740381df1bf970d1fe
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>