[kune-commits] r1812 - in trunk: . debian src/main/java/cc/kune/core/server/persist src/main/java/cc/kune/core/server/properties src/main/java/cc/kune/core/server/rpc src/main/java/cc/kune/events/server/utils src/test/java/cc/kune/core/server/persist src/test/java/cc/kune/events/server/utils

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Sat Mar 31 21:22:39 CEST 2012


Author: vjrj_
Date: 2012-03-31 21:22:39 +0200 (Sat, 31 Mar 2012)
New Revision: 1812

Added:
   trunk/src/test/java/cc/kune/core/server/persist/CachedCollectionTest.java
   trunk/src/test/java/cc/kune/events/server/utils/DateUtilsTest.java
Removed:
   trunk/src/main/java/cc/kune/core/server/persist/CachedCollectionTest.java
   trunk/src/main/java/cc/kune/events/server/utils/DateUtilsTest.java
Modified:
   trunk/TROUBLESHOOT
   trunk/debian/changelog
   trunk/debian/files
   trunk/pom.xml
   trunk/src/main/java/cc/kune/core/server/persist/CachedCollection.java
   trunk/src/main/java/cc/kune/core/server/properties/KunePropertiesDefault.java
   trunk/src/main/java/cc/kune/core/server/rpc/SiteRPC.java
Log:
Removing some compile warnings


Modified: trunk/TROUBLESHOOT
===================================================================
--- trunk/TROUBLESHOOT	2012-03-31 17:43:11 UTC (rev 1811)
+++ trunk/TROUBLESHOOT	2012-03-31 19:22:39 UTC (rev 1812)
@@ -139,6 +139,17 @@
 
 Verify that your system supports UTF8 (in debian systems check /etc/locale.gen and locale-gen)
 
+** Java compile errors: incompatible types 
+Sometimes you get errors like this, trying to compile:
+Authorizated.java:[50,47] incompatible types
+found   : cc.kune.core.shared.domain.AccessRol
+required: cc.kune.core.shared.domain.AccessRol
+seems that happens with some openjdk6 versions. Workaround to compile from eclipse or using sun-jdk or opnejdk7.
+More info:
+https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/611284
+update-java-alternatives -l
+try with:
+update-java-alternatives -s java-6-sun
 ** Emite troubleshooting
 
 See:

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2012-03-31 17:43:11 UTC (rev 1811)
+++ trunk/debian/changelog	2012-03-31 19:22:39 UTC (rev 1812)
@@ -1,3 +1,9 @@
+kune (0.1.0+b4) oneiric; urgency=low
+
+  * Improved trash funcionality, other minor changes
+
+ -- Vicente J. Ruiz Jurado <vjrj at ourproject.org>  Sat, 31 Mar 2012 19:42:30 +0200
+
 kune (0.1.0+b3) oneiric; urgency=low
 
   * Several changes (cache of SN and events, minor style changes, etc). See ChangeLog

Modified: trunk/debian/files
===================================================================
--- trunk/debian/files	2012-03-31 17:43:11 UTC (rev 1811)
+++ trunk/debian/files	2012-03-31 19:22:39 UTC (rev 1812)
@@ -1 +1 @@
-kune_0.1.0+b3_all.deb java optional
+kune_0.1.0+b4_all.deb java optional

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2012-03-31 17:43:11 UTC (rev 1811)
+++ trunk/pom.xml	2012-03-31 19:22:39 UTC (rev 1812)
@@ -212,11 +212,13 @@
       <groupId>org.cobogw.gwt</groupId>
       <artifactId>cobogw</artifactId>
       <version>1.3.1</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>com.gwtplatform</groupId>
       <artifactId>gwtp-all</artifactId>
       <version>0.5</version>
+      <scope>provided</scope>
       <!-- <version>0.6-SNAPSHOT</version> -->
       <exclusions>
         <exclusion>
@@ -248,6 +250,7 @@
     <dependency>
       <groupId>org.adamtacy</groupId>
       <artifactId>gwt-fx</artifactId>
+      <scope>provided</scope>
       <version>r464</version>
     </dependency>
     <!-- <dependency> <groupId>com.jhickman.web.gwt</groupId> <artifactId>gwt-customuibinder</artifactId> 
@@ -258,16 +261,19 @@
       <groupId>com.allen_sauer.gwt.log.gwt-log</groupId>
       <artifactId>gwt-log</artifactId>
       <version>3.0.1</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>com.allen_sauer.gwt.voices.gwt-voices</groupId>
       <artifactId>gwt-voices</artifactId>
       <version>2.0.0</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>com.allen_sauer.gwt.dnd.gwt-dnd</groupId>
       <artifactId>gwt-dnd</artifactId>
       <version>3.0.1</version>
+      <scope>provided</scope>
     </dependency>
     <!-- utilities -->
     <dependency>
@@ -285,6 +291,7 @@
       <groupId>com.calclab.emite</groupId>
       <artifactId>emite</artifactId>
       <version>r1694</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>com.calclab.emite</groupId>
@@ -295,6 +302,7 @@
       <groupId>com.calclab.emite</groupId>
       <artifactId>hablar</artifactId>
       <version>r1697</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>jivesoftware</groupId>
@@ -703,6 +711,7 @@
       <groupId>com.bradrydzewski</groupId>
       <artifactId>gwt-cal</artifactId>
       <version>0.9.3-dndCreation</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.mnode.ical4j</groupId>

Modified: trunk/src/main/java/cc/kune/core/server/persist/CachedCollection.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/persist/CachedCollection.java	2012-03-31 17:43:11 UTC (rev 1811)
+++ trunk/src/main/java/cc/kune/core/server/persist/CachedCollection.java	2012-03-31 19:22:39 UTC (rev 1812)
@@ -36,7 +36,7 @@
  * @param <V>
  *          the value type
  */
-public class CachedCollection<K, V> implements Map<K, V> {
+public class CachedCollection<K, V> {
 
   /** The cache. */
   // private final Map<K, V> cache;
@@ -49,65 +49,53 @@
    *          the size of the cache
    */
   public CachedCollection(final int size) {
-    cache = Collections.synchronizedMap(new LRUMap(size));   
+    cache = Collections.synchronizedMap(new LRUMap(size));
   }
 
-  @Override
   public void clear() {
     cache.clear();
   }
 
-  @Override
   public boolean containsKey(final Object key) {
     return cache.containsKey(key);
   }
 
-  @Override
   public boolean containsValue(final Object value) {
     return cache.containsKey(value);
   }
 
-  @Override
   public Set<java.util.Map.Entry<K, V>> entrySet() {
     return cache.entrySet();
   }
 
-  @Override
   public V get(final Object key) {
     return (V) cache.get(key);
   }
 
-  @Override
   public boolean isEmpty() {
     return cache.isEmpty();
   }
 
-  @Override
   public Set<K> keySet() {
     return cache.keySet();
   }
 
-  @Override
-  public Object put(final Object key, final Object value) {
-    return cache.put(key, value);
+  public V put(final K key, final V value) {
+    return (V) cache.put(key, value);
   }
 
-  @Override
   public void putAll(final Map<? extends K, ? extends V> m) {
     cache.putAll(m);
   }
 
-  @Override
   public V remove(final Object key) {
     return (V) cache.remove(key);
   }
 
-  @Override
   public int size() {
     return cache.size();
   }
 
-  @Override
   public Collection<V> values() {
     return cache.values();
   }

Deleted: trunk/src/main/java/cc/kune/core/server/persist/CachedCollectionTest.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/persist/CachedCollectionTest.java	2012-03-31 17:43:11 UTC (rev 1811)
+++ trunk/src/main/java/cc/kune/core/server/persist/CachedCollectionTest.java	2012-03-31 19:22:39 UTC (rev 1812)
@@ -1,54 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2012 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package cc.kune.core.server.persist;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class CachedCollectionTest {
-
-  private CachedCollection<String, String> cache;
-
-  @Before
-  public void before() {
-    cache = new CachedCollection<String, String>(2);
-  }
-
-  @Test
-  public void testBasicSize() {
-    assertTrue(cache.size() == 0);
-    final String first = "1";
-    cache.put(first, "1b");
-    final String snd = "2";
-    cache.put(snd, "2b");
-    final String third = "3";
-    cache.put(third, "3b");
-    assertNull(cache.get(first));
-    assertNotNull(cache.get(snd));
-    assertNotNull(cache.get(third));
-    assertTrue(cache.size() == 2);
-  }
-
-}

Modified: trunk/src/main/java/cc/kune/core/server/properties/KunePropertiesDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/properties/KunePropertiesDefault.java	2012-03-31 17:43:11 UTC (rev 1811)
+++ trunk/src/main/java/cc/kune/core/server/properties/KunePropertiesDefault.java	2012-03-31 19:22:39 UTC (rev 1812)
@@ -29,7 +29,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import sun.misc.SignalHandler;
 import cc.kune.core.server.error.ServerException;
 
 import com.google.inject.Inject;
@@ -46,13 +45,16 @@
     this.fileName = fileName;
     // http://stackoverflow.com/questions/40376/handle-signals-in-the-java-virtual-machine
     // Runtime.getRuntime().addShutdownHook() ??
-    sun.misc.Signal.handle(new sun.misc.Signal("HUP"), new SignalHandler() {
-      @Override
-      public void handle(final sun.misc.Signal sig) {
-        LOG.warn("Received SIGHUP signal. Will reload kune.properties");
-        loadConfiguration();
-      }
-    });
+    // Gives some warning in openjdk
+    // http://stackoverflow.com/questions/5023520/sending-signals-to-a-running-jvm
+    //
+    // sun.misc.Signal.handle(new sun.misc.Signal("HUP"), new SignalHandler() {
+    // @Override
+    // public void handle(final sun.misc.Signal sig) {
+    // LOG.warn("Received SIGHUP signal. Will reload kune.properties");
+    // loadConfiguration();
+    // }
+    // });
     loadConfiguration();
   }
 

Modified: trunk/src/main/java/cc/kune/core/server/rpc/SiteRPC.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rpc/SiteRPC.java	2012-03-31 17:43:11 UTC (rev 1811)
+++ trunk/src/main/java/cc/kune/core/server/rpc/SiteRPC.java	2012-03-31 19:22:39 UTC (rev 1812)
@@ -23,7 +23,6 @@
 import java.util.List;
 import java.util.TimeZone;
 
-import sun.misc.SignalHandler;
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.rpcservices.SiteService;
 import cc.kune.core.server.InitData;
@@ -79,12 +78,15 @@
     this.countryManager = countryManager;
     this.serverToolRegistry = serverToolRegistry;
     this.extMediaDescManager = extMediaDescManager;
-    sun.misc.Signal.handle(new sun.misc.Signal("HUP"), new SignalHandler() {
-      @Override
-      public void handle(final sun.misc.Signal sig) {
-        loadProperties(kuneProperties);
-      }
-    });
+    // Gives some warning in openjdk
+    // http://stackoverflow.com/questions/5023520/sending-signals-to-a-running-jvm
+    //
+    // sun.misc.Signal.handle(new sun.misc.Signal("HUP"), new SignalHandler() {
+    // @Override
+    // public void handle(final sun.misc.Signal sig) {
+    // loadProperties(kuneProperties);
+    // }
+    // });
     loadProperties(kuneProperties);
   }
 

Deleted: trunk/src/main/java/cc/kune/events/server/utils/DateUtilsTest.java
===================================================================
--- trunk/src/main/java/cc/kune/events/server/utils/DateUtilsTest.java	2012-03-31 17:43:11 UTC (rev 1811)
+++ trunk/src/main/java/cc/kune/events/server/utils/DateUtilsTest.java	2012-03-31 19:22:39 UTC (rev 1812)
@@ -1,42 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.events.server.utils;
-
-import static org.junit.Assert.assertEquals;
-
-import java.text.ParseException;
-
-import org.junit.Test;
-
-public class DateUtilsTest {
-
-  private static final String SAMPLE = "2012-03-05T00:00:00.000+0100";
-  private static final String SAMPLE2 = "2012-03-05T00:00:00.000+01:00";
-
-  @Test
-  public void basicTest() throws ParseException {
-
-    DateUtils.toDate(SAMPLE);
-    DateUtils.toDate(SAMPLE2);
-
-    // Difference from GWT timezone and SimpleDate
-    assertEquals("foo+0100", "foo+01:00".replaceFirst(DateUtils.TIMEZONE_REGEXP, "$1$2"));
-  }
-}

Copied: trunk/src/test/java/cc/kune/core/server/persist/CachedCollectionTest.java (from rev 1809, trunk/src/main/java/cc/kune/core/server/persist/CachedCollectionTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/persist/CachedCollectionTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/persist/CachedCollectionTest.java	2012-03-31 19:22:39 UTC (rev 1812)
@@ -0,0 +1,54 @@
+/*
+ *
+ * Copyright (C) 2007-2012 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package cc.kune.core.server.persist;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class CachedCollectionTest {
+
+  private CachedCollection<String, String> cache;
+
+  @Before
+  public void before() {
+    cache = new CachedCollection<String, String>(2);
+  }
+
+  @Test
+  public void testBasicSize() {
+    assertTrue(cache.size() == 0);
+    final String first = "1";
+    cache.put(first, "1b");
+    final String snd = "2";
+    cache.put(snd, "2b");
+    final String third = "3";
+    cache.put(third, "3b");
+    assertNull(cache.get(first));
+    assertNotNull(cache.get(snd));
+    assertNotNull(cache.get(third));
+    assertTrue(cache.size() == 2);
+  }
+
+}

Copied: trunk/src/test/java/cc/kune/events/server/utils/DateUtilsTest.java (from rev 1809, trunk/src/main/java/cc/kune/events/server/utils/DateUtilsTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/events/server/utils/DateUtilsTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/events/server/utils/DateUtilsTest.java	2012-03-31 19:22:39 UTC (rev 1812)
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.events.server.utils;
+
+import static org.junit.Assert.assertEquals;
+
+import java.text.ParseException;
+
+import org.junit.Test;
+
+public class DateUtilsTest {
+
+  private static final String SAMPLE = "2012-03-05T00:00:00.000+0100";
+  private static final String SAMPLE2 = "2012-03-05T00:00:00.000+01:00";
+
+  @Test
+  public void basicTest() throws ParseException {
+
+    DateUtils.toDate(SAMPLE);
+    DateUtils.toDate(SAMPLE2);
+
+    // Difference from GWT timezone and SimpleDate
+    assertEquals("foo+0100", "foo+01:00".replaceFirst(DateUtils.TIMEZONE_REGEXP, "$1$2"));
+  }
+}




More information about the kune-commits mailing list