Suppress warnings related to Java version
authorMathieu Baudier <mbaudier@argeo.org>
Sat, 14 Feb 2015 17:15:12 +0000 (17:15 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Sat, 14 Feb 2015 17:15:12 +0000 (17:15 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@7877 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

org.argeo.osgi.boot/build.properties
org.argeo.osgi.boot/ext/test/org/argeo/osgi/boot/OsgiBootNoRuntimeTest.java
org.argeo.osgi.boot/ext/test/org/argeo/osgi/boot/OsgiBootRuntimeTest.java
org.argeo.osgi.boot/src/org/argeo/osgi/boot/DistributionBundle.java
org.argeo.osgi.boot/src/org/argeo/osgi/boot/Launcher.java
org.argeo.osgi.boot/src/org/argeo/osgi/boot/OsgiBoot.java
org.argeo.osgi.boot/src/org/argeo/osgi/boot/OsgiBootUtils.java
org.argeo.osgi.boot/src/org/argeo/osgi/boot/internal/springutil/CollectionUtils.java
org.argeo.osgi.boot/src/org/argeo/osgi/boot/internal/springutil/ObjectUtils.java
org.argeo.osgi.boot/src/org/argeo/osgi/boot/internal/springutil/StringUtils.java
org.argeo.osgi.boot/src/org/argeo/osgi/boot/internal/springutil/SystemPropertyUtils.java

index 31b02d2fa9c6b0294ec18da699f5f729ca012eb4..406d7996c66478c08ed03f31a3eb8b58f6bc77ef 100644 (file)
@@ -1 +1,3 @@
+source.. = src/,\
+           ext/test/
 additional.bundles = org.junit
index 638b13a6d94b882689f0bee895034e4ee7def215..2a4d2195a2c022b18c1d1a6dd5d04ccb8a5d36a6 100644 (file)
@@ -23,6 +23,7 @@ import junit.framework.TestCase;
 import org.argeo.osgi.boot.OsgiBoot;
 
 /** Tests which do not require a runtime. */
+@SuppressWarnings("rawtypes")
 public class OsgiBootNoRuntimeTest extends TestCase {
        public final static String BUNDLES = "src/test/bundles/some;in=*;ex=excluded,"
                        + "src/test/bundles/others;in=**/org.argeo.*";
index 32b72bcebfe6b7c4e6cf14da732e767d59b91de6..7596c56a3f87f006ab828258cbfd48d232cf9d6c 100644 (file)
@@ -26,6 +26,7 @@ import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 
 /** Starts an Equinox runtime and provision it with OSGi boot. */
+@SuppressWarnings({ "unchecked", "rawtypes", "deprecation", "restriction" })
 public class OsgiBootRuntimeTest extends TestCase {
        protected OsgiBoot osgiBoot = null;
        private boolean osgiRuntimeAlreadyRunning = false;
index e6c04281fe39da724c22d5a6cdd26006d0547e4f..340472558f15d9125f9537be4dc9e98526287672 100644 (file)
@@ -36,6 +36,7 @@ import org.osgi.framework.Constants;
  * expected that it is. The root of the repository is computed based on the file
  * name of the URL and of the content of the index.
  */
+@SuppressWarnings({ "rawtypes", "unchecked" })
 public class DistributionBundle {
        private final static String INDEX_FILE_NAME = "modularDistribution.csv";
 
index 6af1a71843343164a53bdca33e3d242e74b21802..ccba757d0ee4bf0cd3f951929ead0b93305d88e1 100644 (file)
@@ -25,6 +25,7 @@ import org.eclipse.core.runtime.adaptor.EclipseStarter;
 import org.osgi.framework.BundleContext;
 
 /** Command line interface. */
+@SuppressWarnings({ "rawtypes", "unchecked", "restriction" })
 public class Launcher {
 
        public static void main(String[] args) {
index 300ebb82dd48ba2802b3328cd832fd3a3dc1dbbe..a072e69ce6dbfab0e4cb0516e5b677b0ac34a0bd 100644 (file)
@@ -49,6 +49,7 @@ import org.osgi.service.packageadmin.PackageAdmin;
  * The approach is to generate list of URLs based on various methods, configured
  * via system properties.
  */
+@SuppressWarnings({ "rawtypes", "unchecked", "deprecation" })
 public class OsgiBoot {
        public final static String SYMBOLIC_NAME_OSGI_BOOT = "org.argeo.osgi.boot";
        public final static String SYMBOLIC_NAME_EQUINOX = "org.eclipse.osgi";
index 20891c7f9ef3ada558496662063117755102d743..8c63344e5d330fa2a55de7259057116e9b89e4c8 100644 (file)
@@ -25,6 +25,7 @@ import java.util.StringTokenizer;
 import org.osgi.framework.Bundle;\r
 \r
 /** Utilities, mostly related to logging. */\r
+@SuppressWarnings({ "rawtypes", "unchecked" })\r
 public class OsgiBootUtils {\r
        /** ISO8601 (as per log4j) and difference to UTC */\r
        private static DateFormat dateFormat = new SimpleDateFormat(\r
@@ -100,7 +101,7 @@ public class OsgiBootUtils {
                StringTokenizer tSt = new StringTokenizer(currentVersion, ".");\r
                while (tSt.hasMoreTokens())\r
                        tToks.add(tSt.nextToken());\r
-       \r
+\r
                int comp = 0;\r
                comp: for (int i = 0; i < cToks.size(); i++) {\r
                        if (tToks.size() <= i) {\r
@@ -108,10 +109,10 @@ public class OsgiBootUtils {
                                comp = 1;\r
                                break comp;\r
                        }\r
-       \r
+\r
                        String c = (String) cToks.get(i);\r
                        String t = (String) tToks.get(i);\r
-       \r
+\r
                        try {\r
                                int cInt = Integer.parseInt(c);\r
                                int tInt = Integer.parseInt(t);\r
@@ -130,12 +131,12 @@ public class OsgiBootUtils {
                                }\r
                        }\r
                }\r
-       \r
+\r
                if (comp == 0 && tToks.size() > cToks.size()) {\r
                        // equals until then, current shorter\r
                        comp = -1;\r
                }\r
-       \r
+\r
                return comp;\r
        }\r
 \r
index ad0154293d828da75482b6223afbdde88d56d67e..18cbe16ef3f4682a4cebdf979097cd0bb01c8423 100644 (file)
@@ -32,6 +32,7 @@ import java.util.Properties;
  * @author Rob Harrop\r
  * @since 1.1.3\r
  */\r
+@SuppressWarnings({ "rawtypes", "unchecked" })\r
 public abstract class CollectionUtils {\r
 \r
        /**\r
index 223b2a1c148236a3bf551101e6de010e488b9a3f..691aaf58c0c2c4b739c4c3cefda0f3eeb8220c69 100644 (file)
@@ -32,6 +32,7 @@ import java.util.Arrays;
  * @since 19.03.2004\r
  * @see org.apache.commons.lang.ObjectUtils\r
  */\r
+@SuppressWarnings({ "rawtypes", "unchecked" })\r
 public abstract class ObjectUtils {\r
 \r
        private static final int INITIAL_HASH = 7;\r
index 262659044bcaf26c73b3cec9f5c94ca8ddbe5e09..83d91755b0dc1b395dd7a5a4a17e65e4b7da37bb 100644 (file)
@@ -51,6 +51,7 @@ import java.util.TreeSet;
  * @since 16 April 2001\r
  * @see org.apache.commons.lang.StringUtils\r
  */\r
+@SuppressWarnings({ "rawtypes", "unchecked" })\r
 public abstract class StringUtils {\r
 \r
        private static final String FOLDER_SEPARATOR = "/";\r
index f81adc25b67135f5c593e01edb29ab3406dff11a..ff81a2219c8f13c0d43c311fdf507cf90eecab75 100644 (file)
@@ -45,6 +45,7 @@ public abstract class SystemPropertyUtils {
         * @see #PLACEHOLDER_PREFIX\r
         * @see #PLACEHOLDER_SUFFIX\r
         */\r
+       @SuppressWarnings("unused")\r
        public static String resolvePlaceholders(String text) {\r
                StringBuffer buf = new StringBuffer(text);\r
 \r