2 * Copyright (c) 2018 Pantheon Technologies, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.binding.dom.adapter;
10 import org.slf4j.LoggerFactory;
13 * Static JVM-wide configuration.
15 final class StaticConfiguration {
17 * When we are invoking a Binding-Aware RPC implementation, we can side-step translation through NormalizedNodes,
18 * which is an obvious performance win.
21 * Unfortunately Binding Specification does not truthfully cover YANG semantics, in that grouping instantiations
22 * are not treated separately, which leads to constructs which are Binding-valid, but are actually YANG-invalid.
23 * These are usually easily rectified when identified, but the existence of this shortcut means that in single-node
24 * scenario we do not detect these mismatches and thus these issues remain unidentified -- only to break when
25 * in multi-node scenarios or the shortcut becomes otherwise ineffective.
28 * We therefore allow the shortcuts to be globally disabled via a property, which is evaluated when this component
31 static final boolean ENABLE_CODEC_SHORTCUT = !Boolean.getBoolean(
32 "org.opendaylight.mdsal.binding.dom.adapter.disableCodecShortcut");
35 // Do not retain the logger
36 LoggerFactory.getLogger(StaticConfiguration.class).info("Binding-over-DOM codec shortcuts are {}",
37 ENABLE_CODEC_SHORTCUT ? "enabled" : "disabled");
40 private StaticConfiguration() {