yangtools.git
5 years agoBump versions for yangtools-3.0.0 02/79902/1
Robert Varga [Fri, 25 Jan 2019 10:58:18 +0000 (11:58 +0100)]
Bump versions for yangtools-3.0.0

This starts the development of the next major release.

Change-Id: I2b2e0f7e339886f309d062895a49cff6ada0671d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix yangtools-docs 26/79826/1
Robert Varga [Tue, 22 Jan 2019 15:34:20 +0000 (16:34 +0100)]
Fix yangtools-docs

Current docs fail to correctly deploy, fix that up. Also group
packages to make them more readable.

Change-Id: Iebf8c785ca0fd7968724759a2b593ca559620057
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRework aggregate javadocs 70/79770/7
Robert Varga [Sun, 20 Jan 2019 23:48:17 +0000 (00:48 +0100)]
Rework aggregate javadocs

Since javadoc:aggregate-jar is forcing a full re-generate and compile
of the project, let's take a different approach.

This patch overloads the purpose of the docs directory so that it
participates on maven build. It produces a pom file with attached
sources and javadocs. Later we can add more stuff to it, too.

Change-Id: I866e8405e73f297c552194a7caf10c1fd8b26731
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove unneded artifacts entries 69/79769/1
Robert Varga [Sun, 20 Jan 2019 23:30:35 +0000 (00:30 +0100)]
Remove unneded artifacts entries

object cahce is a thing of the past, remove these stale
entries.

Change-Id: I3d81196819c291364b7dad2d53431b8f0024516c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAllow {Json,Xml}ParserStream to handle actions 64/79764/2
Robert Varga [Sun, 20 Jan 2019 18:25:12 +0000 (19:25 +0100)]
Allow {Json,Xml}ParserStream to handle actions

Generalize the support for RPCs to include actions, so that we can
use both. Also fix null handling to comply with javadoc.

Change-Id: Id84052c1d1f20aa9d0371015f01b0c8845152de2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAllow JSON/XML writers to be instantiated with root node 65/79765/2
Robert Varga [Sun, 20 Jan 2019 18:43:42 +0000 (19:43 +0100)]
Allow JSON/XML writers to be instantiated with root node

Rather than requiring a SchemaContext/SchemaPath combination, allow
writers to be instantiated by specifying a DataNodeContainer.

Change-Id: I9eb470587cad2af9b3390d134dcc03abc95e8645
JIRA: YANGTOOLS-935
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump version to 9-SNAPSHOT 59/79659/2
Robert Varga [Fri, 18 Jan 2019 14:42:20 +0000 (15:42 +0100)]
Bump version to 9-SNAPSHOT

This starts the next development cycle.

Change-Id: I0be6ec1cb52f2603c2d2d6077df26f9892d69495
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.9 58/79658/2
Stephen Kitt [Fri, 18 Jan 2019 13:50:35 +0000 (14:50 +0100)]
Bump to odlparent 4.0.9

Change-Id: Ie33ea4ef73069041ec5883c461f08ea31740d8c0
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoRemove writeValue()'s IOException throws 55/79655/1
Robert Varga [Fri, 18 Jan 2019 12:08:07 +0000 (13:08 +0100)]
Remove writeValue()'s IOException throws

Neither implementation can throw an IOException, hence tighten
internal API contract.

Change-Id: I7e3fe5bebfae87f5130f85cd4f40c87061d528d1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoClean up XMLStreamWriterUtils 87/79587/5
Robert Varga [Wed, 16 Jan 2019 21:27:05 +0000 (22:27 +0100)]
Clean up XMLStreamWriterUtils

This is slight refactor propagating @NonNull annotations and
acting on them:
- we do not need to use String.valueOf()
- we do not need guard against null values
- ValueWriter is a nice place to have a utility for doing
  writeCharacters(obj.toString())

Change-Id: Idcbc24036c2ae07cf93481cba1a2e311db7def6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDelay calling writeStartElement() 82/79582/7
Robert Varga [Wed, 16 Jan 2019 16:29:52 +0000 (17:29 +0100)]
Delay calling writeStartElement()

Java's default XMLStreamWriter is rather bad at emitting self-closing
tags, in that it will not do that unless we explicitly call
writeEmptyElement().

This is rather unfortunate, as there is plenty of cases, where it's
the writer's job to realize the element should be self-closing, for
example in case it carries only attributes -- which we simply have
no way of driving through XMLStreamWriter.

In order to make this work, we need to delay the call to
writeStartElement() until we see the next event, which can end up
being writeEndElement() -- which is where when we need to use
writeEmptyElement() instead.

Since value serializers can end up emitting namespace declarations
and characters into the stream, we hide the writer behind two classes:

- ValueWriter, which is abstract class strictly for use by serializers
  and exposes minimal methods required for them
- StreamWriterFacade, which is the sole implementation of ValueWriter,
  which holds methods required by XMLStreamNormalizedNodeStreamWriter

StreamWriterFacade thus has visibility into activity of both call
sites and can make appropriate decisions.

JIRA: YANGTOOLS-927
Change-Id: Ib42d7662d0b9b648132e93bc4ea9fbe012104deb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDeprecate XMLStreamNormalizedNodeStreamWriter.toString(Element) 88/79588/4
Robert Varga [Wed, 16 Jan 2019 22:16:33 +0000 (23:16 +0100)]
Deprecate XMLStreamNormalizedNodeStreamWriter.toString(Element)

This is an unused method, deprecate it for removal.

Change-Id: I6c0706d9d74ee7cae983b767c1b98e7899e04916
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not write empty string in EmptyXmlCodec 83/79583/5
Robert Varga [Wed, 16 Jan 2019 21:38:04 +0000 (22:38 +0100)]
Do not write empty string in EmptyXmlCodec

Emitting an empty string does nothing but churn writer state,
so speed up EmptyXmlCodec by not touching the writer.

Change-Id: Iab7db37089b84ec1a3c2e3c9381265025e21fdca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRefactor implementations to hide XMLStreamWriter 81/79581/4
Robert Varga [Wed, 16 Jan 2019 15:23:21 +0000 (16:23 +0100)]
Refactor implementations to hide XMLStreamWriter

In order to have control over when we output an element, we need
to make sure we know how the writer is being used.

Refactor XMLStreamNormalizedNodeStreamWriter interaction with its
subclasses so we know when we are leaking the writer -- which
happens only in writeValue().

JIRA: YANGTOOLS-927
Change-Id: I7e7bd62016e994a31fe6d69995e9d088746359da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRework anyxml encoding 24/79524/8
Robert Varga [Mon, 14 Jan 2019 19:55:36 +0000 (20:55 +0100)]
Rework anyxml encoding

It seems JRE's Transformers are broken in the DOM->StAX direction,
such they do not work with external StAX implementations like
woodstox-core.

As it turns out, this is quite unnecessary complexity because
stax2-api gives us XMLStreamReader wrapping a DOM Element, which
we are already using in the parser side.

This patch removes the the use the transformer in favor of rather
simpler forwarding of XMLStreamReader events to the underlying
XMLStreamWriter.

Also move StAX-based transformer to XmlParserStream, as it is now
the only user of StAX->DOM, updating required feature to StAXSource.

Performs plain old DOM->stream translation, hence it can use any
old transformer.

JIRA: YANGTOOLS-926
Change-Id: I25d0210a6b76f7cbbd5956814773d26776cbace6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove unused XMLStreamWriterUtils.writeAttribute() method 84/79584/1
Robert Varga [Wed, 16 Jan 2019 18:38:52 +0000 (19:38 +0100)]
Remove unused XMLStreamWriterUtils.writeAttribute() method

This method is completely unused, remove it.

Change-Id: I74c5eb42a1d20464270a41329bb849dd0e5b0b0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix default namespace emission 46/79546/3
Robert Varga [Tue, 15 Jan 2019 18:19:08 +0000 (19:19 +0100)]
Fix default namespace emission

When we are emitting opening a new element, we need to consult
XMLStreamWriter before we emit the element, otherwise its state
already reflects the newly-started element.

In non-repairing mode the JDK writer will accept our invocation
and update the namespace mapping, which will lead us to erroneously
assume we do not need to emit the declaration.

Since it is non-repairing, it will not emit the declaration itself,
leading to a blank document -- something for which we are actually
testing in one of our tests.

In order to improve the confidence in results, also update tests
which used only repairing factories to use both repairing and
non-repairing ones.

JIRA: YANGTOOLS-801
Change-Id: I6975cf21121f7a8f92056b5b49b31d53b685dc0f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoImprove JAXP implementation compatibility 44/79544/2
Robert Varga [Tue, 15 Jan 2019 16:50:03 +0000 (17:50 +0100)]
Improve JAXP implementation compatibility

Testing with woodstox-core shows a couple of UT failures that
are really assumptions on the implementation. Address them so we
do not get failures when implementation changes (too much).

While we are at it, improve startsWith/contains string checks
by using hamcrest.

Change-Id: I4af0c9cc370e5699255725f049ee7bb9b5c171ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd javadoc.io badge 12/79412/1
Robert Varga [Thu, 10 Jan 2019 11:45:59 +0000 (12:45 +0100)]
Add javadoc.io badge

With aggregated javadocs out there, add a badge pointing to
javadoc.io.

Change-Id: I4fe75f7df39e56b01e6f33603f622577b90bdc9b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoStart 2.1.8 release development 03/79403/1
Robert Varga [Thu, 10 Jan 2019 10:15:52 +0000 (11:15 +0100)]
Start 2.1.8 release development

This bumps artifacts to .8-SNAPSHOT version.

Change-Id: I023530bb8d3599149e74607ab97f0c92f96edd9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.8 52/79352/1
Stephen Kitt [Wed, 9 Jan 2019 14:01:54 +0000 (15:01 +0100)]
Bump to odlparent 4.0.8

Change-Id: Iee91b1e015ee6c8a122b427860d5e96fd9f8cd42
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoRemove JSR305 annotations from yang-data-codec-gson 66/79266/2
Robert Varga [Mon, 7 Jan 2019 09:30:49 +0000 (10:30 +0100)]
Remove JSR305 annotations from yang-data-codec-gson

Ditch JSR305 annotations in favor of JDT annotations.

JIRA: YANGTOOLS-907
Change-Id: I9b5a19f88f54ca92e07ce8404b469cc76a7858a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove JSR305 annotations from yang-data-codec-xml 67/79267/1
Robert Varga [Mon, 7 Jan 2019 10:06:53 +0000 (11:06 +0100)]
Remove JSR305 annotations from yang-data-codec-xml

Ditch JSR305 annotations in favor of JDT annotations.

JIRA: YANGTOOLS-907
Change-Id: Ife00f06b20b562f62514f8fbd2e36e3179223857
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove JSR305 annotations from yang-data-util 65/79265/2
Robert Varga [Mon, 7 Jan 2019 09:39:47 +0000 (10:39 +0100)]
Remove JSR305 annotations from yang-data-util

Ditch JSR305 annotations in favor of JDT annotations.

JIRA: YANGTOOLS-907
Change-Id: Ia183995a947277ea78cb9e37e2aa1494f937c43e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAlign createQName @Nonnull declarations 61/79261/1
Stephen Kitt [Mon, 7 Jan 2019 08:42:09 +0000 (09:42 +0100)]
Align createQName @Nonnull declarations

RFC7951JSONInstanceIdentifierCodec overrides createQName with a
mismatched lastModule annotations; this patch aligns the annotations
(@Nonnull) without changing the implementation (which throws an
IllegalArgumentException if lastModule is null).

(Caught by SpotBugs.)

Change-Id: I9e08241a5ec1c58554a0cd178e46ad4aeb061a77
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoRemove unneeded jaxb-api workarounds 36/79136/1
Robert Varga [Wed, 2 Jan 2019 12:53:46 +0000 (13:53 +0100)]
Remove unneeded jaxb-api workarounds

odlparent-4.0.5 provides a correct declaration of jaxb-api
and exclusions, hence we can remove them.

Change-Id: I91bd84fc7c8bd566d178a875df0d07addf08893b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd Codec/Deserializer/Serializer FIXMEs 95/79095/1
Robert Varga [Tue, 1 Jan 2019 16:28:57 +0000 (17:28 +0100)]
Add Codec/Deserializer/Serializer FIXMEs

The general design of Codec/Serializer/Deserializer allows for
nulls and does not allow for error reporting. This should be
fixed in next API design review.

Change-Id: Ib553d17f2ea570589b9c0094d1be6a0bcf598072
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate parser to JDT annotations 04/76704/10
Robert Varga [Tue, 1 Jan 2019 15:28:38 +0000 (16:28 +0100)]
Migrate parser to JDT annotations

This gets rid of unneeded nullness annotations and migrates
the remaining ones to JDT.

JIRA: YANGTOOLS-907
Change-Id: I601df58c7270bcc7e78d661a4a0b0eb430d53631
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAttach aggragate javadocs to aggragator 36/79036/3
Robert Varga [Mon, 24 Dec 2018 21:23:13 +0000 (22:23 +0100)]
Attach aggragate javadocs to aggragator

This allows us to point users to our aggregated javadocs, hence
they do not fish for them.

Change-Id: If191cdfd45c2732a96d4a62deb183f6add155a65
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump odlparent to 4.0.7 81/79081/4
Robert Varga [Thu, 27 Dec 2018 15:56:56 +0000 (16:56 +0100)]
Bump odlparent to 4.0.7

This fixes Java11 SFT compatiblity and removes the need to
declare triemap import.

Change-Id: Ia7c3f448cfceedd4cc6acd65b469438b328386c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnable spotbugs in yang-parser-reactor 16/76016/9
Robert Varga [Wed, 12 Sep 2018 00:51:26 +0000 (02:51 +0200)]
Enable spotbugs in yang-parser-reactor

Fix reported issues and flip the switch.

Change-Id: I3c496143e8c666dd103a429bcce2c586a313915b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoShorten StatementMap$Regular.get(int) 54/79054/2
Robert Varga [Wed, 26 Dec 2018 02:36:03 +0000 (03:36 +0100)]
Shorten StatementMap$Regular.get(int)

We can use a trigraph instead of a if/return combo, saving an
instruction.

Change-Id: If1482da5a4cf83f87b4d995333d757d2fa2d7e12
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix StatementMap$RegularAsCollection's size 24/76024/6
Robert Varga [Wed, 12 Sep 2018 09:29:40 +0000 (11:29 +0200)]
Fix StatementMap$RegularAsCollection's size

We are not initializing the size field, hence the class does not
operate correctly. Fix that and remove isEmpty(), which is a useless
override.

Change-Id: I1543e617f14f0a88c6b59afe93364cace151ee5c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMass-migrate to Objects.requireNonNull() 40/79040/4
Robert Varga [Tue, 25 Dec 2018 21:58:19 +0000 (22:58 +0100)]
Mass-migrate to Objects.requireNonNull()

Rather than using Guava's version of this method, use JDK8-native
one.

Change-Id: I43f229fecb0490103b4a02d9d8242e91797ae177
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSpeed up StatementContextVisitor.getValidStatementDefinition() 42/79042/6
Robert Varga [Tue, 25 Dec 2018 22:18:49 +0000 (23:18 +0100)]
Speed up StatementContextVisitor.getValidStatementDefinition()

Unprefixed statements are most common and we end up creating
a QNameModule each time we encounter them, while we have a common
constant which we can use.

Use the constant, allowing us to allocate fewer objects while
also allowing making interning work.

Change-Id: I9e8847f8bd39fb9bcf6f8d0e8b86d196aeb5e2cd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix noRev map efficiency 46/79046/3
Robert Varga [Tue, 25 Dec 2018 23:07:24 +0000 (00:07 +0100)]
Fix noRev map efficiency

QName.getRevision() always returns non-null, which means we are
always taking the slow version of this branch, as correctly flagged
by Eclipse.

Furthermore we can use QName.withoutRevision() to side-step QName's
localName validation, as the local name is known to have already
been checked.

Change-Id: I7be3b8053ab3dbddfdf9cf12f8754a307127a8b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup RFC6020_YIN_NAMESPACE usage 43/79043/5
Robert Varga [Tue, 25 Dec 2018 22:29:08 +0000 (23:29 +0100)]
Cleanup RFC6020_YIN_NAMESPACE usage

In export write we really want to use RFC6020_YIN_NAMESPACE_STRING,
not RFC6020_YIN_NAMESPACE, making references proper constants.

Change-Id: I3e9c7c745fbd2dd97fcb35e47cdb0920a81cc596
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd a maven central badge 99/78999/1
Robert Varga [Sat, 22 Dec 2018 21:10:57 +0000 (22:10 +0100)]
Add a maven central badge

Since we are publishing to central, add a pointer to the latest
yangtools-artifacts.

Change-Id: Ibea7c4736d4935e935360970e613709e93ee8949
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump versions to .7-SNAPSHOT 90/78990/1
Robert Varga [Sat, 22 Dec 2018 16:55:46 +0000 (17:55 +0100)]
Bump versions to .7-SNAPSHOT

This starts 2.1.7 development iteration.

Change-Id: Ica943173fdfa6fa0e8ae08b3bb63e0109dbd1dbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse odl-{antlr4,gson,stax2-api} 89/78989/3
Robert Varga [Sat, 22 Dec 2018 16:12:26 +0000 (17:12 +0100)]
Use odl-{antlr4,gson,stax2-api}

odlparent-4.0.5 provides granular wrapper features for artifacts
we are using. Use those features instead of re-packaging those
artifacts.

Change-Id: If897d435a0724b4c5049179855b5ed755b953a4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump pt-triemap to 1.0.4 51/78951/3
Robert Varga [Fri, 21 Dec 2018 15:32:41 +0000 (16:32 +0100)]
Bump pt-triemap to 1.0.4

Upstream version aligned with odlparent-4.0.5.

Change-Id: I36f446aaa6cbf1ccae76d1dd31bc092a4344b6b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.5 55/78955/2
Robert Varga [Fri, 21 Dec 2018 21:38:56 +0000 (22:38 +0100)]
Bump to odlparent 4.0.5

Change-Id: I4b122ff9c55c23df83440b3aa307fe276b56aade
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd karaf distribution 68/78968/2
Robert Varga [Fri, 21 Dec 2018 18:30:47 +0000 (19:30 +0100)]
Add karaf distribution

This adds a karaf distribution for the purposes of validating
upstream (odlparent) packaging.

Change-Id: I0c01ebad2cad2e34407eae139cb6b2a2dc119d51
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump odlparent to 4.0.5-SNAPSHOT 67/78967/2
Robert Varga [Fri, 21 Dec 2018 18:29:20 +0000 (19:29 +0100)]
Bump odlparent to 4.0.5-SNAPSHOT

This bumps the odlparent version to latest developent,
fixing issues with distrubution (relative to 4.0.4).

Change-Id: I8d238e4bda2ddf2cfd241a7f5b65f5d08423a224
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.4 05/78905/2
Stephen Kitt [Fri, 21 Dec 2018 08:50:14 +0000 (09:50 +0100)]
Bump to odlparent 4.0.4

Change-Id: I0e9737eb596296ec70f754492911f51241927c9c
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoIntern empty leaves 86/78886/1
Robert Varga [Thu, 20 Dec 2018 09:39:52 +0000 (10:39 +0100)]
Intern empty leaves

This patch teaches LeafInterner to intern leaves holding Empty,
as they have only one possible value.

Change-Id: I5afa161ec49b02c33a3e7be28bcda135b6d796cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoExpand leaf interner 90/57790/5
Robert Varga [Wed, 24 May 2017 20:01:44 +0000 (22:01 +0200)]
Expand leaf interner

This expands LeafInterner to also handle int8/uint8 types.

Change-Id: Ic9632c170252c88f76a7a7d557c783ee7d982701
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMass migrate fields to use Immutable collections 06/78806/2
Robert Varga [Fri, 14 Dec 2018 18:46:04 +0000 (19:46 +0100)]
Mass migrate fields to use Immutable collections

We are using immutables in all but declaration. Help performance
a bit by using base classes.

Change-Id: I8408ec89667b747da264b13a3425bfc752cc4ef4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump versions to 2.1.6-SNAPSHOT 39/78639/1
Robert Varga [Tue, 11 Dec 2018 09:30:43 +0000 (10:30 +0100)]
Bump versions to 2.1.6-SNAPSHOT

This is the start of next development cycle.

Change-Id: If0f7f75ac7560de6c976b797bd5e4b973ff1dfe4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPreserve attributes when parsing AnyXml from XML 66/78466/5
Jakub Morvay [Wed, 5 Dec 2018 16:29:38 +0000 (17:29 +0100)]
Preserve attributes when parsing AnyXml from XML

So far, anyxml nodes have been parsed in following pipeline:
 String -> DOM -> Stax -> String -> DOM
Now the parsing is simplified to:
 String -> DOM -> Stax -> DOM

Remove the unnecessary "back to string" step. This step is not just
unnecessary but also stripes down attributes and namespaces from AnyXml
node value.

JIRA: YANGTOOLS-923
Change-Id: If13ce9c7397c37b96a532090e67683a635ae14ef
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize SingletonSet.containsAll() 88/78388/1
Robert Varga [Mon, 3 Dec 2018 16:10:15 +0000 (17:10 +0100)]
Optimize SingletonSet.containsAll()

Use a single expression return to trim down some bytecode.

Change-Id: I49ca88033d36994de761abaa7eb28438e10a37e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize ImmutableOffsetMap a bit 87/78387/1
Robert Varga [Mon, 3 Dec 2018 15:55:10 +0000 (16:55 +0100)]
Optimize ImmutableOffsetMap a bit

Use fluent StringBuilder, assign-and-compare and eliminate an
unneeded variable to trim down bytecode size.

Change-Id: Ib08a65e33759920e9a86751fe5b833052d8bce87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize ConstantArrayCollection.equals() 86/78386/1
Robert Varga [Mon, 3 Dec 2018 15:50:25 +0000 (16:50 +0100)]
Optimize ConstantArrayCollection.equals()

Use a single expression return, trimming the resulting method
size.

Change-Id: I5300ed93cc97de9b3b60ce885b6b8a13dd0c6927
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAllocate new keyes map lazily 96/78296/2
Robert Varga [Thu, 29 Nov 2018 14:25:35 +0000 (15:25 +0100)]
Allocate new keyes map lazily

Do not allocate the map for new mappings until it is actually needed.
This introduces some additional complexity via null checks, but that
is not something major.

Also refactor large equals() method into smaller chunks, so that it
can be inlined more easily.

JIRA: YANGTOOLS-919
Change-Id: Idb4b7a4cb7cde09af2eab0bcebfb71083e64ff2f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump version to 2.1.5-SNAPSHOT 19/78119/1
Robert Varga [Sun, 25 Nov 2018 18:27:57 +0000 (19:27 +0100)]
Bump version to 2.1.5-SNAPSHOT

This starts the next version development.

Change-Id: Ib2b1b5e8a8c33da1164ac7c193958650b47c0aa0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd predicate-free NodeIdentifierWithPredicates constructor 12/78112/1
Robert Varga [Sun, 25 Nov 2018 16:55:01 +0000 (17:55 +0100)]
Add predicate-free NodeIdentifierWithPredicates constructor

This saves some time and figuring out to users, as they can just
not specify any predicates and get a free list. This side-steps
some of the code done in the Map-taking constructor.

Change-Id: If06c50aad3c2918cc6ec150b4185837557ac3f40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRefactor ImmutableMapEntryNodeSchemaAwareBuilder 69/78069/17
Robert Varga [Thu, 22 Nov 2018 23:43:32 +0000 (00:43 +0100)]
Refactor ImmutableMapEntryNodeSchemaAwareBuilder

This builder's logic is not entirely efficient, as it can constructs
unnecessary NodeIdentifierWithPredicates purely for checking purposes.

Furthermore we can side-step child validation when we are switching
by available children, as we have the entryset available.

JIRA: YANGTOOLS-917
Change-Id: I57d0a156ced3abce7e61403c2b390c074850d612
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFactor out {SharedSingleton,ImmutableOffset}MapTemplate 08/78108/4
Robert Varga [Sun, 25 Nov 2018 10:19:25 +0000 (11:19 +0100)]
Factor out {SharedSingleton,ImmutableOffset}MapTemplate

Exposing the single-entry map case has the advantage of providing
instantiateWithValue(Object) method, side-stepping the need for
a temporary array. Split it out of ImmutableMapTemplate, so that
users can provide customized handling as needed.

The same holds true if the keyset is known to contain more than
one key, in which case using ImmutableOffsetMapTemplate can be
faster.

JIRA: YANGTOOLS-917
Change-Id: If08f492ff59bc89f3826a4122cfbcf34657c2210
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoImprove ListEntryNodeDataWithSchema 66/78066/16
Robert Varga [Thu, 22 Nov 2018 22:32:00 +0000 (23:32 +0100)]
Improve ListEntryNodeDataWithSchema

ImmutableMapTemplate allows us to more efficiently instantiate
NodeIdentifierPredicates, as it takes care of ordering of keys
while maintaining an efficient internal representations.

It furthermore provides a keySet() method, which is useful for
quickly checking if a leaf is part of key definition -- unlike
ListSchemaNode.getKeyDefinition(), which is a List and therefore
must be linearly searched.

It also allows us to skip HashMap allocation for unkeyed lists,
clearly showing that the class should be split into two.

JIRA: YANGTOOLS-917
Change-Id: If2d7bbbc5c4fe1ca96097f374f4313aabb411908
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd ImmutableMapTemplate 59/78059/18
Robert Varga [Thu, 22 Nov 2018 17:43:42 +0000 (18:43 +0100)]
Add ImmutableMapTemplate

We have couple some hot paths where we know the keySet of an immutable
map we want to instantiate. For these, using
ImmutableOffsetMap.*copyOf() is wasteful, as it performs unnecessary
cache looks and map lookups.

ImmutableMapTemplate can be used to amortize these preparatory steps,
so that an ImmutableOffsetMap (or SharedSingletonMap) can efficiently
be produced by either transforming values of some other map, or by
supplying values in the correct order.

Since we are in the area, improve documentation and @NonNull
annotations of both ImmutableOffsetMap and SharedSingletonMap.

JIRA: YANGTOOLS-917
Change-Id: I8e7808b9bfe751885b842715f7e0346c0e7485b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSeparate out ConstantArrayCollection iterator 86/78086/2
Robert Varga [Fri, 23 Nov 2018 10:12:15 +0000 (11:12 +0100)]
Separate out ConstantArrayCollection iterator

This splits it out into its own static class.

Change-Id: I94a86c65eefdba79db2f5ec3a01b13dbad0b41b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd EmptyDequeTest 74/78074/2
Robert Varga [Fri, 23 Nov 2018 03:48:19 +0000 (04:48 +0100)]
Add EmptyDequeTest

This tests the class to 61%.

Change-Id: Iaf1f4dc14a31937a53a47766c7c42f05b423117d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRetrofit SchemaContextProvider 65/78065/4
Robert Varga [Thu, 22 Nov 2018 21:42:02 +0000 (22:42 +0100)]
Retrofit SchemaContextProvider

Since we already have a getSchemaContext() method, we can
get it documented and widely available for free.

Change-Id: Ib5aaa3d1d503a000a997beaee3d31002755e5998
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMake InMemoryDataTreeSnapshot implement SchemaContextProvider 64/78064/3
Robert Varga [Thu, 22 Nov 2018 21:34:12 +0000 (22:34 +0100)]
Make InMemoryDataTreeSnapshot implement SchemaContextProvider

Note DataTreeSnapshot's duplication of getSchemaContext(), which
is indicative of a coupling to yang.model.api. This is fine for now,
as this coupling already exists through xpath interfaces, but it
needs to be revisited and cleaned by either removing the method,
or making it a non-default (and inherited from SchemaContextProvider).

Change-Id: If335f178e9e086b8b5185044a06d4296f81b2a74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRefactor XMLStreamWriterUtils 63/78063/3
Robert Varga [Thu, 22 Nov 2018 21:19:24 +0000 (22:19 +0100)]
Refactor XMLStreamWriterUtils

This refactors XMLStreamWriterUtils, so that it can be a proper
SchemaContextProvider. This allows us to propagate this property
through SchemaAwareXMLStreamNormalizedNodeStreamWriter the same
way.

Change-Id: Ibe0832e76d3e66ca27f8d345f7fd6f890b92f35e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoReuse writer field from parent 62/78062/2
Robert Varga [Thu, 22 Nov 2018 21:13:46 +0000 (22:13 +0100)]
Reuse writer field from parent

Writer is a duplicate field, which is already available as
getParent(). Remove the field and use the getter.

Change-Id: I1d5dd866512479268e32affb0ded301fadb5cb11
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSpeed up UnorderedMapMixinContextNode 60/78060/1
Robert Varga [Thu, 22 Nov 2018 20:33:32 +0000 (21:33 +0100)]
Speed up UnorderedMapMixinContextNode

NodeIdentifierWithPredicates recognizes ImmutableMap, make sure
we remain on the faster path of it.

Change-Id: I95d745d6e7ba54dcdb422fac19256112a21f413f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup Immutable documentation 55/77855/1
Robert Varga [Thu, 15 Nov 2018 14:38:30 +0000 (15:38 +0100)]
Cleanup Immutable documentation

This is a simple formatting update, with small rewording to use
better language.

Change-Id: I51848c3a956c7251bad98418cac40ea0ffa943c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDocument Identifiable interface contract 54/77854/2
Robert Varga [Thu, 15 Nov 2018 14:31:25 +0000 (15:31 +0100)]
Document Identifiable interface contract

Somehow this core interface went undocumented, fix that and also
clarify it's companion Identifier contract.

Change-Id: I009ed90e548770b46d636e5e41c07877642682d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix HashCodeBuilder Eclipse error 40/77740/1
Robert Varga [Tue, 13 Nov 2018 18:39:28 +0000 (19:39 +0100)]
Fix HashCodeBuilder Eclipse error

With .build() required to return a @NonNull, make sure we match
the annotation.

Change-Id: I1baedf6af702ec77c053f209fe43ad75f357bccd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoProperly propagate BuildContext 04/77704/3
Robert Varga [Tue, 13 Nov 2018 07:27:59 +0000 (08:27 +0100)]
Properly propagate BuildContext

YangToSourcesProcessor was not properly propagating BuildContext,
fix that.

JIRA: YANGTOOLS-915
Change-Id: Id4f28fe640bbd4d4ed065b9aa62f0becb2db43ec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd OptionalBoolean.ofOptional() 12/77612/1
Robert Varga [Thu, 8 Nov 2018 10:28:29 +0000 (11:28 +0100)]
Add OptionalBoolean.ofOptional()

This adds a simple utility method to create symmetry with
fromOptional(). Also cache TRUE/FALSE optionals, so accesses
get a bit faster.

Change-Id: Ife95d26f9b58e6859991d544eda52d0094302c30
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump versions to 2.1.4-SNAPSHOT 87/77587/1
Robert Varga [Wed, 7 Nov 2018 18:25:32 +0000 (19:25 +0100)]
Bump versions to 2.1.4-SNAPSHOT

This starts the next release development.

Change-Id: I4035fb4a68b6778151fbb5aac020a43af4505ca2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFixup xpath versions (again) 86/77586/1
Robert Varga [Wed, 7 Nov 2018 18:24:44 +0000 (19:24 +0100)]
Fixup xpath versions (again)

This is the second time I missed the version bump, let's fix it
up.

Change-Id: I834b2ab339c2b1ebc974d8af0ac7e0a9a50a721e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUpdate RpcResultBuilder.buildFuture() 11/77511/1
Robert Varga [Mon, 5 Nov 2018 15:53:01 +0000 (16:53 +0100)]
Update RpcResultBuilder.buildFuture()

Returning a FluentFuture here is extremely useful, retrofit
the builder by introducing a hidden superclass which returns
ListenableFuture, which allows us to seamlessly return
a FluentFuture instead by forcing the compiler to emit a synthetic
bridge method.

Change-Id: I3d9725c666ff5d78f795eb0eada6e7acf81e8e70
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoShorten Prerequisite reference 56/77456/2
Robert Varga [Fri, 2 Nov 2018 15:23:37 +0000 (16:23 +0100)]
Shorten Prerequisite reference

We have the interface imported, no need to refer to it via
ModelActionBuilder.

Change-Id: Ife9f840bffe430264cd7b9ba793f604a0dbc4e5c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoTolerate empty instance identifier in ImmutableNodes.fromInstanceId() 80/77480/1
Robert Varga [Sun, 4 Nov 2018 20:24:28 +0000 (21:24 +0100)]
Tolerate empty instance identifier in ImmutableNodes.fromInstanceId()

If the user specifies an empty InstanceIdentifier, we fail with an
undocumented NoSuchElementException. Make sure we properly handle
this case by returning a container which matches SchemaContext.NAME.

JIRA: YANGTOOLS-914
Change-Id: I0b503d3bed99d73d88e037d35979c503215f3b52
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix StmtContext nullness problems 60/77260/3
Robert Varga [Wed, 24 Oct 2018 14:24:20 +0000 (16:24 +0200)]
Fix StmtContext nullness problems

Introduce coerceParentContext() and coerce(Raw)StatementArgument(),
which are guaranteed to return a non-null reference or throw
a VerifyException. Convert users pointed out by Eclipse nullness
analysis to use these instead their @Nullable counterparts.

JIRA: YANGTOOLS-907
Change-Id: Ib6d80a9597ec8437194dc553ea71445599ee381c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate SourceException and its subclasses to JDT annotations 09/77309/1
Robert Varga [Fri, 26 Oct 2018 17:11:32 +0000 (19:11 +0200)]
Migrate SourceException and its subclasses to JDT annotations

This is straightforward change, just switch over annotations and
fixup some of the warnings in the corresponding test.

JIRA: YANGTOOLS-907
Change-Id: I9d757381d71af205f3ed4a41778a2027a66d3fdb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoLimit the TCCL when instantiating UntrustedXML 00/77300/1
Robert Varga [Wed, 24 Oct 2018 21:12:02 +0000 (23:12 +0200)]
Limit the TCCL when instantiating UntrustedXML

JAXP newInstance() methods can end up going through ServiceLoader
with TCCL as its ClassLoader, which means our constants may end up
pointing to a ClassLoader beyond our normal visibility.

This means we can end up picking up a different factory depending
on where we are called from and also can mean the TCCL cannot be
garbage-collected.

Force the TCCL to be the ClassLoader holding UntrustedXML, thus
establishing tight coupling between JAXP implementation discovery
mechanism and UntrustedXML.

JIRA: CONTROLLER-1867
Change-Id: Icacb0e193c7360c73bd07bc5c815bf803ca9ac44
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6fd73a016d19cfb336ab12f6eddfc2d5934fb3fc)

5 years agoFixup errors reported by null analysis 51/77251/3
Robert Varga [Wed, 24 Oct 2018 11:29:32 +0000 (13:29 +0200)]
Fixup errors reported by null analysis

This fixes up nulls being used in illegal contexts.

Change-Id: Icba09ff95e0c8a41615b0925de8f12006ea92059
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoConvert parser-{reactor,spi} classes to JDT annotations 38/77238/18
Robert Varga [Wed, 24 Oct 2018 00:28:11 +0000 (02:28 +0200)]
Convert parser-{reactor,spi} classes to JDT annotations

Migrate away from JSR-305 annotations to JDT annotations.

Change-Id: I268808a6da501eedce9bc34df0d9c5f70b145230
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUndo yang-common JDT annotation in parameters 49/77249/2
Robert Varga [Wed, 24 Oct 2018 10:43:52 +0000 (12:43 +0200)]
Undo yang-common JDT annotation in parameters

Using @NonNull for arguments to construction methods causes massive
amounts of warnings downstreams, disable them for now.

Change-Id: I940793d9ec0a899c04027d947f129130c88634d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMake Delegator.getDelegate() non-null 37/77237/13
Robert Varga [Tue, 23 Oct 2018 23:58:59 +0000 (01:58 +0200)]
Make Delegator.getDelegate() non-null

The implied intent is that the delegate is always non-null. Fix this
up.

Change-Id: I29f21eeafd724ee3799db736c9a4bbb6bc4f1e3d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate yang-model-util annotations 36/77236/11
Robert Varga [Tue, 23 Oct 2018 23:44:52 +0000 (01:44 +0200)]
Migrate yang-model-util annotations

This moves over to use JDT annotations instead of JSR305.

Change-Id: I98d70e53a951d41c3533272da016fb8afa223a49
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate yang-parser-api annotations 35/77235/8
Robert Varga [Tue, 23 Oct 2018 22:06:18 +0000 (00:06 +0200)]
Migrate yang-parser-api annotations

This patch migrates nullness annotations from JSR-305 to JDT.

Change-Id: I23fe36ffbf3a5929c48239bbdcfd9ef1e62ae0b6
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate XPath-related interfaces to JDT 34/77234/7
Robert Varga [Tue, 23 Oct 2018 21:49:06 +0000 (23:49 +0200)]
Migrate XPath-related interfaces to JDT

Rather than using JSR305 annotations, use JDT equivalents.

Change-Id: I76025f02f74a326fef1e72b6fb768897b68b33f7
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate model.repo.api to JDT annotations 33/77233/6
Robert Varga [Tue, 23 Oct 2018 21:11:51 +0000 (23:11 +0200)]
Migrate model.repo.api to JDT annotations

This mass-migrates all of model.repo.api interfaces and classes
to use JDT nullness annotations.

Change-Id: I740d22b348d9f12cc30389e8f569b0dc912e7a57
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate SchemaSourceRepresentation annotations 32/77232/5
Robert Varga [Tue, 23 Oct 2018 20:46:15 +0000 (22:46 +0200)]
Migrate SchemaSourceRepresentation annotations

Migrate from JSR305 to JDT annotations, along with implentations.

Change-Id: I38c8c567a91c42e0c4387cfc3d7baf06cf495e2b
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate StatementDefinition @Nullable 31/77231/3
Robert Varga [Tue, 23 Oct 2018 20:08:13 +0000 (22:08 +0200)]
Migrate StatementDefinition @Nullable

This is of @Nullable is rather trivial, update it to JDT annotation,
and update implementations to eliminate warnings comimng from Eclipse.

Change-Id: Ifd3fea2f3e9fe68a51c0599b11889ee86b3ef7c6
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup IdentifierNamespace annotations 28/77228/3
Robert Varga [Tue, 23 Oct 2018 18:12:30 +0000 (20:12 +0200)]
Cleanup IdentifierNamespace annotations

Migrate from javax.annotation to JDT annotations, cleaning up
implementations while we are at it.

Change-Id: I0147422c3ac2353c08f8d810906974922b8a6710
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate EffectiveStatement to @NonNull 26/77226/5
Robert Varga [Tue, 23 Oct 2018 17:34:26 +0000 (19:34 +0200)]
Migrate EffectiveStatement to @NonNull

This migrates @Nonnull to @NonNull, eliminating the need to
annotate implementations.

Change-Id: Ia7527df07e5ea4df839f8a6051dbc5bd2280aa66
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate TypeDefinitionAware to JDT types 25/77225/6
Robert Varga [Tue, 23 Oct 2018 17:19:45 +0000 (19:19 +0200)]
Migrate TypeDefinitionAware to JDT types

This migrates all implementations of TypeDefinitionAware to
JDT @NonNull annotation.

Change-Id: If3a083835f1be90063a62c3241df4f6970c97442
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate statements to JDT annotations 24/77224/6
Robert Varga [Tue, 23 Oct 2018 16:30:32 +0000 (18:30 +0200)]
Migrate statements to JDT annotations

These are trivial conversions from javax.annotation to JDT's
NonNull.

Change-Id: If3f6fed71917101febb2bce0d1b2a853668f205a
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd CheckedBuilder 69/76769/9
Robert Varga [Mon, 8 Oct 2018 20:25:47 +0000 (22:25 +0200)]
Add CheckedBuilder

API design can call for a specific exception to be thrown when
a builder is not properly initialized. Add CheckedBuilder which
can throw a specific exception.

Change-Id: I03fcc7a96363d40217fc7e363535fffe89699da0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate ActionStatementContainer to JDT annotations 23/77223/3
Robert Varga [Tue, 23 Oct 2018 16:23:50 +0000 (18:23 +0200)]
Migrate ActionStatementContainer to JDT annotations

This is a trivial use of @Nonnull, migrate it over to @NonNull.

Change-Id: Ie2167fa3574441fbb859b4ea5c56fdefe3b1b264
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate RevisionStatement to JDT annotations 22/77222/2
Robert Varga [Tue, 23 Oct 2018 16:20:47 +0000 (18:20 +0200)]
Migrate RevisionStatement to JDT annotations

This is a trivial use of @Nonnull, migrate it and eliminate useless
override in RevisionStatementImpl.

Change-Id: I096627189a3d37a49b612ee8ea7cc544570a8eae
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate AbstractDeclaredStatement to JDT annotations 21/77221/2
Robert Varga [Tue, 23 Oct 2018 15:38:10 +0000 (17:38 +0200)]
Migrate AbstractDeclaredStatement to JDT annotations

Baseline yang-model-apis have been migrated, move over to JDT
annotations here, too.

Change-Id: I8de262e3730ec616b2158dc25f4bbe4171a37e70
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate SchemaNode to JDT annotations 20/77220/1
Robert Varga [Tue, 23 Oct 2018 15:04:46 +0000 (17:04 +0200)]
Migrate SchemaNode to JDT annotations

This is trivial use of @Nonnull, migrate it over along
with implementations, also cascading annotations to SchemaContext
and SchemaPath.

Change-Id: I7359582d6696f60a262b779d9aed728e4f828637
JIRA: YANGTOOLS-907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate SchemaContext to JDT annotations 19/77219/1
Robert Varga [Tue, 23 Oct 2018 14:50:24 +0000 (16:50 +0200)]
Migrate SchemaContext to JDT annotations

This is a trivial use @Nullable, migrate it and strengthen
annotations around default methods.

JIRA: YANGTOOLS-907
Change-Id: I8bbbe0e80bfe5037564913099f14ffd10d5df583
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>