Merge "BUG-980: stop emiting copyright"
authorTony Tkacik <ttkacik@cisco.com>
Mon, 12 May 2014 07:04:12 +0000 (07:04 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 12 May 2014 07:04:12 +0000 (07:04 +0000)
opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/util/StringUtil.java
opendaylight/config/yang-jmx-generator-plugin/src/main/resources/copyright.txt [deleted file]
opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/util/StringUtilTest.java

index 265aea10c59f8f858fb036b5fb97216ccc404a35..bcc55a203eb05a17aa6cb7b386e649f9f69d7043 100644 (file)
@@ -4,14 +4,11 @@ import com.google.common.base.Joiner;
 import com.google.common.base.Optional;
 import com.google.common.base.Splitter;
 import com.google.common.base.Strings;
-import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.opendaylight.controller.config.yangjmxgenerator.plugin.java.FullyQualifiedName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
-import java.io.InputStream;
 import java.util.List;
 import java.util.regex.Pattern;
 
@@ -61,13 +58,18 @@ public class StringUtil {
 
 
     public static Optional<String> loadCopyright() {
-        try (InputStream in = StringUtil.class.getResourceAsStream("/copyright.txt")) {
-            if (in != null) {
-                return Optional.of(IOUtils.toString(in));
+        /*
+         * FIXME: BUG-980: this is a nice feature, but the copyright needs to come
+         *        from the project being processed, not this one.
+            try (InputStream in = StringUtil.class.getResourceAsStream("/copyright.txt")) {
+                if (in != null) {
+                    return Optional.of(IOUtils.toString(in));
+                }
+            } catch (IOException e) {
+                logger.warn("Cannot load copyright.txt", e);
             }
-        } catch (IOException e) {
-            logger.warn("Cannot load copyright.txt", e);
-        }
+
+        */
         return Optional.absent();
     }
 
diff --git a/opendaylight/config/yang-jmx-generator-plugin/src/main/resources/copyright.txt b/opendaylight/config/yang-jmx-generator-plugin/src/main/resources/copyright.txt
deleted file mode 100644 (file)
index 4a0c355..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Copyright (c) 2013 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
index b0217a4ba93e7cf012dd9b50030c0ad5af2cc802..1ad0207c2bc05d9b495ab78592def151fa0f7c40 100644 (file)
@@ -1,5 +1,6 @@
 package org.opendaylight.controller.config.yangjmxgenerator.plugin.util;
 
+import org.junit.Ignore;
 import org.junit.Test;
 import org.opendaylight.controller.config.yangjmxgenerator.plugin.java.FullyQualifiedName;
 
@@ -24,6 +25,7 @@ public class StringUtilTest {
     }
 
     @Test
+    @Ignore
     public void testCopyright() throws IOException {
         assertTrue(StringUtil.loadCopyright().isPresent());
     }