mdsal.git
5 years agoIndex nonnull/getter methods by String 90/77890/9
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>
5 years agoDo not box result twice 20/77920/1
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>
5 years agoUse ImmutableMaps for lazy augmentations initialization 99/77799/5
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>
5 years agoIndex cached data by method name 76/77876/3
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>
5 years agoSwitch on method names 75/77875/4
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>
5 years agoSwitch on parameterCount 74/77874/3
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>
5 years agoUse Method.getParameterCount() 73/77873/3
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>
5 years agoDefine getImplementedInterface name in BindingMapping 68/77868/1
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>
5 years agoFixup lookup of DOMDataTreePrefixTableEntry 14/76814/13
han [Wed, 10 Oct 2018 02:55:13 +0000 (10:55 +0800)]
Fixup lookup of DOMDataTreePrefixTableEntry

- Make sure to return the entry with value present.

Change-Id: Ib37def7a8593516e1623ca0b1b34ef997790c754
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoCache mismatched augmentations 24/77724/3
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>
5 years agoIntroduce ReadOperations.exists() 39/77739/3
Robert Varga [Tue, 13 Nov 2018 18:18:30 +0000 (19:18 +0100)]
Introduce ReadOperations.exists()

This method exists in the DOM API, but for some reason it was left
out if the Binding API. Introduce it as default methods riding on
the read() method and override them in all known implementations,
so the request is efficiently routed.

Change-Id: Id56332d6f720396305ac68e40554e62fd17c34fb
JIRA: MDSAL-389
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoGenerate nonnull default wrappers for list getters 27/77627/11
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>
5 years agoMove getter method naming to BindingMapping 16/77616/12
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>
5 years agoRevert "Add DataObjectUtils" 17/77617/11
Robert Varga [Thu, 8 Nov 2018 09:49:32 +0000 (10:49 +0100)]
Revert "Add DataObjectUtils"

This reverts commit 0ef76ead8ed2d4af93e0d8cac92b67d087354057 in
preparation for a more proper solution.

JIRA: MDSAL-18
Change-Id: I96b89867e5a324327eb77cdde018700456fc4bbc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoWADL/Documentations generators should use BuildContextAware 79/77679/3
Robert Varga [Mon, 12 Nov 2018 08:45:00 +0000 (09:45 +0100)]
WADL/Documentations generators should use BuildContextAware

We should not be hard-wiring to DefaultBuildContext, but rather
pick it up from yang-maven-plugin.

Change-Id: I56a6f23698e450f31087bff76e911bef0f5819cd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoProvide iana-if-type based on RFC8343 96/77496/6
Jie Han [Mon, 5 Nov 2018 09:33:42 +0000 (17:33 +0800)]
Provide iana-if-type based on RFC8343

- Current iana-if-type artifact is tied to RFC7223,
  meaning the code generated within it is not usable with RFC8343.
  Provide an alternative artifact, which is bound to RFC8343.

  JIRA: MDSAL-381
Change-Id: Ia2089010fca472dfa499b97cc0ac3c6c420b0431
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoPrevent NPE from being propagated from LazyDataObject 24/77624/4
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>
5 years agoRefactor DataObjectCodecContext.getBindingChildValue() 23/77623/3
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>
5 years agoSeparate out DOMDataTree{Read,Write}Transactions 90/77590/8
Robert Varga [Wed, 7 Nov 2018 23:31:14 +0000 (00:31 +0100)]
Separate out DOMDataTree{Read,Write}Transactions

DOMDataTreeReadWriteTransaction.close() does not make sense
in presence of DOMDataTreeReadWriteTransaction.cancel().

Split out both operation sets, so ReadWriteTransaction can eventually
become a WriteTransaction which also has ReadOperations.

Make DOMDataTreeReadWriteTransaction.close() a default method, which
defers processing to cancel() and remove its other implementations
-- some of which were completely broken.

Change-Id: Ib45e3e0d17ae2be591915fa618d5b468ec0c89e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove redundant public modifier 11/77611/2
Jakub Morvay [Thu, 8 Nov 2018 09:59:08 +0000 (10:59 +0100)]
Remove redundant public modifier

public modifier is redundant for inner interfaces. Remove it from
DOMMountPointService DOMMountPointBuilder inner interface definition.

Change-Id: I2a370750636d9307b45adbef44ec5c5eb37c28b6
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoDeprecate leak methods in DOMMountPointServiceImpl 09/77609/5
Jakub Morvay [Thu, 8 Nov 2018 09:41:30 +0000 (10:41 +0100)]
Deprecate leak methods in DOMMountPointServiceImpl

This deprecates DOMMountPointServiceImpl registerMountPoint() and
unregisterMountPoint() methods as they are leaks and should never have
been exposed publicly.

Change-Id: Iba5a270d15ca882eb08372f1f6911af55d298f8d
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoCleanup ShardedDOMWriteTransactionAdapter 95/77595/2
Robert Varga [Thu, 8 Nov 2018 00:04:48 +0000 (01:04 +0100)]
Cleanup ShardedDOMWriteTransactionAdapter

Move field initialization and add annotations.

Change-Id: If9548e02144e9c1ae9488bdb1854b2946af4da30
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUpdate FastThreadPoolExecutor instantiation 94/77594/2
Robert Varga [Thu, 8 Nov 2018 00:00:06 +0000 (01:00 +0100)]
Update FastThreadPoolExecutor instantiation

This forwards logger identity to the executor, so its entries
are properly accounted for.

Change-Id: I996d9d51742c8c870e1ef5a48ad9cf8627f289be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup ScanningSchemaContext 93/77593/2
Robert Varga [Wed, 7 Nov 2018 23:54:50 +0000 (00:54 +0100)]
Cleanup ScanningSchemaContext

This adds a few aesthetic improvements, killing some superfluous
operations.

Change-Id: Ibd4c45c9e5df91852fc7aa392ba34d3fd0c3fb52
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup PingPongDataBroker 92/77592/2
Robert Varga [Wed, 7 Nov 2018 23:43:15 +0000 (00:43 +0100)]
Cleanup PingPongDataBroker

This cleans up annotations and various aesthetics in pingpong, not
changing anything, really.

Change-Id: Ib86bff9df8cae3e5d48edc4f0c42770a207d8812
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup ShardedDOMTransactionChainAdapter 91/77591/2
Robert Varga [Wed, 7 Nov 2018 23:42:02 +0000 (00:42 +0100)]
Cleanup ShardedDOMTransactionChainAdapter

Inner classes have incorrect structure and can be final, fix that
and also eliminate the need to verifyNotNull().

Change-Id: I68a68f69e6e7e7f442783858dfd719e7ca374bfb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.3 88/77588/4
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>
5 years agoRework lookup to eliminate the need for checkArgument() 89/77589/2
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>
5 years agoFix AbstractTypeMember toString() 50/77550/1
Stephen Kitt [Tue, 6 Nov 2018 16:08:35 +0000 (17:08 +0100)]
Fix AbstractTypeMember toString()

It shouldn't reference MethodSignatureImpl.

Change-Id: I20c44fe66b76daa5fb8ccd51485e57c1da0e932c
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoCache reflection operations in AbstractSchemaAwareTest 08/77508/1
Robert Varga [Mon, 5 Nov 2018 15:27:45 +0000 (16:27 +0100)]
Cache reflection operations in AbstractSchemaAwareTest

The design of AbstractSchemaAwareTest requires reflection-based
loading of SchemaContext for each test case, which is slow.

Instantiate weak caches to speed up tests which are co-located
on the same class loader.

Change-Id: I1a79d7e99f6efcccab37445f3de25a74cb6f02b6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not issue empty list merges 79/77479/3
Robert Varga [Sun, 4 Nov 2018 18:31:16 +0000 (19:31 +0100)]
Do not issue empty list merges

List nodes undergo atomatic lifecycle, i.e. they are created
as needed. This means we do issue an empty merge when a list
entry is written from binding -- reducing the number of operations
issued in typical operation.

Also mark BindingToNormalizedNodeCodec.getDefaultNodeFor() as
deprecated, because it should never have been public in the first
place.

JIRA: MDSAL-383
Change-Id: Ie41dbd9d238990f3e136043b87d002bf55557501
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix a few eclipse warnings 83/77483/1
Robert Varga [Sun, 4 Nov 2018 21:23:15 +0000 (22:23 +0100)]
Fix a few eclipse warnings

This fixes:
- unneeded else statements
- unnecessary use of a raw type
- generic argument shadowing

Change-Id: Ifd3a83a57a9300a4b3b01ddf93facc892c01bb52
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRefactor write tracking implementation 78/77478/2
Robert Varga [Sun, 4 Nov 2018 17:29:48 +0000 (18:29 +0100)]
Refactor write tracking implementation

Rather than duplicating code which wraps a package-internal class,
provide a subclass hook in TypedWriteTransactionImpl, so that it
write-tracking defaults to no-op and is optionally wrapped.

This removes a lot of duplicated code, making the result equally
performant and more maintainable. It also removes the need to leak
TypedWriteTransactionImpl.delegate to the package and tracking
them in two fields.

Change-Id: I636818f0048090c145e6fabba198238dad1e6922
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoHide TypedTransaction.datastoreType 76/77476/3
Robert Varga [Sun, 4 Nov 2018 15:22:42 +0000 (16:22 +0100)]
Hide TypedTransaction.datastoreType

This field has a proper accessor, hence we do not need to make
it package-private. Also shorten local variable name used in cast
so we lower verbosity.

Change-Id: Ifd0e83217996f0d14fb84ba42c53b879c68f3b1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix warnings in TransactionAdapter 75/77475/3
Robert Varga [Sun, 4 Nov 2018 15:16:02 +0000 (16:16 +0100)]
Fix warnings in TransactionAdapter

Using a private constructor forces a synthetic accessor being
created, hence make nested class constructors package-private,
eliminating the need to suppress warnings.

Also rename generic arguments so as not to clash with method
generics used in the interface being implemented.

Finally add proper generic arguments, so we eliminate raw type
warnings.

Change-Id: I9ec2bf6b377eed26fd11896e84c99fa8922f4abf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd DataObjectUtils 02/77102/6
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>
5 years agoAdd @NonNull annotation to LazyDataTreeModification 74/77374/3
Robert Varga [Wed, 31 Oct 2018 08:49:16 +0000 (09:49 +0100)]
Add @NonNull annotation to LazyDataTreeModification

This fixes a couple of eclipse warnings and makes the code a bit
more dense.

Change-Id: Iab34963d54a6ee0f38a05e327c00c202ea9bf3b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoReduce use of javax.annotation annotations 32/76732/21
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>
5 years agoReport non-present initial data in (DOM)DataTreeChangeListener 70/77070/7
han [Thu, 18 Oct 2018 03:08:34 +0000 (11:08 +0800)]
Report non-present initial data in (DOM)DataTreeChangeListener

Add a default method 'onInitialData' with no-op in
DOMDataTreeChangeListener', which would be invoked only once during
registration of the listener if there was no data in the conceptual
data tree for the supplied path, which was used to register this
listener, and after this 'onDataTreeChanged' would always be
invoked for data changes.

Users not caring about this event could leave it as default with no-op.

JIRA: MDSAL-217
Change-Id: I3a2c02c76b8c37ac7624dd1646692bd783a3468d
Signed-off-by: Jie Han <han.jie@zte.com.cn>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd missing @Beta annotations for managed txes 25/77325/2
Stephen Kitt [Mon, 29 Oct 2018 15:35:55 +0000 (16:35 +0100)]
Add missing @Beta annotations for managed txes

ManagedTransactionRunner is marked @Beta, but the related interfaces
ManagedTransactionFactory and ManagedTransactionChain aren’t. This
patch fixes that; hopefully it’s acceptable for a patch release...

Change-Id: I1d67551ae8bba12b515b31e0611bb5b713d20644
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoUse equals() in AssertDataObjects 34/61334/8
Stephen Kitt [Tue, 8 Aug 2017 12:55:11 +0000 (14:55 +0200)]
Use equals() in AssertDataObjects

Currently, AssertDataObjects.assertEqualBeans() relies entirely on
XtendBeans’ conversions; but what we really want to test is the
equals() implementations â€” XtendBeans is helpful to produce errors
which are easier to understand and act upon.

This patch tests the beans using equals() first, and only uses
XtendBeans to produce an error message. It also catches cases where
equals() fails but the XtendBeans-generated representations are
equal.

Change-Id: I8412609c54795b3d7c27001f01d3df281203bb78
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoTry harder to acquire class mapping 91/76991/4
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>
5 years agoRelax LazyDataObject.augmentations() implementation 69/76969/7
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>
5 years agoSpeed up DataObjectCodecContext instantiation 88/76988/3
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>
5 years agoDo not instantiate entrySet when not needed 85/76985/1
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>
5 years agoShorten java.util.Optional reference 74/76974/1
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>
5 years agoBump versions for 3.0.2-SNAPSHOT 72/76972/1
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>
5 years agoBump yangtools to 2.1.2 71/76971/1
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>
5 years agoOptimize AbstractBuilderTemplate key property sort 60/76960/1
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>
5 years agoOptimize AbstractBuilderTemplate.generateAugmentField() 58/76958/3
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>
5 years agoUse ArrayList.sort() instead of Collections.sort() 59/76959/2
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>
5 years agoBuilder should acquire augmentations only once 57/76957/2
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>
5 years agoBump yangtools to 2.1.2-SNAPSHOT 37/76937/1
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>
5 years agoFix infinite recursion in ForwardingWriteTransaction 80/76880/3
Stephen Kitt [Thu, 11 Oct 2018 13:44:52 +0000 (15:44 +0200)]
Fix infinite recursion in ForwardingWriteTransaction

put() calls itself instead of delegating. This patch fixes that.

Change-Id: I4d42bbae0952e12f17ddfd46ad08cf06e746cf70
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoAvoid StringBuilder's char constructor 82/76882/3
Stephen Kitt [Thu, 11 Oct 2018 13:55:46 +0000 (15:55 +0200)]
Avoid StringBuilder's char constructor

Passing a char to StringBuilder's constructor is interpreted as
setting the initial capacity, not providing the initial content. This
was already accounted for; so this patch removes the char arguments
since they only end up being confusing.

Change-Id: Ic7b1281174e0faec891cb96dd89e0d4aa4ced670
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoEnable spotbugs in mdsal-binding-generator-impl 11/76911/2
Robert Varga [Thu, 11 Oct 2018 19:50:03 +0000 (21:50 +0200)]
Enable spotbugs in mdsal-binding-generator-impl

This patch fixes up violations and flips enforcement.

Change-Id: Ifc823e7bdc64b5d798f59b87b12a68f44f42af51
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable spotbugs in mdsal-binding-dom-adapter 10/76910/1
Robert Varga [Thu, 11 Oct 2018 19:35:21 +0000 (21:35 +0200)]
Enable spotbugs in mdsal-binding-dom-adapter

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

Change-Id: I50525331b45f556eae0840fbc8e3459fc903d9dd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable spotbugs in mdsal-binding-dom-codec 09/76909/2
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>
5 years agoEnable spotbugs in mdsal-binding-dom-codec-osgi 08/76908/1
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>
5 years agoEnable spotbugs in yang-binding 07/76907/1
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>
5 years agoEnable spotbugs in mdsal-binding-generator-util 06/76906/1
Robert Varga [Thu, 11 Oct 2018 18:43:43 +0000 (20:43 +0200)]
Enable spotbugs in mdsal-binding-generator-util

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

Change-Id: I2f9d96aff277864f7e1edc1be69d45610947a250
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable mdsal-binding-generator-api spotbugs 05/76905/1
Robert Varga [Thu, 11 Oct 2018 18:32:36 +0000 (20:32 +0200)]
Enable mdsal-binding-generator-api spotbugs

This just flips enforcement to on.

Change-Id: I7fac526f853d156ff6c8d2c60433944f7670b9d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable spotbugs in mdsal-binding-spec-util 04/76904/1
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>
5 years agoEnable mdsal-binding-util spotbugs 03/76903/1
Robert Varga [Thu, 11 Oct 2018 18:11:52 +0000 (20:11 +0200)]
Enable mdsal-binding-util spotbugs

This just flips enforcement to on.

Change-Id: I53d63c44e27a52d152535a0218d4b83f2ee35f59
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable spotbugs in entity-ownership-service 02/76902/1
Robert Varga [Thu, 11 Oct 2018 18:08:51 +0000 (20:08 +0200)]
Enable spotbugs in entity-ownership-service

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

Change-Id: Ifd8201eb6ad60c133559bc29b40fda487f4d2c5e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix checkstyle in mdsal-binding-java-api-generator 92/76892/3
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>
5 years agoEnable spotbugs in singleton-service 01/76901/1
Robert Varga [Thu, 11 Oct 2018 17:49:59 +0000 (19:49 +0200)]
Enable spotbugs in singleton-service

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

Change-Id: If2c1b8214a552f791eda8c68da12cafd59ad6a10
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable mdsal-dom-inmemory-datastore spotbugs 98/76898/2
Robert Varga [Thu, 11 Oct 2018 17:43:26 +0000 (19:43 +0200)]
Enable mdsal-dom-inmemory-datastore spotbugs

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

Change-Id: Ic475fd76d3449c2ab165b2e5da41b693edb3cb8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable mdsal-dom-schema-service-osgi spotbugs 94/76894/3
Robert Varga [Thu, 11 Oct 2018 17:34:28 +0000 (19:34 +0200)]
Enable mdsal-dom-schema-service-osgi spotbugs

This just flips enforcement to on.

Change-Id: I3a3495d3442c6231e9fc25dc7d9ffab099bc75f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable mdsal-dom-broker spotbugs 97/76897/2
Robert Varga [Thu, 11 Oct 2018 16:42:48 +0000 (18:42 +0200)]
Enable mdsal-dom-broker spotbugs

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

Change-Id: Iae6de422f027e6413b4e3021d4324b051f41a513
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSwitch mdsal-binding-test-utils to spotbugs 93/76893/2
Robert Varga [Thu, 11 Oct 2018 16:35:50 +0000 (18:35 +0200)]
Switch mdsal-binding-test-utils to spotbugs

This changes from findbugs to spotbugs.

Change-Id: I4f59b2ee72e593ac26d8f91fa3802d3ef87e6994
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix checkstyle in mdsal-binding-util-tests 87/76887/1
Robert Varga [Thu, 11 Oct 2018 15:33:38 +0000 (17:33 +0200)]
Fix checkstyle in mdsal-binding-util-tests

This fixes a single violation and flips enforcement on.

Change-Id: I9b5aca10dc74f540d98fa4dca5db08b888ef4f8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix checkstyle in mdsal-binding-generator-impl 78/76878/4
Robert Varga [Thu, 11 Oct 2018 13:39:22 +0000 (15:39 +0200)]
Fix checkstyle in mdsal-binding-generator-impl

This fixes violations and flips enforcement on.

Change-Id: Ida4e62f4c3ddf4d7d8066f3858e6ab98f0f92cf1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix checkstyle in mdsal-binding-generator-util 77/76877/3
Robert Varga [Thu, 11 Oct 2018 12:31:01 +0000 (14:31 +0200)]
Fix checkstyle in mdsal-binding-generator-util

This fixes violations and flips enforcement on.

Change-Id: Ibc12e6595498c4349695d62bcd74f3d126f4b8e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable checkstyle in mdsal-binding-util 73/76873/2
Robert Varga [Thu, 11 Oct 2018 12:20:03 +0000 (14:20 +0200)]
Enable checkstyle in mdsal-binding-util

This fixes a few violations and flips enforcement on.

Change-Id: I6b0de1511bda6ad509991f343c2a456ba67866d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable checkstyle in mdsal-binding-spec-util 72/76872/2
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>
5 years agoEnable checkstyle in mdsal-binding-generator-api 70/76870/2
Robert Varga [Thu, 11 Oct 2018 12:09:40 +0000 (14:09 +0200)]
Enable checkstyle in mdsal-binding-generator-api

This fixes a few violations and flips enforcement on.

Change-Id: Id55c011e8a7f5e85e678aefe793e6aba585ee083
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable checkstyle in mdsal-dom-schema-service-osgi 69/76869/2
Robert Varga [Thu, 11 Oct 2018 11:43:13 +0000 (13:43 +0200)]
Enable checkstyle in mdsal-dom-schema-service-osgi

This fixes a few violations and flips enforcement on.

Change-Id: I336e1624564f9f41c62f96294ebf5c9ef0ca839c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove redundant string operations 65/76865/3
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>
5 years agoSeparate out builder/impl copy generators 29/76829/3
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>
5 years agoAdd feature-parent 41/76841/4
Robert Varga [Wed, 10 Oct 2018 23:15:57 +0000 (01:15 +0200)]
Add feature-parent

This adds a utility parent (useful for downstreams, too),
which adds the mdsal imports.

Change-Id: If1bdad409b08a3f7cc47852b73439b18b1e07936
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove project.groupId use 40/76840/3
Robert Varga [Wed, 10 Oct 2018 23:13:44 +0000 (01:13 +0200)]
Remove project.groupId use

Having explicit groupId make things more explicit, making it a wee
bit more navigable between mdsal proper and models.

Change-Id: Ib7cce538930b51268e960cf27f4cbd8dbbec9793
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse properties to skip deploy/install 99/76799/2
Stephen Kitt [Tue, 9 Oct 2018 14:21:50 +0000 (16:21 +0200)]
Use properties to skip deploy/install

odlparent-lite recognises maven.deploy.skip and maven.install.skip to
skip the deploy and install plugins, use those instead of re-declaring
the plugins.

Change-Id: I5cd645fe810b54e018abdb2f12487037ba3b01d8
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoSort out BindingCodecTreeNode.streamChild() nullness 67/76767/8
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>
5 years agoFixup null warnings reported by eclipse 63/76763/10
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>
5 years agoMigrate mdsal-binding-dom-codec to JDT annotations 52/76752/20
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>
5 years agoOverride scala-lang to 2.11.12 92/76792/2
Robert Varga [Tue, 9 Oct 2018 12:59:31 +0000 (14:59 +0200)]
Override scala-lang to 2.11.12

In order to build with JDK10, we need to make sure we pull in
the latest 2.11.x scala.

Change-Id: Iccea3ffebed11580fc7ad108f5988a88e0e7a597
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump scala-maven-plugin 91/76791/2
Robert Varga [Tue, 9 Oct 2018 12:54:43 +0000 (14:54 +0200)]
Bump scala-maven-plugin

We cannot use the latest plugin because of maven-3.5.4 requirement,
hence bump it just a bit.

Change-Id: I1f74835d38291cb93bd8997665e198d41fd2ee9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove unneeded dependencies 02/76802/2
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>
5 years agoUse dom-parent internally 01/76801/2
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>
5 years agoRemove use of Class.newInstance() 93/76793/2
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>
5 years agoFix mdsal-binding-spi parent setup 86/76786/2
Robert Varga [Tue, 9 Oct 2018 11:01:53 +0000 (13:01 +0200)]
Fix mdsal-binding-spi parent setup

We need to have a relativePath to work correctly.

Change-Id: I8ab8e034001ce73546d73f7629ffe36b7ecb4b41
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable spotbugs in mdsal-{binding,dom}-spi 89/76789/2
Robert Varga [Tue, 9 Oct 2018 11:40:52 +0000 (13:40 +0200)]
Enable spotbugs in mdsal-{binding,dom}-spi

This patch addresses violations and flips the switch.

Change-Id: I9a0a715b26d42cff395f6448323be1b6e52b162d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable spotbugs in mdsal-{common,binding,dom}-api 83/76783/2
Robert Varga [Tue, 9 Oct 2018 10:35:22 +0000 (12:35 +0200)]
Enable spotbugs in mdsal-{common,binding,dom}-api

This suppresses the single violation and flips the switch.

Change-Id: I48e8364604192a973a05bf35631551091403e2b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDeprecate BaseYangTypes.UnionType 64/76764/8
Robert Varga [Mon, 8 Oct 2018 17:30:48 +0000 (19:30 +0200)]
Deprecate BaseYangTypes.UnionType

This class is not used anywhere and is defunct due to nullness
violation. Deprecate it for removal.

Change-Id: Icfdda71931571b8bf98f0f4d65a783447db13f7e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate mdsal-binding-dom-adapter to JDT annotations 54/76754/16
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>
5 years agoMigrate ietf-type-util to JDT annotations 62/76762/6
Robert Varga [Mon, 8 Oct 2018 16:52:05 +0000 (18:52 +0200)]
Migrate ietf-type-util to JDT annotations

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

Change-Id: I05d01bb4aa3a8e343432987e8a66e06971d22e69
JIRA: MDSAL-373
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSuppress javax.annotation imports in yang-binding 61/76761/6
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>
5 years agoMigrate mdsal-dom-inmemory-datastore to JDT annotations 51/76751/15
Robert Varga [Mon, 8 Oct 2018 12:45:49 +0000 (14:45 +0200)]
Migrate mdsal-dom-inmemory-datastore to JDT annotations

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

Change-Id: I9b05210e5a927e78085779e216fde8cd2142c30b
JIRA: MDSAL-373
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate mdsal-dom-broker to JDT annotations 50/76750/15
Robert Varga [Mon, 8 Oct 2018 12:41:51 +0000 (14:41 +0200)]
Migrate mdsal-dom-broker to JDT annotations

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

Change-Id: Idabf3b89a4aad9b04168126d5ea9ebee1268b1f9
JIRA: MDSAL-373
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>