From 1a12a44cb1c0bb6258e00573100984da3c0fad16 Mon Sep 17 00:00:00 2001 From: eugenp Date: Wed, 25 Dec 2013 14:14:22 +0200 Subject: [PATCH] initial java 8 sample --- core-java-8/.classpath | 2 +- core-java-8/.settings/org.eclipse.jdt.core.prefs | 7 ++++--- core-java-8/src/main/java/.gitignore | 13 +++++++++++++ .../java/org/baeldung/java/CoreJava8UnitTest.java | 15 +++++++++++++++ 4 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 core-java-8/src/main/java/.gitignore create mode 100644 core-java-8/src/test/java/org/baeldung/java/CoreJava8UnitTest.java diff --git a/core-java-8/.classpath b/core-java-8/.classpath index 0720e4851b..5efa587d72 100644 --- a/core-java-8/.classpath +++ b/core-java-8/.classpath @@ -27,7 +27,7 @@ - + diff --git a/core-java-8/.settings/org.eclipse.jdt.core.prefs b/core-java-8/.settings/org.eclipse.jdt.core.prefs index 723e5b1245..c57289fc09 100644 --- a/core-java-8/.settings/org.eclipse.jdt.core.prefs +++ b/core-java-8/.settings/org.eclipse.jdt.core.prefs @@ -5,9 +5,10 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -92,4 +93,4 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/core-java-8/src/main/java/.gitignore b/core-java-8/src/main/java/.gitignore new file mode 100644 index 0000000000..83c05e60c8 --- /dev/null +++ b/core-java-8/src/main/java/.gitignore @@ -0,0 +1,13 @@ +*.class + +#folders# +/target +/neoDb* +/data +/src/main/webapp/WEB-INF/classes +*/META-INF/* + +# Packaged files # +*.jar +*.war +*.ear \ No newline at end of file diff --git a/core-java-8/src/test/java/org/baeldung/java/CoreJava8UnitTest.java b/core-java-8/src/test/java/org/baeldung/java/CoreJava8UnitTest.java new file mode 100644 index 0000000000..9e7c00b4eb --- /dev/null +++ b/core-java-8/src/test/java/org/baeldung/java/CoreJava8UnitTest.java @@ -0,0 +1,15 @@ +package org.baeldung.java; + +import org.junit.Test; + +public class CoreJava8UnitTest { + + // tests - + + @Test + public final void when_thenCorrect() { + final Runnable r2 = () -> System.out.println("Hello world two!"); + r2.run(); + } + +}