- potentially-static methods
- deprecated use of Throwables.propagate()
- raw use of NormalizedNode
Change-Id: I06bc1f56c90d7c4fddce262ef2c63eec72492274
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.netconf.mdsal.connector.ops.get;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Optional;
package org.opendaylight.netconf.mdsal.connector.ops.get;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Optional;
-import com.google.common.base.Throwables;
import com.google.common.collect.Iterables;
import java.io.IOException;
import javax.xml.stream.XMLOutputFactory;
import com.google.common.collect.Iterables;
import java.io.IOException;
import javax.xml.stream.XMLOutputFactory;
return result.getNode();
}
return result.getNode();
}
- private XMLStreamWriter getXmlStreamWriter(final DOMResult result) {
+ private static XMLStreamWriter getXmlStreamWriter(final DOMResult result) {
try {
return XML_OUTPUT_FACTORY.createXMLStreamWriter(result);
} catch (final XMLStreamException e) {
try {
return XML_OUTPUT_FACTORY.createXMLStreamWriter(result);
} catch (final XMLStreamException e) {
- private SchemaPath getSchemaPath(final YangInstanceIdentifier dataRoot) {
+ private static SchemaPath getSchemaPath(final YangInstanceIdentifier dataRoot) {
return SchemaPath.create(
Iterables.transform(dataRoot.getPathArguments(), PathArgument::getNodeType), dataRoot.equals(ROOT));
}
return SchemaPath.create(
Iterables.transform(dataRoot.getPathArguments(), PathArgument::getNodeType), dataRoot.equals(ROOT));
}
- private void writeRootElement(final XMLStreamWriter xmlWriter, final NormalizedNodeWriter nnWriter,
+ private static void writeRootElement(final XMLStreamWriter xmlWriter, final NormalizedNodeWriter nnWriter,
final ContainerNode data) {
try {
if (data.getNodeType().equals(SchemaContext.NAME)) {
final ContainerNode data) {
try {
if (data.getNodeType().equals(SchemaContext.NAME)) {
nnWriter.flush();
xmlWriter.flush();
} catch (XMLStreamException | IOException e) {
nnWriter.flush();
xmlWriter.flush();
} catch (XMLStreamException | IOException e) {
- Throwables.propagate(e);
+ throw new RuntimeException(e);
}
}
protected Element serializeNodeWithParentStructure(final Document document, final YangInstanceIdentifier dataRoot,
}
}
protected Element serializeNodeWithParentStructure(final Document document, final YangInstanceIdentifier dataRoot,
- final NormalizedNode node) {
+ final NormalizedNode<?, ?> node) {
if (!dataRoot.equals(ROOT)) {
return (Element) transformNormalizedNode(document,
ImmutableNodes.fromInstanceId(schemaContext.getCurrentContext(), dataRoot, node),
if (!dataRoot.equals(ROOT)) {
return (Element) transformNormalizedNode(document,
ImmutableNodes.fromInstanceId(schemaContext.getCurrentContext(), dataRoot, node),
- public Iterator getPrefixes(final String namespaceURI) {
+ public Iterator<String> getPrefixes(final String namespaceURI) {
// Not implemented
return null;
}
// Not implemented
return null;
}