[Arakhnę-Dev] [344] * Java 1.6 -> Java 1.7

[ Thread Index | Date Index | More arakhne.org/dev Archives ]


Revision: 344
Author:   galland
Date:     2012-07-09 22:15:56 +0200 (Mon, 09 Jul 2012)
Log Message:
-----------
* Java 1.6 -> Java 1.7

Modified Paths:
--------------
    trunk/arakhneLog4J/pom.xml
    trunk/arakhneLog4J/src/main/java/org/arakhne/logging/ApacheLogger.java
    trunk/arakhneLogger/pom.xml
    trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractLogger.java
    trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractPrintStreamLogger.java
    trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractStandAloneLogger.java
    trunk/arakhneLogger/src/main/java/org/arakhne/logging/ConsoleLogger.java
    trunk/arakhneLogger/src/main/java/org/arakhne/logging/FileLogger.java
    trunk/arakhneLogger/src/main/java/org/arakhne/logging/LogLevel.java
    trunk/arakhneLogger/src/main/java/org/arakhne/logging/Logger.java
    trunk/arakhneLogger/src/main/java/org/arakhne/logging/LoggerEvent.java
    trunk/arakhneLogger/src/main/java/org/arakhne/logging/LoggerEventListener.java
    trunk/arakhneLogger/src/main/java/org/arakhne/logging/LoggingSystem.java
    trunk/arakhneLogger/src/main/java/org/arakhne/logging/SunLogger.java
    trunk/arakhneRefs/pom.xml
    trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractPhantomValueMap.java
    trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractReferencedValueMap.java
    trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractSoftValueMap.java
    trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractWeakValueMap.java
    trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/WeakArrayList.java
    trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractCollectionTestCase.java
    trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractMapTestCase.java
    trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractReferencableValueMapTestCase.java
    trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractTestCase.java
    trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/PhantomValueHashMapTest.java
    trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/PhantomValueTreeMapTest.java
    trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/SoftValueHashMapTest.java
    trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/SoftValueTreeMapTest.java
    trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/WeakValueHashMapTest.java
    trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/WeakValueTreeMapTest.java
    trunk/maventools/pom.xml
    trunk/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
    trunk/maventools/src/main/java/org/arakhne/maven/MultiFileFilter.java
    trunk/tag-replacer/pom.xml
    trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/AbstractReplaceMojo.java
    trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/GenerateSourceMojo.java
    trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/ReplaceHtmlMojo.java
    trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/ReplaceResourceMojo.java

Modified: trunk/arakhneLog4J/pom.xml
===================================================================
--- trunk/arakhneLog4J/pom.xml	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLog4J/pom.xml	2012-07-09 20:15:56 UTC (rev 344)
@@ -9,7 +9,6 @@
 		<version>4.3-SNAPSHOT</version>
 	</parent>
 
-	<groupId>org.arakhne.afc</groupId>
 	<artifactId>arakhneLog4J</artifactId>
 	<packaging>jar</packaging>
 	<version>1.6-SNAPSHOT</version>

Modified: trunk/arakhneLog4J/src/main/java/org/arakhne/logging/ApacheLogger.java
===================================================================
--- trunk/arakhneLog4J/src/main/java/org/arakhne/logging/ApacheLogger.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLog4J/src/main/java/org/arakhne/logging/ApacheLogger.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,8 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2004-2009 Stephane GALLANDcolas GAUD
+ * Copyright (C) 2004-2009 Stephane GALLAND, Nicolas GAUD
+ * Copyright (C) 2012 Stephane GALLAND, Nicolas GAUD
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -32,7 +33,9 @@
  * @mavengroupid $GroupId$
  * @mavenartifactid $ArtifactId$
  * @see Logger
+ * @deprecated Replaced by the standard JRE logging system
  */
+@Deprecated
 public class ApacheLogger extends AbstractLogger {
 
 	private final org.apache.log4j.Logger bindedLogger;
@@ -62,7 +65,7 @@
 	 * @param level is the level to translate
 	 * @return the Sun's level
 	 */
-	protected Level toApacheLevel(LogLevel level) {
+	protected static Level toApacheLevel(LogLevel level) {
 		switch(level) {
 		case NONE:
 			return Level.OFF;
@@ -74,6 +77,7 @@
 			return Level.INFO;
 		case DEBUG:
 			return Level.DEBUG;
+		default:
 		}
 		return Level.OFF;
 	}

Modified: trunk/arakhneLogger/pom.xml
===================================================================
--- trunk/arakhneLogger/pom.xml	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLogger/pom.xml	2012-07-09 20:15:56 UTC (rev 344)
@@ -9,7 +9,6 @@
 		<version>4.3-SNAPSHOT</version>
 	</parent>
 
-	<groupId>org.arakhne.afc</groupId>
 	<artifactId>arakhneLogger</artifactId>
 	<packaging>jar</packaging>
 	<version>1.8-SNAPSHOT</version>

Modified: trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractLogger.java
===================================================================
--- trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractLogger.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractLogger.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,8 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2004-2009 Stephane GALLANDcolas GAUD
+ * Copyright (C) 2004-2009 Stephane GALLAND, Nicolas GAUD
+ * Copyright (C) 2012 Stephane GALLAND, Nicolas GAUD
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -32,7 +33,9 @@
  * @mavengroupid $GroupId$
  * @mavenartifactid $ArtifactId$
  * @see Logger
+ * @deprecated Replaced by the standard JRE logging system
  */
+@Deprecated
 public abstract class AbstractLogger implements Logger {
 
 	private LogLevel minLevel;
@@ -173,7 +176,7 @@
 	@Override
 	public final void addLoggerEventListener(LoggerEventListener listener) {
 		if (this.listeners==null) {
-			this.listeners = new ArrayList<LoggerEventListener>();
+			this.listeners = new ArrayList<>();
 		}
 		this.listeners.add(listener);
 	}

Modified: trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractPrintStreamLogger.java
===================================================================
--- trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractPrintStreamLogger.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractPrintStreamLogger.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,8 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2009 Stephane GALLANDcolas GAUD
+ * Copyright (C) 2009 Stephane GALLAND, Nicolas GAUD
+ * Copyright (C) 2012 Stephane GALLAND, Nicolas GAUD
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -32,7 +33,9 @@
  * @mavengroupid $GroupId$
  * @mavenartifactid $ArtifactId$
  * @see Logger
+ * @deprecated Replaced by the standard JRE logging system
  */
+@Deprecated
 public abstract class AbstractPrintStreamLogger extends AbstractStandAloneLogger {
 
 	/** Output print stream for anomalies.
@@ -84,15 +87,15 @@
 			buffer.append(": "); //$NON-NLS-1$
 			buffer.append(msg);
 			
-			PrintStream ps = level.isAnomalyLevel() ? this.anomalyStream : this.noticeStream;
-
-			ps.println(buffer.toString());
-			
-			if (exception!=null) {
-				exception.printStackTrace(ps);
+			try (PrintStream ps = level.isAnomalyLevel() ? this.anomalyStream : this.noticeStream) {
+				ps.println(buffer.toString());
+				
+				if (exception!=null) {
+					exception.printStackTrace(ps);
+				}
+	
+				fireLoggerEvent(source, level, msg);
 			}
-
-			fireLoggerEvent(source, level, msg);
 		}
 	}
 

Modified: trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractStandAloneLogger.java
===================================================================
--- trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractStandAloneLogger.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLogger/src/main/java/org/arakhne/logging/AbstractStandAloneLogger.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,8 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2009 Stephane GALLANDcolas GAUD
+ * Copyright (C) 2009 Stephane GALLAND, Nicolas GAUD
+ * Copyright (C) 2012 Stephane GALLAND, Nicolas GAUD
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -34,7 +35,9 @@
  * @mavengroupid $GroupId$
  * @mavenartifactid $ArtifactId$
  * @see Logger
+ * @deprecated Replaced by the standard JRE logging system
  */
+@Deprecated
 public abstract class AbstractStandAloneLogger extends AbstractLogger {
 
 	private static String errorLabel = null;
@@ -63,6 +66,7 @@
 		case INFO:
 			if (infoLabel!=null) return infoLabel;
 			break;
+		default:
 		}
 
 		String name = level.name().toUpperCase();
@@ -92,6 +96,7 @@
 		case INFO:
 			infoLabel = name;
 			break;
+		default:
 		}
 		
 		return name;

Modified: trunk/arakhneLogger/src/main/java/org/arakhne/logging/ConsoleLogger.java
===================================================================
--- trunk/arakhneLogger/src/main/java/org/arakhne/logging/ConsoleLogger.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLogger/src/main/java/org/arakhne/logging/ConsoleLogger.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,8 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2004-2009 Stephane GALLANDcolas GAUD
+ * Copyright (C) 2004-2009 Stephane GALLAND, Nicolas GAUD
+ * Copyright (C) 2012 Stephane GALLAND, Nicolas GAUD
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -29,7 +30,9 @@
  * @mavengroupid $GroupId$
  * @mavenartifactid $ArtifactId$
  * @see Logger
+ * @deprecated Replaced by the standard JRE logging system
  */
+@Deprecated
 public class ConsoleLogger extends AbstractPrintStreamLogger {
 
 	/**

Modified: trunk/arakhneLogger/src/main/java/org/arakhne/logging/FileLogger.java
===================================================================
--- trunk/arakhneLogger/src/main/java/org/arakhne/logging/FileLogger.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLogger/src/main/java/org/arakhne/logging/FileLogger.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,8 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2009 Stephane GALLANDcolas GAUD
+ * Copyright (C) 2009 Stephane GALLAND, Nicolas GAUD
+ * Copyright (C) 2012 Stephane GALLAND, Nicolas GAUD
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -34,7 +35,9 @@
  * @mavengroupid $GroupId$
  * @mavenartifactid $ArtifactId$
  * @see Logger
+ * @deprecated Replaced by the standard JRE logging system
  */
+@Deprecated
 public class FileLogger extends AbstractPrintStreamLogger {
 
 	private final File logFile;
@@ -45,6 +48,7 @@
 	 * @param logFile is the log file to write inside.
 	 * @throws IOException when error on log file opening. 
 	 */
+	@SuppressWarnings("resource")
 	public FileLogger(File logFile) throws IOException {
 		this(logFile, new PrintStream(new FileOutputStream(logFile)));
 	}
@@ -56,6 +60,7 @@
 	 * @param name is the name of the logger.
 	 * @throws IOException when error on log file opening. 
 	 */
+	@SuppressWarnings("resource")
 	public FileLogger(File logFile, String name) throws IOException {
 		this(logFile, new PrintStream(new FileOutputStream(logFile)), name);
 	}

Modified: trunk/arakhneLogger/src/main/java/org/arakhne/logging/LogLevel.java
===================================================================
--- trunk/arakhneLogger/src/main/java/org/arakhne/logging/LogLevel.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLogger/src/main/java/org/arakhne/logging/LogLevel.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,8 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2004-2009 Stephane GALLANDcolas GAUD
+ * Copyright (C) 2004-2009 Stephane GALLAND, Nicolas GAUD
+ * Copyright (C) 2012 Stephane GALLAND, Nicolas GAUD
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -28,7 +29,9 @@
  * @version $FullVersion$
  * @mavengroupid $GroupId$
  * @mavenartifactid $ArtifactId$
- */	
+ * @deprecated Replaced by the standard JRE logging system
+ */
+@Deprecated
 public enum LogLevel {
 	/**
 	 * No logging.

Modified: trunk/arakhneLogger/src/main/java/org/arakhne/logging/Logger.java
===================================================================
--- trunk/arakhneLogger/src/main/java/org/arakhne/logging/Logger.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLogger/src/main/java/org/arakhne/logging/Logger.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,8 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2004-2009 Stephane GALLANDcolas GAUD
+ * Copyright (C) 2004-2009 Stephane GALLAND, Nicolas GAUD
+ * Copyright (C) 2012 Stephane GALLAND, Nicolas GAUD
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -32,7 +33,9 @@
  * @mavengroupid $GroupId$
  * @mavenartifactid $ArtifactId$
  * @see LogLevel
+ * @deprecated Replaced by the standard JRE logging system
  */
+@Deprecated
 public interface Logger {
 
 	/**

Modified: trunk/arakhneLogger/src/main/java/org/arakhne/logging/LoggerEvent.java
===================================================================
--- trunk/arakhneLogger/src/main/java/org/arakhne/logging/LoggerEvent.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLogger/src/main/java/org/arakhne/logging/LoggerEvent.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,8 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2004-2009 Stephane GALLANDcolas GAUD
+ * Copyright (C) 2004-2009 Stephane GALLAND, Nicolas GAUD
+ * Copyright (C) 2012 Stephane GALLAND, Nicolas GAUD
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -30,7 +31,9 @@
  * @mavengroupid $GroupId$
  * @mavenartifactid $ArtifactId$
  * @see Logger
+ * @deprecated Replaced by the standard JRE logging system
  */
+@Deprecated
 public class LoggerEvent extends EventObject {
 
 	private static final long serialVersionUID = -272287628530037390L;

Modified: trunk/arakhneLogger/src/main/java/org/arakhne/logging/LoggerEventListener.java
===================================================================
--- trunk/arakhneLogger/src/main/java/org/arakhne/logging/LoggerEventListener.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLogger/src/main/java/org/arakhne/logging/LoggerEventListener.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,8 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2004-2008 Stephane GALLANDcolas GAUD
+ * Copyright (C) 2004-2008 Stephane GALLAND, Nicolas GAUD
+ * Copyright (C) 2012 Stephane GALLAND, Nicolas GAUD
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -30,7 +31,9 @@
  * @mavengroupid $GroupId$
  * @mavenartifactid $ArtifactId$
  * @see Logger
+ * @deprecated Replaced by the standard JRE logging system
  */
+@Deprecated
 public interface LoggerEventListener extends EventListener {
 
 	/** Invoked when an event was logged in.

Modified: trunk/arakhneLogger/src/main/java/org/arakhne/logging/LoggingSystem.java
===================================================================
--- trunk/arakhneLogger/src/main/java/org/arakhne/logging/LoggingSystem.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLogger/src/main/java/org/arakhne/logging/LoggingSystem.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,8 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2004-2008 Stephane GALLANDcolas GAUD
+ * Copyright (C) 2004-2008 Stephane GALLAND, Nicolas GAUD
+ * Copyright (C) 2012 Stephane GALLAND, Nicolas GAUD
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -35,7 +36,9 @@
  * @version $FullVersion$
  * @mavengroupid $GroupId$
  * @mavenartifactid $ArtifactId$
+ * @deprecated Replaced by the standard JRE logging system
  */
+@Deprecated
 public class LoggingSystem {
 
 	private static final String[] PREFERED_LOGGERS = new String[] {
@@ -83,7 +86,7 @@
 		return singleton;
 	}	
 	
-	private final Map<String,Logger> preferedLoggers = new TreeMap<String,Logger>();
+	private final Map<String,Logger> preferedLoggers = new TreeMap<>();
 	private Logger anonymousLogger = null;
 	
 	private Class<? extends Logger> preferedLoggerType = null;
@@ -191,7 +194,7 @@
 		throw new Error("unable to create an instance of Logger"); //$NON-NLS-1$
 	}
 	
-	private Logger createLoggerInstance(Class<? extends Logger> type, String name) {
+	private static Logger createLoggerInstance(Class<? extends Logger> type, String name) {
 		if (type==null) return null;
 		if ((name!=null)&&(!"".equals(name))) { //$NON-NLS-1$
 			try {
@@ -223,7 +226,7 @@
 	 * @return the type of the the preferred logging system.
 	 */
 	@SuppressWarnings("unchecked")
-	protected Class<? extends Logger> findDefaultLoggerClass() {
+	protected static Class<? extends Logger> findDefaultLoggerClass() {
 		for(String className : PREFERED_LOGGERS) {
 			try {
 				Class<?> type = Class.forName(className);
@@ -242,7 +245,7 @@
 	 */
 	public final void addLoggerEventListener(LoggerEventListener listener) {
 		if (this.listeners==null) {
-			this.listeners = new ArrayList<LoggerEventListener>();
+			this.listeners = new ArrayList<>();
 		}
 		this.listeners.add(listener);
 	}

Modified: trunk/arakhneLogger/src/main/java/org/arakhne/logging/SunLogger.java
===================================================================
--- trunk/arakhneLogger/src/main/java/org/arakhne/logging/SunLogger.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneLogger/src/main/java/org/arakhne/logging/SunLogger.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,8 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2004-2009 Stephane GALLANDcolas GAUD
+ * Copyright (C) 2004-2009 Stephane GALLAND, Nicolas GAUD
+ * Copyright (C) 2012 Stephane GALLAND, Nicolas GAUD
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -31,7 +32,9 @@
  * @mavengroupid $GroupId$
  * @mavenartifactid $ArtifactId$
  * @see Logger
+ * @deprecated Replaced by the standard JRE logging system
  */
+@Deprecated
 public class SunLogger extends AbstractLogger {
 
 	private final java.util.logging.Logger bindedLogger;
@@ -61,7 +64,7 @@
 	 * @param level is the level to translate
 	 * @return the Sun's level
 	 */
-	protected Level toSunLevel(LogLevel level) {
+	protected static Level toSunLevel(LogLevel level) {
 		switch(level) {
 		case NONE:
 			return Level.OFF;
@@ -73,6 +76,7 @@
 			return Level.INFO;
 		case DEBUG:
 			return Level.CONFIG;
+		default:
 		}
 		return Level.OFF;
 	}

Modified: trunk/arakhneRefs/pom.xml
===================================================================
--- trunk/arakhneRefs/pom.xml	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/pom.xml	2012-07-09 20:15:56 UTC (rev 344)
@@ -9,7 +9,6 @@
 		<version>4.3-SNAPSHOT</version>
 	</parent>
 
-	<groupId>org.arakhne.afc</groupId>
 	<artifactId>arakhneRefs</artifactId>
 	<packaging>jar</packaging>
 	<version>5.8-SNAPSHOT</version>

Modified: trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractPhantomValueMap.java
===================================================================
--- trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractPhantomValueMap.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractPhantomValueMap.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -2,7 +2,7 @@
  * $Id$
  * 
  * Copyright (C) 2005-2009 Stephane GALLAND.
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -57,7 +57,7 @@
 	 */
 	@Override
 	protected final ReferencableValue<K,V> makeValue(K k, V v, ReferenceQueue<V> queue) {
-		return new PhantomReferencedValue<K,V>(k, v, queue);
+		return new PhantomReferencedValue<>(k, v, queue);
 	}
 
 }

Modified: trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractReferencedValueMap.java
===================================================================
--- trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractReferencedValueMap.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractReferencedValueMap.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -2,7 +2,7 @@
  * $Id$
  * 
  * Copyright (C) 2005-2009 Stephane GALLAND.
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -121,7 +121,7 @@
 	}
 
 	private boolean autoExpurge = false;
-	private final ReferenceQueue<V> queue = new ReferenceQueue<V>();
+	private final ReferenceQueue<V> queue = new ReferenceQueue<>();
 
 	/** Internal map.
 	 */

Modified: trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractSoftValueMap.java
===================================================================
--- trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractSoftValueMap.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractSoftValueMap.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -2,7 +2,7 @@
  * $Id$
  * 
  * Copyright (C) 2005-2009 Stephane GALLAND.
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -57,7 +57,7 @@
 	 */
 	@Override
 	protected final ReferencableValue<K,V> makeValue(K k, V v, ReferenceQueue<V> queue) {
-		return new SoftReferencedValue<K,V>(k, v, queue);
+		return new SoftReferencedValue<>(k, v, queue);
 	}
 
 }

Modified: trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractWeakValueMap.java
===================================================================
--- trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractWeakValueMap.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/AbstractWeakValueMap.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -2,7 +2,7 @@
  * $Id$
  * 
  * Copyright (C) 2005-2009 Stephane GALLAND.
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -57,7 +57,7 @@
 	 */
 	@Override
 	protected final ReferencableValue<K,V> makeValue(K k, V v, ReferenceQueue<V> queue) {
-		return new WeakReferencedValue<K,V>(k, v, queue);
+		return new WeakReferencedValue<>(k, v, queue);
 	}
 
 }

Modified: trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/WeakArrayList.java
===================================================================
--- trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/WeakArrayList.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/main/java/org/arakhne/util/ref/WeakArrayList.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -2,6 +2,7 @@
  * $Id$
  * 
  * Copyright (C) 2005-2009 Stephane GALLAND.
+ * Copyright (C) 2012 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -89,7 +90,7 @@
 		return (value==NULL_VALUE) ? null : value;
 	}
 
-	private final transient ReferenceQueue<T> queue = new ReferenceQueue<T>();
+	private final transient ReferenceQueue<T> queue = new ReferenceQueue<>();
 	
 	private Object[] data;
 	
@@ -166,7 +167,7 @@
      * @return the weak reference. 
      */
     private Reference<T> createRef(T obj) {
-    	return new WeakReference<T>(maskNull(obj), this.queue);
+    	return new WeakReference<>(maskNull(obj), this.queue);
     }
     
     /**
@@ -355,7 +356,7 @@
      */
     public void addReferenceListener(ReferenceListener listener) {
     	if (this.listeners==null) {
-    		this.listeners = new LinkedList<ReferenceListener>();
+    		this.listeners = new LinkedList<>();
     	}
 		List<ReferenceListener> list = this.listeners;
     	synchronized(list) {

Modified: trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractCollectionTestCase.java
===================================================================
--- trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractCollectionTestCase.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractCollectionTestCase.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -2,7 +2,7 @@
  * 
  * Copyright (c) 2006-10, Multiagent Team, Laboratoire Systemes et Transport,
  *                        Universite de Technologie de Belfort-Montbeliard.
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -51,13 +51,13 @@
 	public void setUp() throws Exception {
 		super.setUp();
 		int count = this.RANDOM.nextInt(400)+100;
-		this.reference = new ArrayList<OBJ>(count);
+		this.reference = new ArrayList<>(count);
 		for(int idx=0; idx<count; idx++) {
 			this.reference.add(createContentInstance());
 		}
 		
 		count = this.RANDOM.nextInt(5)+5;
-		this.unreference = new ArrayList<OBJ>(count);
+		this.unreference = new ArrayList<>(count);
 		for(int idx=0; idx<count; idx++) {
 			this.unreference.add(createContentInstance());
 		}

Modified: trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractMapTestCase.java
===================================================================
--- trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractMapTestCase.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractMapTestCase.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -2,7 +2,7 @@
  * 
  * Copyright (c) 2006-10, Multiagent Team, Laboratoire Systemes et Transport,
  *                        Universite de Technologie de Belfort-Montbeliard.
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -56,13 +56,13 @@
 	public void setUp() throws Exception {
 		super.setUp();
 		int count = this.RANDOM.nextInt(400)+100;
-		this.reference = new HashMap<K,V>(count);
+		this.reference = new HashMap<>(count);
 		for(int idx=0; idx<count; idx++) {
 			this.reference.put(createKeyInstance("in/"), createValueInstance("in/")); //$NON-NLS-1$//$NON-NLS-2$
 		}
 		
 		count = this.RANDOM.nextInt(5)+5;
-		this.unreference = new HashMap<K,V>(count);
+		this.unreference = new HashMap<>(count);
 		for(int idx=0; idx<count; idx++) {
 			this.unreference.put(createKeyInstance("out/"), createValueInstance("out/")); //$NON-NLS-1$//$NON-NLS-2$
 		}

Modified: trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractReferencableValueMapTestCase.java
===================================================================
--- trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractReferencableValueMapTestCase.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractReferencableValueMapTestCase.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,6 +1,6 @@
 /* $Id$
  * 
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -57,7 +57,7 @@
 	@Override
 	public void setUp() throws Exception {
 		super.setUp();
-		this.loosedKeys = new TreeSet<String>();
+		this.loosedKeys = new TreeSet<>();
 	}
 	
 	/**

Modified: trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractTestCase.java
===================================================================
--- trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractTestCase.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/AbstractTestCase.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,7 @@
 /* $Id$
  * 
  * Copyright (C) 2007-09 Stephane GALLAND.
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -95,7 +95,7 @@
 	 * @param actual is the actual value of the object.
 	 * @return the message
 	 */
-	protected  String formatFailMessage(String message, Object expected, Object actual) {
+	protected static String formatFailMessage(String message, Object expected, Object actual) {
 		StringBuilder formatted = new StringBuilder();
 		if (message!=null) {
 			formatted.append(message);
@@ -117,7 +117,7 @@
 	 * @param actual is the actual value of the object.
 	 * @return the message
 	 */
-	protected  String formatFailMessage(String message, String msg, Object actual) {
+	protected static String formatFailMessage(String message, String msg, Object actual) {
 		StringBuilder formatted = new StringBuilder();
 		if (message!=null) {
 			formatted.append(message);
@@ -137,7 +137,7 @@
 	 * @param notexpected is the not-expected object.
 	 * @return the message
 	 */
-	protected String formatFailNegMessage(String message, Object notexpected) {
+	protected static String formatFailNegMessage(String message, Object notexpected) {
 		StringBuilder formatted = new StringBuilder();
 		if (message!=null) {
 			formatted.append(message);
@@ -156,7 +156,7 @@
 	 * @param notexpected is the value which is not expected by the unit test.
 	 * @param actual is the actual value of the object in the unit test.
 	 */
-	protected void assertNotEquals(String message, Object notexpected, Object actual) {
+	protected static void assertNotEquals(String message, Object notexpected, Object actual) {
 		if ((notexpected!=actual)&&
 			((notexpected==null)
 			 ||
@@ -170,7 +170,7 @@
 	 * @param notexpected is the value which is not expected by the unit test.
 	 * @param actual is the actual value of the object in the unit test.
 	 */
-	protected void assertNotEquals(Object notexpected, Object actual) {
+	protected static void assertNotEquals(Object notexpected, Object actual) {
 	    assertNotEquals(null, notexpected, actual);
 	}
 	
@@ -181,7 +181,7 @@
 	 * @param expectedObjects are the set of expected values during the unit test.
 	 * @param actual is the actual value of the object in the unit test.
 	 */
-	protected void assertEquals(String message, Object[] expectedObjects, Object actual) {
+	protected static void assertEquals(String message, Object[] expectedObjects, Object actual) {
 		if ((expectedObjects!=null)&&(expectedObjects.length>0)) {
 			for (Object object : expectedObjects) {
 				if ((object==null)&&(actual==null)) return;
@@ -197,7 +197,7 @@
 	 * @param expectedObjects are the set of expected values during the unit test.
 	 * @param actual is the actual value of the object in the unit test.
 	 */
-	protected void assertEquals(Object[] expectedObjects, Object actual) {
+	protected static void assertEquals(Object[] expectedObjects, Object actual) {
 	    assertEquals(null, expectedObjects, actual);
 	}
 
@@ -209,7 +209,7 @@
 	 * @param expectedObjects are the set of expected values during the unit test.
 	 * @param actual is the actual value of the objects in the unit test.
 	 */
-	protected <T> void assertEquals(String message, T[] expectedObjects, T[] actual) {
+	protected static <T> void assertEquals(String message, T[] expectedObjects, T[] actual) {
 		if (expectedObjects==actual) return;
 		if ((expectedObjects!=null)&&(actual!=null)&&
 			(expectedObjects.length==actual.length)) {
@@ -234,7 +234,7 @@
 	 * @param expectedObjects are the set of expected values during the unit test.
 	 * @param actual is the actual value of the objects in the unit test.
 	 */
-	protected <T> void assertEquals(T[] expectedObjects, T[] actual) {
+	protected static <T> void assertEquals(T[] expectedObjects, T[] actual) {
 	    assertEquals(null, expectedObjects, actual);
 	}
 
@@ -246,7 +246,7 @@
 	 * @param expectedObjects are the set of expected values during the unit test.
 	 * @param actual is the actual value of the objects in the unit test.
 	 */
-	protected <T> void assertNotEquals(String message, T[] expectedObjects, T[] actual) {
+	protected static <T> void assertNotEquals(String message, T[] expectedObjects, T[] actual) {
 		if (expectedObjects!=actual) {			
 			if ((expectedObjects!=null)&&(actual!=null)) {
 				if (expectedObjects.length!=actual.length) return;
@@ -273,7 +273,7 @@
 	 * @param expectedObjects are the set of expected values during the unit test.
 	 * @param actual is the actual value of the objects in the unit test.
 	 */
-	protected <T> void assertNotEquals(T[] expectedObjects, T[] actual) {
+	protected static <T> void assertNotEquals(T[] expectedObjects, T[] actual) {
 	    assertNotEquals(null, expectedObjects, actual);
 	}
 
@@ -288,7 +288,7 @@
 	 * @see #assertEquals(Object[], Object)
 	 * @see #assertEquals(Object[], Object[])
 	 */
-	protected void assertEqualsGeneric(Object expected, Object actual) {
+	protected static void assertEqualsGeneric(Object expected, Object actual) {
 		assertEqualsGeneric(null, expected, actual);
 	}
 
@@ -304,7 +304,7 @@
 	 * @see #assertEquals(Object[], Object)
 	 * @see #assertEquals(Object[], Object[])
 	 */
-	protected void assertEqualsGeneric(String message, Object expected, Object actual) {
+	protected static void assertEqualsGeneric(String message, Object expected, Object actual) {
 		if ((expected!=null)&&(actual!=null)&&(expected.getClass().isArray())) {
 			if (actual.getClass().isArray())
 				assertEquals(message, (Object[])expected, (Object[])actual);
@@ -321,7 +321,7 @@
 	 * @param expectedObjects are the expected values during the unit test.
 	 * @param actual are the actual values of the objects during the unit test.
 	 */
-	protected <T> void assertSimilars(T[] expectedObjects, T[] actual) {
+	protected static <T> void assertSimilars(T[] expectedObjects, T[] actual) {
 	    assertSimilars(null, expectedObjects, actual);
 	}
 
@@ -333,7 +333,7 @@
 	 * @param expectedObjects are the expected values during the unit test.
 	 * @param actual are the actual values of the objects during the unit test.
 	 */
-	protected <T> void assertSimilars(String message, T[] expectedObjects, T[] actual) {
+	protected static <T> void assertSimilars(String message, T[] expectedObjects, T[] actual) {
 		if (expectedObjects==actual) return;
 		if ((arrayContainsAll(expectedObjects, actual))&&(arrayContainsAll(actual, expectedObjects)))
 			return;
@@ -347,7 +347,7 @@
 	 * @param expectedObjects are the expected values during the unit test.
 	 * @param actual are the actual values of the objects during the unit test.
 	 */
-	protected <T> void assertSimilars(Collection<T> expectedObjects, Collection<T> actual) {
+	protected static <T> void assertSimilars(Collection<T> expectedObjects, Collection<T> actual) {
 	    assertSimilars(null, expectedObjects, actual);
 	}
 	
@@ -359,14 +359,14 @@
 	 * @param expectedObjects are the expected values during the unit test.
 	 * @param actual are the actual values of the objects during the unit test.
 	 */
-	protected <T> void assertSimilars(String message, Collection<T> expectedObjects, Collection<T> actual) {
+	protected static <T> void assertSimilars(String message, Collection<T> expectedObjects, Collection<T> actual) {
 		if (expectedObjects==actual) return;
 		if (similars(expectedObjects,actual)) return;
 		fail(formatFailMessage(message, expectedObjects, actual));
 	}
 	
-	private <T> boolean similars(Collection<T> c1, Collection<T> c2) {
-		ArrayList<T> a = new ArrayList<T>();
+	private static <T> boolean similars(Collection<T> c1, Collection<T> c2) {
+		ArrayList<T> a = new ArrayList<>();
 		a.addAll(c2);
 		for(T elt : c1) {
 			if (!a.remove(elt)) {
@@ -383,7 +383,7 @@
 	 * @param expectedObjects are the expected values during the unit test.
 	 * @param actual are the actual values of the objects during the unit test.
 	 */
-	protected <T> void assertEquals(List<T> expectedObjects, List<T> actual) {
+	protected static <T> void assertEquals(List<T> expectedObjects, List<T> actual) {
 	    assertEquals(null, expectedObjects, actual);
 	}
 	
@@ -395,13 +395,13 @@
 	 * @param expectedObjects are the expected values during the unit test.
 	 * @param actual are the actual values of the objects during the unit test.
 	 */
-	protected <T> void assertEquals(String message, List<T> expectedObjects, List<T> actual) {
+	protected static <T> void assertEquals(String message, List<T> expectedObjects, List<T> actual) {
 		if (expectedObjects==actual) return;
 		if (equals(expectedObjects,actual)) return;
 		fail(formatFailMessage(message, expectedObjects, actual));
 	}
 
-	private <T> boolean equals(List<T> c1, List<T> c2) {
+	private static <T> boolean equals(List<T> c1, List<T> c2) {
 		if (c1.size()!=c2.size()) return false;
 		int count = c1.size();
 		T e1, e2;
@@ -422,7 +422,7 @@
 	 * @param expectedObjects are the expected values during the unit test.
 	 * @param actual are the actual values of the objects during the unit test.
 	 */
-	protected <T> void assertNotEquals(List<T> expectedObjects, List<T> actual) {
+	protected static <T> void assertNotEquals(List<T> expectedObjects, List<T> actual) {
 	    assertNotEquals(null, expectedObjects, actual);
 	}
 	
@@ -434,7 +434,7 @@
 	 * @param expectedObjects are the expected values during the unit test.
 	 * @param actual are the actual values of the objects during the unit test.
 	 */
-	protected <T> void assertNotEquals(String message, List<T> expectedObjects, List<T> actual) {
+	protected static <T> void assertNotEquals(String message, List<T> expectedObjects, List<T> actual) {
 		if ((expectedObjects!=actual)&&(!equals(expectedObjects,actual))) return;
 		fail(formatFailMessage(message, expectedObjects, actual));
 	}
@@ -449,7 +449,7 @@
 	 * @param actual are the actual value of the object during the unit test.
 	 */
 	@SuppressWarnings("unchecked")
-	protected <T, X> void assertSimilars(String message, T expected, T actual) {
+	protected static <T, X> void assertSimilars(String message, T expected, T actual) {
 		if (expected==actual) return;
 		if (expected instanceof Collection)
 			assertSimilars(message, (Collection<?>)expected, (Collection<?>)actual);
@@ -472,7 +472,7 @@
 	 * @param expected is the expected value.
 	 * @param actual is the current value.
 	 */
-	protected <T, X> void assertNotSimilars(String message, T expected, T actual) {
+	protected static <T, X> void assertNotSimilars(String message, T expected, T actual) {
 		if (expected!=actual) {
 			try {
 				assertSimilars(message,expected, actual);
@@ -497,7 +497,7 @@
 	 * @param obj2
 	 * @return <code>true</code> if the objects are similar, otherwise <code>false</code>
 	 */
-	protected <T, X> boolean isSimilarObjects(T obj1, T obj2) {
+	protected static <T, X> boolean isSimilarObjects(T obj1, T obj2) {
 		if (obj1==obj2) return true;
 		try {
 			assertSimilars(null,obj1, obj2);
@@ -519,7 +519,7 @@
 	 * @param expectedObjects is the expected map.
 	 * @param actual is the current map.
 	 */
-	protected <K,V> void assertDeepSimilars(Map<K,V> expectedObjects, Map<K,V> actual) {
+	protected static <K,V> void assertDeepSimilars(Map<K,V> expectedObjects, Map<K,V> actual) {
 	    assertDeepSimilars(null, expectedObjects, actual);
 	}
 	
@@ -532,7 +532,7 @@
 	 * @param expectedObjects is the expected map.
 	 * @param actual is the current map.
 	 */
-	protected <K,V> void assertDeepSimilars(String message, Map<K,V> expectedObjects, Map<K,V> actual) {
+	protected static <K,V> void assertDeepSimilars(String message, Map<K,V> expectedObjects, Map<K,V> actual) {
 		if (expectedObjects==actual) return;
 		if (similars(expectedObjects.keySet(), actual.keySet())) {
 			for(Entry<K,V> entry : expectedObjects.entrySet()) {
@@ -554,7 +554,7 @@
 	 * @param expectedObjects is the expected map.
 	 * @param actual is the current map.
 	 */
-	protected <K,V> void assertNotDeepSimilars(Map<K,V> expectedObjects, Map<K,V> actual) {
+	protected static <K,V> void assertNotDeepSimilars(Map<K,V> expectedObjects, Map<K,V> actual) {
 	    assertNotDeepSimilars(null, expectedObjects, actual);
 	}
 	
@@ -567,7 +567,7 @@
 	 * @param expectedObjects is the expected map.
 	 * @param actual is the current map.
 	 */
-	protected <K,V> void assertNotDeepSimilars(String message, Map<K,V> expectedObjects, Map<K,V> actual) {
+	protected static <K,V> void assertNotDeepSimilars(String message, Map<K,V> expectedObjects, Map<K,V> actual) {
 		if (expectedObjects!=actual) {
 			if (!similars(expectedObjects.keySet(), actual.keySet())) return;
 			
@@ -584,7 +584,7 @@
 	 * 
 	 * @param number
 	 */
-	protected void assertStrictlyNegative(Number number) {
+	protected static void assertStrictlyNegative(Number number) {
 		assertStrictlyNegative(null,number);
 	}
 
@@ -593,7 +593,7 @@
 	 * @param message is the error message to put inside the assertion.
 	 * @param number
 	 */
-	protected void assertStrictlyNegative(String message, Number number) {
+	protected static void assertStrictlyNegative(String message, Number number) {
 		if (number.doubleValue()<0.) return;
 		fail(formatFailMessage(message, "expected negative value", number)); //$NON-NLS-1$
 	}
@@ -602,7 +602,7 @@
 	 * 
 	 * @param number
 	 */
-	protected void assertStrictlyPositive(Number number) {
+	protected static void assertStrictlyPositive(Number number) {
 		assertStrictlyPositive(null,number);
 	}
 
@@ -611,7 +611,7 @@
 	 * @param message is the error message to put inside the assertion.
 	 * @param number
 	 */
-	protected void assertStrictlyPositive(String message, Number number) {
+	protected static void assertStrictlyPositive(String message, Number number) {
 		if (number.doubleValue()>0.) return;
 		fail(formatFailMessage(message, "expected positive value", number)); //$NON-NLS-1$
 	}
@@ -620,7 +620,7 @@
 	 * 
 	 * @param number
 	 */
-	protected void assertNegative(Number number) {
+	protected static void assertNegative(Number number) {
 		assertNegative(null,number);
 	}
 
@@ -629,7 +629,7 @@
 	 * @param message is the error message to put inside the assertion.
 	 * @param number
 	 */
-	protected void assertNegative(String message, Number number) {
+	protected static void assertNegative(String message, Number number) {
 		if (number.doubleValue()<=0.) return;
 		fail(formatFailMessage(message, "expected negative value", number)); //$NON-NLS-1$
 	}
@@ -638,7 +638,7 @@
 	 * 
 	 * @param number
 	 */
-	protected void assertPositive(Number number) {
+	protected static void assertPositive(Number number) {
 		assertPositive(null,number);
 	}
 
@@ -647,7 +647,7 @@
 	 * @param message is the error message to put inside the assertion.
 	 * @param number
 	 */
-	protected void assertPositive(String message, Number number) {
+	protected static void assertPositive(String message, Number number) {
 		if (number.doubleValue()>=0.) return;
 		fail(formatFailMessage(message, "expected positive value", number)); //$NON-NLS-1$
 	}
@@ -661,10 +661,10 @@
 	 * @return the selected values (possible duplicated)
 	 */
 	@SuppressWarnings("unchecked")
-	protected <T> T[] extractRandomValues(T[] availableValues) {
+	protected static <T> T[] extractRandomValues(T[] availableValues) {
 		Random rnd = new Random();
 		int count = rnd.nextInt(500);
-		ArrayList<T> tab = new ArrayList<T>(count);
+		ArrayList<T> tab = new ArrayList<>(count);
 		for(int i=0; i<count; i++) {
 			tab.add(availableValues[rnd.nextInt(availableValues.length)]);
 		}
@@ -679,7 +679,7 @@
 	 * 
 	 * @return a random string.
 	 */
-	protected String randomString() {
+	protected static String randomString() {
 		return randomString(-1);
 	}
 
@@ -688,7 +688,7 @@
 	 * @param maxSize is the max length of the string.
 	 * @return a random string with a max length.
 	 */
-	protected String randomString(int maxSize) {
+	protected static String randomString(int maxSize) {
 		Random rnd = new Random();
 		StringBuilder b = new StringBuilder();
 		int count = rnd.nextInt(maxSize<=0 ? 255 : maxSize-1)+1;
@@ -706,7 +706,7 @@
 	 * @param types is the parameter types of the method
 	 * @param parameters is the parameter values to pass at invocation.
 	 */
-	protected void assertException(Object self, String method, Class<?>[] types, Object[] parameters) {
+	protected static void assertException(Object self, String method, Class<?>[] types, Object[] parameters) {
 		assertException(null, self, method, types, parameters);
 	}
 
@@ -718,7 +718,7 @@
 	 * @param types is the parameter types of the method
 	 * @param parameters is the parameter values to pass at invocation.
 	 */
-	protected void assertException(String message, Object self, String method, Class<?>[] types, Object[] parameters) {
+	protected static void assertException(String message, Object self, String method, Class<?>[] types, Object[] parameters) {
 		try {
 			Class<?> clazz = self.getClass();
 			Method methodFunc = clazz.getMethod(method, types);
@@ -735,7 +735,7 @@
 	 * @param self is the calling object
 	 * @param method is the name of the method to invoke
 	 */
-	protected void assertException(Object self, String method) {
+	protected static void assertException(Object self, String method) {
 		assertException(null, self, method, new Class<?>[0], new Object[0]);
 	}
 
@@ -745,7 +745,7 @@
 	 * @param self is the calling object
 	 * @param method is the name of the method to invoke
 	 */
-	protected void assertException(String message, Object self, String method) {
+	protected static void assertException(String message, Object self, String method) {
 		assertException(message, self, method, new Class<?>[0], new Object[0]);
 	}
 
@@ -756,7 +756,7 @@
 	 * @param expected
 	 * @param actual
 	 */
-	protected <T> void assertEpsilonEquals(Collection<? extends T> expected, Collection<? extends T> actual) {
+	protected static <T> void assertEpsilonEquals(Collection<? extends T> expected, Collection<? extends T> actual) {
 		assertEpsilonEquals(null, expected, actual);
 	}
 
@@ -768,8 +768,8 @@
 	 * @param expected
 	 * @param actual
 	 */
-	protected <T> void assertEpsilonEquals(String message, Collection<? extends T> expected, Collection<? extends T> actual) {
-		ArrayList<T> l = new ArrayList<T>(actual);
+	protected static <T> void assertEpsilonEquals(String message, Collection<? extends T> expected, Collection<? extends T> actual) {
+		ArrayList<T> l = new ArrayList<>(actual);
 		for(T e : expected) {
 			if (!l.remove(e)) {
 				fail((message==null ? "" : (message+": "))  //$NON-NLS-1$//$NON-NLS-2$
@@ -791,7 +791,7 @@
 	 * @param expected
 	 * @param actual
 	 */
-	protected <T> void assertEpsilonEquals(T[] expected, T[] actual) {
+	protected static <T> void assertEpsilonEquals(T[] expected, T[] actual) {
 		assertEpsilonEquals(null, expected, actual);
 	}
 
@@ -803,8 +803,8 @@
 	 * @param expected
 	 * @param actual
 	 */
-	protected <T> void assertEpsilonEquals(String message, T[] expected, T[] actual) {
-		ArrayList<T> l = new ArrayList<T>(Arrays.asList(actual));
+	protected static <T> void assertEpsilonEquals(String message, T[] expected, T[] actual) {
+		ArrayList<T> l = new ArrayList<>(Arrays.asList(actual));
 		for(T e : expected) {
 			if (!l.remove(e)) {
 				fail((message==null ? "" : (message+": "))  //$NON-NLS-1$//$NON-NLS-2$
@@ -826,7 +826,7 @@
 	 * @param expected
 	 * @param actual
 	 */
-	protected <T> void assertNotEpsilonEquals(T[] expected, T[] actual) {
+	protected static <T> void assertNotEpsilonEquals(T[] expected, T[] actual) {
 		assertNotEpsilonEquals(null, expected, actual);
 	}
 
@@ -838,8 +838,8 @@
 	 * @param expected
 	 * @param actual
 	 */
-	protected <T> void assertNotEpsilonEquals(String message, T[] expected, T[] actual) {
-		ArrayList<T> l = new ArrayList<T>(Arrays.asList(actual));
+	protected static <T> void assertNotEpsilonEquals(String message, T[] expected, T[] actual) {
+		ArrayList<T> l = new ArrayList<>(Arrays.asList(actual));
 		for(T e : expected) {
 			if (!l.remove(e)) return;
 		}

Modified: trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/PhantomValueHashMapTest.java
===================================================================
--- trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/PhantomValueHashMapTest.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/PhantomValueHashMapTest.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,6 +1,6 @@
 /* $Id$
  * 
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -40,7 +40,7 @@
 	 */
 	@Override
 	protected Map<String,String> createMap() {
-		return new PhantomValueHashMap<String,String>();
+		return new PhantomValueHashMap<>();
 	}
 
 }

Modified: trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/PhantomValueTreeMapTest.java
===================================================================
--- trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/PhantomValueTreeMapTest.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/PhantomValueTreeMapTest.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,6 +1,6 @@
 /* $Id$
  * 
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -40,7 +40,7 @@
 	 */
 	@Override
 	protected Map<String,String> createMap() {
-		return new PhantomValueTreeMap<String,String>();
+		return new PhantomValueTreeMap<>();
 	}
 
 }

Modified: trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/SoftValueHashMapTest.java
===================================================================
--- trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/SoftValueHashMapTest.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/SoftValueHashMapTest.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,6 +1,6 @@
 /* $Id$
  * 
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -40,7 +40,7 @@
 	 */
 	@Override
 	protected Map<String,String> createMap() {
-		return new SoftValueHashMap<String,String>();
+		return new SoftValueHashMap<>();
 	}
 
 }

Modified: trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/SoftValueTreeMapTest.java
===================================================================
--- trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/SoftValueTreeMapTest.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/SoftValueTreeMapTest.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,6 +1,6 @@
 /* $Id$
  * 
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -40,7 +40,7 @@
 	 */
 	@Override
 	protected Map<String,String> createMap() {
-		return new SoftValueTreeMap<String,String>();
+		return new SoftValueTreeMap<>();
 	}
 
 }

Modified: trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/WeakValueHashMapTest.java
===================================================================
--- trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/WeakValueHashMapTest.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/WeakValueHashMapTest.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,6 +1,6 @@
 /* $Id$
  * 
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -40,7 +40,7 @@
 	 */
 	@Override
 	protected Map<String,String> createMap() {
-		return new WeakValueHashMap<String,String>();
+		return new WeakValueHashMap<>();
 	}
 
 }

Modified: trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/WeakValueTreeMapTest.java
===================================================================
--- trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/WeakValueTreeMapTest.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/arakhneRefs/src/test/java/org/arakhne/util/ref/WeakValueTreeMapTest.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,6 +1,6 @@
 /* $Id$
  * 
- * Copyright (C) 2011 Stephane GALLAND.
+ * Copyright (C) 2011-12 Stephane GALLAND.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -40,7 +40,7 @@
 	 */
 	@Override
 	protected Map<String,String> createMap() {
-		return new WeakValueTreeMap<String,String>();
+		return new WeakValueTreeMap<>();
 	}
 
 }

Modified: trunk/maventools/pom.xml
===================================================================
--- trunk/maventools/pom.xml	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/maventools/pom.xml	2012-07-09 20:15:56 UTC (rev 344)
@@ -7,7 +7,6 @@
 		<version>4.3-SNAPSHOT</version>
 	</parent>
 
-	<groupId>org.arakhne.afc</groupId>
 	<artifactId>maventools</artifactId>
 	<version>3.3-SNAPSHOT</version>
 	<name>Tools for Maven Plugins</name>

Modified: trunk/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
===================================================================
--- trunk/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,7 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2010-11 Stephane GALLAND This library is free software; you can redistribute it and/or
+ * Copyright (C) 2010-12 Stephane GALLAND This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
@@ -194,7 +194,7 @@
 		debug(in.toString()+"->"+out.toString());  //$NON-NLS-1$
 		debug("Ignore hidden files: "+skipHiddenFiles);  //$NON-NLS-1$
 		out.mkdirs();
-		LinkedList<File> candidates = new LinkedList<File>();
+		LinkedList<File> candidates = new LinkedList<>();
 		candidates.add(in);
 		File f, targetFile;
 		File[] children;
@@ -222,7 +222,7 @@
 		}		
 	}
 	
-	private File toOutput(File root, File file, File newRoot) {
+	private static File toOutput(File root, File file, File newRoot) {
 		String filename = file.getAbsolutePath();
 		String rootPath = root.getAbsolutePath();
 		return new File(filename.replaceAll("^\\Q"+rootPath+"\\E", newRoot.getAbsolutePath()));  //$NON-NLS-1$//$NON-NLS-2$
@@ -238,7 +238,7 @@
 	public final void dirRemove(File dir) throws IOException {
 		if (dir!=null) {
 			debug("Deleting tree: "+dir.toString()); //$NON-NLS-1$
-			LinkedList<File> candidates = new LinkedList<File>();
+			LinkedList<File> candidates = new LinkedList<>();
 			candidates.add(dir);
 			File f;
 			File[] children;
@@ -285,15 +285,12 @@
 		assert (in != null);
 		assert (out != null);
 		debug("Copying file: "+in.toString()+" into "+out.toString()); //$NON-NLS-1$ //$NON-NLS-2$
-		FileChannel inChannel = new FileInputStream(in).getChannel();
-		FileChannel outChannel = new FileOutputStream(out).getChannel();
-		try {
+		try (
+				FileInputStream fis = new FileInputStream(in);
+				FileChannel inChannel = fis.getChannel();
+				FileOutputStream fos = new FileOutputStream(out);
+				FileChannel outChannel = fos.getChannel()) {
 			inChannel.transferTo(0, inChannel.size(), outChannel);
-		} finally {
-			if (inChannel != null)
-				inChannel.close();
-			if (outChannel != null)
-				outChannel.close();
 		}
 	}
 
@@ -304,20 +301,16 @@
 	 * @param out
 	 * @throws IOException
 	 */
-	public final void fileCopy(URL in, File out) throws IOException {
+	public static final void fileCopy(URL in, File out) throws IOException {
 		assert (in != null);
-		InputStream inStream = in.openStream();
-		OutputStream outStream = new FileOutputStream(out);
-		try {
+		try (
+				InputStream inStream = in.openStream();
+				OutputStream outStream = new FileOutputStream(out)) { 
 			byte[] buf = new byte[4096];
 			int len;
 			while ((len = inStream.read(buf)) > 0) {
 				outStream.write(buf, 0, len);
 			}
-		} finally {
-			if (inStream != null)
-				inStream.close();
-			outStream.close();
 		}
 	}
 
@@ -332,7 +325,7 @@
 	 *            are the parameters to replace.
 	 * @return the read text.
 	 */
-	public final String getLString(Class<?> source, String label, Object... params) {
+	public static final String getLString(Class<?> source, String label, Object... params) {
 		ResourceBundle rb = ResourceBundle.getBundle(source.getCanonicalName());
 		String text = rb.getString(label);
 		text = text.replaceAll("[\\n\\r]", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -348,7 +341,7 @@
 	 * @param file
 	 * @return the <var>file</var> without the prefix.
 	 */
-	public final String removePathPrefix(File prefix, File file) {
+	public static final String removePathPrefix(File prefix, File file) {
 		String r = file.getAbsolutePath().replaceFirst(
 				"^"+ //$NON-NLS-1$
 				Pattern.quote(prefix.getAbsolutePath()),
@@ -366,12 +359,12 @@
 	/**
 	 * Map the directory of pom.xml files to the definition of the corresponding maven module.
 	 */
-	private final Map<File, ExtendedArtifact> localArtifactDescriptions = new TreeMap<File, ExtendedArtifact>();
+	private final Map<File, ExtendedArtifact> localArtifactDescriptions = new TreeMap<>();
 
 	/**
 	 * Map the artifact id to the definition of the corresponding maven module.
 	 */
-	private final Map<String, ExtendedArtifact> remoteArtifactDescriptions = new TreeMap<String, ExtendedArtifact>();
+	private final Map<String, ExtendedArtifact> remoteArtifactDescriptions = new TreeMap<>();
 
 	/**
 	 * Manager of the SVN repository.
@@ -386,7 +379,7 @@
 	/**
 	 */
 	public AbstractArakhneMojo() {
-		List<Charset> availableCharsets = new ArrayList<Charset>();
+		List<Charset> availableCharsets = new ArrayList<>();
 
 		// New Mac OS and Linux OS
 		addCharset(availableCharsets, PREFERRED_CHARSET_UNIX);
@@ -602,7 +595,7 @@
 	 * @return the list of files.
 	 */
 	public final Collection<File> findFiles(File directory, FileFilter filter) {
-		Collection<File> files = new ArrayList<File>();
+		Collection<File> files = new ArrayList<>();
 		findFiles(directory, filter, files);
 		return files;
 	}
@@ -620,7 +613,7 @@
 	public final synchronized void findFiles(File directory, FileFilter filter, Collection<? super File> fileOut) {
 		if (directory != null && filter != null) {
 			File candidate;
-			List<File> candidates = new ArrayList<File>();
+			List<File> candidates = new ArrayList<>();
 
 			String relativePath = removePathPrefix(getBaseDirectory(), directory);
 
@@ -682,7 +675,7 @@
 			FindFileListener listener) {
 		if (directory != null && filter != null) {
 			File candidate;
-			List<File> candidates = new ArrayList<File>();
+			List<File> candidates = new ArrayList<>();
 
 			String relativePath = removePathPrefix(getBaseDirectory(), directory);
 
@@ -848,8 +841,8 @@
 			return null;
 
 		MavenXpp3Reader pomReader = new MavenXpp3Reader();
-		try {
-			Model model = pomReader.read(new FileReader(pomFile));
+		try (FileReader fr = new FileReader(pomFile)) {
+			Model model = pomReader.read(fr);
 			groupId = model.getGroupId();
 			artifactId = model.getArtifactId();
 			name = model.getName();
@@ -857,7 +850,7 @@
 			url = model.getUrl();
 			organization = model.getOrganization();
 			scm = model.getScm();
-
+			
 			developers = model.getDevelopers();
 			contributors = model.getContributors();
 			licenses = model.getLicenses();
@@ -870,23 +863,23 @@
 		}
 
 		if (developers == null) {
-			developers = new ArrayList<Developer>();
+			developers = new ArrayList<>();
 		} else {
-			List<Developer> list = new ArrayList<Developer>();
+			List<Developer> list = new ArrayList<>();
 			list.addAll(developers);
 			developers = list;
 		}
 		if (contributors == null) {
-			contributors = new ArrayList<Contributor>();
+			contributors = new ArrayList<>();
 		} else {
-			List<Contributor> list = new ArrayList<Contributor>();
+			List<Contributor> list = new ArrayList<>();
 			list.addAll(contributors);
 			contributors = list;
 		}
 		if (licenses == null) {
-			licenses = new ArrayList<License>();
+			licenses = new ArrayList<>();
 		} else {
-			List<License> list = new ArrayList<License>();
+			List<License> list = new ArrayList<>();
 			list.addAll(licenses);
 			licenses = list;
 		}
@@ -937,6 +930,15 @@
 			} catch (IOException e) {
 				getLog().warn(e);
 			}
+			
+			// Be sure that the optional fields version and groupId are correctly set.
+			if (version==null || version.isEmpty()) {
+				version = parent.getVersion();
+			}
+
+			if (groupId==null || groupId.isEmpty()) {
+				groupId = parent.getGroupId();
+			}
 		}
 
 		String scmRevision = null;
@@ -1019,7 +1021,7 @@
 	 * @param mavenArtifact
 	 * @return the aether artifact
 	 */
-	public final org.sonatype.aether.artifact.Artifact createArtifact(Artifact mavenArtifact) {
+	public static final org.sonatype.aether.artifact.Artifact createArtifact(Artifact mavenArtifact) {
 		if (mavenArtifact==null) return null;
 		return new org.sonatype.aether.util.artifact.DefaultArtifact(
 				mavenArtifact.getGroupId(),
@@ -1086,7 +1088,9 @@
 
 		ArtifactHandler handler = getArtifactHandlerManager().getArtifactHandler(type);
 
-		return new org.apache.maven.artifact.DefaultArtifact(groupId, artifactId, versionRange, desiredScope, type, null, // classifier
+		return new org.apache.maven.artifact.DefaultArtifact(
+				groupId, artifactId, versionRange, 
+				desiredScope, type, null, // classifier
 				handler, false); // optional
 	}
 
@@ -1097,7 +1101,7 @@
 	 */
 	protected abstract void checkMojoAttributes() throws MojoExecutionException;
 
-	private String getLogType(Object o) {
+	private static String getLogType(Object o) {
 		if (o instanceof Boolean || o instanceof AtomicBoolean)
 			return "B"; //$NON-NLS-1$
 		if (o instanceof Byte)
@@ -1202,19 +1206,18 @@
 		return b.toString();
 	}
 
-	private void detectEncoding(File file, CharsetDecoder decoder) throws IOException, CharacterCodingException {
+	private static void detectEncoding(File file, CharsetDecoder decoder) throws IOException, CharacterCodingException {
 		decoder.onMalformedInput(CodingErrorAction.REPORT);
 		decoder.onUnmappableCharacter(CodingErrorAction.REPORT);
-		ReadableByteChannel channel = Channels.newChannel(new FileInputStream(file));
-		Reader reader = Channels.newReader(channel, decoder, -1);
-		BufferedReader bReader = new BufferedReader(reader);
-		try {
+		try (
+				FileInputStream fis = new FileInputStream(file);
+				ReadableByteChannel channel = Channels.newChannel(fis);
+				Reader reader = Channels.newReader(channel, decoder, -1);
+				BufferedReader bReader = new BufferedReader(reader)) {
 			String line = bReader.readLine();
 			while (line != null) {
 				line = bReader.readLine();
 			}
-		} finally {
-			channel.close();
 		}
 	}
 
@@ -1228,7 +1231,7 @@
 	 * @see #setPreferredCharsets(Charset...)
 	 */
 	public final Charset detectEncoding(File file) {
-		Collection<Charset> fittingCharsets = new TreeSet<Charset>();
+		Collection<Charset> fittingCharsets = new TreeSet<>();
 		for (Charset c : Charset.availableCharsets().values()) {
 			CharsetDecoder decoder = c.newDecoder();
 			try {
@@ -1349,8 +1352,8 @@
     	
     	private final List<ArtifactRepository> remoteRepositiories;
 		private final boolean isTransitive;
-		private List<Dependency> dependencies = new ArrayList<Dependency>();
-		private Set<String> treated = new TreeSet<String>();
+		private List<Dependency> dependencies = new ArrayList<>();
+		private Set<String> treated = new TreeSet<>();
 		private MavenProject next;
 
 		/**

Modified: trunk/maventools/src/main/java/org/arakhne/maven/MultiFileFilter.java
===================================================================
--- trunk/maventools/src/main/java/org/arakhne/maven/MultiFileFilter.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/maventools/src/main/java/org/arakhne/maven/MultiFileFilter.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,7 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2011 Stephane GALLAND This library is free software; you can redistribute it and/or
+ * Copyright (C) 2011-12 Stephane GALLAND This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
@@ -35,7 +35,7 @@
  */
 public class MultiFileFilter implements FileFilter {
 
-	private final Collection<FileFilter> filters = new ArrayList<FileFilter>();
+	private final Collection<FileFilter> filters = new ArrayList<>();
 	
 	/**
 	 */

Modified: trunk/tag-replacer/pom.xml
===================================================================
--- trunk/tag-replacer/pom.xml	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/tag-replacer/pom.xml	2012-07-09 20:15:56 UTC (rev 344)
@@ -9,7 +9,6 @@
 		<version>4.3-SNAPSHOT</version>
 	</parent>
 
-	<groupId>org.arakhne.afc</groupId>
 	<artifactId>tag-replacer</artifactId>
 	<version>2.3-SNAPSHOT</version>
 	<packaging>maven-plugin</packaging>

Modified: trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/AbstractReplaceMojo.java
===================================================================
--- trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/AbstractReplaceMojo.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/AbstractReplaceMojo.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,7 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2010-11 Stephane GALLAND
+ * Copyright (C) 2010-12 Stephane GALLAND
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -326,31 +326,33 @@
 					+ inputFile.getName() + "' with '" //$NON-NLS-1$
 					+ charset.displayName() + "' encoding"); //$NON-NLS-1$
 
-			ReadableByteChannel channel = Channels.newChannel(new FileInputStream(inputFile));
-			r = Channels.newReader(channel, charset.newDecoder(), -1);
+			try (
+					FileInputStream fis = new FileInputStream(inputFile);
+					ReadableByteChannel channel = Channels.newChannel(fis)) {
+				r = Channels.newReader(channel, charset.newDecoder(), -1);
 
-			if (r == null) {
-				r = new FileReader(inputFile);
-			}
+				if (r == null) {
+					r = new FileReader(inputFile);
+				}
 
-			BufferedReader br = new BufferedReader(r);
-
-			WritableByteChannel wChannel = Channels.newChannel(new FileOutputStream(outputFile));
-			Writer w = Channels.newWriter(wChannel, charset.newEncoder(), -1);
-
-			String line;
-			int nLine = 1;
-
-			while ((line = br.readLine()) != null) {
-				line = replaceInString(inputFile, nLine, shortFilename, artifact, line, replacementType);
-				w.write(line);
-				w.write("\n"); //$NON-NLS-1$
-				++nLine;
+				try (
+						BufferedReader br = new BufferedReader(r);
+						FileOutputStream fos = new FileOutputStream(outputFile);
+						WritableByteChannel wChannel = Channels.newChannel(fos);
+						Writer w = Channels.newWriter(wChannel, charset.newEncoder(), -1)) {
+					String line;
+					int nLine = 1;
+		
+					while ((line = br.readLine()) != null) {
+						line = replaceInString(inputFile, nLine, shortFilename, artifact, line, replacementType);
+						w.write(line);
+						w.write("\n"); //$NON-NLS-1$
+						++nLine;
+					}
+					w.flush();
+				}
 			}
-			w.flush();
-			br.close();
-			w.close();
-
+			
 			if (sourceFile == null) {
 				fileCopy(outputFile, targetFile);
 				outputFile.delete();
@@ -363,7 +365,7 @@
 		}
 	}
 
-	private Pattern buildMacroPattern(String macroName) {
+	private static Pattern buildMacroPattern(String macroName) {
 		StringBuilder b = new StringBuilder();
 		b.append(Pattern.quote("$")); //$NON-NLS-1$
 		b.append(macroName);
@@ -374,7 +376,7 @@
 		return Pattern.compile(b.toString(), Pattern.CASE_INSENSITIVE);
 	}
 
-	private Pattern buildMacroPatternWithGroup(String macroName) {
+	private static Pattern buildMacroPatternWithGroup(String macroName) {
 		StringBuilder b = new StringBuilder();
 		b.append(Pattern.quote("$")); //$NON-NLS-1$
 		b.append(macroName);

Modified: trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/GenerateSourceMojo.java
===================================================================
--- trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/GenerateSourceMojo.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/GenerateSourceMojo.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,7 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2011 Stephane GALLAND This library is free software; you can redistribute it and/or
+ * Copyright (C) 2011-12 Stephane GALLAND This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
@@ -93,7 +93,7 @@
 
 		clearInternalBuffers();
 
-		Map<File,File> htmlBasedFiles = new TreeMap<File,File>();
+		Map<File,File> htmlBasedFiles = new TreeMap<>();
 		
 		for(File sourceDir : sourceDirs) {
     		if ( sourceDir.isDirectory() ) {

Modified: trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/ReplaceHtmlMojo.java
===================================================================
--- trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/ReplaceHtmlMojo.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/ReplaceHtmlMojo.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,7 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2011 Stephane GALLAND This library is free software; you can redistribute it and/or
+ * Copyright (C) 2011-12 Stephane GALLAND This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
@@ -67,7 +67,7 @@
 		
 		clearInternalBuffers();
 
-		Collection<File> textBasedFiles = new ArrayList<File>();
+		Collection<File> textBasedFiles = new ArrayList<>();
 		
 		for(File htmlDir : htmlDirs) {
     		if ( htmlDir.isDirectory() ) {

Modified: trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/ReplaceResourceMojo.java
===================================================================
--- trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/ReplaceResourceMojo.java	2012-07-09 20:15:00 UTC (rev 343)
+++ trunk/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/ReplaceResourceMojo.java	2012-07-09 20:15:56 UTC (rev 344)
@@ -1,7 +1,7 @@
 /* 
  * $Id$
  * 
- * Copyright (C) 2011 Stephane GALLAND This library is free software; you can redistribute it and/or
+ * Copyright (C) 2011-12 Stephane GALLAND This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
@@ -66,7 +66,7 @@
 		
 		clearInternalBuffers();
 
-		Collection<File> textBasedFiles = new ArrayList<File>();
+		Collection<File> textBasedFiles = new ArrayList<>();
 		
 		for(File sourceDir : sourceDirs) {
     		if ( sourceDir.isDirectory() ) {


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/