yangtools.git
2 weeks agoOffload null value checking to CodeHelpers
Robert Varga [Tue, 26 Mar 2019 19:34:36 +0000 (20:34 +0100)]
Offload null value checking to CodeHelpers

Since we are using a fixed string, we can easily offload the call
to a centralized place in CodeHelpers, thus providing some minor
class size improvements.

Change-Id: I25991e7020bafc535dab6731063e39e92de03d95
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRemove unused imports
Robert Varga [Tue, 26 Mar 2019 19:37:28 +0000 (20:37 +0100)]
Remove unused imports

These were introduced during MDSAL-48 implementation, remove them
again.

JIRA: MDSAL-48
Change-Id: I1fa1944bd8e1f6e0780cf2fd5d82e3b028d27a4e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRemove use of deprecated createCursor() method
Robert Varga [Tue, 26 Mar 2019 15:21:57 +0000 (16:21 +0100)]
Remove use of deprecated createCursor() method

This method has been superseded by openCursor(), use that.

Change-Id: Ie64c91106c1b1cfddbd0d68456e5081f6ef72341
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRemove @(Not)ThreadSafe annotation
Robert Varga [Tue, 26 Mar 2019 13:03:15 +0000 (14:03 +0100)]
Remove @(Not)ThreadSafe annotation

Use documentation rather than JSR305 to document non-thread-safety.
In package-private classes these annotations often do not make
sense.

Change-Id: Iea39cf23472917e9d5765e6d2a025ff7ab7f6114
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoTolerate unresolvable leafrefs in groupings
Vratko Polak [Fri, 1 Jul 2016 11:21:15 +0000 (13:21 +0200)]
Tolerate unresolvable leafrefs in groupings

In case a grouping contains a relative leafref pointing outside of
the grouping subtree we cannot safely determine the target type, which
lead to an IllegalArgumentException.

In this case we need to resolve the return type to an Object, which
loses type safety, but really is the best we can do as we just do not
know in what contexts that grouping is used.

Unfortunately this requires API changes to mdsal-binding-generator-api
as we need to communicate the fact we are resolving a type definition
in the context of a grouping to TypeProvider implementations.

JIRA: MDSAL-182
Change-Id: Iaf96d133c08eb47f4bb27b6c4f3db1463b78f05e
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoChange 'type empty' mapping
Robert Varga [Mon, 18 Mar 2019 13:40:29 +0000 (14:40 +0100)]
Change 'type empty' mapping

This patch changes 'type empty' leaves to map to yang.common.Empty,
aligning DOM and Binding representations and removing potential
confusion around what Boolean.FALSE means in the value.

It also eliminates the need for a dedicated codec, as this type is
handled through NOOP_CODEC.

JIRA: MDSAL-48
Change-Id: If43d710d4620cffaecc8ca7d42d1eb00c58370c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRemove FluentFuture from DOM RPC contracts
Robert Varga [Sat, 16 Mar 2019 12:01:58 +0000 (13:01 +0100)]
Remove FluentFuture from DOM RPC contracts

FluentFuture cannot be proxied in Guava 27.0, hence we need to drop
to using ListenableFuture to efficiently shortcut invocations.

Change-Id: Ib89742760e0bbfdb6c46aa4bbf99ea35f5823c8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoCleanup RuntimeException throws
Robert Varga [Tue, 19 Mar 2019 17:04:49 +0000 (18:04 +0100)]
Cleanup RuntimeException throws

We are just wrapping exceptions in these cases, switch to wrapping
with IllegalStateException to keep sonar happy.

Change-Id: I571f444b9d97dd9d9129b6e18f7e91e72b30d842
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoSpeed up ClassTemplate getDefaultInstance() generation
Robert Varga [Tue, 19 Mar 2019 11:30:08 +0000 (12:30 +0100)]
Speed up ClassTemplate getDefaultInstance() generation

We can skip instantiating FQCN and just compare against constants,
which results in faster dispatch.

Change-Id: I681888872db411b4f70b3b09d205540d8b607568
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoSpeed up Union stringValue() generation
Robert Varga [Tue, 19 Mar 2019 11:31:14 +0000 (12:31 +0100)]
Speed up Union stringValue() generation

We can compare against well-known Types, which is faster than
going through FQCN.

Change-Id: I7f6a7bd143d94be48176d9d8e1fe56bd0e6eae8e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoSimplify UnionTemplate stringValue() dispatch
Robert Varga [Tue, 19 Mar 2019 11:19:41 +0000 (12:19 +0100)]
Simplify UnionTemplate stringValue() dispatch

We have a complicated if in two cases, simplify it and take
advantage of Types.BYTE_ARRAY.

Change-Id: Ib413d5f987b0dd15cf29fbc429bde68bc35c1379
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRemove DataContainer.getImplementedInterface()
Robert Varga [Mon, 18 Mar 2019 14:11:14 +0000 (15:11 +0100)]
Remove DataContainer.getImplementedInterface()

This method conflicts with user data and has been supplanted
by implementedInterface().

This patch removes it from codebase and instantiates a test for
the conflict.

JIRA: MDSAL-395
Change-Id: I3c2f6699a0785dbc353f3118883168b0e84407b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoGenerate implementedInterface
Robert Varga [Fri, 23 Nov 2018 18:48:03 +0000 (19:48 +0100)]
Generate implementedInterface

getImplementedInterface() is trampling on getter namespace, making
it possible to clash with a user-supplied model. It also is not properly
overridden in generated code.

Fix both these issues by introducing DataContainer.implementedInterface()
and overriding it as needed wither with a narrower specification
(groupings) or a default implementation (other interfaces).

JIRA: MDSAL-396
Change-Id: I902350f0979067a9e035770e683ab18e966deb7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoUse E$$ to capture augmentation type
Robert Varga [Mon, 18 Mar 2019 13:55:43 +0000 (14:55 +0100)]
Use E$$ to capture augmentation type

'E' is a valid generated identifier, which can lead to conflicts
when generating augmentable implementations.

Change-Id: I9d69d06e18301eff788c101e389a6d0b5365ad38
JIRA: MDSAL-425
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump version for 4.0.0-SNAPSHOT
Robert Varga [Fri, 15 Mar 2019 23:45:03 +0000 (00:45 +0100)]
Bump version for 4.0.0-SNAPSHOT

This updates snapshot artifacts for 4.0.0 release train.

Change-Id: I3900cd07963b927b34ecdd60668f47c4a3c3c85b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRemove use of deprecated constructors
Robert Varga [Fri, 15 Mar 2019 19:07:06 +0000 (20:07 +0100)]
Remove use of deprecated constructors

Java 11 deprecates most of these constructurs, so let's get rid
of them.

Change-Id: I67c03370c4e8440608e0cece182d87c7ea923258
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoMake Enumeration extend TypeObject
Jie Han [Sat, 26 Jan 2019 03:04:33 +0000 (11:04 +0800)]
Make Enumeration extend TypeObject

- By now we can use TypeObject for leaf type objects

JIRA: MDSAL-407
Change-Id: Ifc7889b154e5e8bcdcbc4885affa9d3fa88facc2
Signed-off-by: Jie Han <han.jie@zte.com.cn>
2 weeks agoUse Collections.emptyList and Collections.emptySet
Stephen Kitt [Tue, 12 Feb 2019 15:41:53 +0000 (16:41 +0100)]
Use Collections.emptyList and Collections.emptySet

... instead of the non-generic constants.

Change-Id: I8540db4c2d52185ed0de65eb8b45b75f75cc3f91
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2 weeks agoUse HashMap and HashSet constructors
Stephen Kitt [Tue, 12 Feb 2019 15:37:56 +0000 (16:37 +0100)]
Use HashMap and HashSet constructors

... instead of Maps.newHashMap and Sets.newHashSet.

Change-Id: Ie6c04a4fc546401b41943c481335e2cc320f7edd
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2 weeks agoSwitch to java.util.Base64
Stephen Kitt [Tue, 12 Feb 2019 14:23:30 +0000 (15:23 +0100)]
Switch to java.util.Base64

Change-Id: Ib944fdd09543d423478267d0ea8a386ae3efe02d
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2 weeks agoSwitch to Objects.requireNonNull
Stephen Kitt [Tue, 12 Feb 2019 11:04:48 +0000 (12:04 +0100)]
Switch to Objects.requireNonNull

... instead of Guava’s Preconditions.checkNotNull.

Change-Id: If7979ac0071e8c1d1af2d7913c6df791942825ab
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2 weeks agoAdd mark interface
Jie Han [Fri, 25 Jan 2019 03:52:34 +0000 (11:52 +0800)]
Add mark interface

- Add TypeObject for derived types only
- Add base BindingObject for all binding types

JIRA: MDSAL-406
Change-Id: I93ac1bea70f61a9ed05dc35951f024f08dcf6b83
Signed-off-by: Jie Han <han.jie@zte.com.cn>
2 weeks agoBump to 3.0.7-SNAPSHOT
Robert Varga [Tue, 22 Jan 2019 15:12:58 +0000 (16:12 +0100)]
Bump to 3.0.7-SNAPSHOT

This starts the next release development.

Change-Id: I57a90dbf6d5961ea0c2d1c3bb5af5dda985132c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRevert "Add BindingNormalizedNodeSerializer.coerceFromYangInstanceIdentifier"
Robert Varga [Tue, 22 Jan 2019 01:58:17 +0000 (02:58 +0100)]
Revert "Add BindingNormalizedNodeSerializer.coerceFromYangInstanceIdentifier"

This reverts commit 7196441a7ea3ff5026515050c86e00ea379bc53d.

Blueprint cannot handle default methods, hence we need to revert
this, unfortunately.

Change-Id: I67917f2e5cdb70ebe45f76cae347bde209841e17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump versions to 3.0.6-SNAPSHOT
Robert Varga [Mon, 21 Jan 2019 01:24:22 +0000 (02:24 +0100)]
Bump versions to 3.0.6-SNAPSHOT

This starts the next development iteration.

Change-Id: I1012c62ad20cf9db03b8fa121db16377669e43d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump yangtools to 2.1.8
Robert Varga [Sat, 19 Jan 2019 20:16:54 +0000 (21:16 +0100)]
Bump yangtools to 2.1.8

This align with odlparent-4.0.9.

Change-Id: I0b8f5c3502a78ae7bf3b6c96631e84d9c1303183
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoAdd BindingNormalizedNodeSerializer.coerceFromYangInstanceIdentifier
Robert Varga [Thu, 17 Jan 2019 16:18:21 +0000 (17:18 +0100)]
Add BindingNormalizedNodeSerializer.coerceFromYangInstanceIdentifier

In application-level adapter, which are bound to particular models,
the nullable annotation gets in the way, as it flags a potential
error, which needs to be expensively masked.

Introduce a coerceFromYangInstanceIdentifier() method, which includes
the masking, leaving application code unburdened with this detail.

Change-Id: I0b6e052b6b9be7c42538ab25924fd47b0421b274
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoStart mdsal-3.0.5 development
Robert Varga [Thu, 10 Jan 2019 15:21:34 +0000 (16:21 +0100)]
Start mdsal-3.0.5 development

This bumps versions to .5-SNAPSHOT, opening the next development
iteration.

Change-Id: I082400c698c78eaa525f8addaac2ecbdc90c4874
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump yangtools to 2.1.7
Robert Varga [Thu, 10 Jan 2019 10:18:44 +0000 (11:18 +0100)]
Bump yangtools to 2.1.7

This realigns odlparent/yangtools versions and brings in some
minor improvements.

Change-Id: If46369a9be7976f905dd4c3ebf26e984328c489f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoFixup version bump
Robert Varga [Thu, 10 Jan 2019 10:10:09 +0000 (11:10 +0100)]
Fixup version bump

I again forgot to perform a complete version bump, this fixes it
up so we have proper .4-SNAPSHOT versions.

Change-Id: I750b41c188cf00b164997fdd928c5db906d6bb63
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRemove redundant type declarations
Stephen Kitt [Thu, 11 Oct 2018 10:47:47 +0000 (12:47 +0200)]
Remove redundant type declarations

Type inference improved since we wrote this code, hence we can
ditch the explicit types.

Change-Id: I44ae2c841820b6e8e4b05d06b45d9123c7b6db70
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump version to .4-SNAPSHOT
Robert Varga [Sun, 23 Dec 2018 10:23:52 +0000 (11:23 +0100)]
Bump version to .4-SNAPSHOT

This starts 3.0.4-SNAPSHOT development.

Change-Id: Ifb0a03e6ad9d648ac5e9eebce19d3844b25b25ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump yangtools to 2.1.6
Robert Varga [Fri, 21 Dec 2018 16:07:17 +0000 (17:07 +0100)]
Bump yangtools to 2.1.6

This bumps the yangtools version to align it with odlparent-4.0.5.

Change-Id: I639889f1247dba53c318d3ccd33e2cb82a68be86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoFix a javadoc typo
Robert Varga [Sat, 22 Dec 2018 15:11:54 +0000 (16:11 +0100)]
Fix a javadoc typo

Simple typo in javadoc, fix it.

Change-Id: I37cdd22d0a73630f6d45072b61efba4d43061079
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump to yangtools-2.1.6-SNAPSHOT
Robert Varga [Sat, 22 Dec 2018 18:24:34 +0000 (19:24 +0100)]
Bump to yangtools-2.1.6-SNAPSHOT

This is for early integration before the regular release is promoted.

Change-Id: I33e64b02e385d5e302467242579f994e491e305e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRemove commons-lang3 dependency
Robert Varga [Sat, 22 Dec 2018 17:22:11 +0000 (18:22 +0100)]
Remove commons-lang3 dependency

mdsal-binding-dom-codec does not need this dependency, remove it.

Change-Id: I464594cf64599c1d15578c40c0d54252e006384f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoMass-migrate fields to Immutable collections
Robert Varga [Fri, 14 Dec 2018 20:09:26 +0000 (21:09 +0100)]
Mass-migrate fields to Immutable collections

This follows errorprone/Google recommendation of keeping fields
Immutable{List,Map,Set}. It has the tiny advantage of resulting
in invokevirtual vs. invokeinterface.

Change-Id: I53d55c1909d93021370d6f411284a89cab62b4f8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoAdd CodeHelpers.throwInvalidRange() specializations
Robert Varga [Thu, 13 Dec 2018 19:07:37 +0000 (20:07 +0100)]
Add CodeHelpers.throwInvalidRange() specializations

Range-checking code can (and does) emit checks based on primitive
types, hence it is forcing a boxing operation.

Provide overloaded methods to allow generated code to bind to both
int- and long-based specializations, resulting is less byte code
being generated.

Change-Id: If6d3cc04c3f7d3d3d5fb3ad3a10f3c3d8f813654
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump yangtools to 2.1.5
Robert Varga [Tue, 11 Dec 2018 09:33:13 +0000 (10:33 +0100)]
Bump yangtools to 2.1.5

Brings in the latest fixes and improvements.

Change-Id: I5a9aa33355aa8a21b857411d9945c696438ec0ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoDo not import javax.annotation
Robert Varga [Sat, 1 Dec 2018 22:11:20 +0000 (23:11 +0100)]
Do not import javax.annotation

javax.annotation.RegEx has retention=runtime, hence we need to
suppress javax.annotation import until we migrate to something
else. Also fix binding2, which uses other JSR305 annotations.

Change-Id: I506fe8d11c0d3ec683cc09c4c9b8f5506c809163
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoSeparate out single-key Identifiable handling
Robert Varga [Sun, 25 Nov 2018 15:01:34 +0000 (16:01 +0100)]
Separate out single-key Identifiable handling

We can further optimize IdentifiableItemCodec by separating
out the common case of a single-key from multiple-keys.

This allows us to specialize ImmutableMapTemplates we use for
the two cases, more efficiently binding to
NodeIdentifierWithPredicates constructor.

Furthermore we can specialize key constructor invocation such
that we directly invoke the constructor for single-key identifiers,
without the need to iterate and allocate arrays.

JIRA: MDSAL-387
Change-Id: I2fc26dc7285bfb3fe829b8b0efd9937daf6fbc8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump versions to 3.0.3-SNAPSHOT
Robert Varga [Tue, 27 Nov 2018 11:14:49 +0000 (12:14 +0100)]
Bump versions to 3.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: Id51d991b957c1fe58ac64f6c64384baa7bd6fcc6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoFix ClassTemplate.hashCode() alignment
Robert Varga [Tue, 27 Nov 2018 09:39:09 +0000 (10:39 +0100)]
Fix ClassTemplate.hashCode() alignment

We missed four spaces, making the output look ugly. Fix that.

Change-Id: I44cf863a9478db8d1ab4f90c4cf2d766d576f554
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoTeach MethodSignature about default methods
Robert Varga [Fri, 23 Nov 2018 18:30:11 +0000 (19:30 +0100)]
Teach MethodSignature about default methods

MethodSignature dates back to Java 7 days and has no notion of
interface-default methods. Retrofit the support, as it may come
handy when dealing with various aspects of codegen.

Also propagate the knowledge of them into java-api-generator, so
that we have a cleaner nonnull method generation and new default
methods do not break Builder{Generator,Template} assumptions.

JIRA: MDSAL-18
JIRA: MDSAL-396
Change-Id: I12ea42d096ee50ae61f908e9f9347c45883f66b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoOptimize IdentifiableItemCodec
Robert Varga [Fri, 23 Nov 2018 00:30:08 +0000 (01:30 +0100)]
Optimize IdentifiableItemCodec

ImmutableMapTemplate allows us to instantiate space-efficient
ImmutableOffsetMaps very quickly, because we know exactly what
keySet() we are going to use, including our preferred ordering.

Use this class to instantiate keyValueContexts and also create
NodeIdentifierWithPredicates.

JIRA: YANGTOOLS-917
Change-Id: I087083fe4e1914bb5d8e58b9e378ebda9e070793
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoUse internal classes for codecs
Robert Varga [Sun, 25 Nov 2018 18:39:00 +0000 (19:39 +0100)]
Use internal classes for codecs

As we are exposing codecs through package-private interfaces, there
is no point in hiding the implementation class. This helps JIT to
devirtualize the calls.

Change-Id: I74262f76380c27c3cfbc6af2d97d69bd4f57bf9e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBind invoker method handle to constructor
Robert Varga [Sun, 25 Nov 2018 15:15:23 +0000 (16:15 +0100)]
Bind invoker method handle to constructor

We only ever pass the constructor method handle to the invoker,
hence we can make this a constant by binding the invoker handle
to the constructor -- saving us a field.

Change-Id: I547f7eac202389aa0f7308266b2f3a451a2f83a3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump yangtools to 2.1.4
Robert Varga [Fri, 23 Nov 2018 13:26:30 +0000 (14:26 +0100)]
Bump yangtools to 2.1.4

This release brings about ImmutableMapTemplate, which we'll use
to improve IdentifiableItemCodec.

Change-Id: I2a873d7987fd77f03213a744ae5a75d094e4d96f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoClean up pom of mdsal-binding-test-model a bit
Jie Han [Thu, 22 Nov 2018 11:51:37 +0000 (19:51 +0800)]
Clean up pom of mdsal-binding-test-model a bit

- Remove duplicated dependecy and exclution.
- Enable spotbugs

Change-Id: I9bcd76d7fcf1ae1447bbf4f0b698f6f24bc24279
Signed-off-by: Jie Han <han.jie@zte.com.cn>
2 weeks agoFix InterfaceGenerator confusion with RPC method names
Robert Varga [Fri, 16 Nov 2018 11:31:15 +0000 (12:31 +0100)]
Fix InterfaceGenerator confusion with RPC method names

The refactor in method generation has caused a regression where
we erroneously mark RPC methods with @Nullable. Fix this by checking
that the method has zero arguments.

JIRA: MDSAL-18
Change-Id: Id497eb0a7954ee85c9c22919dd3fa814dd788d5e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoOptimize single-property ClassTemplate hashCode()
Robert Varga [Sun, 18 Nov 2018 20:12:08 +0000 (21:12 +0100)]
Optimize single-property ClassTemplate hashCode()

When we have a single property, it does not make sense to generate
anything aside from delegation to the field, without any additional
arithmetic.

While this changes hashCode() results, these are still consistent
and for bonus points save ourselves some amount of bytecode and make
concentrate some common template code.

JIRA: MDSAL-400
Change-Id: I2035acd30d7c9653fcf7d9af4abcad9032ab795c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoIndex nonnull/getter methods by String
Robert Varga [Fri, 16 Nov 2018 09:20:45 +0000 (10:20 +0100)]
Index nonnull/getter methods by String

Looking up by String offers slight advantage over Method lookup,
because we'll end up with a constant hashCode() over objects which
are guaranteed to be interned.

This rework implies we no longer get to have a map whose keySet
reflects property methods -- which is fine, as the keyset would
take up more memory than a plain array, so we retain the methods
in an array -- hence this ends up being a net win in both cases.

Furthermore it flushes out the fact that nonnull methods should
not really cache their result -- for example if the user performs
a nonnull() access and then runs hashCode(), we'll end up performing
two decodes, as nonnull() cache will not be picked up by hashCode().

We therefore construct nonnull->getter String map, which we consult
on nonnull accesses and only wrap it without caching. This has
the benefit of keeping the cache smaller while maintaining its
effectiveness.

JIRA: MDSAL-398
Change-Id: I36526ce15735d4ef8e4ba847bcc24ea69b950e94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoDo not box result twice
Robert Varga [Sun, 18 Nov 2018 20:58:17 +0000 (21:58 +0100)]
Do not box result twice

result is an int while both cache and return type are Integer,
instantiate a local variable to hold the boxed value so we not
box twice.

Change-Id: I659b60b40d0d1dfa1eee25d214af4a096bf3e60e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoUse ImmutableMaps for lazy augmentations initialization
Robert Varga [Wed, 14 Nov 2018 15:40:29 +0000 (16:40 +0100)]
Use ImmutableMaps for lazy augmentations initialization

Rather than tracking lookups in two separate ConcurrentMaps, we
perform locked atomic updates in copy-on-write immutable structure.

The two lookup maps are kept in ImmutableMaps, which offer tighter
packing and do not incur any further volatile reads beyond getting
a reference to them.

This results in lower memory overhead, as the maps are more tightly
packed and also biases performance towards the dominant use case,
which is pure lookups.

JIRA: MDSAL-391
Change-Id: I65ecb25a5d364040be44df144000d1bbbc2a922e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoIndex cached data by method name
Robert Varga [Fri, 16 Nov 2018 07:15:42 +0000 (08:15 +0100)]
Index cached data by method name

Method.hashCode() is not a constant, whereas String.hashCode() is
pre-computed (for interned Strings). As Method.getName() is guaranteed
to be interned and getters have zero arguments, a method's name
is enough to uniquely identify the corresponding piece of data.

Therefore use Method.getName() to index cachedData.

Change-Id: Ie9fec477bd7346042e3700695588bc526fd56dac
JIRA: MDSAL-398
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoSwitch on method names
Robert Varga [Fri, 16 Nov 2018 06:51:27 +0000 (07:51 +0100)]
Switch on method names

Method names are guarateed to be interned by the JVM, hence their
hashCode is O(1) -- making them a prime target for a switch statement,
which side-steps the need to run String.equals() slow path most of
the time.

JIRA: MDSAL-398
Change-Id: Ie57c2f9fd8c3757ec08e1be945b08d66ebbcff4e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoSwitch on parameterCount
Robert Varga [Fri, 16 Nov 2018 06:47:39 +0000 (07:47 +0100)]
Switch on parameterCount

The else case here assumes parameterCount being 1, make that explicit,
resulting in cleaner code.

JIRA: MDSAL-398
Change-Id: Ie3fa47de6b1630e98a426da69bb6c6d2b6b4b026
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoUse Method.getParameterCount()
Robert Varga [Fri, 16 Nov 2018 06:38:51 +0000 (07:38 +0100)]
Use Method.getParameterCount()

Java 8 introduced this method, which bypasses array cloning done
by getParameterTypes(), making it more efficient. Take advantage
of it.

JIRA: MDSAL-398
Change-Id: Id5d4972ba20d63a8ff79e4adbdf6d2adbfce0b87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoDefine getImplementedInterface name in BindingMapping
Robert Varga [Fri, 16 Nov 2018 06:34:37 +0000 (07:34 +0100)]
Define getImplementedInterface name in BindingMapping

This moves the definition from LazyDataObject to a common place,
so we have one place which defines it. Also remove unused Throwable
declaration.

Change-Id: Icfbc861419fca3b207e9aebfc2b00ddf8a1fc38f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoCache mismatched augmentations
Robert Varga [Tue, 13 Nov 2018 14:13:41 +0000 (15:13 +0100)]
Cache mismatched augmentations

Address a FIXME around caching of mismatched augmentations, as it
seems openflowplugin is doing this on purpose.

The cache is expected to be needed infrequently in terms of associated
objects as well as modified infrequently, hence we use a space-efficient
ImmutableMap.

JIRA: MDSAL-388
Change-Id: Id86d8c713ee1014d9d4867558032ba3ccd51fc45
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoGenerate nonnull default wrappers for list getters
Robert Varga [Thu, 8 Nov 2018 15:27:49 +0000 (16:27 +0100)]
Generate nonnull default wrappers for list getters

This adds the knowledge about default methods to BindingMapping,
templates and CodeHelpers, so that whenever we emit a List accessor
(getFoo) we also emit a corresponding nonnull accessor (nonnullFoo).

The nonnull accessor is a default method, which takes invokes
getFoo() and runs it through CodeHelper.nonnull(), which turns
nulls into empty lists.

JIRA: MDSAL-18
Change-Id: Ic4fc80aa071b7d5b93bf49d1de44855f4bd820f2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoMove getter method naming to BindingMapping
Robert Varga [Thu, 8 Nov 2018 11:18:17 +0000 (12:18 +0100)]
Move getter method naming to BindingMapping

Both BaseTemplate.isAccessor() and a chunk of
AbstractTypeGenerator.getterMethodName() should actually be held
in BindingMapping, so we retain consistent naming of things.

This patch introduces the constants necessary for this to work
and migrates the code there. This cascades to various other places,
like mdsal-binding-dom-codec, where we extract copy&pasted code
to a common utility class.

JIRA: MDSAL-18
Change-Id: I5fb285f00658ce81f60890d03844b51e19bd4a40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRevert "Add DataObjectUtils"
Robert Varga [Thu, 8 Nov 2018 09:49:32 +0000 (10:49 +0100)]
Revert "Add DataObjectUtils"

This reverts commit 865a75b8201cd92346e60a48b22c13fd09eb2ab0 in
preparation for a more proper solution.

JIRA: MDSAL-18
Change-Id: I96b89867e5a324327eb77cdde018700456fc4bbc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoPrevent NPE from being propagated from LazyDataObject
Robert Varga [Thu, 8 Nov 2018 14:09:49 +0000 (15:09 +0100)]
Prevent NPE from being propagated from LazyDataObject

Rather than incurring a NPE when we fail to find proper
NodeContextSupplier, add an explicit verifyNotNull() check to
throw a more explanatory VerifyException.

Change-Id: Ieed6d050bccfe482f69152b33a9a84bbe20037c2
JIRA: MDSAL-18
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRefactor DataObjectCodecContext.getBindingChildValue()
Robert Varga [Thu, 8 Nov 2018 14:01:07 +0000 (15:01 +0100)]
Refactor DataObjectCodecContext.getBindingChildValue()

Using instanceof checks is an OOP anti-pattern, which we do not
want here anyways. Generalize NodeCodecContext.defaultObject()
to return null by default and refactor decoding to rely on it,
with LeafNodeCodecContext returning whatever it has as a default
value.

Change-Id: I2b58bc7f1a16496cf6bc93fd7a33aec38f864597
JIRA: MDSAL-18
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump yangtools to 2.1.3
Robert Varga [Wed, 7 Nov 2018 20:48:17 +0000 (21:48 +0100)]
Bump yangtools to 2.1.3

This adopts yangtools-2.1.3.

Change-Id: I6c67a060fa24d06553c6b6076acfa85f6f35718e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRework lookup to eliminate the need for checkArgument()
Robert Varga [Wed, 7 Nov 2018 22:03:40 +0000 (23:03 +0100)]
Rework lookup to eliminate the need for checkArgument()

SpotBugs is twitchy around this, let's rework it to make
the precondition unnecessary.

Change-Id: I2083877c1c6b263b6c9d8368cd8f3fb746bbc6d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoAdd DataObjectUtils
Robert Varga [Fri, 19 Oct 2018 12:42:06 +0000 (14:42 +0200)]
Add DataObjectUtils

Add DataObjectUtils.nullToEmpty(List), which is useful when dealing
with nullable lists being returned from binding DTOs. This also moves
mdsal.binding.spec.util to yang-binding, so the utilities are
available to all model users.

Change-Id: I681c49141b4e880448747a53d749065208f9aca1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoReduce use of javax.annotation annotations
Robert Varga [Mon, 8 Oct 2018 09:12:50 +0000 (11:12 +0200)]
Reduce use of javax.annotation annotations

The annotations in use have runtime retention, which triggers
generation of import-package for javax.annotation, which is no longer
satisfied with newer JDKs.

Use JDT @Nullable annotation instead. Since @Nullable is TYPE_USE
annotation, this also requires a bit of juggling in JavaFileTemplate
to make it work correctly with types which end up being referenced
via their FQCN.

This still retains javax.annotation.CheckReturnValue, but marks it
for replacement once we decide where to go annotation-wise.

JIRA: MDSAL-372
Change-Id: I792094d3c07162a5f8e6ca82ceea3a75b48c7b6e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoTry harder to acquire class mapping
Robert Varga [Mon, 15 Oct 2018 12:44:48 +0000 (14:44 +0200)]
Try harder to acquire class mapping

We can perform a third try when we failed to load an augmentation
using TCCL by installing the candidate class classloader as the TCCL.

This can help in situations where we are invoked from a context where
the TCCL is not set up to actually see binding classes properly.

JIRA: MDSAL-379
Change-Id: I56d65494cbce32aee0592e3f0799a2bf283e6d17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRelax LazyDataObject.augmentations() implementation
Robert Varga [Sat, 13 Oct 2018 09:35:56 +0000 (11:35 +0200)]
Relax LazyDataObject.augmentations() implementation

We use double-checked locking to guard against concurrent
initialization of cachedAugmentations. While this ensures we do
not do the same work twice, it is a bit costly for the typical
case when the augmentations field is accessed once.

During the first call, we perform:
- a volatile read
- a lock acquire
- a volatile read
- compute the value (exclusive)
- a volatile write
- a lock release

Rather than doing that, allow the value to be computed concurrently
and use compare-and-swap to initialize it. Hence for the first call
we perform:
- a volatile read
- compute the value (concurrent)
- a compare-and-set

In case of concurrent initialization, all threads will compute
the value, but all except the first one will issue another volatile
read and throw their work away.

JIRA: MDSAL-377
Change-Id: I1dbf9c4e60cf9800720eea31bd9de936b1dae5aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoSpeed up DataObjectCodecContext instantiation
Robert Varga [Mon, 15 Oct 2018 10:22:09 +0000 (12:22 +0200)]
Speed up DataObjectCodecContext instantiation

Do not bounce multiple times to bindingClass(), but rather store
it in a local variable. Since we are here, also update other callers
of bindingClass().

Change-Id: Ia093d5dbdff16f6ec17f96c71895cb292eb12862
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoDo not instantiate entrySet when not needed
Robert Varga [Mon, 15 Oct 2018 09:00:12 +0000 (11:00 +0200)]
Do not instantiate entrySet when not needed

reloadAllAugmentations() does not need the key, hence we do not
need to instantiate entrySet(), values() is sufficient.

Change-Id: Ib58b5fac547370709ab916ca5f700bc4b841efb8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoShorten java.util.Optional reference
Robert Varga [Sun, 14 Oct 2018 00:07:07 +0000 (02:07 +0200)]
Shorten java.util.Optional reference

All of our codebase is using JDK Optionals, hence we need not use
a FQCN.

Change-Id: Ib6b4fba3e8021fce4d238f8db84db32ac5bf746c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump versions for 3.0.2-SNAPSHOT
Robert Varga [Sat, 13 Oct 2018 12:55:53 +0000 (14:55 +0200)]
Bump versions for 3.0.2-SNAPSHOT

This starts the next version development.

Change-Id: Ia3e479b1d364d6f92e7ff8405ada398c342227a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump yangtools to 2.1.2
Robert Varga [Sat, 13 Oct 2018 12:52:30 +0000 (14:52 +0200)]
Bump yangtools to 2.1.2

This propagates the released version.

Change-Id: I404e82dcb0aa6102ef00fb1ee65cbbf7aa8f821a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoOptimize AbstractBuilderTemplate key property sort
Robert Varga [Sat, 13 Oct 2018 08:54:39 +0000 (10:54 +0200)]
Optimize AbstractBuilderTemplate key property sort

Rather than using a lambda for each comparison, create a constant
Comparator and reuse it.

Change-Id: I0b5af97b485f65924adb2de369a69e03027af887
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoOptimize AbstractBuilderTemplate.generateAugmentField()
Robert Varga [Sat, 13 Oct 2018 08:08:42 +0000 (10:08 +0200)]
Optimize AbstractBuilderTemplate.generateAugmentField()

This moves the "private" field to its sole caller, eliminating
the need for a redundant IF. Also cache the importedName result
so we do not make multiple round-trips to cache.

Change-Id: I31bd9ffe51e6820d6b4b22f489ed0fbaf9dd1192
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoUse ArrayList.sort() instead of Collections.sort()
Robert Varga [Sat, 13 Oct 2018 08:38:32 +0000 (10:38 +0200)]
Use ArrayList.sort() instead of Collections.sort()

We do not need Collections, as we have Java 8 and hence can
directly use List.sort(). This has the side-effect of
short-circuiting to ArrayList's implementation.

Change-Id: If978265242275014c586fcf92d96d5ba09bb7bca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBuilder should acquire augmentations only once
Robert Varga [Sat, 13 Oct 2018 08:28:34 +0000 (10:28 +0200)]
Builder should acquire augmentations only once

While generated DataObjects have this method simple, LazyDataObject
constructs the map lazily and caches it -- hence additional access
is forcing an additional volatile read.

Therefore instead of invoking augmentations() twice, store its
result in a local variable and reuse that.

Change-Id: Ifbe2002bb7edbd253d65b5bdc1e53c4d687bed32
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump yangtools to 2.1.2-SNAPSHOT
Robert Varga [Fri, 12 Oct 2018 12:31:54 +0000 (14:31 +0200)]
Bump yangtools to 2.1.2-SNAPSHOT

Preparatory patch to get validation of upcoming yangtools release.

Change-Id: Iaf6f4371216a85639d8f12089d69ca7c94b8822a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoEnable spotbugs in mdsal-binding-dom-codec
Robert Varga [Thu, 11 Oct 2018 19:13:53 +0000 (21:13 +0200)]
Enable spotbugs in mdsal-binding-dom-codec

This fixes up the issues reported and flips enforcement to on.

Change-Id: I7e5b5c20a8b9f1ce3de42aac512ac3b31779821f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoEnable spotbugs in mdsal-binding-dom-codec-osgi
Robert Varga [Thu, 11 Oct 2018 18:57:37 +0000 (20:57 +0200)]
Enable spotbugs in mdsal-binding-dom-codec-osgi

This fixes up the issues reported and flips enforcement to on.

Change-Id: Ia58b4f08fb1b594446cec458268586db8df8d62c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoEnable spotbugs in yang-binding
Robert Varga [Thu, 11 Oct 2018 18:49:01 +0000 (20:49 +0200)]
Enable spotbugs in yang-binding

This fixes up the issues reported and flips enforcement to on.

Change-Id: I2e9b0c82af063d322428216be40e7562959f0824
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoEnable spotbugs in mdsal-binding-spec-util
Robert Varga [Thu, 11 Oct 2018 18:31:02 +0000 (20:31 +0200)]
Enable spotbugs in mdsal-binding-spec-util

This fixes up the issues reported and flips enforcement to on.

Change-Id: I24d7722143253cc4c16cfac6f6d38976741ee6b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoFix checkstyle in mdsal-binding-java-api-generator
Robert Varga [Thu, 11 Oct 2018 15:38:26 +0000 (17:38 +0200)]
Fix checkstyle in mdsal-binding-java-api-generator

This fixes violations and flips enforcement on.

Change-Id: I08d96c67c0d072655529ed9890b85ca1c4e7059f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoEnable checkstyle in mdsal-binding-spec-util
Robert Varga [Thu, 11 Oct 2018 12:13:39 +0000 (14:13 +0200)]
Enable checkstyle in mdsal-binding-spec-util

This flips enforcement on.

Change-Id: I8e3db62a29d21fe727b1c31b0c3982b42eb58444
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRemove redundant string operations
Stephen Kitt [Thu, 11 Oct 2018 09:58:14 +0000 (11:58 +0200)]
Remove redundant string operations

* use StringBuilder::append to extract substrings directly;
* split combined append/concatenation into multiple append calls;
* use "" instead of new String();
* remove a couple of unnecessary toString() calls.

Change-Id: If09efe90d756c3b1faf30c27eb94d514593a4861
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoSeparate out builder/impl copy generators
Robert Varga [Wed, 10 Oct 2018 17:43:41 +0000 (19:43 +0200)]
Separate out builder/impl copy generators

Builders are taking an immutable implementation of target type,
hence for list entries they can rely on the key to be present and
do not have to check it. Implementations need to account
for the builder key being set to null, hence they need to
instantiate the key themselves.

This patch separates the two code paths, so both cases are properly
expressed in the object hierarchy. This allows us to simplify
the abstract template, removing weird boolean-based decisions.

We also promote implementation constructor to package-visible, which
allows javac to skip generation of synthetic accessor.

We further optimize the template output by capturing importedNames
when they are reused -- leading to xtend generating cleaner Java code.

JIRA: MDSAL-374
Change-Id: I3274e35780b8e6a56d470caf80459e9e115a5374
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoSort out BindingCodecTreeNode.streamChild() nullness
Robert Varga [Mon, 8 Oct 2018 17:52:21 +0000 (19:52 +0200)]
Sort out BindingCodecTreeNode.streamChild() nullness

This method really cannot return null, which means there is some
dead code in DataContainerCodecContext. Remove the FIXME and kill
the superfluous code.

Change-Id: I7ee3e86b10e1ad2ccc5cfaa4aad228654b1445c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoFixup null warnings reported by eclipse
Robert Varga [Mon, 8 Oct 2018 17:29:20 +0000 (19:29 +0200)]
Fixup null warnings reported by eclipse

JDT annotations are flushing out some lazyness in tests, fix that
up by throwing UnsupportedOperationExceptions and proper mocking
in most places.

Change-Id: I2374a368e4a361c0e58d61e4b563f98036b4c540
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoMigrate mdsal-binding-dom-codec to JDT annotations
Robert Varga [Mon, 8 Oct 2018 13:12:08 +0000 (15:12 +0200)]
Migrate mdsal-binding-dom-codec to JDT annotations

This removes the use of javax.annotation nullable annotations
to remove import-package.

Change-Id: I436b9f0d0b3c835fce9da9e4c99e4dad273f9bbe
JIRA: MDSAL-373
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRemove unneeded dependencies
Robert Varga [Tue, 9 Oct 2018 14:49:10 +0000 (16:49 +0200)]
Remove unneeded dependencies

odlparent is declaring test dependencies for us, and also
declares osg.core correctly. yangtools also declares test utils
with proper scope, hence we can remove those overrides, too.

Change-Id: I7c4f18313b32123043242b36b573263afde40962
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoUse dom-parent internally
Robert Varga [Tue, 9 Oct 2018 14:27:25 +0000 (16:27 +0200)]
Use dom-parent internally

dom-parent is essentially an mdsal-level bundle-parent, as it
inherits from bundle-parent and brings in dependencyManagement
we (and our downstreams) need.

Reuse this parent pom across the project, so that we do not have
to repeat dependencyManagement over and over again.

Change-Id: I0575ef37d2eedcd7cda0c69d6dcec3a65af64cf3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRemove use of Class.newInstance()
Robert Varga [Tue, 9 Oct 2018 13:12:34 +0000 (15:12 +0200)]
Remove use of Class.newInstance()

This method has been deprecated in JDK9+, use its simple replacement
instead.

Change-Id: I1f7ed3babd4b339d1b1a9cc396b901e7886c985a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoMigrate mdsal-binding-dom-adapter to JDT annotations
Robert Varga [Mon, 8 Oct 2018 13:29:40 +0000 (15:29 +0200)]
Migrate mdsal-binding-dom-adapter to JDT annotations

This removes the use of javax.annotation nullable annotations
to remove import-package.

Change-Id: I220ed55636d3a4a4bc3e4c39a6169541f89cf283
JIRA: MDSAL-373
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoSuppress javax.annotation imports in yang-binding
Robert Varga [Mon, 8 Oct 2018 16:24:54 +0000 (18:24 +0200)]
Suppress javax.annotation imports in yang-binding

We do not want to generate references to javax.annotation, remove
it from imports.

Change-Id: I2edffd282db530c6052b3541a553d52e33c3fd78
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoMake sure we compare key members via their property name
Robert Varga [Thu, 4 Oct 2018 15:17:42 +0000 (17:17 +0200)]
Make sure we compare key members via their property name

As it turns out, simple comparison ignoring cases does not correctly
work if the schema is using CamelCase. We need to do the hard work of
deriving Binding property name and sort on that to be consistent with
what the codegen does.

JIRA: MDSAL-355
Change-Id: I34cdb032fbdeb093e2973b91c5011e302e6280bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump versions to 3.0.1-SNAPSHOT
Robert Varga [Fri, 5 Oct 2018 06:31:53 +0000 (08:31 +0200)]
Bump versions to 3.0.1-SNAPSHOT

This starts the next development cycle.

Change-Id: I1f1e0381f1abf9ae89c2c17ca3eb6ead58ce201a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoDrop Xtend Equinox Common overrides
Stephen Kitt [Thu, 4 Oct 2018 14:52:06 +0000 (16:52 +0200)]
Drop Xtend Equinox Common overrides

These are no longer necessary and make it harder than it should be to
upgrade Xtend in odlparent.

Change-Id: I3196ad374895e8e96f71f79529dde578913589ab
Signed-off-by: Stephen Kitt <skitt@redhat.com>