Bump odlparent dependency to 2.0.0 73/50173/13
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 21 Jun 2017 14:03:22 +0000 (16:03 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 21 Jun 2017 14:03:22 +0000 (16:03 +0200)
This patch updates the dependency to 2.0.0. Furthermore it eliminates
karaf 3 features and fixes Guava changes.

Change-Id: I2f9d3bda9ed12c58ca44f44e66f1110cceaf200b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
57 files changed:
common/artifacts/pom.xml
common/checkstyle-logging/pom.xml
common/concepts/pom.xml
common/mockito-configuration/pom.xml
common/object-cache-api/pom.xml
common/object-cache-guava/pom.xml
common/object-cache-noop/pom.xml
common/pom.xml
common/testutils/pom.xml
common/util/pom.xml
common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/AsyncNotifyingListeningExecutorServiceTest.java
common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/DeadlockDetectingListeningExecutorServiceTest.java
features/features-yangtools/pom.xml
features/features-yangtools/src/main/features/features.xml [deleted file]
features/features4-yangtools/pom.xml [deleted file]
features/odl-yangtools-common/pom.xml
features/odl-yangtools-yang-data/pom.xml
features/odl-yangtools-yang-parser/pom.xml
features/pom.xml
pom.xml
third-party/pom.xml
third-party/triemap/pom.xml
websocket/pom.xml
websocket/websocket-client/pom.xml
yang-validation-tool/pom.xml
yang/pom.xml
yang/yang-common/pom.xml
yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Revision.java
yang/yang-data-api/pom.xml
yang/yang-data-codec-gson/pom.xml
yang/yang-data-codec-gson/src/main/java/org/opendaylight/yangtools/yang/data/codec/gson/JSONNormalizedNodeStreamWriter.java
yang/yang-data-codec-xml/pom.xml
yang/yang-data-impl/pom.xml
yang/yang-data-jaxen/pom.xml
yang/yang-data-transform/pom.xml
yang/yang-data-util/pom.xml
yang/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/codec/SharedCodecCache.java
yang/yang-maven-plugin-it/pom.xml
yang/yang-maven-plugin-spi/pom.xml
yang/yang-maven-plugin/pom.xml
yang/yang-model-api/pom.xml
yang/yang-model-export/pom.xml
yang/yang-model-immutable/pom.xml
yang/yang-model-util/pom.xml
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/repo/util/AbstractSchemaRepository.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/repo/util/SchemaSourceTransformer.java
yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/repo/util/FilesystemSchemaSourceCacheTest.java
yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/repo/util/InMemorySchemaSourceCacheTest.java
yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/repo/util/SchemaSourceTransformerTest.java
yang/yang-parser-api/pom.xml
yang/yang-parser-impl/pom.xml
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SharedSchemaContextFactory.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/CrossSourceStatementReactor.java
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/SharedSchemaRepositoryTest.java
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/DeviationResolutionTest.java
yang/yang-system-test/pom.xml
yang/yang-test-util/pom.xml

index 94d7b564d60bd1c3ef0c3bdbda0db594b8f88e04..e34b4f8d8e2db260ea64dfd6149bed6184f643ee 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
       <groupId>org.opendaylight.odlparent</groupId>
       <artifactId>odlparent-lite</artifactId>
-      <version>1.9.0</version>
+      <version>2.0.0</version>
       <relativePath/>
     </parent>
 
index bcfa092307185fd3080c7a7f7a4a49fc5a86eca0..bf6436f3543bc231b16e8f68418296954765b51e 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
   <groupId>org.opendaylight.yangtools</groupId>
index 756b99b00866705c4d38135f8c9e1938084b1549..60b3dd0ca937a3b276239ed47351502cb2506319 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 1bfff877995e0db1c8602afc0fdde1a673d5e37c..05ffad027ac30b576813b9a9bfc260be20dc52bb 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index e8a153066ce4b4b321225020fe579182f178ecc9..e58b70c8a02d53cbcd2a9718452d0d49575c2287 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
     <packaging>bundle</packaging>
index 6d2b842c9f9349a3185a1a705434aae3816c9bfc..0e3a917614d0b970a77f915be6818c59f983372b 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 211473a593e28419de5c1fd82b10c34c8ca6abcf..052ed867aba24a9df022d7faa6f1b56ab0be2d96 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
     <packaging>bundle</packaging>
index fef64dbb23dfbe58777c697050786ed33538bc29..7fa3e677931700eaae7d12c30fad40812ad151c8 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
       <groupId>org.opendaylight.odlparent</groupId>
       <artifactId>odlparent-lite</artifactId>
-      <version>1.9.0</version>
+      <version>2.0.0</version>
       <relativePath/>
     </parent>
 
index 491c58aa53016dc1d190a7c2db92d00f4abbd68d..9c821b88c7e3374d3f0cba472b76d71ee41cf899 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 38bab0f2645ed89b6d0d06e483b9592c76872b02..8f6289418ba3c55f484f2122ef2ba8d52e099372 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
     <packaging>bundle</packaging>
index bbcb87f148e1fe30a6874f9d0038b4dc8752e909..e954795fbdddc48a68b65f9cb12efeb1d0109529 100644 (file)
@@ -22,6 +22,7 @@ import static org.opendaylight.yangtools.util.concurrent.CommonTestUtils.SUBMIT_
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import java.util.ArrayList;
 import java.util.List;
@@ -153,7 +154,7 @@ public class AsyncNotifyingListeningExecutorServiceTest {
                 // Shouldn't happen
                 fail("Unexpected failure " + t);
             }
-        });
+        }, MoreExecutors.directExecutor());
     }
 
     @Test
index c1f760375bb47ab6f1c6533f1a8520c1816485e8..0546fa309896f3d1157c156403a787657293cac5 100644 (file)
@@ -21,6 +21,7 @@ import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutionException;
@@ -129,7 +130,7 @@ public class DeadlockDetectingListeningExecutorServiceTest {
                 caughtEx.set(t);
                 futureCompletedLatch.countDown();
             }
-        });
+        }, MoreExecutors.directExecutor());
 
         initialInvoker.invokeExecutor(executor, task);
 
index 8c3c55a6b5608be82ab7a5c10d3eacb17580ef12..26bbc8d53b39e14be7754fec007939c165f78b73 100644 (file)
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
 <!--
- Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ Copyright Â© 2016 Red Hat, Inc. and others.  All rights reserved.
 
  This program and the accompanying materials are made available under the
  terms of the Eclipse Public License v1.0 which accompanies this distribution,
  and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
+
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
-        <artifactId>features-parent</artifactId>
-        <version>1.9.0</version>
+        <artifactId>feature-repo-parent</artifactId>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.yangtools</groupId>
     <artifactId>features-yangtools</artifactId>
     <version>1.2.0-SNAPSHOT</version>
-    <packaging>jar</packaging>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.opendaylight.yangtools</groupId>
-                <artifactId>yangtools-artifacts</artifactId>
-                <version>${project.version}</version>
-                <scope>import</scope>
-                <type>pom</type>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
+    <packaging>feature</packaging>
 
     <dependencies>
         <dependency>
-            <groupId>org.opendaylight.odlparent</groupId>
-            <artifactId>features-odlparent</artifactId>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>odl-yangtools-common</artifactId>
+            <version>${project.version}</version>
             <classifier>features</classifier>
             <type>xml</type>
         </dependency>
-
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-data-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-data-impl</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-data-util</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-data-codec-gson</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-data-codec-xml</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-model-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-model-util</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-parser-impl</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-parser-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>util</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>concepts</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>object-cache-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>object-cache-guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>object-cache-noop</artifactId>
+            <artifactId>odl-yangtools-yang-data</artifactId>
+            <version>${project.version}</version>
+            <classifier>features</classifier>
+            <type>xml</type>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>triemap</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
+            <artifactId>odl-yangtools-yang-parser</artifactId>
+            <version>${project.version}</version>
+            <classifier>features</classifier>
+            <type>xml</type>
         </dependency>
     </dependencies>
 
             <url>${nexus.site.url}/${project.artifactId}/</url>
         </site>
     </distributionManagement>
+
 </project>
diff --git a/features/features-yangtools/src/main/features/features.xml b/features/features-yangtools/src/main/features/features.xml
deleted file mode 100644 (file)
index 80a60a6..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<features name="odl-yangtools-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">
-    <repository>mvn:org.opendaylight.odlparent/features-odlparent/{{VERSION}}/xml/features</repository>
-    <feature name='odl-yangtools-yang-data' version='${project.version}' description='OpenDaylight :: Yangtools :: Data Binding'>
-        <feature version='${project.version}' dependency="true">odl-yangtools-yang-parser</feature>
-        <bundle>mvn:org.opendaylight.yangtools/yang-data-impl/{{VERSION}}</bundle>
-
-        <!-- GSON-based JSON codec. Can be split out -->
-        <bundle dependency="true">mvn:com.google.code.gson/gson/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/yang-data-codec-gson/{{VERSION}}</bundle>
-
-        <bundle>mvn:org.opendaylight.yangtools/yang-data-codec-xml/{{VERSION}}</bundle>
-    </feature>
-
-    <feature name='odl-yangtools-common' version='${project.version}' description='OpenDaylight :: Yangtools :: Common'>
-        <feature version="[1.7.0, 2.0.0)" dependency="true">odl-guava-18</feature>
-        <feature version="[1.7.0, 2.0.0)" dependency="true">odl-triemap-0.2</feature>
-        <bundle>mvn:org.opendaylight.yangtools/concepts/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/yang-common/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/util/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/object-cache-api/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/object-cache-guava/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/object-cache-noop/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/triemap/{{VERSION}}</bundle>
-    </feature>
-
-    <feature name='odl-yangtools-yang-parser' version='${project.version}' description='OpenDaylight :: Yangtools :: YANG Parser'>
-        <feature version='${project.version}' dependency="true">odl-yangtools-common</feature>
-        <bundle dependency="true">mvn:org.antlr/antlr4-runtime/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/yang-model-api/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/yang-model-util/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/yang-data-api/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/yang-data-util/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/yang-parser-api/{{VERSION}}</bundle>
-        <bundle>mvn:org.opendaylight.yangtools/yang-parser-impl/{{VERSION}}</bundle>
-    </feature>
-
-</features>
diff --git a/features/features4-yangtools/pom.xml b/features/features4-yangtools/pom.xml
deleted file mode 100644 (file)
index 9e3d576..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright Â© 2016 Red Hat, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.opendaylight.odlparent</groupId>
-        <artifactId>feature-repo-parent</artifactId>
-        <version>1.9.0</version>
-        <relativePath/>
-    </parent>
-
-    <groupId>org.opendaylight.yangtools</groupId>
-    <artifactId>features4-yangtools</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
-    <packaging>feature</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>odl-yangtools-common</artifactId>
-            <version>${project.version}</version>
-            <classifier>features</classifier>
-            <type>xml</type>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>odl-yangtools-yang-data</artifactId>
-            <version>${project.version}</version>
-            <classifier>features</classifier>
-            <type>xml</type>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>odl-yangtools-yang-parser</artifactId>
-            <version>${project.version}</version>
-            <classifier>features</classifier>
-            <type>xml</type>
-        </dependency>
-    </dependencies>
-
-    <!--
-        Maven Site Configuration
-
-        The following configuration is necessary for maven-site-plugin to
-        correctly identify the correct deployment path for OpenDaylight Maven
-        sites.
-    -->
-    <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
-
-    <distributionManagement>
-        <site>
-            <id>opendaylight-site</id>
-            <url>${nexus.site.url}/${project.artifactId}/</url>
-        </site>
-    </distributionManagement>
-
-</project>
index 849503c703b02297df36f50570bc93646a72cf64..e93fd44bfffdc29de0b0fa97dd932efcd91f8986 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
@@ -30,7 +30,7 @@
             <dependency>
                 <groupId>org.opendaylight.odlparent</groupId>
                 <artifactId>odlparent-artifacts</artifactId>
-                <version>1.9.0</version>
+                <version>2.0.0</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
     <dependencies>
         <dependency>
             <groupId>org.opendaylight.odlparent</groupId>
-            <artifactId>odl4-guava-18</artifactId>
+            <artifactId>odl-guava-22</artifactId>
+            <version>2.0.0</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.odlparent</groupId>
-            <artifactId>odl4-triemap-0.2</artifactId>
+            <artifactId>odl-triemap-0.2</artifactId>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 4f1d0ba2d5754123b4453622de05b8acbc91028a..7477d8df435b3e3dbd1ffcf74944a75d7fcf6c92 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 0b0b4be7ac597346cc360f7e2ec31c1066825d50..dc3b9449f37404cdab3dd8c09a03d05a690744e9 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 8aead7b5010f2cbd639f1fcd5d8005ce22955e44..723b2a766d9c0dcdab2b3f7dcf2535e0c66f3246 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
     <packaging>pom</packaging>
 
     <modules>
-        <!-- Karaf 3 features -->
-        <module>features-yangtools</module>
-
         <!-- Karaf 4 features -->
         <module>odl-yangtools-common</module>
         <module>odl-yangtools-yang-data</module>
         <module>odl-yangtools-yang-parser</module>
-        <module>features4-yangtools</module>
+        <module>features-yangtools</module>
     </modules>
 
     <!--
diff --git a/pom.xml b/pom.xml
index a816dcdf6950f7d15e9f234148350278e987a4b5..1493f2d52188759ea15140252dd8275877430c5a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
     <parent>
       <groupId>org.opendaylight.odlparent</groupId>
       <artifactId>odlparent-lite</artifactId>
-      <version>1.9.0</version>
+      <version>2.0.0</version>
       <relativePath/>
     </parent>
 
index 3b0f9d3cd74e20c47305ac9beab5db6ddbc00ba5..9be006e2b1efcbd97bfc901c95bc813e4b43c38a 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index b0f3610755e4ec09976c33bd7a6c93f848d326b9..25f99a08b40b97ec5e4698e65582afa8186a772c 100644 (file)
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 181e380a88a95c9d33b079be45e901abcd94a9b1..90068199a208cb51e68e86f9aeeac834a9c3e871 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
       <groupId>org.opendaylight.odlparent</groupId>
       <artifactId>odlparent-lite</artifactId>
-      <version>1.9.0</version>
+      <version>2.0.0</version>
       <relativePath/>
     </parent>
 
index e13a2798561913a9cb4ea634ca58a87e0a1287ba..30e43c846ea8a596a0b0d1050a381b562250b609 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index a8e03c2512b353246ab6ce7d168fb76236f62aad..24fc0022f38849f4898bb0e024d53cfe7fdcfb32 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index f6bba4f231e3e23cafa00641a6ff7ee8c890ff2c..cdd90277ba4fc8e12ab3c9f4fe8c7ae39361f660 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 6fe2a68c2f8247a462506b3569eff9bd4195c28c..df1569932c2d8c46c70ba78e108bb8f850520cd7 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index bc8940a55cb1da88b24d6a39c542ae8d424604ec..a5a59acd86d292853e5905a5f3147921b8808300 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.yangtools.yang.common;
 
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 import java.io.Externalizable;
 import java.io.IOException;
 import java.io.ObjectInput;
@@ -96,7 +95,7 @@ public abstract class Revision implements Comparable<Revision>, Serializable {
             try {
                 return Revision.forString(str);
             } catch (ParseException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
     }
index 1c3edf5eaa80b204f8e4c5cc7aac651b8fa67f1c..aded579c5a9147e2c936678fac86fe1436931c7e 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 85b56072837e6d728834b941429e5ffbdae1a248..0ec189ad13fe77065685c473fe645cec85df4a6c 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index c1b9c7181a6e96a1a585bf6b07ccc572a198d317..a3ba148e568d6e6a1a1796b9396a9662defc2767 100644 (file)
@@ -12,7 +12,6 @@ import static org.w3c.dom.Node.ELEMENT_NODE;
 import static org.w3c.dom.Node.TEXT_NODE;
 
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 import com.google.gson.stream.JsonWriter;
 import java.io.IOException;
 import java.net.URI;
@@ -226,10 +225,9 @@ public final class JSONNormalizedNodeStreamWriter implements NormalizedNodeStrea
             throws IOException {
         try {
             ((JSONCodec<Object>) codec).writeValue(writer, value);
-        } catch (IOException e) {
+        } catch (IOException | RuntimeException e) {
             throw e;
         } catch (Exception e) {
-            Throwables.propagateIfPossible(e);
             throw new RuntimeException(e);
         }
     }
index d94dcb54c9c4dc38b8dbfcc92e9101de978413e9..b62af88b6efb542e0b5b100edc0b245137bada2e 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index b387098022590280fe9880459463d31b2be806f9..a136c28a8c92b396b4d4dfa0ae7f762828644a1c 100644 (file)
@@ -10,7 +10,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index befed920eb5bc1788aa5c7c8194f05d4c6b00a92..01d457685df62be2726f514cb30845de3c38ff50 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 0a8015460f2c7d3caa25c5bef4167487ff1a6085..15b93054e7879fbe83a7499e9747695f5451a9e4 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index a864a7e34acd5f7dd5d7fbcf17e7e5422f386e4d..81f922178b60871bc05c26b4adba097fc7161252 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 2b694ecfbe85900b753e18bb4a139e512db1d39b..026ed9fa2a26681e78db8ec9e6fe1456bbbff506 100644 (file)
@@ -44,7 +44,9 @@ public final class SharedCodecCache<T> extends CodecCache<T> {
         try {
             return complexCodecs.get(schema, () -> codec);
         } catch (ExecutionException e) {
-            throw Throwables.propagate(e.getCause());
+            final Throwable cause = e.getCause();
+            Throwables.throwIfUnchecked(cause);
+            throw new RuntimeException(e);
         }
     }
 
@@ -53,7 +55,9 @@ public final class SharedCodecCache<T> extends CodecCache<T> {
         try {
             return simpleCodecs.get(type, () -> codec);
         } catch (ExecutionException e) {
-            throw Throwables.propagate(e.getCause());
+            final Throwable cause = e.getCause();
+            Throwables.throwIfUnchecked(cause);
+            throw new RuntimeException(e);
         }
     }
 }
index af2df451872f5857cc2f2a1dca9e11ebbb2c5751..77359335c3c096ad7fe49f48b9f3ca7031ba6cce 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 1f8741fbfc29954074fac783c8b5de4d55cfe81d..ee245a25da3fb41c2f2a7ff8bbcdef97800e4625 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index c78810702cb998af2390fa258fd91bf8f01b9382..84bf479e6dd21e570f5826c1d5f94b18a21613a0 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 18ea68226f2193757b57ff1cb1f467684cb40ae4..244ca697a8b55f1be40d9d689148ad2b9e3a6699 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 5636022a8f9f4322a6227cb1d169a81a8575bce1..720fab5bfcbfa2626c30ba7e067ebbb77ab8f115 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 5f7a40d95acdae0c1013abd25910bd98be7231da..526fdd1d31fef1f21305ffb238666801ff9ff03a 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index 4c8e6469712b8e08313e6b422afef18520f65a64..39b3e1d6c67ba46fd59d85947d892b0f4cdab1dd 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index b887c2d95a50150bd696aeb34a0eeafc0ec3ed06..1f211bfaca7fb12537e2f17a160d4e292210208a 100644 (file)
@@ -14,9 +14,9 @@ import com.google.common.collect.Lists;
 import com.google.common.collect.Multimap;
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.FutureCallback;
-import com.google.common.util.concurrent.FutureFallback;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.MoreExecutors;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -68,26 +68,21 @@ public abstract class AbstractSchemaRepository implements SchemaRepository, Sche
     @GuardedBy("this")
     private final Collection<SchemaListenerRegistration> listeners = new ArrayList<>();
 
-    private static <T extends SchemaSourceRepresentation> CheckedFuture<T, SchemaSourceException> fetchSource(
+    @SuppressWarnings("unchecked")
+    private static <T extends SchemaSourceRepresentation> ListenableFuture<T> fetchSource(
             final SourceIdentifier id, final Iterator<AbstractSchemaSourceRegistration<?>> it) {
         final AbstractSchemaSourceRegistration<?> reg = it.next();
 
-        @SuppressWarnings("unchecked")
-        final CheckedFuture<? extends T, SchemaSourceException> f =
-            ((SchemaSourceProvider<T>)reg.getProvider()).getSource(id);
-
-        return Futures.makeChecked(Futures.withFallback(f, new FutureFallback<T>() {
-            @Override
-            public ListenableFuture<T> create(@Nonnull final Throwable cause) throws SchemaSourceException {
-                LOG.debug("Failed to acquire source from {}", reg, cause);
+        return Futures.catchingAsync(((SchemaSourceProvider<T>)reg.getProvider()).getSource(id), Throwable.class,
+            input -> {
+                LOG.debug("Failed to acquire source from {}", reg, input);
 
                 if (it.hasNext()) {
                     return fetchSource(id, it);
                 }
 
-                throw new MissingSchemaSourceException("All available providers exhausted", id, cause);
-            }
-        }), FETCH_MAPPER);
+                throw new MissingSchemaSourceException("All available providers exhausted", id, input);
+            }, MoreExecutors.directExecutor());
     }
 
     @Override
@@ -115,7 +110,7 @@ public abstract class AbstractSchemaRepository implements SchemaRepository, Sche
                         "No providers for source " + id + " representation " + representation + " available", id));
         }
 
-        CheckedFuture<T, SchemaSourceException> fetchSourceFuture = fetchSource(id, regs);
+        final ListenableFuture<T> fetchSourceFuture = fetchSource(id, regs);
         // Add callback to notify cache listeners about encountered schema
         Futures.addCallback(fetchSourceFuture, new FutureCallback<T>() {
             @Override
@@ -130,9 +125,9 @@ public abstract class AbstractSchemaRepository implements SchemaRepository, Sche
             public void onFailure(@Nonnull final Throwable t) {
                 LOG.trace("Skipping notification for encountered source {}, fetching source failed", id, t);
             }
-        });
+        }, MoreExecutors.directExecutor());
 
-        return fetchSourceFuture;
+        return Futures.makeChecked(fetchSourceFuture, FETCH_MAPPER);
     }
 
     private synchronized <T extends SchemaSourceRepresentation> void addSource(final PotentialSchemaSource<T> source,
index a36fa6b4df624af6ca847aa85e27512229dde89c..4aef04b2dfa3744b283a577a2ccd50da85852fb0 100644 (file)
@@ -11,6 +11,7 @@ import com.google.common.base.Preconditions;
 import com.google.common.util.concurrent.AsyncFunction;
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.MoreExecutors;
 import java.util.HashMap;
 import java.util.Map;
 import javax.annotation.Nonnull;
@@ -57,7 +58,7 @@ public class SchemaSourceTransformer<S extends SchemaSourceRepresentation, D ext
     @Override
     public CheckedFuture<D, SchemaSourceException> getSource(final SourceIdentifier sourceIdentifier) {
         final CheckedFuture<S, SchemaSourceException> f = provider.getSchemaSource(sourceIdentifier, srcClass);
-        return Futures.makeChecked(Futures.transform(f, function), MAPPER);
+        return Futures.makeChecked(Futures.transformAsync(f, function, MoreExecutors.directExecutor()), MAPPER);
     }
 
     @Override
index b22104128c3066b12627a882533a9ac03a5834a5..cf5358f250c2329f52794a0f7549d83791e0d532 100644 (file)
@@ -24,6 +24,7 @@ import com.google.common.base.Optional;
 import com.google.common.collect.Collections2;
 import com.google.common.io.Files;
 import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.ListenableFuture;
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.IOException;
@@ -82,9 +83,9 @@ public class FilesystemSchemaSourceCacheTest {
 
         assertThat(fileNames, both(hasItem("test2")).and(hasItem("test@2012-12-12")));
 
-        assertThat(Files.toString(storedFiles.get(0), StandardCharsets.UTF_8),
+        assertThat(Files.asCharSource(storedFiles.get(0), StandardCharsets.UTF_8).read(),
             either(containsString(content)).or(containsString(content2)));
-        assertThat(Files.toString(storedFiles.get(1), StandardCharsets.UTF_8),
+        assertThat(Files.asCharSource(storedFiles.get(1), StandardCharsets.UTF_8).read(),
             either(containsString(content)).or(containsString(content2)));
 
         verify(this.registry, times(2)).registerSchemaSource(any(SchemaSourceProvider.class),
@@ -214,8 +215,7 @@ public class FilesystemSchemaSourceCacheTest {
         final YangTextSchemaSource source = new TestingYangSource("test", "2013-12-12", content);
         cache.offer(source);
         final SourceIdentifier sourceIdentifier = RevisionSourceIdentifier.create("test1", "2012-12-12");
-        final CheckedFuture<? extends YangTextSchemaSource, SchemaSourceException> checked = cache
-                .getSource(sourceIdentifier);
+        final ListenableFuture<? extends YangTextSchemaSource> checked = cache.getSource(sourceIdentifier);
         Assert.assertNotNull(checked);
         checked.get();
     }
index 17cd535e2753d8cf6159bce0800e35351c3e0121..7d5f415f06b0d4c5f47f25602afd2dda2dce1d65 100644 (file)
@@ -12,7 +12,7 @@ import static org.mockito.Mockito.doReturn;
 
 import com.google.common.base.MoreObjects;
 import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.ListenableFuture;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -26,7 +26,6 @@ import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.yangtools.yang.model.repo.api.RevisionSourceIdentifier;
-import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException;
 import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation;
 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
 import org.opendaylight.yangtools.yang.model.repo.api.YangSchemaSourceRepresentation;
@@ -78,8 +77,8 @@ public class InMemorySchemaSourceCacheTest {
         final YangTextSchemaSource source = new TestingYangSource("test", "2012-12-12", content);
         inMemorySchemaSourceCache.offer(source);
         final SourceIdentifier sourceIdentifier = RevisionSourceIdentifier.create("test", "2012-12-12");
-        final CheckedFuture<? extends YangSchemaSourceRepresentation, SchemaSourceException> checkedSource =
-            inMemorySchemaSourceCache.getSource(sourceIdentifier);
+        final ListenableFuture<? extends YangSchemaSourceRepresentation> checkedSource = inMemorySchemaSourceCache
+                .getSource(sourceIdentifier);
         Assert.assertNotNull(checkedSource);
         final YangSchemaSourceRepresentation yangSchemaSourceRepresentation = checkedSource.get();
         Assert.assertNotNull(yangSchemaSourceRepresentation);
@@ -92,7 +91,7 @@ public class InMemorySchemaSourceCacheTest {
         final InMemorySchemaSourceCache<YangSchemaSourceRepresentation> inMemorySchemaSourceCache =
             InMemorySchemaSourceCache.createSoftCache(this.registry, REPRESENTATION);
         final SourceIdentifier sourceIdentifier = RevisionSourceIdentifier.create("test", "2012-12-12");
-        final CheckedFuture<? extends YangSchemaSourceRepresentation, SchemaSourceException> checkedSource =
+        final ListenableFuture<? extends YangSchemaSourceRepresentation> checkedSource =
             inMemorySchemaSourceCache.getSource(sourceIdentifier);
         Assert.assertNotNull(checkedSource);
         checkedSource.get();
@@ -112,9 +111,9 @@ public class InMemorySchemaSourceCacheTest {
         inMemorySchemaSourceCache2.offer(source);
 
         final SourceIdentifier sourceIdentifier = RevisionSourceIdentifier.create("test", "2012-12-12");
-        final CheckedFuture<? extends YangSchemaSourceRepresentation, SchemaSourceException> checkedSource =
+        final ListenableFuture<? extends YangSchemaSourceRepresentation> checkedSource =
             inMemorySchemaSourceCache.getSource(sourceIdentifier);
-        final CheckedFuture<? extends SchemaSourceRepresentation, SchemaSourceException> checkedSource2 =
+        final ListenableFuture<? extends SchemaSourceRepresentation> checkedSource2 =
             inMemorySchemaSourceCache2.getSource(sourceIdentifier);
         Assert.assertNotNull(checkedSource);
         Assert.assertNotNull(checkedSource2);
index a9d6bc90532010cd95c1a5ebe10fc0fb1f1f3e5c..a0ac6000d1c7afcc4f83990d64b781a5a4ee2ba9 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.yangtools.yang.model.repo.util;
 
 import com.google.common.util.concurrent.AsyncFunction;
 import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.ListenableFuture;
 import java.util.Arrays;
 import java.util.concurrent.Future;
 import javax.annotation.Nonnull;
@@ -96,12 +97,11 @@ public class SchemaSourceTransformerTest {
         final PotentialSchemaSource<?>[] potList = { foo.getPotentialSchemSource() };
         final Iterable<PotentialSchemaSource<?>> sources = Arrays.asList(potList);
         listener.schemaSourceRegistered(sources);
-        final CheckedFuture<YinXmlSchemaSource, SchemaSourceException> source = this.schema.getSource(sourceIdentifier);
+        final ListenableFuture<YinXmlSchemaSource> source = this.schema.getSource(sourceIdentifier);
         Assert.assertNotNull(source);
 
         listener.schemaSourceUnregistered(foo.getPotentialSchemSource());
-        final CheckedFuture<YinXmlSchemaSource, SchemaSourceException> source2 = this.schema
-                .getSource(sourceIdentifier);
+        final ListenableFuture<YinXmlSchemaSource> source2 = this.schema.getSource(sourceIdentifier);
         Assert.assertNotNull(source2);
     }
 
index ea9d093b8324999f6c46da7c37d0801c43ab3957..dabd1e2b7b6f579d546688406f3b39f29436d0db 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index ee41b11f2c4f1e1571fc0b458fd800998ac149e9..13b097b144047b6d2f130bde5238db51dc2ccc03 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>
 
index c9c3db8f730298c0b2cfd8864e2a8c5fbb1e6334..0288d7afec7ca1dbaae98c0c30087e6391f1396b 100644 (file)
@@ -20,6 +20,7 @@ import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.MoreExecutors;
 import java.util.Collection;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
@@ -102,10 +103,12 @@ final class SharedSchemaContextFactory implements SchemaContextFactory {
         // Detect mismatch between requested Source IDs and IDs that are extracted from parsed source
         // Also remove duplicates if present
         // We are relying on preserved order of uniqueSourceIdentifiers as well as sf
-        sf = Futures.transform(sf, new SourceIdMismatchDetector(uniqueSourceIdentifiers));
+        sf = Futures.transform(sf, new SourceIdMismatchDetector(uniqueSourceIdentifiers),
+            MoreExecutors.directExecutor());
 
         // Assemble sources into a schema context
-        final ListenableFuture<SchemaContext> cf = Futures.transform(sf, assembleSources);
+        final ListenableFuture<SchemaContext> cf = Futures.transformAsync(sf, assembleSources,
+            MoreExecutors.directExecutor());
 
         // Populate cache when successful
         Futures.addCallback(cf, new FutureCallback<SchemaContext>() {
@@ -118,7 +121,7 @@ final class SharedSchemaContextFactory implements SchemaContextFactory {
             public void onFailure(@Nonnull final Throwable t) {
                 LOG.debug("Failed to assemble sources", t);
             }
-        });
+        }, MoreExecutors.directExecutor());
 
         return Futures.makeChecked(cf, MAPPER);
     }
index 2e3f1ac5e55adbfdc946575ad248d3a8b73449ba..87dfcecb8188f22c06b69e086469c53af5a173ea 100644 (file)
@@ -162,13 +162,6 @@ public final class CrossSourceStatementReactor {
         return buildAction;
     }
 
-    private static <T> T warnOnNull(final T obj) {
-        if (obj == null) {
-            LOG.info("Set of supported features has not been provided, so all features are supported by default.");
-        }
-        return obj;
-    }
-
     public static class Builder implements org.opendaylight.yangtools.concepts.Builder<CrossSourceStatementReactor> {
         private final Map<ValidationBundleType, Collection<?>> validationBundles =
                 new EnumMap<>(ValidationBundleType.class);
index f45e6650e3f355526affda3868e0e8d8eb8f363d..67abd0ee6a667f90b9115c811d37b3c3fbb9f61b 100644 (file)
@@ -31,6 +31,8 @@ import com.google.common.io.Files;
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.MoreExecutors;
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.IOException;
@@ -238,17 +240,16 @@ public class SharedSchemaRepositoryTest {
         sharedSchemaRepository.registerSchemaSourceListener(listener);
 
         final File test = new File(storageDir, "test.yang");
-        Files.write("content-test", test, StandardCharsets.UTF_8);
+        Files.asCharSink(test, StandardCharsets.UTF_8).write("content-test");
 
         final File test2 = new File(storageDir, "test@2012-12-12.yang");
-        Files.write("content-test-2012", test2, StandardCharsets.UTF_8);
+        Files.asCharSink(test2, StandardCharsets.UTF_8).write("content-test-2012");
 
         final File test3 = new File(storageDir, "test@2013-12-12.yang");
-        Files.write("content-test-2013", test3, StandardCharsets.UTF_8);
+        Files.asCharSink(test3, StandardCharsets.UTF_8).write("content-test-2013");
 
         final File test4 = new File(storageDir, "module@2010-12-12.yang");
-        Files.write("content-module-2010", test4, StandardCharsets.UTF_8);
-
+        Files.asCharSink(test4, StandardCharsets.UTF_8).write("content-module-2010");
 
         final FilesystemSchemaSourceCache<YangTextSchemaSource> cache = new FilesystemSchemaSourceCache<>(
                 sharedSchemaRepository, YangTextSchemaSource.class, storageDir);
@@ -297,7 +298,7 @@ public class SharedSchemaRepositoryTest {
         sharedSchemaRepository.registerSchemaSourceListener(transformer);
 
         // Request schema to make repository notify the cache
-        final CheckedFuture<SchemaContext, SchemaResolutionException> schemaFuture = sharedSchemaRepository
+        final ListenableFuture<SchemaContext> schemaFuture = sharedSchemaRepository
                 .createSchemaContextFactory(ALWAYS_ACCEPT).createSchemaContext(ImmutableList.of(runningId));
         Futures.addCallback(schemaFuture, new FutureCallback<SchemaContext>() {
             @Override
@@ -313,7 +314,7 @@ public class SharedSchemaRepositoryTest {
                 assertEquals(1, cachedSchemas.size());
                 assertEquals(Files.getNameWithoutExtension(cachedSchemas.get(0).getName()), "running@2012-12-12");
             }
-        });
+        }, MoreExecutors.directExecutor());
 
         try {
             schemaFuture.get();
index b31ebaba6c5550cc896c5cec728ea7803ca60b01..5476e88200a7ada55b1aae8be5c31d1ee7eed534 100644 (file)
@@ -17,7 +17,6 @@ import static org.junit.Assert.fail;
 import static org.opendaylight.yangtools.yang.stmt.StmtTestUtils.sourceForResource;
 
 import java.io.ByteArrayOutputStream;
-import java.io.File;
 import java.io.PrintStream;
 import java.util.Date;
 import org.junit.Test;
index b64e18d34186b390ee60733aa7c74a2787f37d82..587ef9237b5fda23f2138dda97140b50e9a55f65 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath />
     </parent>
 
index 8829fbbe16be538b01fe33f52216aee23be713c7..f2e99a690b2dcd25e81a06e68f464e719bd98ddf 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.9.0</version>
+        <version>2.0.0</version>
         <relativePath/>
     </parent>