sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1677907 - in /sis/branches/Android: ./ application/sis-console/src/main/java/org/apache/sis/console/ application/sis-console/src/test/java/org/apache/sis/console/ core/sis-utility/ core/sis-utility/src/main/java/org/apache/sis/internal/jdk...
Date Tue, 05 May 2015 22:48:28 GMT
Author: desruisseaux
Date: Tue May  5 22:48:28 2015
New Revision: 1677907

URL: http://svn.apache.org/r1677907
Log:
Remove some references to JavaEE technologies on the Android branch.

Removed:
    sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java
    sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/ServletListener.java
    sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java
    sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/SupervisorMBean.java
Modified:
    sis/branches/Android/application/sis-console/src/main/java/org/apache/sis/console/AboutSC.java
    sis/branches/Android/application/sis-console/src/test/java/org/apache/sis/console/AboutSCTest.java
    sis/branches/Android/core/sis-utility/pom.xml
    sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/jdk7/JDK7.java
    sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java
    sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java
    sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java
    sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
    sis/branches/Android/ide-project/NetBeans/nbproject/project.properties
    sis/branches/Android/ide-project/eclipse/classpath
    sis/branches/Android/pom.xml

Modified: sis/branches/Android/application/sis-console/src/main/java/org/apache/sis/console/AboutSC.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/application/sis-console/src/main/java/org/apache/sis/console/AboutSC.java?rev=1677907&r1=1677906&r2=1677907&view=diff
==============================================================================
--- sis/branches/Android/application/sis-console/src/main/java/org/apache/sis/console/AboutSC.java
[UTF-8] (original)
+++ sis/branches/Android/application/sis-console/src/main/java/org/apache/sis/console/AboutSC.java
[UTF-8] Tue May  5 22:48:28 2015
@@ -17,20 +17,9 @@
 package org.apache.sis.console;
 
 import java.util.EnumSet;
-import java.io.IOException;
-import java.rmi.registry.Registry;
-import javax.management.JMX;
-import javax.management.ObjectName;
-import javax.management.MBeanServerConnection;
-import javax.management.remote.JMXServiceURL;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
 import org.apache.sis.setup.About;
 import org.apache.sis.util.Version;
-import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.resources.Vocabulary;
-import org.apache.sis.internal.system.Supervisor;
-import org.apache.sis.internal.system.SupervisorMBean;
 
 
 /**
@@ -82,54 +71,17 @@ final class AboutSC extends SubCommand {
             configuration = Vocabulary.getResources(locale).getString(
                     Vocabulary.Keys.Version_2, "Apache SIS", Version.SIS);
         } else {
-            if (files.isEmpty()) {
-                /*
-                 * Provide information about the local SIS installation.
-                 */
-                final EnumSet<About> sections = EnumSet.allOf(About.class);
-                if (!options.containsKey(Option.VERBOSE)) {
-                    sections.remove(About.LIBRARIES);
-                }
-                configuration = About.configuration(sections, locale, timezone).toString();
-            } else {
-                /*
-                 * Provide information about a remote SIS installation. Those information
are accessible
-                 * only if explicitely enabled at JVM startup time.
-                 *
-                 * Tutorial: http://docs.oracle.com/javase/tutorial/jmx/remote/custom.html
-                 */
-                final String path = toRemoveURL(files.get(0));
-                try {
-                    final JMXServiceURL url = new JMXServiceURL(path);
-                    final JMXConnector jmxc = JMXConnectorFactory.connect(url);
-                    try {
-                        final MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
-                        final SupervisorMBean bean = JMX.newMBeanProxy(mbsc, new ObjectName(Supervisor.NAME),
SupervisorMBean.class);
-                        configuration = bean.configuration().toString();
-                    } finally {
-                        jmxc.close();
-                    }
-                } catch (IOException e) {
-                    error(Errors.format(Errors.Keys.CanNotConnectTo_1, path), e);
-                    return Command.IO_EXCEPTION_EXIT_CODE;
-                }
+            /*
+             * Provide information about the local SIS installation.
+             */
+            final EnumSet<About> sections = EnumSet.allOf(About.class);
+            if (!options.containsKey(Option.VERBOSE)) {
+                sections.remove(About.LIBRARIES);
             }
+            configuration = About.configuration(sections, locale, timezone).toString();
         }
         out.println(configuration);
         out.flush();
         return 0;
     }
-
-    /**
-     * Creates a {@code "service:jmx:rmi:///jndi/rmi://host:port/jmxrmi"} URL for the given
host name.
-     * The host name can optionally be followed by a port number.
-     */
-    static String toRemoveURL(final String host) {
-        final StringBuilder buffer = new StringBuilder(60).append("service:jmx:rmi:///jndi/rmi://")
-                .append(host, host.regionMatches(true, 0, "localhost", 0, 9) ? 9 : 0, host.length());
-        if (host.lastIndexOf(':') < 0) {
-            buffer.append(':').append(Registry.REGISTRY_PORT);
-        }
-        return buffer.append("/jmxrmi").toString();
-    }
 }

Modified: sis/branches/Android/application/sis-console/src/test/java/org/apache/sis/console/AboutSCTest.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/application/sis-console/src/test/java/org/apache/sis/console/AboutSCTest.java?rev=1677907&r1=1677906&r2=1677907&view=diff
==============================================================================
--- sis/branches/Android/application/sis-console/src/test/java/org/apache/sis/console/AboutSCTest.java
[UTF-8] (original)
+++ sis/branches/Android/application/sis-console/src/test/java/org/apache/sis/console/AboutSCTest.java
[UTF-8] Tue May  5 22:48:28 2015
@@ -93,17 +93,4 @@ public final strictfp class AboutSCTest
         // Check for a dependency which should be present.
         assertTrue("geoapi", result.contains("geoapi"));
     }
-
-    /**
-     * Tests the {@link AboutSC#toRemoveURL(String)} method.
-     */
-    @Test
-    public void testToRemoveURL() {
-        assertEquals("service:jmx:rmi:///jndi/rmi://myhost:9999/jmxrmi",    AboutSC.toRemoveURL("myhost:9999"));
-        assertEquals("service:jmx:rmi:///jndi/rmi://myhost:1099/jmxrmi",    AboutSC.toRemoveURL("myhost"));
-        assertEquals("service:jmx:rmi:///jndi/rmi://:9999/jmxrmi",          AboutSC.toRemoveURL("localhost:9999"));
-        assertEquals("service:jmx:rmi:///jndi/rmi://:1099/jmxrmi",          AboutSC.toRemoveURL("localhost"));
-        assertEquals("service:jmx:rmi:///jndi/rmi://:9999/jmxrmi",          AboutSC.toRemoveURL(":9999"));
-        assertEquals("service:jmx:rmi:///jndi/rmi://localhosx:1099/jmxrmi", AboutSC.toRemoveURL("localhosx"));
-    }
 }

Modified: sis/branches/Android/core/sis-utility/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/Android/core/sis-utility/pom.xml?rev=1677907&r1=1677906&r2=1677907&view=diff
==============================================================================
--- sis/branches/Android/core/sis-utility/pom.xml (original)
+++ sis/branches/Android/core/sis-utility/pom.xml Tue May  5 22:48:28 2015
@@ -149,20 +149,4 @@ Miscellaneous utilities.
     </plugins>
   </build>
 
-
-  <!-- ===========================================================
-           Dependencies
-       =========================================================== -->
-  <dependencies>
-    <!-- Optional dependencies (provided scope) -->
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax</groupId>
-      <artifactId>javaee-api</artifactId>
-    </dependency>
-  </dependencies>
-
 </project>

Modified: sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/jdk7/JDK7.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/jdk7/JDK7.java?rev=1677907&r1=1677906&r2=1677907&view=diff
==============================================================================
--- sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/jdk7/JDK7.java
(original)
+++ sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/jdk7/JDK7.java
Tue May  5 22:48:28 2015
@@ -20,7 +20,6 @@ import java.io.Closeable;
 import java.sql.Connection;
 import java.sql.Statement;
 import java.sql.ResultSet;
-import javax.imageio.stream.ImageInputStream;
 
 
 /**
@@ -99,7 +98,7 @@ public final class JDK7 {
      * @return {@code true} if the given object is closeable.
      */
     public static boolean isAutoCloseable(final Object object) {
-        return (object instanceof AutoCloseable) || (object instanceof Closeable) || (object
instanceof ImageInputStream) ||
+        return (object instanceof AutoCloseable) || (object instanceof Closeable) ||
                 (object instanceof Connection) || (object instanceof Statement) || (object
instanceof ResultSet);
     }
 
@@ -113,7 +112,6 @@ public final class JDK7 {
      */
     public static void close(final Object object) throws Exception {
              if (object instanceof Closeable)        ((Closeable)        object).close();
-        else if (object instanceof ImageInputStream) ((ImageInputStream) object).close();
         else if (object instanceof Connection)       ((Connection)       object).close();
         else if (object instanceof Statement)        ((Statement)        object).close();
         else if (object instanceof ResultSet)        ((ResultSet)        object).close();

Modified: sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java?rev=1677907&r1=1677906&r2=1677907&view=diff
==============================================================================
--- sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java
[UTF-8] (original)
+++ sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java
[UTF-8] Tue May  5 22:48:28 2015
@@ -134,9 +134,6 @@ public final class DelayedExecutor exten
             // (Reference: Goetz et al.: "Java Concurrency in Practice").
             thread.start();
         }
-        if (Supervisor.ENABLED) {
-            Supervisor.register();
-        }
     }
 
     /**

Modified: sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java?rev=1677907&r1=1677906&r2=1677907&view=diff
==============================================================================
--- sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java
[UTF-8] (original)
+++ sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java
[UTF-8] Tue May  5 22:48:28 2015
@@ -69,9 +69,6 @@ public final class ReferenceQueueConsume
             // (Reference: Goetz et al.: "Java Concurrency in Practice").
             thread.start();
         }
-        if (Supervisor.ENABLED) {
-            Supervisor.register();
-        }
     }
 
     /**

Modified: sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java?rev=1677907&r1=1677906&r2=1677907&view=diff
==============================================================================
--- sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java
[UTF-8] (original)
+++ sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java
[UTF-8] Tue May  5 22:48:28 2015
@@ -16,7 +16,6 @@
  */
 package org.apache.sis.internal.system;
 
-import javax.management.JMException;
 import org.apache.sis.util.logging.Logging;
 
 
@@ -43,20 +42,8 @@ public final class Shutdown {
      * @param  caller The class invoking this method, to be used only for logging purpose,
      *         or {@code null} if the logging system is not available anymore (i.e. the JVM
      *         itself is shutting down).
-     * @throws JMException If an error occurred during unregistration of the supervisor MBean.
      */
-    public static void stop(final Class<?> caller) throws JMException {
-        /*
-         * Unregister the MBean before to stop the threads, in order to avoid false alerts
-         * in the superviror 'warnings()' method. Failure to unregister the MBean is worth
-         * to report, but we will do that only after we completed the other shutdown steps.
-         */
-        JMException exception = null;
-        if (Supervisor.ENABLED) try {
-            Supervisor.unregister();
-        } catch (JMException deferred) {
-            exception = deferred;
-        }
+    public static void stop(final Class<?> caller) {
         /*
          * Following is usually fast, but may potentially take a little while.
          * If an other thread invoked Thread.interrupt() while we were waiting
@@ -70,8 +57,5 @@ public final class Shutdown {
                 Logging.unexpectedException(caller, "stop", e);
             }
         }
-        if (exception != null) {
-            throw exception;
-        }
     }
 }

Modified: sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1677907&r1=1677906&r2=1677907&view=diff
==============================================================================
--- sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] (original)
+++ sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] Tue May  5 22:48:28 2015
@@ -20,7 +20,6 @@ import java.net.URL;
 import java.util.Map;
 import java.util.Locale;
 import java.util.MissingResourceException;
-import javax.annotation.Generated;
 import org.opengis.util.InternationalString;
 
 
@@ -51,7 +50,6 @@ public final class Errors extends Indexe
      * @since   0.3
      * @module
      */
-    @Generated("org.apache.sis.util.resources.IndexedResourceCompiler")
     public static final class Keys extends KeyConstants {
         /**
          * The unique instance of key constants handler.

Modified: sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
URL: http://svn.apache.org/viewvc/sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java?rev=1677907&r1=1677906&r2=1677907&view=diff
==============================================================================
--- sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
[UTF-8] (original)
+++ sis/branches/Android/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
[UTF-8] Tue May  5 22:48:28 2015
@@ -19,7 +19,6 @@ package org.apache.sis.util.resources;
 import java.net.URL;
 import java.util.Locale;
 import java.util.MissingResourceException;
-import javax.annotation.Generated;
 import org.opengis.util.InternationalString;
 
 
@@ -42,7 +41,6 @@ public final class Messages extends Inde
      * @since   0.3
      * @module
      */
-    @Generated("org.apache.sis.util.resources.IndexedResourceCompiler")
     public static final class Keys extends KeyConstants {
         /**
          * The unique instance of key constants handler.

Modified: sis/branches/Android/ide-project/NetBeans/nbproject/project.properties
URL: http://svn.apache.org/viewvc/sis/branches/Android/ide-project/NetBeans/nbproject/project.properties?rev=1677907&r1=1677906&r2=1677907&view=diff
==============================================================================
--- sis/branches/Android/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] (original)
+++ sis/branches/Android/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] Tue
May  5 22:48:28 2015
@@ -103,9 +103,7 @@ javac.classpath=\
     ${maven.repository}/org/geonames/georss-rome/${georss.version}/georss-rome-${georss.version}.jar:\
     ${maven.repository}/rome/rome/${rome.version}/rome-${rome.version}.jar:\
     ${maven.repository}/jdom/jdom/${jdom1.version}/jdom-${jdom1.version}.jar:\
-    ${maven.repository}/javax/javaee-api/${jee.version}/javaee-api-${jee.version}.jar:\
-    ${maven.repository}/edu/ucar/cdm/${netcdf.version}/cdm-${netcdf.version}.jar:\
-    ${maven.repository}/org/osgi/org.osgi.core/${osgi.version}/org.osgi.core-${osgi.version}.jar
+    ${maven.repository}/edu/ucar/cdm/${netcdf.version}/cdm-${netcdf.version}.jar
 javac.processorpath=\
     ${javac.classpath}
 javac.test.classpath=\

Modified: sis/branches/Android/ide-project/eclipse/classpath
URL: http://svn.apache.org/viewvc/sis/branches/Android/ide-project/eclipse/classpath?rev=1677907&r1=1677906&r2=1677907&view=diff
==============================================================================
--- sis/branches/Android/ide-project/eclipse/classpath (original)
+++ sis/branches/Android/ide-project/eclipse/classpath Tue May  5 22:48:28 2015
@@ -16,13 +16,11 @@
 	<classpathentry kind="var" path="M2_REPO/org/geonames/georss-rome/0.9.8/georss-rome-0.9.8.jar"/>
 	<classpathentry kind="var" path="M2_REPO/rome/rome/0.9/rome-0.9.jar"/>
 	<classpathentry kind="var" path="M2_REPO/jdom/jdom/1.0/jdom-1.0.jar"/>
-	<classpathentry kind="var" path="M2_REPO/javax/javaee-api/6.0/javaee-api-6.0.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="var" path="M2_REPO/org/opengis/geoapi/3.0.0/geoapi-3.0.0.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/opengis/geoapi-conformance/3.0.0/geoapi-conformance-3.0.0.jar"/>
 	<classpathentry kind="var" path="M2_REPO/javax/measure/jsr-275/0.9.3/jsr-275-0.9.3.jar"/>
 	<classpathentry kind="var" path="M2_REPO/junit/junit/4.8.1/junit-4.8.1.jar"/>
-	<classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.core/5.0.0/org.osgi.core-5.0.0.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-core/3.0.4/maven-core-3.0.4.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-api/3.0.4/maven-plugin-api-3.0.4.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact/3.0.4/maven-artifact-3.0.4.jar"/>

Modified: sis/branches/Android/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/Android/pom.xml?rev=1677907&r1=1677906&r2=1677907&view=diff
==============================================================================
--- sis/branches/Android/pom.xml (original)
+++ sis/branches/Android/pom.xml Tue May  5 22:48:28 2015
@@ -356,12 +356,6 @@ Apache SIS is a free software, Java lang
         <version>1.0.3</version>
       </dependency>
       <dependency>
-        <groupId>javax</groupId>
-        <artifactId>javaee-api</artifactId>
-        <version>6.0</version>
-        <scope>provided</scope>
-      </dependency>
-      <dependency>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-compress</artifactId>
         <version>1.9</version>
@@ -369,12 +363,6 @@ Apache SIS is a free software, Java lang
 
       <!-- Optional dependencies -->
       <dependency>
-        <groupId>org.osgi</groupId>
-        <artifactId>org.osgi.core</artifactId>
-        <version>5.0.0</version>
-        <scope>provided</scope>
-      </dependency>
-      <dependency>
         <groupId>edu.ucar</groupId>
         <artifactId>cdm</artifactId>
         <version>${netcdf.version}</version>



Mime
View raw message