Robert Varga [Tue, 23 Oct 2018 14:10:08 +0000 (16:10 +0200)]
Migrate EnumTypeDefinition to JDT annotations
This is a simple use of @Nonnull, migrate it over along with
all implementations.
Change-Id: Ide74c244134bbe4be62d74945059de486c57bed5
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 14:06:22 +0000 (16:06 +0200)]
Migrate ListSchemaNode to JDT annotations
This migrates the trivial use of @Nonnull to JDT's @NonNull.
Change-Id: I08c54870093c9e41ea1b5da2a16b6be90921a4d0
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 14:03:19 +0000 (16:03 +0200)]
Migrate LeafListSchemaNode to JDT annotations
This is a simple use of @Nonnull, migrate it to JDT.
Change-Id: Iad55cc0536a43a407c336cd68886e8d24927544a
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 14:00:37 +0000 (16:00 +0200)]
Migrate ElementCountConstraint to JDT annotations
This is confined use of @Nullable, migrate it.
JIRA: YANGTOOLS-907
Change-Id: I948d3523aee4088109b1809c2309e13af7efc2c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 13:56:19 +0000 (15:56 +0200)]
Migrate IdentitySchemaNode to JDT annotations
Rather than using JSR-305, migrate IdentitySchemaNode and its
implementation to JDT annotations.
Change-Id: I7e1ca793c86ca6a2576292cf0791dcaa17a5d346
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 13:50:30 +0000 (15:50 +0200)]
Migrate BitsTypeDefinition to JDT annotations
This migrates @Nonnull to @NonNull in the interface and all its
implementations.
JIRA: YANGTOOLS-907
Change-Id: Ic4a43b8e1e6a85894995c1c73032490111079874
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 13:42:28 +0000 (15:42 +0200)]
Migrate DocumentedNode/Status to JDT annotations
Switch DocumentedNode and its implementation to JDT nullable
annotations.
JIRA: YANGTOOLS-907
Change-Id: I7eea3429d1ee7617f0731c7416456a44e2caffbe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 13:41:43 +0000 (15:41 +0200)]
Switch DataNodeContainer to JDT annotations
We are using a single @Nullable, switch that over.
JIRA: YANGTOOLS-907
Change-Id: I154822f057850ab1c5a65c62be01a6ab04c35c72
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 12:53:19 +0000 (14:53 +0200)]
Remove javax.annotation nullness from yang-model-export
Switch to using JDT annotations instead and remove bundle plugin
exclusion.
JIRA: YANGTOOLS-907
Change-Id: I708076719fe4e91049946c49640459fc9baa215c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 12:28:09 +0000 (14:28 +0200)]
Remove javax.annotation use from yang-data-transform
Switch to JDT annotations and remove the bundle exclusion
instruction.
Change-Id: I487d384cba31b9337c5291373df5a6410278070b
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 11:41:48 +0000 (13:41 +0200)]
Cleanup StmtContext nullness annotations
Switch @Nonnull to JDT's @NonNull, propagating results to
implentations.
JIRA: YANGTOOLS-907
Change-Id: I44bd6791f23a7e3dfb6864cba15763713022a327
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 11:21:55 +0000 (13:21 +0200)]
Update (Abstract)StatementSupport nullness annotations
Use JDT annotations instead of JSR-305.
Change-Id: Ica49e1c54aba95677fb883c01d4040e4bee44c8b
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 11:15:16 +0000 (13:15 +0200)]
Cleanup nullness in StatementSourceReference
getStatementSource() must return non-null, make sure we express
it in the contract.
Change-Id: Ifa098ce7bda78878ad5a333849c1c254f111dfbd
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 10:54:46 +0000 (12:54 +0200)]
Cleanup StatementFactory Nonnull annotations
Switch to using JDT, all implementations are ready for this.
JIRA: YANGTOOLS-907
Change-Id: I26870cea034d50fff44c3af1091d87906eb5b6a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Oct 2018 10:28:16 +0000 (12:28 +0200)]
Cleanup ModelStatement/StatementDefinition non-nullness
This patch removes @Nonnull in favor of @NonNull, adjusting
implementations to remove Eclipse warnings.
JIRA: YANGTOOLS-907
Change-Id: I6d04dd3d807316f8cc39fe3481e0252c20673460
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 22 Oct 2018 11:53:33 +0000 (13:53 +0200)]
Add CopyHistory.toString()
This method makes for easier debugging, add it.
Change-Id: Ib25dc0414dce2ddacecaedafb14b2e0d42e3d50d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 22 Oct 2018 11:40:03 +0000 (13:40 +0200)]
Add a unit test showing augmentation handling
There is a world of difference between augmentations added to
a node vs. instantiated nodes. This patch adds a test which shows
it.
JIRA: YANGTOOLS-911
Change-Id: Ida3ce1fab8db09470e09d101de740b9b7d27a687
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 19 Oct 2018 11:58:05 +0000 (13:58 +0200)]
Add yang.common.Revision.MAX_VALUE
Since Revision is Comparable, it is useful to capture its maximum
value, so it can be used within Ranges composed of Revision and
some other Comparable.
Change-Id: Ib2e0dba348dc5cbc53b19bc4ae6d7062c6feabb6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 15 Oct 2018 15:26:39 +0000 (17:26 +0200)]
Attach error listeners to lexers
We currently disconnect parser from standard output, but lexer
may incur errors as well, hence we should do the same dance to
lexers, too.
Change-Id: Ib901cb1fbdba05c721aeba5d60a5e8bda5f48087
JIRA: YANGTOOLS-905
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 14 Oct 2018 00:56:21 +0000 (02:56 +0200)]
Exclude javax.xml.stream dependency
This dependency is satisfied by the JDK, hence we do not need to
pull it in.
Change-Id: I440114204f064239e3e25215e53fe67981ddf6d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 13 Oct 2018 12:48:52 +0000 (14:48 +0200)]
Bump versions to 2.1.3-SNAPSHOT
This starts the development of 2.1.3.
Change-Id: I710c410311cff014ed4249a158242400be3c3a62
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 12 Oct 2018 21:11:22 +0000 (23:11 +0200)]
Fixup MinMaxElementsValidation with disappearances
When a list disappears, even when it has a certain number of minimum
elements, MinMaxElementsValidation should not take any action.
The resposibility for enforcing the list being present when it has
min-elements > 0 falls under perview of MandatoryNodeValidator, which
covers the non-existence of the list at the proper enforcement point
-- something MinMaxElementsValidation cannot do.
JIRA: YANGTOOLS-909
Change-Id: I3612a1c1461456b2bd41651decab1032581f85d1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 12 Oct 2018 09:02:27 +0000 (11:02 +0200)]
MinMaxElementsValidation needs to deal with lists disappearing
Constrained lists may become empty, in which case applying
the modification will result in a non-present TreeNode. In that
case the list needs to count as zero elements rather than tripping
up VerifyException.
MinMaxElementsValidation really needs to become a full-blown proxy
ModificationApplyOperation instead of being piggy-backed on
SchemaAwareApplyOperation, as otherwise can end up tripping up
preconditions which ware dealt by the proxy.
JIRA: YANGTOOLS-909
Change-Id: Ia410231f701223792a821cd69af84b7742fe5156
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 10 Oct 2018 14:06:50 +0000 (16:06 +0200)]
Drop the use of project.groupId
Spelling out org.opendaylight.yangtools makes things more
clear without being too verbose.
Change-Id: I10aabbd4a07eb6d6c25aa8f68157a889ee7ab43e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 10 Oct 2018 12:46:41 +0000 (14:46 +0200)]
Add bundle-parent and use it
This concentrates common version definitions into a yangtools
bundle-parent and reuses it them where possible -- shaving almost
500 lines of XML.
Change-Id: Ifc79fee557dc0a49fc0a277c2fafa34199171151
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 9 Oct 2018 11:26:15 +0000 (13:26 +0200)]
jaxb-api should be scope=compile
Keeping scope=provided breaks downstream tests with JDK9+,
hence we need to rework the dependencies to make sure we always
pull jaxb-api, but we also need to exclude it from odl-yangtools-data
feature, because it is provided by Karaf.
Change-Id: Id09281c89a74c3d6c780179dfa21ced545318ba1
JIRA: YANGTOOLS-906
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 5 Oct 2018 09:16:46 +0000 (11:16 +0200)]
Migrate parser extensions to JDT annotations
This removes run-time reliance on javax.annotation package.
JIRA: YANGTOOLS-907
Change-Id: I9cd870882d8c7edfcc44a50154d0e4148bd4eca5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 5 Oct 2018 09:02:56 +0000 (11:02 +0200)]
Migrate common/util to use JDT annotations
This removes run-time reliance on javax.annotation package.
Change-Id: I59193dbe7fcf472fbab29099b685df669c3b301a
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 5 Oct 2018 08:53:50 +0000 (10:53 +0200)]
Migrate yang-common to use JDT annotations
This removes run-time reliance on javax.annotation package.
Change-Id: If8870ba4f6aed9b77d65dc129e3fd7112fb01949
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 3 Oct 2018 09:32:57 +0000 (11:32 +0200)]
Migrate concepts to use JDT annotations
This removes run-time reliance on javax.annotation package.
Change-Id: Ia4c2115f1160446d781f2d7fa1a7b5a4940a3feb
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 8 Oct 2018 05:50:12 +0000 (07:50 +0200)]
Fix Java 11 build
This fixes spotbugs/Java11 false positive.
Change-Id: Idb8e648bf35f0c9f73a236dcfc8a8419e800cacb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 8 Oct 2018 05:22:10 +0000 (07:22 +0200)]
Do not import java.annotation
Nullable JSR305 annotations have runtime retention scope, which is
causing javax.annotation being imported by our bundles, which is not
correct as we do not need the annotation. Reduce the use of these
and suppress javax.annotation imports.
JIRA: YANGTOOLS-907
Change-Id: I0e1f384880e148c707037f8afd4b8cb9d2e00e72
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 5 Oct 2018 16:54:23 +0000 (18:54 +0200)]
Revert "Migrate common/util to use JDT annotations"
This reverts commit
f069fc0c4ef1a95ef7ca81a2d83301a48bf18fb8.
Change-Id: Icaa2bf8d664fcacf4cb7ac97bdb796414845d623
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 5 Oct 2018 16:54:22 +0000 (18:54 +0200)]
Revert "Migrate yang-common to use JDT annotations"
This reverts commit
7286488bb26fbd175297925978c4f75ecee1b70f.
Change-Id: I39afedde0aa2d58b9fe8a809a6f8a7a6de59b770
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 5 Oct 2018 16:54:20 +0000 (18:54 +0200)]
Revert "Migrate concepts to use JDT annotations"
This reverts commit
99379bf4ef363ff88b1898aac1ad671025407322.
Change-Id: I4c3915be96ba1344ca05933359ed88aa238c8913
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 5 Oct 2018 09:02:56 +0000 (11:02 +0200)]
Migrate common/util to use JDT annotations
This removes run-time reliance on javax.annotation package.
JIRA: YANGTOOLS-907
Change-Id: I6665adc378a37b09669de5542b7571a040a5d6f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 5 Oct 2018 08:53:50 +0000 (10:53 +0200)]
Migrate yang-common to use JDT annotations
This removes run-time reliance on javax.annotation package.
JIRA: YANGTOOLS-907
Change-Id: I9fc87546af3c3a0ee194be68e5cf9278b18b836c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 3 Oct 2018 09:32:57 +0000 (11:32 +0200)]
Migrate concepts to use JDT annotations
This removes run-time reliance on javax.annotation package.
JIRA: YANGTOOLS-907
Change-Id: I9345cd4cd1e5554e18717e4eea721b1fd7fe984b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 3 Oct 2018 09:02:15 +0000 (11:02 +0200)]
Fix spotbugs with Java 11
https://github.com/spotbugs/spotbugs/issues/600 is still present,
biting us.
Change-Id: If9bcd5540c5c0d1427a9e69fde87a674d771c182
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 2 Oct 2018 18:17:10 +0000 (20:17 +0200)]
Cleanup ScannedDependencyTest
Rather than messing with test resources set them up properly
in the project so that we can rely on them being present.
Also make sure we clean up our resources correctly.
Change-Id: Idb1b8a8d87293a255582f7120cdb0e47f7278080
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 2 Oct 2018 19:54:40 +0000 (21:54 +0200)]
Bump versions to x.1.2-SNAPSHOT
This starts the next development cycle.
Change-Id: I69d1b41f0deed275a1654f623a15c667b6dcfa37
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 1 Oct 2018 19:01:01 +0000 (21:01 +0200)]
Add NoOp{Listener,Object}Registration
As it turns out, there are use cases for registration which do
nothing in their close() method. Add utility classes to support
those use cases. Also update javadocs a bit.
Change-Id: Ife196f26229cf54173e9b9046ece22bd0138c2ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Sep 2018 23:50:43 +0000 (01:50 +0200)]
Bump triemap to 1.0.1
This brings in the latest version, making sure we pull the same
odlparent.
Change-Id: I47c6a26d8cd9f1d38ae7c57246a0ebe6c4c7540d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 24 Sep 2018 14:23:48 +0000 (16:23 +0200)]
Bump odlparent to 4.0.2
This brings in the latest fixes.
Change-Id: Ia50b273da19ab43a6a2439b9a15fbd94d5f79069
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 24 Sep 2018 16:01:36 +0000 (18:01 +0200)]
Add jaxb-api dependency
For JDK11 we need an explicit scope=provided dependency on
jaxb-api.
JIRA: YANGTOOLS-906
Change-Id: Ifee829a5cd04561f6124ff03b772db2f5d12f04e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 24 Sep 2018 08:36:17 +0000 (10:36 +0200)]
Remove javadoc overrides
JDK9 javadoc generation breaks due to us excluding the generated
package. Do not do that, allowing build to pass here.
Change-Id: I4076753a136b9ce52ef9cbad5a1fec1901bfe681
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Stephen Kitt [Mon, 24 Sep 2018 07:12:22 +0000 (09:12 +0200)]
Bump to odlparent 4.0.1
Change-Id: I1ec17a54dc4765e392a67ac36d65789a28e988af
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Robert Varga [Sun, 23 Sep 2018 15:38:47 +0000 (17:38 +0200)]
Disable illegal UTs
The XSD/Pattern conversion does not really work in this case, as
"&&" is not something which has the same meaning in XSD patterns.
The test is vailing with JDK9+, but is in general invalid. Disable
it for now, we will re-enable it once we have correct translation.
Change-Id: If54d4b9b4fcf3f612885f4af407d4d32ffcd916f
JIRA: YANGTOOLS-887
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 23 Sep 2018 15:15:15 +0000 (17:15 +0200)]
Fix compilation with JDK9
This fixes type inference failure by using a temporary variable.
Change-Id: I298cb7778d590842911dca9e2bd4936b887a221e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 19 Sep 2018 13:07:58 +0000 (15:07 +0200)]
Enable spotbugs in yang-data-transform
This just flips the enforcement switch.
Change-Id: Ie9eb853bcdd2425417f214a736558a86bebe23b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 19 Sep 2018 12:59:17 +0000 (14:59 +0200)]
Bump versions to 2.1.1-SNAPSHOT
This starts the next development cycle.
Change-Id: I8037e20694f5668249a8c8ee161f2a63b8817b46
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 19 Sep 2018 10:48:17 +0000 (12:48 +0200)]
Do not clutter logs with a thrown exception
SourceException is an unchecked exception which we handle at a higher
layer. The logging statement does not add anything useful, so let's
remove it.
Change-Id: I8a4654b44469a2193996d1d90e982d01a1a62bf3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 19 Sep 2018 10:46:46 +0000 (12:46 +0200)]
Fix TypedefEffectiveStatementImpl double-checked load
We really need a volatile read here to make things alright, make
the field volatile.
Change-Id: Id04917a04f9f1fdba6ded2c773571d90106e877f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 19 Sep 2018 10:45:59 +0000 (12:45 +0200)]
Remove unneeded interface declaration
DataNodeContainer is already specified by superclass, no need to
repeat that declaration.
Change-Id: I9a409662d87b02ec9b4abcba88c90bccf684829a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 19 Sep 2018 10:45:03 +0000 (12:45 +0200)]
Remove unneeded check
brk is known to be different from -1, hence we can use it directly
rather than using a temporary variable.
Change-Id: If089baa50b8e7b15d8ab03a8e09f7d6d6d0ea7e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 17 Sep 2018 14:21:52 +0000 (16:21 +0200)]
Do not emit empty non-presence containers
Since the data store portion of container lifecycle has been
fixed, this patch reverts
cb247b77dfab26658e434a593ca282fcd723022f
and takes containers' presence statement into account again.
JIRA: YANGTOOLS-903
Change-Id: I9aeeeb72848dd61f8abfe83ae7f22036aae2c214
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 17 Sep 2018 15:35:02 +0000 (17:35 +0200)]
Enable spotbugs in yang-model-validator
This adds supressions as needed and flips the switch.
Change-Id: I35d60ad737a63b4f4e9f2c7819ab3ad8ebb7843a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 17 Sep 2018 13:45:47 +0000 (15:45 +0200)]
Correctly activate jacoco report aggregation
The profile was missing activation, hence we failed to activate
it -- leading to zero coverage.
Change-Id: Icec36e7347a60f4cc077835596af99a6dd3f7379
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 17 Sep 2018 13:31:43 +0000 (15:31 +0200)]
Fix spotbugs warnings in yang-data-codec-gson
This fixes the simple warnings and flips the switch.
Change-Id: I31cf662d0be9c905b7b7c4f0d2ce44142fa4d71c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 17 Sep 2018 13:16:33 +0000 (15:16 +0200)]
Remove redundant interface declarations
As pointed out by spotbugs, these classes specify Immutable while
it is already specified by a superclass.
Change-Id: I1836b1ec8ffacf441deaf1cb93a8df589ba74374
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 17 Sep 2018 11:50:27 +0000 (13:50 +0200)]
Fix warnings in yang-maven-plugin
Fix spotbugs warnings and flip the switch.
Change-Id: I69f2f65962af3a44b9205f1659af051a30c5133d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 17 Sep 2018 11:37:30 +0000 (13:37 +0200)]
Enable spotbugs in yang-data-util
Fix the few reported warnings and flip the switch.
Change-Id: I31874f55eff860067cda7858381b0abc44444ab6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 13 Sep 2018 22:08:23 +0000 (00:08 +0200)]
Remove sonar.jacoco.reportPath overrides
Now that yangtools-sonar provides sonar.jacoco.reportPaths, there
is no need for us to override it.
Change-Id: I2915a6398bd64b22f8a8368c3276cc0e5af9443a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 13 Sep 2018 21:58:29 +0000 (23:58 +0200)]
Activate jacoco aggregation on odl.jacoco.aggregateFile
Unless this property is defined, we don't really have a user,
which means we should not be aggragating jacoco.
Change-Id: I2e9c72d1a30b531111089e14c1fc99ffebb4da28
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 20 Aug 2018 15:30:21 +0000 (17:30 +0200)]
Switch to spotbugs
Findbugs is ancient, spotbugs is a live project, switch to using
it.
Change-Id: I160bb14eb1b32bc226b1e94955d340c7cc79fa5e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Sep 2018 20:12:14 +0000 (22:12 +0200)]
Migrate to tech.pantheon.TrieMap
TrieMap has a new how outside of yangtools, use that source and
provide a compatibility wrapper.
JIRA: YANGTOOLS-902
Change-Id: Ifcc27f1dddd0e4f97ee992618bd2941c7c2821bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Stephen Kitt [Thu, 30 Aug 2018 11:57:33 +0000 (13:57 +0200)]
Remove the object cache
It’s been experimental for four years and isn’t used anywhere in ODL.
Change-Id: Icc9778ef5ab777ae217b3ccd02e54de680460c73
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Robert Varga [Thu, 13 Sep 2018 16:34:26 +0000 (18:34 +0200)]
Remove jacoco overrides
odlparent-4.0.0 includes a refactor which renders these overrides
unneeded. Remove them.
Change-Id: I898160e74e698dd939b582b7c2355165a3041fd9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 13 Sep 2018 15:05:53 +0000 (17:05 +0200)]
Enable findbugs in yang-data-codec-xml
This fixes warnings reported and flips the switch.
Change-Id: I78121287fdc9d3bef6e1b0c52300c57c5be074d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 13 Sep 2018 10:07:13 +0000 (12:07 +0200)]
Enable findbugs in mockito-configuration
This fixes warnings reported and flips the switch.
Change-Id: I4f035e4c3a9c7bc4a764668abb6adb9b8d952c9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Stephen Kitt [Thu, 13 Sep 2018 10:10:06 +0000 (12:10 +0200)]
Bump to odlparent 4.0.0
Change-Id: I67af761a5a5f45fe8a76c3905661cff626355935
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Robert Varga [Thu, 13 Sep 2018 08:35:38 +0000 (10:35 +0200)]
Add a license badge
This adds a bit of visibility on github.
Change-Id: I4e62496583184ac28a39fcf8efbff869dfc5461e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 23:31:30 +0000 (01:31 +0200)]
Fix Sonar integration
Use project-wide merged JaCoCo execution profile for Sonar purposes,
providing real coverage provided by yangtools UTs. This patch is rather
intrusive due to the need to override odlparent settings to make it
work.
Change-Id: I8aacec9bd2ab45d5a4ffe83d692b020d7bf32ab8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 12 Sep 2018 09:31:27 +0000 (11:31 +0200)]
Fix logging template
Logger template is missing a placeholder, add it.
Change-Id: Ib1068bc4e122affc69e408da87378230607b7408
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 12 Sep 2018 00:26:19 +0000 (02:26 +0200)]
Enable findbugs in more artifacts
This fixed/enables FB warnings in yang-maven-plugin-spi,
yang-parser-spi, yang-test-util and yang-xpath-api,
yang-parser-impl and ang-maven-plugin-it.
Change-Id: I1b9abdbd32f81b16243c111c74143929a573d76e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 20:58:18 +0000 (22:58 +0200)]
Fix pom.xml formatting
The patches to enable findbugs had incorrect indentation of
</plugin>. Fix that.
Change-Id: I0c58c600625a44500ff68b39fc6653d7721f2519
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 20:55:55 +0000 (22:55 +0200)]
Revert "Experiment: aggregate jacoco for sonar"
This reverts commit
7358371685ccb40a38f7214acd1785d4c9e73236
and
cfceb5bc60cbf0d622db1f41466ace602c3ab6e5.
Change-Id: I63153afeedd1ca91835ca6fc63c6af6a71fa3a3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 19:42:46 +0000 (21:42 +0200)]
Experiment: fix base.directory vs. basedir
This fixes up previous patch to correctly reference maven
base directory.
Change-Id: Ib10d67ddbc9d1db116a237f99455cb0a676645c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 15:04:51 +0000 (17:04 +0200)]
Experiment: aggregate jacoco for sonar
This is a second cut, overriding targets for jacoco and also
pointing sonar to the aggregate report.
Change-Id: I07f13985edfbe766c41f6adff1a714c31b6d017a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 14:11:41 +0000 (16:11 +0200)]
Revert "Experiment: merge jacoco reports"
This reverts commit
5ae609d30b1584d716e93b5faedcb80e1405fd99.
Change-Id: I75da3ddef983b8eb71f577394e056ce245f05c5d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 12:51:11 +0000 (14:51 +0200)]
Experiment: merge jacoco reports
This is an experiment with sonar, which should allow us to get
better coverage reports.
Change-Id: Ic5649dc88fe36e33a0274f089961a642bfc2e719
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 10:08:48 +0000 (12:08 +0200)]
Fix warnings in yang-model-util
This fixes warnings reported in yang-model-util and enables findbugs
enforcement.
Change-Id: Ieb04815237075f6606711ac72e2b10910b2aa854
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 09:56:33 +0000 (11:56 +0200)]
Fix warnings in yang-model-api
This fixes warnings reported in yang-model-api and enables findbugs
enforcement.
Change-Id: Iad35b5ba7c4b9c0373dbcf7be2d696cb66755600
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 09:30:03 +0000 (11:30 +0200)]
Remove tabs from pom.xmls
This fixes formatting to comply with ODL standards.
Change-Id: Ieffe637a9ce2d5663164e979822be5c2646ecd7e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 09:25:59 +0000 (11:25 +0200)]
Fix warnings in yang-data-api
This fixes warnings reported in yang-data-api and enables findbugs
enforcement.
Change-Id: Ibb999c321b852ad71f21301c31322f9659adffd1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 09:03:36 +0000 (11:03 +0200)]
Enable findbugs in yang-parser-api
Flip the switch on enforcement.
Change-Id: I7bcb413c1aafd00ec63efc1ac296332ae0c1118b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 08:56:20 +0000 (10:56 +0200)]
Fix warnings in rfc8040 support
This fixes warnings reported in rfc8040-model-api and
rfc8040-parser-support, and enables findbugs enforcement.
Change-Id: I4ee91b65cc7f6ae11fffbdd3181d6470d9214c04
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 08:54:12 +0000 (10:54 +0200)]
Enable findbugs in rfc7952 support
This just flips the enforcement switch, not further changes.
Change-Id: Idb94e589ec7ba58f9ee22231ff5c6fd0d27fc49f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 08:40:42 +0000 (10:40 +0200)]
Enable findbugs in rfc6536 support
This just flips the enforcement switch, not further changes.
Change-Id: Iec68058a4e056b4e7b3320213a3ae290a46d3837
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 08:37:47 +0000 (10:37 +0200)]
Fix warnings in openconfig support
This fixes warnings reported in openconfig-model-api and
openconfig-parser-support, and enables findbugs enforcement.
Change-Id: I6769c4b4ddb4f4782911619e4d6c177d55f7dccf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 08:33:43 +0000 (10:33 +0200)]
Fix warnings in odlext support
This fixes warnings reported in odlext-model-api and odlext-parser-support,
and enables findbugs enforcement.
Change-Id: I97d0f98052d36fbbbee1590abbc33ad4e9db07a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 08:24:18 +0000 (10:24 +0200)]
Fix findbugs in yang-common and enable enforcement
Fix trivial issues and suppress places where findbugs does not
understand annotations.
Change-Id: I988e1471b04d42e988f20b9492d6b0f07252f6be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 08:15:04 +0000 (10:15 +0200)]
Fix javadoc warnings in testutils and enable findbugs
This fixes javadoc warnings and enables findbugs in testutils.
Change-Id: If5b4cfe8cc30f8c551534e506be9d322d9c4ce03
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 11 Sep 2018 08:06:17 +0000 (10:06 +0200)]
Fix warnings in concepts and enable findbugs
This patch fixes all javac/checkstyle/findbugs/javadoc warnings
and enables findbugs enforcement.
Change-Id: I48a488e54cb533dd38fba5c3a61233dadef35e43
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Sep 2018 17:49:08 +0000 (19:49 +0200)]
Add yang-model-api tests
This improves test coverage by testing default methods in yang-model-api.
Change-Id: Iee9290c86ad7b9ab7c20c56b5ebd51ffa966c4d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Marek Gradzki [Tue, 14 Aug 2018 08:05:37 +0000 (10:05 +0200)]
Consider AugmentationNodes when direct descendant is not found
With previous refactors it is quite easy to arrive at a simple
solution to take augmentations into account. This also
This includes a unit test from upstream based on afi-safi-name
with bgp-openconfig-extensions.
JIRA: YANGTOOLS-892
Change-Id: I237ed2c6cbed458a2109a48b468a30650f103a48
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Sep 2018 15:19:51 +0000 (17:19 +0200)]
Eliminate LeafRefValidation.forEachChoice()
As it turns out the two call sites can share more code. Introduce
processChildNode(), inlining forEachChoice() and its surrounding
lookup logic.
JIRA: YANGTOOLS-892
Change-Id: I2091abcd579ce1d48a628c3bdea9b4514b050e29
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Sep 2018 10:42:51 +0000 (12:42 +0200)]
Optimize QNameWithPredicateImpl
Create a dedicated QName-only implementation, saving some space.
Change-Id: I0218763aaf4e809f50b580677fc0b634b7c918fa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Sep 2018 10:02:20 +0000 (12:02 +0200)]
Split up LeafRefValidation.validateNodeData()
Turn this method into a dispatch and move logic into dedicated
methods. This makes it easier to follow the code flow and eliminate
duplicates.
JIRA: YANGTOOLS-892
Change-Id: I840fa0d2e8c7ea86efa05c1afea825e85d890837
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Sep 2018 09:43:07 +0000 (11:43 +0200)]
Minor code cleanups
- static private method
- reduce use of ChoiceSchemaNode.getCaseNodeByName()
- QNameWithPredicateBuilder(QName)
Change-Id: I9cf97ba4c6ef667e39212f511e17bb18b4002bc3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>