Skip to content

Commit 9543f1f

Browse files
author
eugenp
committed
lambda example
1 parent 1a12a44 commit 9543f1f

File tree

6 files changed

+236
-206
lines changed

6 files changed

+236
-206
lines changed

core-java-8/.settings/org.eclipse.jdt.ui.prefs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#Sat Jan 21 23:04:06 EET 2012
21
eclipse.preferences.version=1
32
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
43
sp_cleanup.add_default_serial_version_id=true
@@ -14,6 +13,7 @@ sp_cleanup.always_use_blocks=true
1413
sp_cleanup.always_use_parentheses_in_expressions=true
1514
sp_cleanup.always_use_this_for_non_static_field_access=false
1615
sp_cleanup.always_use_this_for_non_static_method_access=false
16+
sp_cleanup.convert_functional_interfaces=false
1717
sp_cleanup.convert_to_enhanced_for_loop=true
1818
sp_cleanup.correct_indentation=true
1919
sp_cleanup.format_source_code=true
@@ -46,8 +46,10 @@ sp_cleanup.remove_unused_private_methods=true
4646
sp_cleanup.remove_unused_private_types=true
4747
sp_cleanup.sort_members=false
4848
sp_cleanup.sort_members_all=false
49-
sp_cleanup.use_blocks=false
49+
sp_cleanup.use_anonymous_class_creation=false
50+
sp_cleanup.use_blocks=true
5051
sp_cleanup.use_blocks_only_for_return_and_throw=false
52+
sp_cleanup.use_lambda=false
5153
sp_cleanup.use_parentheses_in_expressions=false
5254
sp_cleanup.use_this_for_non_static_field_access=true
5355
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true

core-java-8/pom.xml

Lines changed: 144 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,146 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2-
<modelVersion>4.0.0</modelVersion>
3-
<groupId>org.baeldung</groupId>
4-
<artifactId>spring-rest</artifactId>
5-
<version>0.1-SNAPSHOT</version>
6-
7-
<name>spring-rest</name>
8-
9-
<dependencies>
10-
11-
<!-- utils -->
12-
13-
<dependency>
14-
<groupId>com.google.guava</groupId>
15-
<artifactId>guava</artifactId>
16-
<version>15.0</version>
17-
</dependency>
18-
19-
<dependency>
20-
<groupId>org.apache.commons</groupId>
21-
<artifactId>commons-collections4</artifactId>
22-
<version>4.0</version>
23-
</dependency>
24-
25-
<!-- web -->
26-
27-
<!-- marshalling -->
28-
29-
<dependency>
30-
<groupId>com.fasterxml.jackson.core</groupId>
31-
<artifactId>jackson-databind</artifactId>
32-
<version>${jackson.version}</version>
33-
</dependency>
34-
35-
<!-- test scoped -->
36-
37-
<dependency>
38-
<groupId>junit</groupId>
39-
<artifactId>junit-dep</artifactId>
40-
<version>${junit.version}</version>
41-
<scope>test</scope>
42-
</dependency>
43-
44-
<dependency>
45-
<groupId>org.hamcrest</groupId>
46-
<artifactId>hamcrest-core</artifactId>
47-
<version>${org.hamcrest.version}</version>
48-
<scope>test</scope>
49-
</dependency>
50-
<dependency>
51-
<groupId>org.hamcrest</groupId>
52-
<artifactId>hamcrest-library</artifactId>
53-
<version>${org.hamcrest.version}</version>
54-
<scope>test</scope>
55-
</dependency>
56-
57-
<dependency>
58-
<groupId>org.mockito</groupId>
59-
<artifactId>mockito-core</artifactId>
60-
<version>${mockito.version}</version>
61-
<scope>test</scope>
62-
</dependency>
63-
64-
</dependencies>
65-
66-
<build>
67-
<finalName>core-java-8</finalName>
68-
<resources>
69-
<resource>
70-
<directory>src/main/resources</directory>
71-
<filtering>true</filtering>
72-
</resource>
73-
</resources>
74-
75-
<plugins>
76-
77-
<plugin>
78-
<groupId>org.apache.maven.plugins</groupId>
79-
<artifactId>maven-compiler-plugin</artifactId>
80-
<version>${maven-compiler-plugin.version}</version>
81-
<configuration>
82-
<source>1.7</source>
83-
<target>1.7</target>
84-
</configuration>
85-
</plugin>
86-
87-
<plugin>
88-
<groupId>org.apache.maven.plugins</groupId>
89-
<artifactId>maven-surefire-plugin</artifactId>
90-
<version>${maven-surefire-plugin.version}</version>
91-
</plugin>
92-
93-
</plugins>
94-
95-
</build>
96-
97-
<properties>
98-
<!-- Spring -->
99-
<org.springframework.version>4.0.0.RELEASE</org.springframework.version>
100-
<org.springframework.security.version>3.2.0.RELEASE</org.springframework.security.version>
101-
102-
<!-- persistence -->
103-
<hibernate.version>4.3.0.Final</hibernate.version>
104-
<mysql-connector-java.version>5.1.27</mysql-connector-java.version>
105-
106-
<!-- marshalling -->
107-
<jackson.version>2.3.0</jackson.version>
108-
109-
<!-- logging -->
110-
<org.slf4j.version>1.7.5</org.slf4j.version>
111-
<logback.version>1.0.11</logback.version>
112-
113-
<!-- various -->
114-
<hibernate-validator.version>5.0.1.Final</hibernate-validator.version>
115-
116-
<!-- util -->
117-
<guava.version>15.0</guava.version>
118-
<commons-lang3.version>3.1</commons-lang3.version>
119-
120-
<!-- testing -->
121-
<org.hamcrest.version>1.3</org.hamcrest.version>
122-
<junit.version>4.11</junit.version>
123-
<mockito.version>1.9.5</mockito.version>
124-
125-
<httpcore.version>4.3</httpcore.version>
126-
<httpclient.version>4.3.1</httpclient.version>
127-
128-
<rest-assured.version>2.1.0</rest-assured.version>
129-
130-
<!-- maven plugins -->
131-
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
132-
<maven-war-plugin.version>2.4</maven-war-plugin.version>
133-
<maven-surefire-plugin.version>2.16</maven-surefire-plugin.version>
134-
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
135-
<cargo-maven2-plugin.version>1.4.5</cargo-maven2-plugin.version>
136-
137-
</properties>
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>org.baeldung</groupId>
5+
<artifactId>spring-rest</artifactId>
6+
<version>0.1-SNAPSHOT</version>
7+
8+
<name>spring-rest</name>
9+
10+
<dependencies>
11+
12+
<!-- utils -->
13+
14+
<dependency>
15+
<groupId>com.google.guava</groupId>
16+
<artifactId>guava</artifactId>
17+
<version>16.0-rc1</version>
18+
</dependency>
19+
20+
<dependency>
21+
<groupId>org.apache.commons</groupId>
22+
<artifactId>commons-collections4</artifactId>
23+
<version>4.0</version>
24+
</dependency>
25+
26+
<dependency>
27+
<groupId>org.apache.commons</groupId>
28+
<artifactId>commons-lang3</artifactId>
29+
<version>3.1</version>
30+
</dependency>
31+
32+
<!-- web -->
33+
34+
<!-- marshalling -->
35+
36+
<dependency>
37+
<groupId>com.fasterxml.jackson.core</groupId>
38+
<artifactId>jackson-databind</artifactId>
39+
<version>${jackson.version}</version>
40+
</dependency>
41+
42+
<!-- test scoped -->
43+
44+
<dependency>
45+
<groupId>junit</groupId>
46+
<artifactId>junit-dep</artifactId>
47+
<version>${junit.version}</version>
48+
<scope>test</scope>
49+
</dependency>
50+
51+
<dependency>
52+
<groupId>org.hamcrest</groupId>
53+
<artifactId>hamcrest-core</artifactId>
54+
<version>${org.hamcrest.version}</version>
55+
<scope>test</scope>
56+
</dependency>
57+
<dependency>
58+
<groupId>org.hamcrest</groupId>
59+
<artifactId>hamcrest-library</artifactId>
60+
<version>${org.hamcrest.version}</version>
61+
<scope>test</scope>
62+
</dependency>
63+
64+
<dependency>
65+
<groupId>org.mockito</groupId>
66+
<artifactId>mockito-core</artifactId>
67+
<version>${mockito.version}</version>
68+
<scope>test</scope>
69+
</dependency>
70+
71+
</dependencies>
72+
73+
<build>
74+
<finalName>core-java-8</finalName>
75+
<resources>
76+
<resource>
77+
<directory>src/main/resources</directory>
78+
<filtering>true</filtering>
79+
</resource>
80+
</resources>
81+
82+
<plugins>
83+
84+
<plugin>
85+
<groupId>org.apache.maven.plugins</groupId>
86+
<artifactId>maven-compiler-plugin</artifactId>
87+
<version>${maven-compiler-plugin.version}</version>
88+
<configuration>
89+
<source>1.7</source>
90+
<target>1.7</target>
91+
</configuration>
92+
</plugin>
93+
94+
<plugin>
95+
<groupId>org.apache.maven.plugins</groupId>
96+
<artifactId>maven-surefire-plugin</artifactId>
97+
<version>${maven-surefire-plugin.version}</version>
98+
</plugin>
99+
100+
</plugins>
101+
102+
</build>
103+
104+
<properties>
105+
<!-- Spring -->
106+
<org.springframework.version>4.0.0.RELEASE</org.springframework.version>
107+
<org.springframework.security.version>3.2.0.RELEASE</org.springframework.security.version>
108+
109+
<!-- persistence -->
110+
<hibernate.version>4.3.0.Final</hibernate.version>
111+
<mysql-connector-java.version>5.1.27</mysql-connector-java.version>
112+
113+
<!-- marshalling -->
114+
<jackson.version>2.3.0</jackson.version>
115+
116+
<!-- logging -->
117+
<org.slf4j.version>1.7.5</org.slf4j.version>
118+
<logback.version>1.0.11</logback.version>
119+
120+
<!-- various -->
121+
<hibernate-validator.version>5.0.1.Final</hibernate-validator.version>
122+
123+
<!-- util -->
124+
<guava.version>15.0</guava.version>
125+
<commons-lang3.version>3.1</commons-lang3.version>
126+
127+
<!-- testing -->
128+
<org.hamcrest.version>1.3</org.hamcrest.version>
129+
<junit.version>4.11</junit.version>
130+
<mockito.version>1.9.5</mockito.version>
131+
132+
<httpcore.version>4.3</httpcore.version>
133+
<httpclient.version>4.3.1</httpclient.version>
134+
135+
<rest-assured.version>2.1.0</rest-assured.version>
136+
137+
<!-- maven plugins -->
138+
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
139+
<maven-war-plugin.version>2.4</maven-war-plugin.version>
140+
<maven-surefire-plugin.version>2.16</maven-surefire-plugin.version>
141+
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
142+
<cargo-maven2-plugin.version>1.4.5</cargo-maven2-plugin.version>
143+
144+
</properties>
138145

139146
</project>

core-java-8/src/test/java/org/baeldung/java/CoreJava8UnitTest.java

Lines changed: 0 additions & 15 deletions
This file was deleted.

core-java-8/src/test/java/org/baeldung/java/CoreJavaUnitTest.java

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)