mdsal.git
5 years agoBump to odlparent 4.0.5 56/78956/2
Stephen Kitt [Fri, 21 Dec 2018 16:40:24 +0000 (17:40 +0100)]
Bump to odlparent 4.0.5

Change-Id: I68edc89602d424de7b61e24cf42db674c8364b15
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoDowngrade mdsal-binding-generator-impl dependencies 72/78972/2
Robert Varga [Fri, 21 Dec 2018 21:12:52 +0000 (22:12 +0100)]
Downgrade mdsal-binding-generator-impl dependencies

mdsal-binding-generator-impl does not need yang-data-impl,
only yang-data-api. Downgrade the dependency.

Change-Id: I8ac5c20f43237cb6a811a4556752f236e6c61217
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFixup (DOM)DataTreeChangeListener a bit 62/78662/5
Jie Han [Wed, 12 Dec 2018 01:09:37 +0000 (09:09 +0800)]
Fixup (DOM)DataTreeChangeListener a bit

According to comments of
https://git.opendaylight.org/gerrit/#/c/77070/

 - replace 'onInitialData' with 'onEmptyInitialData' in
    (DOM)DataTreeChangeListener
 - fixup javadoc description

Change-Id: I50a1b903c365157265512eefce9811cbdd3d6350
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoBump to odlparent 4.0.4 06/78906/2
Stephen Kitt [Fri, 21 Dec 2018 08:54:06 +0000 (09:54 +0100)]
Bump to odlparent 4.0.4

Change-Id: I6c3bf062614b6817e1a2bfe7e7f7e94c44683852
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoAllow Binding/DOM/Binding shortcuts to be disabled 16/78816/4
Robert Varga [Sat, 15 Dec 2018 13:14:33 +0000 (14:14 +0100)]
Allow Binding/DOM/Binding shortcuts to be disabled

This adds a property-driven knob, which allows the various shortcuts
we take when crossing binding-dom-adapter to be completely disabled.

Using the knob is useful for testing and making sure applications
correctly follow the YANG model they are written against.

Change-Id: I9836304fe7878b80c769b88914300fbcf3fe08b5
JIRA: MDSAL-409
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMass-migrate fields to Immutable collections 08/78808/1
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>
5 years agoImprove conflicting error message 96/78796/1
Robert Varga [Fri, 14 Dec 2018 12:15:58 +0000 (13:15 +0100)]
Improve conflicting error message

In the unlikely event we conflict on a constant, it is nice to know
what name it has.

Change-Id: Ie775779c350e6621917d0212978f6aa2f28c32f3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup BaseYangTypes 95/78795/1
Robert Varga [Fri, 14 Dec 2018 12:01:49 +0000 (13:01 +0100)]
Cleanup BaseYangTypes

We can make direct references to constants exposed from Types,
as well as eliminate a static initializer by exploiting fluent
nature of ImmutableMap.builder();

Change-Id: If045e15375bc7c35c2f7e72dafde59a7baa07317
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd CodeHelpers.throwInvalidRange() specializations 68/78768/2
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>
5 years agoBump yangtools to 2.1.5 40/78640/1
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>
5 years agoDo not import javax.annotation 33/78333/4
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>
5 years agoDisable binding2 javadoc under Java 11 34/78334/4
Robert Varga [Sat, 1 Dec 2018 22:20:52 +0000 (23:20 +0100)]
Disable binding2 javadoc under Java 11

javadoc fails to find generated .txt package, leading to a failure
to resolve imports. Sacrifice javadocs to let Java 11 through.

Change-Id: Ifd6fa576f38d08d1d12ffc7aeeced1762a021beb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSuppress RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE 32/78332/2
Robert Varga [Sat, 1 Dec 2018 22:13:02 +0000 (23:13 +0100)]
Suppress RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

spotbugs does not grok Java 11 try-with-resources desugaring,
forcing us to suppress this warning.

Change-Id: Ia840cdd03932ae543fe66931f55d6b3c1b2d4697
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSeparate out single-key Identifiable handling 10/78110/13
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>
5 years agoBump versions to 3.0.3-SNAPSHOT 05/78205/2
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>
5 years agoAdjust minor version to 1.0.2-SNAPSHOT 02/78202/2
Robert Varga [Tue, 27 Nov 2018 10:57:03 +0000 (11:57 +0100)]
Adjust minor version to 1.0.2-SNAPSHOT

This makes it a lot easier to bump versions.

Change-Id: Ib2e3870f9b1868869907998e382147b89a27f828
JIRA: MDSAL-381
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix up release old producers to avoid memory leak 01/76501/22
han [Sun, 30 Sep 2018 08:49:54 +0000 (16:49 +0800)]
Fix up release old producers to avoid memory leak

- It should close all correlative old 'InMemoryDOMDataTreeShardProducer'
  when close a 'ShardedDOMDataTreeProducer', or a memory leak happens
  for repeatly creating and closing the same producer as well as in the
  case of attach/detach subshards.

JIRA: MDSAL-386
Change-Id: I9c6ad6b63de4dfc7b75a315fce23a5da3be9d06d
Signed-off-by: Jie Han <han.jie@zte.com.cn>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix ClassTemplate.hashCode() alignment 98/78198/2
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>
5 years agoTeach MethodSignature about default methods 02/78102/9
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>
5 years agoOptimize IdentifiableItemCodec 73/78073/8
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>
5 years agoUse internal classes for codecs 21/78121/3
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>
5 years agoBind invoker method handle to constructor 09/78109/2
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>
5 years agoBump yangtools to 2.1.4 93/78093/5
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>
5 years agoClean up pom of mdsal-binding-test-model a bit 46/78046/1
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>
5 years agoUpdate WriteOperations/TypedTransaction API design 67/77467/27
Robert Varga [Fri, 2 Nov 2018 21:17:39 +0000 (22:17 +0100)]
Update WriteOperations/TypedTransaction API design

Overloading merge/put methods with a boolean prevents a quick
identification of users of costly operations. Moreover, the
documentation (and contract) does not completely reflect behaviour
as all purely-structural elements undergo automatic lifecycle:
for example non-presence containers are created as needed and
removed when they are no longer needed.

Update the design by deprecating boolean-taking methods in favor
of mergeParentStructureAnd{Merge,Put}, which are now implemented
as defaults. This will allow us to migrate users first and then
remove those methods in 4.0.0 timeframe.

Also update documentation to discourage the use of these methods,
as they have significant performance cost.

JIRA: MDSAL-382
Change-Id: I878863797dab01a1adfa2164a0ab0583b0641163
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix InterfaceGenerator confusion with RPC method names 93/77893/7
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>
5 years agoOptimize single-property ClassTemplate hashCode() 19/77919/5
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>
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>