Migrated to Java 8. Upgraded library jar files.

This commit is contained in:
Christian P. MOMON 2018-05-31 10:30:49 +02:00
parent 92d5c02692
commit 643e6e84de
31 changed files with 26 additions and 25 deletions

View file

@ -3,16 +3,14 @@
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/> <classpathentry kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="lib" path="lib/commons-lang3-3.1.jar" sourcepath="lib/commons-lang3-3.1-sources.jar"/>
<classpathentry kind="lib" path="lib/joda-time-2.3.jar"/>
<classpathentry kind="lib" path="lib/Logs/log4j-1.2.17.jar" sourcepath="lib/Logs/log4j-1.2.17-source.zip"/> <classpathentry kind="lib" path="lib/Logs/log4j-1.2.17.jar" sourcepath="lib/Logs/log4j-1.2.17-source.zip"/>
<classpathentry kind="lib" path="lib/Logs/slf4j-api-1.7.5.jar" sourcepath="lib/Logs/slf4j-api-1.7.5-sources.jar"/>
<classpathentry kind="lib" path="lib/Logs/slf4j-log4j12-1.7.5.jar" sourcepath="lib/Logs/slf4j-log4j12-1.7.5-sources.jar"/>
<classpathentry kind="lib" path="lib/UnitTesting/hamcrest-core-1.3.jar" sourcepath="lib/UnitTesting/hamcrest-core-1.3-sources.jar"/> <classpathentry kind="lib" path="lib/UnitTesting/hamcrest-core-1.3.jar" sourcepath="lib/UnitTesting/hamcrest-core-1.3-sources.jar"/>
<classpathentry kind="lib" path="lib/UnitTesting/junit-4.11.jar" sourcepath="lib/UnitTesting/junit-4.11-sources.jar"/> <classpathentry kind="lib" path="lib/Logs/slf4j-api-1.7.25.jar" sourcepath="lib/Logs/slf4j-api-1.7.25-sources.jar"/>
<classpathentry kind="lib" path="lib/devinsy-xml-0.4.1.jar" sourcepath="lib/devinsy-xml-0.4.1-sources.zip"/> <classpathentry kind="lib" path="lib/Logs/slf4j-log4j12-1.7.25.jar" sourcepath="lib/Logs/slf4j-log4j12-1.7.25-sources.jar"/>
<classpathentry kind="lib" path="lib/devinsy-strings-0.4.1.jar" sourcepath="lib/devinsy-strings-0.4.1-sources.zip"/> <classpathentry kind="lib" path="lib/UnitTesting/junit-4.12.jar" sourcepath="lib/UnitTesting/junit-4.12-sources.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"> <classpathentry kind="lib" path="lib/devinsy-xml-0.8.0.jar" sourcepath="lib/devinsy-xml-0.8.0-sources.zip"/>
<classpathentry kind="lib" path="lib/devinsy-strings-0.8.1.jar" sourcepath="lib/devinsy-strings-0.8.1-sources.zip"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes> <attributes>
<attribute name="owner.project.facets" value="java"/> <attribute name="owner.project.facets" value="java"/>
</attributes> </attributes>

View file

@ -10,15 +10,15 @@ org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6 org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0

View file

@ -3,5 +3,5 @@
<fixed facet="jst.java"/> <fixed facet="jst.java"/>
<fixed facet="jst.utility"/> <fixed facet="jst.utility"/>
<installed facet="jst.utility" version="1.0"/> <installed facet="jst.utility" version="1.0"/>
<installed facet="jst.java" version="6.0"/> <installed facet="jst.java" version="1.8"/>
</faceted-project> </faceted-project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
lib/devinsy-xml-0.8.0.jar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -22,7 +22,7 @@ import java.util.HashMap;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import fr.devinsy.util.strings.StringList; import fr.devinsy.strings.StringList;
/** /**
* The Class RSSCache. * The Class RSSCache.

View file

@ -18,7 +18,8 @@
*/ */
package fr.devinsy.util.rss; package fr.devinsy.util.rss;
import org.joda.time.DateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
/** /**
* The Class RSSElement. * The Class RSSElement.
@ -41,7 +42,7 @@ public class RSSElement
* @param value * @param value
* the value * the value
*/ */
public RSSElement(final String name, final DateTime value) public RSSElement(final String name, final LocalDateTime value)
{ {
setName(name); setName(name);
if (value == null) if (value == null)
@ -50,7 +51,8 @@ public class RSSElement
} }
else else
{ {
this.value = value.toString(DATE_PATTERN);
this.value = value.format(DateTimeFormatter.ofPattern(DATE_PATTERN));
} }
this.attributes = null; this.attributes = null;
} }

View file

@ -25,7 +25,7 @@ import java.io.OutputStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.io.Writer; import java.io.Writer;
import fr.devinsy.util.xml.XMLWriter; import fr.devinsy.xml.XMLWriter;
/** /**
* The Class RSSWriter. * The Class RSSWriter.

View file

@ -19,6 +19,7 @@
package fr.devinsy.util.rss.demo; package fr.devinsy.util.rss.demo;
import java.io.IOException; import java.io.IOException;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -27,13 +28,12 @@ import javax.xml.stream.XMLStreamException;
import org.apache.log4j.BasicConfigurator; import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level; import org.apache.log4j.Level;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.joda.time.DateTime;
import fr.devinsy.strings.StringListWriter;
import fr.devinsy.util.rss.RSSElement; import fr.devinsy.util.rss.RSSElement;
import fr.devinsy.util.rss.RSSWriter; import fr.devinsy.util.rss.RSSWriter;
import fr.devinsy.util.strings.StringListWriter; import fr.devinsy.xml.XMLBadFormatException;
import fr.devinsy.util.xml.XMLBadFormatException; import fr.devinsy.xml.XMLTools;
import fr.devinsy.util.xml.XMLTools;
/** /**
* The Class RssDemo. * The Class RssDemo.
@ -64,9 +64,10 @@ public class RSSDemo
// //
List<RSSElement> elements = new ArrayList<RSSElement>(); List<RSSElement> elements = new ArrayList<RSSElement>();
elements.add(new RSSElement("pubDate", DateTime.now())); LocalDateTime now = LocalDateTime.now();
elements.add(new RSSElement("lastBuildDate", DateTime.now())); elements.add(new RSSElement("pubDate", now));
elements.add(new RSSElement("generator", "Generated by Kiwa")); elements.add(new RSSElement("lastBuildDate", now));
elements.add(new RSSElement("generator", "Generated by Foo"));
// //
out.writeChannel("my FEED_TITLE", "https://www.devinsy.fr/rss/news-en.rss", "my FEED_DESCRIPTION", elements.toArray(new RSSElement[0])); out.writeChannel("my FEED_TITLE", "https://www.devinsy.fr/rss/news-en.rss", "my FEED_DESCRIPTION", elements.toArray(new RSSElement[0]));
@ -74,7 +75,7 @@ public class RSSDemo
// //
elements.clear(); elements.clear();
elements.add(new RSSElement("guid", "devinsy-news-000001", "isPermaLink", "false")); elements.add(new RSSElement("guid", "devinsy-news-000001", "isPermaLink", "false"));
elements.add(new RSSElement("pubDate", DateTime.now())); elements.add(new RSSElement("pubDate", now));
elements.add(new RSSElement("author", "Christian P. MOMON <christian.momon@devinsy.fr>")); elements.add(new RSSElement("author", "Christian P. MOMON <christian.momon@devinsy.fr>"));
elements.add(new RSSElement("category", "Announce")); elements.add(new RSSElement("category", "Announce"));