diff --git a/apache-fop/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/apache-fop/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
deleted file mode 100644
index 627021fb96..0000000000
--- a/apache-fop/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/core-java/src/test/java/org/baeldung/java/arrays/ArraysJoinAndSplitJUnitTest.java b/core-java/src/test/java/org/baeldung/java/arrays/ArraysJoinAndSplitJUnitTest.java
new file mode 100644
index 0000000000..ad1f2dc70c
--- /dev/null
+++ b/core-java/src/test/java/org/baeldung/java/arrays/ArraysJoinAndSplitJUnitTest.java
@@ -0,0 +1,44 @@
+package org.baeldung.java.arrays;
+
+import java.util.Arrays;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ArraysJoinAndSplitJUnitTest {
+
+ private final String[] sauces = {"Marinara", "Olive Oil"};
+ private final String[] cheeses = {"Mozzarella", "Feta", "Parmesan"};
+ private final String[] vegetables = {"Olives", "Spinach", "Green Peppers"};
+
+ private final String[] customers = {"Jay", "Harry", "Ronnie", "Gary", "Ross"};
+
+ @Test
+ public void givenThreeStringArrays_whenJoiningIntoOneStringArray_shouldSucceed() {
+ String[] toppings = new String[sauces.length + cheeses.length + vegetables.length];
+
+ System.arraycopy(sauces, 0, toppings, 0, sauces.length);
+ int AddedSoFar = sauces.length;
+
+ System.arraycopy(cheeses, 0, toppings, AddedSoFar, cheeses.length);
+ AddedSoFar += cheeses.length;
+
+ System.arraycopy(vegetables, 0, toppings, AddedSoFar, vegetables.length);
+
+ Assert.assertArrayEquals(toppings,
+ new String[]{"Marinara", "Olive Oil", "Mozzarella", "Feta",
+ "Parmesan", "Olives", "Spinach", "Green Peppers"});
+ }
+
+
+ @Test
+ public void givenOneStringArray_whenSplittingInHalfTwoStringArrays_shouldSucceed() {
+ int ordersHalved = (customers.length / 2) + (customers.length % 2);
+
+ String[] driverOne = Arrays.copyOf(customers, ordersHalved);
+ String[] driverTwo = Arrays.copyOfRange(customers, ordersHalved, customers.length);
+
+ Assert.assertArrayEquals(driverOne, new String[]{"Jay", "Harry", "Ronnie"});
+ Assert.assertArrayEquals(driverTwo, new String[]{"Gary", "Ross"});
+ }
+}
diff --git a/core-java/src/test/java/org/baeldung/java/collections/CollectionsJoinAndSplitJUnitTest.java b/core-java/src/test/java/org/baeldung/java/collections/CollectionsJoinAndSplitJUnitTest.java
new file mode 100644
index 0000000000..c288cf499d
--- /dev/null
+++ b/core-java/src/test/java/org/baeldung/java/collections/CollectionsJoinAndSplitJUnitTest.java
@@ -0,0 +1,62 @@
+package org.baeldung.java.collections;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class CollectionsJoinAndSplitJUnitTest {
+
+ private ArrayList sauces = new ArrayList<>();
+ private ArrayList cheeses = new ArrayList<>();
+ private ArrayList vegetables = new ArrayList<>();
+
+ private ArrayList> ingredients = new ArrayList<>();
+
+ @Before
+ public void init() {
+ sauces.add("Olive Oil");
+ sauces.add("Marinara");
+
+ cheeses.add("Mozzarella");
+ cheeses.add("Feta");
+ cheeses.add("Parmesan");
+
+ vegetables.add("Olives");
+ vegetables.add("Spinach");
+ vegetables.add("Green Peppers");
+
+ ingredients.add(sauces);
+ ingredients.add(cheeses);
+ ingredients.add(vegetables);
+ }
+
+ @Test
+ public void givenThreeArrayLists_whenJoiningIntoOneArrayList_shouldSucceed() {
+ ArrayList> toppings = new ArrayList<>();
+
+ toppings.add(sauces);
+ toppings.add(cheeses);
+ toppings.add(vegetables);
+
+ Assert.assertTrue(toppings.size() == 3);
+ Assert.assertTrue(toppings.contains(sauces));
+ Assert.assertTrue(toppings.contains(cheeses));
+ Assert.assertTrue(toppings.contains(vegetables));
+ }
+
+ @Test
+ public void givenOneArrayList_whenSplittingIntoTwoArrayLists_shouldSucceed() {
+
+ ArrayList> removedToppings = new ArrayList<>();
+ removedToppings.add(ingredients.remove(ingredients.indexOf(vegetables)));
+
+ Assert.assertTrue(removedToppings.contains(vegetables));
+ Assert.assertTrue(removedToppings.size() == 1);
+ Assert.assertTrue(ingredients.size() == 2);
+ Assert.assertTrue(ingredients.contains(sauces));
+ Assert.assertTrue(ingredients.contains(cheeses));
+ }
+}
diff --git a/dozer-tutorial/pom.xml b/dozer-tutorial/pom.xml
deleted file mode 100644
index 9447a3ff54..0000000000
--- a/dozer-tutorial/pom.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
- 4.0.0
- com.baeldung
- dozer-tutorial
- 1.0
- Dozer
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.3
-
-
- 7
-
-
-
-
-
-
- org.slf4j
- slf4j-api
- 1.7.5
-
-
-
- org.slf4j
- jcl-over-slf4j
- 1.7.5
-
-
-
- org.apache.commons
- commons-lang3
- 3.2.1
-
-
-
- commons-beanutils
- commons-beanutils
- 1.9.1
-
-
-
- net.sf.dozer
- dozer
- 5.5.1
-
-
- junit
- junit
- 4.3
- test
-
-
-
-
diff --git a/dozer-tutorial/src/main/java/com/baeldung/dozer/Dest.java b/dozer-tutorial/src/main/java/com/baeldung/dozer/Dest.java
deleted file mode 100644
index 26ba7e3ac4..0000000000
--- a/dozer-tutorial/src/main/java/com/baeldung/dozer/Dest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.baeldung.dozer;
-
-public class Dest {
- private String name;
- private int age;
-
- public Dest() {
-
- }
-
- public Dest(String name, int age) {
- super();
- this.name = name;
- this.age = age;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public int getAge() {
- return age;
- }
-
- public void setAge(int age) {
- this.age = age;
- }
-
-}
diff --git a/dozer-tutorial/src/main/java/com/baeldung/dozer/Dest2.java b/dozer-tutorial/src/main/java/com/baeldung/dozer/Dest2.java
deleted file mode 100644
index aa969b38d6..0000000000
--- a/dozer-tutorial/src/main/java/com/baeldung/dozer/Dest2.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.baeldung.dozer;
-
-public class Dest2 {
- private int id;
- private int points;
-
- public Dest2() {
-
- }
-
- public Dest2(int id, int points) {
- super();
- this.id = id;
- this.points = points;
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public int getPoints() {
- return points;
- }
-
- public void setPoints(int points) {
- this.points = points;
- }
-
- @Override
- public String toString() {
- return "Dest2 [id=" + id + ", points=" + points + "]";
- }
-
-}
diff --git a/dozer-tutorial/src/main/java/com/baeldung/dozer/MyCustomConvertor.java b/dozer-tutorial/src/main/java/com/baeldung/dozer/MyCustomConvertor.java
deleted file mode 100644
index ae0ed0ba87..0000000000
--- a/dozer-tutorial/src/main/java/com/baeldung/dozer/MyCustomConvertor.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.baeldung.dozer;
-
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.dozer.CustomConverter;
-import org.dozer.MappingException;
-
-public class MyCustomConvertor implements CustomConverter {
-
- @Override
- public Object convert(Object dest, Object source, Class> arg2,
- Class> arg3) {
- if (source == null) {
- return null;
- }
- if (source instanceof Personne3) {
- Personne3 person = (Personne3) source;
- Date date = new Date(person.getDtob());
- DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
- String isoDate = format.format(date);
- return new Person3(person.getName(), isoDate);
-
- } else if (source instanceof Person3) {
- Person3 person = (Person3) source;
- DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
- Date date = null;
- try {
- date = format.parse(person.getDtob());
-
- } catch (ParseException e) {
- throw new MappingException("Converter MyCustomConvertor "
- + "used incorrectly:" + e.getMessage());
- }
- long timestamp = date.getTime();
- return new Personne3(person.getName(), timestamp);
-
- } else {
- throw new MappingException("Converter MyCustomConvertor "
- + "used incorrectly. Arguments passed in were:" + dest
- + " and " + source);
-
- }
- }
-
-}
diff --git a/dozer-tutorial/src/main/java/com/baeldung/dozer/Person.java b/dozer-tutorial/src/main/java/com/baeldung/dozer/Person.java
deleted file mode 100644
index 7367541951..0000000000
--- a/dozer-tutorial/src/main/java/com/baeldung/dozer/Person.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.baeldung.dozer;
-
-public class Person {
- private String name;
- private String nickname;
- private int age;
-
- public Person() {
-
- }
-
- public Person(String name, String nickname, int age) {
- super();
- this.name = name;
- this.nickname = nickname;
- this.age = age;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getNickname() {
- return nickname;
- }
-
- public void setNickname(String nickname) {
- this.nickname = nickname;
- }
-
- public int getAge() {
- return age;
- }
-
- public void setAge(int age) {
- this.age = age;
- }
-
-}
diff --git a/dozer-tutorial/src/main/java/com/baeldung/dozer/Person2.java b/dozer-tutorial/src/main/java/com/baeldung/dozer/Person2.java
deleted file mode 100644
index 1920f2868c..0000000000
--- a/dozer-tutorial/src/main/java/com/baeldung/dozer/Person2.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.baeldung.dozer;
-
-public class Person2 {
- private String name;
- private String nickname;
- private int age;
-
- public Person2() {
-
- }
-
- public Person2(String name, String nickname, int age) {
- super();
- this.name = name;
- this.nickname = nickname;
- this.age = age;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getNickname() {
- return nickname;
- }
-
- public void setNickname(String nickname) {
- this.nickname = nickname;
- }
-
- public int getAge() {
- return age;
- }
-
- public void setAge(int age) {
- this.age = age;
- }
-
-}
diff --git a/dozer-tutorial/src/main/java/com/baeldung/dozer/Person3.java b/dozer-tutorial/src/main/java/com/baeldung/dozer/Person3.java
deleted file mode 100644
index ae1e610aa2..0000000000
--- a/dozer-tutorial/src/main/java/com/baeldung/dozer/Person3.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.baeldung.dozer;
-
-public class Person3 {
- private String name;
- private String dtob;
-
- public Person3() {
-
- }
-
- public Person3(String name, String dtob) {
- super();
- this.name = name;
- this.dtob = dtob;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDtob() {
- return dtob;
- }
-
- public void setDtob(String dtob) {
- this.dtob = dtob;
- }
-
- @Override
- public String toString() {
- return "Person3 [name=" + name + ", dtob=" + dtob + "]";
- }
-
-
-}
diff --git a/dozer-tutorial/src/main/java/com/baeldung/dozer/Personne.java b/dozer-tutorial/src/main/java/com/baeldung/dozer/Personne.java
deleted file mode 100644
index f6ff22c96b..0000000000
--- a/dozer-tutorial/src/main/java/com/baeldung/dozer/Personne.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.baeldung.dozer;
-
-public class Personne {
- private String nom;
- private String surnom;
- private int age;
-
- public Personne() {
-
- }
-
- public Personne(String nom, String surnom, int age) {
- super();
- this.nom = nom;
- this.surnom = surnom;
- this.age = age;
- }
-
- public String getNom() {
- return nom;
- }
-
- public void setNom(String nom) {
- this.nom = nom;
- }
-
- public String getSurnom() {
- return surnom;
- }
-
- public void setSurnom(String surnom) {
- this.surnom = surnom;
- }
-
- public int getAge() {
- return age;
- }
-
- public void setAge(int age) {
- this.age = age;
- }
-
-}
diff --git a/dozer-tutorial/src/main/java/com/baeldung/dozer/Personne2.java b/dozer-tutorial/src/main/java/com/baeldung/dozer/Personne2.java
deleted file mode 100644
index 1cd3f7cdfd..0000000000
--- a/dozer-tutorial/src/main/java/com/baeldung/dozer/Personne2.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.baeldung.dozer;
-
-import org.dozer.Mapping;
-
-public class Personne2 {
- private String nom;
- private String surnom;
- private int age;
-
- public Personne2() {
-
- }
-
- public Personne2(String nom, String surnom, int age) {
- super();
- this.nom = nom;
- this.surnom = surnom;
- this.age = age;
- }
-
- @Mapping("name")
- public String getNom() {
- return nom;
- }
-
- @Mapping("nickname")
- public String getSurnom() {
- return surnom;
- }
-
- public void setNom(String nom) {
- this.nom = nom;
- }
-
- public void setSurnom(String surnom) {
- this.surnom = surnom;
- }
-
- public int getAge() {
- return age;
- }
-
- public void setAge(int age) {
- this.age = age;
- }
-
-}
diff --git a/dozer-tutorial/src/main/java/com/baeldung/dozer/Personne3.java b/dozer-tutorial/src/main/java/com/baeldung/dozer/Personne3.java
deleted file mode 100644
index 04af1fe2d1..0000000000
--- a/dozer-tutorial/src/main/java/com/baeldung/dozer/Personne3.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.baeldung.dozer;
-
-public class Personne3 {
- private String name;
- private long dtob;
-
- public Personne3() {
-
- }
-
- public Personne3(String name, long dtob) {
- super();
- this.name = name;
- this.dtob = dtob;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public long getDtob() {
- return dtob;
- }
-
- public void setDtob(long dtob) {
- this.dtob = dtob;
- }
-
- @Override
- public String toString() {
- return "Personne3 [name=" + name + ", dtob=" + dtob + "]";
- }
-
-}
diff --git a/dozer-tutorial/src/main/java/com/baeldung/dozer/Source.java b/dozer-tutorial/src/main/java/com/baeldung/dozer/Source.java
deleted file mode 100644
index 88b3c7a349..0000000000
--- a/dozer-tutorial/src/main/java/com/baeldung/dozer/Source.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.baeldung.dozer;
-
-public class Source {
- private String name;
- private int age;
-
- public Source() {
- }
-
- public Source(String name, int age) {
- super();
- this.name = name;
- this.age = age;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public int getAge() {
- return age;
- }
-
- public void setAge(int age) {
- this.age = age;
- }
-
-}
diff --git a/dozer-tutorial/src/main/java/com/baeldung/dozer/Source2.java b/dozer-tutorial/src/main/java/com/baeldung/dozer/Source2.java
deleted file mode 100644
index ca7e5baaea..0000000000
--- a/dozer-tutorial/src/main/java/com/baeldung/dozer/Source2.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.baeldung.dozer;
-
-public class Source2 {
- private String id;
- private double points;
-
- public Source2() {
-
- }
-
- public Source2(String id, double points) {
- super();
- this.id = id;
- this.points = points;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public double getPoints() {
- return points;
- }
-
- public void setPoints(double points) {
- this.points = points;
- }
-
- @Override
- public String toString() {
- return "Source2 [id=" + id + ", points=" + points + "]";
- }
-
-}
diff --git a/dozer-tutorial/src/test/java/com/baeldung/dozer/DozerTest.java b/dozer-tutorial/src/test/java/com/baeldung/dozer/DozerTest.java
deleted file mode 100644
index 2b173a045b..0000000000
--- a/dozer-tutorial/src/test/java/com/baeldung/dozer/DozerTest.java
+++ /dev/null
@@ -1,200 +0,0 @@
-package com.baeldung.dozer;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.dozer.DozerBeanMapper;
-import org.dozer.loader.api.BeanMappingBuilder;
-import org.junit.Before;
-import org.junit.Test;
-
-public class DozerTest {
-
- private DozerBeanMapper mapper = new DozerBeanMapper();
-
- @Before
- public void before() throws Exception {
- mapper = new DozerBeanMapper();
- }
-
- private BeanMappingBuilder builder = new BeanMappingBuilder() {
-
- @Override
- protected void configure() {
- mapping(Person.class, Personne.class).fields("name", "nom").fields(
- "nickname", "surnom");
-
- }
- };
- private BeanMappingBuilder builderMinusAge = new BeanMappingBuilder() {
-
- @Override
- protected void configure() {
- mapping(Person.class, Personne.class).fields("name", "nom")
- .fields("nickname", "surnom").exclude("age");
-
- }
- };
-
- @Test
- public void givenApiMapper_whenMaps_thenCorrect() {
- Personne frenchAppPerson = new Personne("Sylvester Stallone", "Rambo",
- 70);
- mapper.addMapping(builder);
- Person englishAppPerson = mapper.map(frenchAppPerson, Person.class);
- assertEquals(englishAppPerson.getName(), frenchAppPerson.getNom());
- assertEquals(englishAppPerson.getNickname(),
- frenchAppPerson.getSurnom());
- assertEquals(englishAppPerson.getAge(), frenchAppPerson.getAge());
- }
-
- @Test
- public void givenApiMapper_whenMapsOnlySpecifiedFields_thenCorrect() {
- Person englishAppPerson = new Person("Sylvester Stallone", "Rambo", 70);
- mapper.addMapping(builderMinusAge);
- Personne frenchAppPerson = mapper.map(englishAppPerson, Personne.class);
- assertEquals(frenchAppPerson.getNom(), englishAppPerson.getName());
- assertEquals(frenchAppPerson.getSurnom(),
- englishAppPerson.getNickname());
- assertEquals(frenchAppPerson.getAge(), 0);
- }
-
- @Test
- public void givenApiMapper_whenMapsBidirectionally_thenCorrect() {
- Person englishAppPerson = new Person("Sylvester Stallone", "Rambo", 70);
- mapper.addMapping(builder);
- Personne frenchAppPerson = mapper.map(englishAppPerson, Personne.class);
- assertEquals(frenchAppPerson.getNom(), englishAppPerson.getName());
- assertEquals(frenchAppPerson.getSurnom(),
- englishAppPerson.getNickname());
- assertEquals(frenchAppPerson.getAge(), englishAppPerson.getAge());
- }
-
- @Test
- public void givenSourceObjectAndDestClass_whenMapsSameNameFieldsCorrectly_thenCorrect() {
- Source source = new Source("Baeldung", 10);
- Dest dest = mapper.map(source, Dest.class);
- assertEquals(dest.getName(), "Baeldung");
- assertEquals(dest.getAge(), 10);
- }
-
- @Test
- public void givenSourceObjectAndDestObject_whenMapsSameNameFieldsCorrectly_thenCorrect() {
- Source source = new Source("Baeldung", 10);
- Dest dest = new Dest();
- mapper.map(source, dest);
- assertEquals(dest.getName(), "Baeldung");
- assertEquals(dest.getAge(), 10);
- }
-
- @Test
- public void givenSourceAndDestWithDifferentFieldTypes_whenMapsAndAutoConverts_thenCorrect() {
- Source2 source = new Source2("320", 15.2);
- Dest2 dest = mapper.map(source, Dest2.class);
- assertEquals(dest.getId(), 320);
- assertEquals(dest.getPoints(), 15);
- }
-
- @Test
- public void givenSrcAndDestWithDifferentFieldNamesWithCustomMapper_whenMaps_thenCorrect() {
- List mappingFiles = new ArrayList<>();
- mappingFiles.add("dozer_mapping.xml");
- Personne frenchAppPerson = new Personne("Sylvester Stallone", "Rambo",
- 70);
- mapper.setMappingFiles(mappingFiles);
- Person englishAppPerson = mapper.map(frenchAppPerson, Person.class);
- assertEquals(englishAppPerson.getName(), frenchAppPerson.getNom());
- assertEquals(englishAppPerson.getNickname(),
- frenchAppPerson.getSurnom());
- assertEquals(englishAppPerson.getAge(), frenchAppPerson.getAge());
- }
-
- @Test
- public void givenSrcAndDestWithDifferentFieldNamesWithCustomMapper_whenMapsBidirectionally_thenCorrect() {
- List mappingFiles = new ArrayList<>();
- mappingFiles.add("dozer_mapping.xml");
- Person englishAppPerson = new Person("Dwayne Johnson", "The Rock", 44);
- mapper.setMappingFiles(mappingFiles);
- Personne frenchAppPerson = mapper.map(englishAppPerson, Personne.class);
- assertEquals(frenchAppPerson.getNom(), englishAppPerson.getName());
- assertEquals(frenchAppPerson.getSurnom(),
- englishAppPerson.getNickname());
- assertEquals(frenchAppPerson.getAge(), englishAppPerson.getAge());
- }
-
-// @Test
-// public void givenMappingFileOutsideClasspath_whenMaps_thenCorrect() {
-// List mappingFiles = new ArrayList<>();
-// mappingFiles.add("file:E:\\dozer_mapping.xml");
-// Person englishAppPerson = new Person("Marshall Bruce Mathers III",
-// "Eminem", 43);
-// mapper.setMappingFiles(mappingFiles);
-// Personne frenchAppPerson = mapper.map(englishAppPerson, Personne.class);
-// assertEquals(frenchAppPerson.getNom(), englishAppPerson.getName());
-// assertEquals(frenchAppPerson.getSurnom(),
-// englishAppPerson.getNickname());
-// assertEquals(frenchAppPerson.getAge(), englishAppPerson.getAge());
-// }
-
- @Test
- public void givenSrcAndDest_whenMapsOnlySpecifiedFields_thenCorrect() {
- List mappingFiles = new ArrayList<>();
- mappingFiles.add("dozer_mapping2.xml");
- Person englishAppPerson = new Person("Shawn Corey Carter", "Jay Z", 46);
- mapper.setMappingFiles(mappingFiles);
- Personne frenchAppPerson = mapper.map(englishAppPerson, Personne.class);
- assertEquals(frenchAppPerson.getNom(), englishAppPerson.getName());
- assertEquals(frenchAppPerson.getSurnom(),
- englishAppPerson.getNickname());
- assertEquals(frenchAppPerson.getAge(), 0);
- }
-
- @Test
- public void givenAnnotatedSrcFields_whenMapsToRightDestField_thenCorrect() {
- Person2 englishAppPerson = new Person2("Jean-Claude Van Damme", "JCVD",
- 55);
- Personne2 frenchAppPerson = mapper.map(englishAppPerson,
- Personne2.class);
- assertEquals(frenchAppPerson.getNom(), englishAppPerson.getName());
- assertEquals(frenchAppPerson.getSurnom(),
- englishAppPerson.getNickname());
- assertEquals(frenchAppPerson.getAge(), englishAppPerson.getAge());
- }
-
- @Test
- public void givenAnnotatedSrcFields_whenMapsToRightDestFieldBidirectionally_thenCorrect() {
- Personne2 frenchAppPerson = new Personne2("Jason Statham",
- "transporter", 49);
- Person2 englishAppPerson = mapper.map(frenchAppPerson, Person2.class);
- assertEquals(englishAppPerson.getName(), frenchAppPerson.getNom());
- assertEquals(englishAppPerson.getNickname(),
- frenchAppPerson.getSurnom());
- assertEquals(englishAppPerson.getAge(), frenchAppPerson.getAge());
- }
-
- @Test
- public void givenSrcAndDestWithDifferentFieldTypes_whenAbleToCustomConvert_thenCorrect() {
- String dateTime = "2007-06-26T21:22:39Z";
- long timestamp = new Long("1182882159000");
- Person3 person = new Person3("Rich", dateTime);
- mapper.setMappingFiles(Arrays
- .asList(new String[] { "dozer_custom_convertor.xml" }));
- Personne3 person0 = mapper.map(person, Personne3.class);
- assertEquals(timestamp, person0.getDtob());
- }
-
- @Test
- public void givenSrcAndDestWithDifferentFieldTypes_whenAbleToCustomConvertBidirectionally_thenCorrect() {
- String dateTime = "2007-06-26T21:22:39Z";
- long timestamp = new Long("1182882159000");
- Personne3 person = new Personne3("Rich", timestamp);
- mapper.setMappingFiles(Arrays
- .asList(new String[] { "dozer_custom_convertor.xml" }));
- Person3 person0 = mapper.map(person, Person3.class);
- assertEquals(dateTime, person0.getDtob());
- }
-
-}
diff --git a/dozer/pom.xml b/dozer/pom.xml
new file mode 100644
index 0000000000..35ac2394a6
--- /dev/null
+++ b/dozer/pom.xml
@@ -0,0 +1,58 @@
+
+ 4.0.0
+
+ com.baeldung
+ dozer
+ 1.0
+
+ dozer
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.3
+
+
+ 7
+
+
+
+
+
+
+
+ org.slf4j
+ slf4j-api
+ 1.7.5
+
+
+
+ org.slf4j
+ jcl-over-slf4j
+ 1.7.5
+
+
+
+ org.apache.commons
+ commons-lang3
+ 3.2.1
+
+
+
+ net.sf.dozer
+ dozer
+ 5.5.1
+
+
+ junit
+ junit
+ 4.3
+ test
+
+
+
+
+
diff --git a/dozer/src/main/java/com/baeldung/dozer/Dest.java b/dozer/src/main/java/com/baeldung/dozer/Dest.java
new file mode 100644
index 0000000000..ddffcc29a1
--- /dev/null
+++ b/dozer/src/main/java/com/baeldung/dozer/Dest.java
@@ -0,0 +1,33 @@
+package com.baeldung.dozer;
+
+public class Dest {
+ private String name;
+ private int age;
+
+ public Dest() {
+
+ }
+
+ public Dest(String name, int age) {
+ super();
+ this.name = name;
+ this.age = age;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+}
diff --git a/dozer/src/main/java/com/baeldung/dozer/Dest2.java b/dozer/src/main/java/com/baeldung/dozer/Dest2.java
new file mode 100644
index 0000000000..bd89af6b2e
--- /dev/null
+++ b/dozer/src/main/java/com/baeldung/dozer/Dest2.java
@@ -0,0 +1,38 @@
+package com.baeldung.dozer;
+
+public class Dest2 {
+ private int id;
+ private int points;
+
+ public Dest2() {
+
+ }
+
+ public Dest2(int id, int points) {
+ super();
+ this.id = id;
+ this.points = points;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public int getPoints() {
+ return points;
+ }
+
+ public void setPoints(int points) {
+ this.points = points;
+ }
+
+ @Override
+ public String toString() {
+ return "Dest2 [id=" + id + ", points=" + points + "]";
+ }
+
+}
diff --git a/dozer/src/main/java/com/baeldung/dozer/MyCustomConvertor.java b/dozer/src/main/java/com/baeldung/dozer/MyCustomConvertor.java
new file mode 100644
index 0000000000..3ae095dc51
--- /dev/null
+++ b/dozer/src/main/java/com/baeldung/dozer/MyCustomConvertor.java
@@ -0,0 +1,44 @@
+package com.baeldung.dozer;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.dozer.CustomConverter;
+import org.dozer.MappingException;
+
+public class MyCustomConvertor implements CustomConverter {
+
+ @Override
+ public Object convert(Object dest, Object source, Class> arg2, Class> arg3) {
+ if (source == null) {
+ return null;
+ }
+ if (source instanceof Personne3) {
+ Personne3 person = (Personne3) source;
+ Date date = new Date(person.getDtob());
+ DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
+ String isoDate = format.format(date);
+ return new Person3(person.getName(), isoDate);
+
+ } else if (source instanceof Person3) {
+ Person3 person = (Person3) source;
+ DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
+ Date date = null;
+ try {
+ date = format.parse(person.getDtob());
+
+ } catch (ParseException e) {
+ throw new MappingException("Converter MyCustomConvertor " + "used incorrectly:" + e.getMessage());
+ }
+ long timestamp = date.getTime();
+ return new Personne3(person.getName(), timestamp);
+
+ } else {
+ throw new MappingException("Converter MyCustomConvertor " + "used incorrectly. Arguments passed in were:" + dest + " and " + source);
+
+ }
+ }
+
+}
diff --git a/dozer/src/main/java/com/baeldung/dozer/Person.java b/dozer/src/main/java/com/baeldung/dozer/Person.java
new file mode 100644
index 0000000000..030c6e9de7
--- /dev/null
+++ b/dozer/src/main/java/com/baeldung/dozer/Person.java
@@ -0,0 +1,43 @@
+package com.baeldung.dozer;
+
+public class Person {
+ private String name;
+ private String nickname;
+ private int age;
+
+ public Person() {
+
+ }
+
+ public Person(String name, String nickname, int age) {
+ super();
+ this.name = name;
+ this.nickname = nickname;
+ this.age = age;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getNickname() {
+ return nickname;
+ }
+
+ public void setNickname(String nickname) {
+ this.nickname = nickname;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+}
diff --git a/dozer/src/main/java/com/baeldung/dozer/Person2.java b/dozer/src/main/java/com/baeldung/dozer/Person2.java
new file mode 100644
index 0000000000..741dfd2fd1
--- /dev/null
+++ b/dozer/src/main/java/com/baeldung/dozer/Person2.java
@@ -0,0 +1,43 @@
+package com.baeldung.dozer;
+
+public class Person2 {
+ private String name;
+ private String nickname;
+ private int age;
+
+ public Person2() {
+
+ }
+
+ public Person2(String name, String nickname, int age) {
+ super();
+ this.name = name;
+ this.nickname = nickname;
+ this.age = age;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getNickname() {
+ return nickname;
+ }
+
+ public void setNickname(String nickname) {
+ this.nickname = nickname;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+}
diff --git a/dozer/src/main/java/com/baeldung/dozer/Person3.java b/dozer/src/main/java/com/baeldung/dozer/Person3.java
new file mode 100644
index 0000000000..a2a37bed53
--- /dev/null
+++ b/dozer/src/main/java/com/baeldung/dozer/Person3.java
@@ -0,0 +1,38 @@
+package com.baeldung.dozer;
+
+public class Person3 {
+ private String name;
+ private String dtob;
+
+ public Person3() {
+
+ }
+
+ public Person3(String name, String dtob) {
+ super();
+ this.name = name;
+ this.dtob = dtob;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDtob() {
+ return dtob;
+ }
+
+ public void setDtob(String dtob) {
+ this.dtob = dtob;
+ }
+
+ @Override
+ public String toString() {
+ return "Person3 [name=" + name + ", dtob=" + dtob + "]";
+ }
+
+}
diff --git a/dozer/src/main/java/com/baeldung/dozer/Personne.java b/dozer/src/main/java/com/baeldung/dozer/Personne.java
new file mode 100644
index 0000000000..ff301db416
--- /dev/null
+++ b/dozer/src/main/java/com/baeldung/dozer/Personne.java
@@ -0,0 +1,43 @@
+package com.baeldung.dozer;
+
+public class Personne {
+ private String nom;
+ private String surnom;
+ private int age;
+
+ public Personne() {
+
+ }
+
+ public Personne(String nom, String surnom, int age) {
+ super();
+ this.nom = nom;
+ this.surnom = surnom;
+ this.age = age;
+ }
+
+ public String getNom() {
+ return nom;
+ }
+
+ public void setNom(String nom) {
+ this.nom = nom;
+ }
+
+ public String getSurnom() {
+ return surnom;
+ }
+
+ public void setSurnom(String surnom) {
+ this.surnom = surnom;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+}
diff --git a/dozer/src/main/java/com/baeldung/dozer/Personne2.java b/dozer/src/main/java/com/baeldung/dozer/Personne2.java
new file mode 100644
index 0000000000..825c45fb81
--- /dev/null
+++ b/dozer/src/main/java/com/baeldung/dozer/Personne2.java
@@ -0,0 +1,47 @@
+package com.baeldung.dozer;
+
+import org.dozer.Mapping;
+
+public class Personne2 {
+ private String nom;
+ private String surnom;
+ private int age;
+
+ public Personne2() {
+
+ }
+
+ public Personne2(String nom, String surnom, int age) {
+ super();
+ this.nom = nom;
+ this.surnom = surnom;
+ this.age = age;
+ }
+
+ @Mapping("name")
+ public String getNom() {
+ return nom;
+ }
+
+ @Mapping("nickname")
+ public String getSurnom() {
+ return surnom;
+ }
+
+ public void setNom(String nom) {
+ this.nom = nom;
+ }
+
+ public void setSurnom(String surnom) {
+ this.surnom = surnom;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+}
diff --git a/dozer/src/main/java/com/baeldung/dozer/Personne3.java b/dozer/src/main/java/com/baeldung/dozer/Personne3.java
new file mode 100644
index 0000000000..c55f8da20d
--- /dev/null
+++ b/dozer/src/main/java/com/baeldung/dozer/Personne3.java
@@ -0,0 +1,38 @@
+package com.baeldung.dozer;
+
+public class Personne3 {
+ private String name;
+ private long dtob;
+
+ public Personne3() {
+
+ }
+
+ public Personne3(String name, long dtob) {
+ super();
+ this.name = name;
+ this.dtob = dtob;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public long getDtob() {
+ return dtob;
+ }
+
+ public void setDtob(long dtob) {
+ this.dtob = dtob;
+ }
+
+ @Override
+ public String toString() {
+ return "Personne3 [name=" + name + ", dtob=" + dtob + "]";
+ }
+
+}
diff --git a/dozer/src/main/java/com/baeldung/dozer/Source.java b/dozer/src/main/java/com/baeldung/dozer/Source.java
new file mode 100644
index 0000000000..d715a5cc16
--- /dev/null
+++ b/dozer/src/main/java/com/baeldung/dozer/Source.java
@@ -0,0 +1,32 @@
+package com.baeldung.dozer;
+
+public class Source {
+ private String name;
+ private int age;
+
+ public Source() {
+ }
+
+ public Source(String name, int age) {
+ super();
+ this.name = name;
+ this.age = age;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+}
diff --git a/dozer/src/main/java/com/baeldung/dozer/Source2.java b/dozer/src/main/java/com/baeldung/dozer/Source2.java
new file mode 100644
index 0000000000..e722f206ca
--- /dev/null
+++ b/dozer/src/main/java/com/baeldung/dozer/Source2.java
@@ -0,0 +1,38 @@
+package com.baeldung.dozer;
+
+public class Source2 {
+ private String id;
+ private double points;
+
+ public Source2() {
+
+ }
+
+ public Source2(String id, double points) {
+ super();
+ this.id = id;
+ this.points = points;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public double getPoints() {
+ return points;
+ }
+
+ public void setPoints(double points) {
+ this.points = points;
+ }
+
+ @Override
+ public String toString() {
+ return "Source2 [id=" + id + ", points=" + points + "]";
+ }
+
+}
diff --git a/dozer/src/test/java/com/baeldung/dozer/DozerTest.java b/dozer/src/test/java/com/baeldung/dozer/DozerTest.java
new file mode 100644
index 0000000000..107aab078d
--- /dev/null
+++ b/dozer/src/test/java/com/baeldung/dozer/DozerTest.java
@@ -0,0 +1,199 @@
+package com.baeldung.dozer;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Arrays;
+
+import org.dozer.DozerBeanMapper;
+import org.dozer.loader.api.BeanMappingBuilder;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class DozerTest {
+ private final long GMT_DIFFERENCE = 46800000;
+
+ DozerBeanMapper mapper;
+
+ @Before
+ public void before() throws Exception {
+ mapper = new DozerBeanMapper();
+ }
+
+ BeanMappingBuilder builder = new BeanMappingBuilder() {
+
+ @Override
+ protected void configure() {
+ mapping(Person.class, Personne.class).fields("name", "nom").fields("nickname", "surnom");
+
+ }
+ };
+ BeanMappingBuilder builderMinusAge = new BeanMappingBuilder() {
+
+ @Override
+ protected void configure() {
+ mapping(Person.class, Personne.class).fields("name", "nom").fields("nickname", "surnom").exclude("age");
+
+ }
+ };
+
+ @Test
+ public void givenApiMapper_whenMaps_thenCorrect() {
+ mapper.addMapping(builder);
+
+ Personne frenchAppPerson = new Personne("Sylvester Stallone", "Rambo", 70);
+ Person englishAppPerson = mapper.map(frenchAppPerson, Person.class);
+
+ assertEquals(englishAppPerson.getName(), frenchAppPerson.getNom());
+ assertEquals(englishAppPerson.getNickname(), frenchAppPerson.getSurnom());
+ assertEquals(englishAppPerson.getAge(), frenchAppPerson.getAge());
+ }
+
+ @Test
+ public void givenApiMapper_whenMapsOnlySpecifiedFields_thenCorrect() {
+ mapper.addMapping(builderMinusAge);
+
+ Person englishAppPerson = new Person("Sylvester Stallone", "Rambo", 70);
+ Personne frenchAppPerson = mapper.map(englishAppPerson, Personne.class);
+
+ assertEquals(frenchAppPerson.getNom(), englishAppPerson.getName());
+ assertEquals(frenchAppPerson.getSurnom(), englishAppPerson.getNickname());
+ assertEquals(frenchAppPerson.getAge(), 0);
+ }
+
+ @Test
+ public void givenApiMapper_whenMapsBidirectionally_thenCorrect() {
+ mapper.addMapping(builder);
+
+ Person englishAppPerson = new Person("Sylvester Stallone", "Rambo", 70);
+ Personne frenchAppPerson = mapper.map(englishAppPerson, Personne.class);
+
+ assertEquals(frenchAppPerson.getNom(), englishAppPerson.getName());
+ assertEquals(frenchAppPerson.getSurnom(), englishAppPerson.getNickname());
+ assertEquals(frenchAppPerson.getAge(), englishAppPerson.getAge());
+ }
+
+ @Test
+ public void givenSourceObjectAndDestClass_whenMapsSameNameFieldsCorrectly_thenCorrect() {
+ Source source = new Source("Baeldung", 10);
+ Dest dest = mapper.map(source, Dest.class);
+ assertEquals(dest.getName(), "Baeldung");
+ assertEquals(dest.getAge(), 10);
+ }
+
+ @Test
+ public void givenSourceObjectAndDestObject_whenMapsSameNameFieldsCorrectly_thenCorrect() {
+ Source source = new Source("Baeldung", 10);
+ Dest dest = new Dest();
+ mapper.map(source, dest);
+ assertEquals(dest.getName(), "Baeldung");
+ assertEquals(dest.getAge(), 10);
+ }
+
+ @Test
+ public void givenSourceAndDestWithDifferentFieldTypes_whenMapsAndAutoConverts_thenCorrect() {
+ Source2 source = new Source2("320", 15.2);
+ Dest2 dest = mapper.map(source, Dest2.class);
+ assertEquals(dest.getId(), 320);
+ assertEquals(dest.getPoints(), 15);
+ }
+
+ @Test
+ public void givenSrcAndDestWithDifferentFieldNamesWithCustomMapper_whenMaps_thenCorrect() {
+ configureMapper("dozer_mapping.xml");
+
+ Personne frenchAppPerson = new Personne("Sylvester Stallone", "Rambo", 70);
+ Person englishAppPerson = mapper.map(frenchAppPerson, Person.class);
+
+ assertEquals(englishAppPerson.getName(), frenchAppPerson.getNom());
+ assertEquals(englishAppPerson.getNickname(), frenchAppPerson.getSurnom());
+ assertEquals(englishAppPerson.getAge(), frenchAppPerson.getAge());
+ }
+
+ @Test
+ public void givenSrcAndDestWithDifferentFieldNamesWithCustomMapper_whenMapsBidirectionally_thenCorrect() {
+ configureMapper("dozer_mapping.xml");
+
+ Person englishAppPerson = new Person("Dwayne Johnson", "The Rock", 44);
+ Personne frenchAppPerson = mapper.map(englishAppPerson, Personne.class);
+
+ assertEquals(frenchAppPerson.getNom(), englishAppPerson.getName());
+ assertEquals(frenchAppPerson.getSurnom(), englishAppPerson.getNickname());
+ assertEquals(frenchAppPerson.getAge(), englishAppPerson.getAge());
+ }
+
+ @Ignore("place dozer_mapping.xml at a location of your choice and copy/paste the path after file: in configureMapper method")
+ @Test
+ public void givenMappingFileOutsideClasspath_whenMaps_thenCorrect() {
+ configureMapper("file:e:/dozer_mapping.xml");
+
+ Person englishAppPerson = new Person("Marshall Bruce Mathers III", "Eminem", 43);
+ Personne frenchAppPerson = mapper.map(englishAppPerson, Personne.class);
+
+ assertEquals(frenchAppPerson.getNom(), englishAppPerson.getName());
+ assertEquals(frenchAppPerson.getSurnom(), englishAppPerson.getNickname());
+ assertEquals(frenchAppPerson.getAge(), englishAppPerson.getAge());
+ }
+
+ @Test
+ public void givenSrcAndDest_whenMapsOnlySpecifiedFields_thenCorrect() {
+ configureMapper("dozer_mapping2.xml");
+
+ Person englishAppPerson = new Person("Shawn Corey Carter", "Jay Z", 46);
+ Personne frenchAppPerson = mapper.map(englishAppPerson, Personne.class);
+
+ assertEquals(frenchAppPerson.getNom(), englishAppPerson.getName());
+ assertEquals(frenchAppPerson.getSurnom(), englishAppPerson.getNickname());
+ assertEquals(frenchAppPerson.getAge(), 0);
+ }
+
+ @Test
+ public void givenAnnotatedSrcFields_whenMapsToRightDestField_thenCorrect() {
+ Person2 englishAppPerson = new Person2("Jean-Claude Van Damme", "JCVD", 55);
+ Personne2 frenchAppPerson = mapper.map(englishAppPerson, Personne2.class);
+ assertEquals(frenchAppPerson.getNom(), englishAppPerson.getName());
+ assertEquals(frenchAppPerson.getSurnom(), englishAppPerson.getNickname());
+ assertEquals(frenchAppPerson.getAge(), englishAppPerson.getAge());
+ }
+
+ @Test
+ public void givenAnnotatedSrcFields_whenMapsToRightDestFieldBidirectionally_thenCorrect() {
+ Personne2 frenchAppPerson = new Personne2("Jason Statham", "transporter", 49);
+ Person2 englishAppPerson = mapper.map(frenchAppPerson, Person2.class);
+ assertEquals(englishAppPerson.getName(), frenchAppPerson.getNom());
+ assertEquals(englishAppPerson.getNickname(), frenchAppPerson.getSurnom());
+ assertEquals(englishAppPerson.getAge(), frenchAppPerson.getAge());
+ }
+
+ @Test
+ public void givenSrcAndDestWithDifferentFieldTypes_whenAbleToCustomConvert_thenCorrect() {
+ configureMapper("dozer_custom_convertor.xml");
+
+ String dateTime = "2007-06-26T21:22:39Z";
+ long timestamp = new Long("1182882159000");
+
+ Person3 person = new Person3("Rich", dateTime);
+ Personne3 person0 = mapper.map(person, Personne3.class);
+
+ long timestampToTest = person0.getDtob();
+ assertTrue(timestampToTest == timestamp || timestampToTest >= timestamp - GMT_DIFFERENCE || timestampToTest <= timestamp + GMT_DIFFERENCE);
+ }
+
+ @Test
+ public void givenSrcAndDestWithDifferentFieldTypes_whenAbleToCustomConvertBidirectionally_thenCorrect() {
+ long timestamp = new Long("1182882159000");
+ Personne3 person = new Personne3("Rich", timestamp);
+ configureMapper("dozer_custom_convertor.xml");
+
+ Person3 person0 = mapper.map(person, Person3.class);
+ String timestampTest = person0.getDtob();
+
+ assertTrue(timestampTest.charAt(10) == 'T' && timestampTest.charAt(19) == 'Z');
+ }
+
+ public void configureMapper(String... mappingFileUrls) {
+ mapper.setMappingFiles(Arrays.asList(mappingFileUrls));
+ }
+
+}
diff --git a/dozer-tutorial/src/test/resources/dozer_custom_convertor.xml b/dozer/src/test/resources/dozer_custom_convertor.xml
similarity index 100%
rename from dozer-tutorial/src/test/resources/dozer_custom_convertor.xml
rename to dozer/src/test/resources/dozer_custom_convertor.xml
diff --git a/dozer-tutorial/src/test/resources/dozer_mapping.xml b/dozer/src/test/resources/dozer_mapping.xml
similarity index 100%
rename from dozer-tutorial/src/test/resources/dozer_mapping.xml
rename to dozer/src/test/resources/dozer_mapping.xml
diff --git a/dozer-tutorial/src/test/resources/dozer_mapping2.xml b/dozer/src/test/resources/dozer_mapping2.xml
similarity index 100%
rename from dozer-tutorial/src/test/resources/dozer_mapping2.xml
rename to dozer/src/test/resources/dozer_mapping2.xml
diff --git a/gson/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/gson/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
deleted file mode 100644
index 627021fb96..0000000000
--- a/gson/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/guava/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/guava/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
deleted file mode 100644
index 627021fb96..0000000000
--- a/guava/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/guava/.settings/.jsdtscope b/guava/.settings/.jsdtscope
deleted file mode 100644
index 7b3f0c8b9f..0000000000
--- a/guava/.settings/.jsdtscope
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/guava/.settings/org.eclipse.jdt.core.prefs b/guava/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index b126d6476b..0000000000
--- a/guava/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,95 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-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.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-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.8
diff --git a/guava/.settings/org.eclipse.jdt.ui.prefs b/guava/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 471e9b0d81..0000000000
--- a/guava/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,55 +0,0 @@
-#Sat Jan 21 23:04:06 EET 2012
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=true
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=true
-sp_cleanup.make_local_variable_final=true
-sp_cleanup.make_parameters_final=true
-sp_cleanup.make_private_fields_final=false
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=false
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=true
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=true
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=true
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/guava/.settings/org.eclipse.m2e.core.prefs b/guava/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f1cb..0000000000
--- a/guava/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/guava/.settings/org.eclipse.m2e.wtp.prefs b/guava/.settings/org.eclipse.m2e.wtp.prefs
deleted file mode 100644
index ef86089622..0000000000
--- a/guava/.settings/org.eclipse.m2e.wtp.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false
diff --git a/guava/.settings/org.eclipse.wst.common.component b/guava/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index e98377cb0f..0000000000
--- a/guava/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/guava/.settings/org.eclipse.wst.common.project.facet.core.xml b/guava/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index f4ef8aa0a5..0000000000
--- a/guava/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/guava/.settings/org.eclipse.wst.jsdt.ui.superType.container b/guava/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a480..0000000000
--- a/guava/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/guava/.settings/org.eclipse.wst.jsdt.ui.superType.name b/guava/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b6ec..0000000000
--- a/guava/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window
\ No newline at end of file
diff --git a/guava/.settings/org.eclipse.wst.validation.prefs b/guava/.settings/org.eclipse.wst.validation.prefs
deleted file mode 100644
index cacf5451ae..0000000000
--- a/guava/.settings/org.eclipse.wst.validation.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-DELEGATES_PREFERENCE=delegateValidatorList
-USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.303.v201202090300
-eclipse.preferences.version=1
-override=true
-suspend=false
-vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01
-vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01
-vals/org.eclipse.wst.jsdt.web.core.JsBatchValidator/global=TF02
-vf.version=3
diff --git a/guava/.settings/org.eclipse.wst.ws.service.policy.prefs b/guava/.settings/org.eclipse.wst.ws.service.policy.prefs
deleted file mode 100644
index 9cfcabe16f..0000000000
--- a/guava/.settings/org.eclipse.wst.ws.service.policy.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.wst.ws.service.policy.projectEnabled=false
diff --git a/guava/src/test/java/org/baeldung/guava/GuavaMapFromSet.java b/guava/src/test/java/org/baeldung/guava/GuavaMapFromSet.java
index 602205ff9f..1d19423f7e 100644
--- a/guava/src/test/java/org/baeldung/guava/GuavaMapFromSet.java
+++ b/guava/src/test/java/org/baeldung/guava/GuavaMapFromSet.java
@@ -11,91 +11,91 @@ import com.google.common.base.Function;
public class GuavaMapFromSet extends AbstractMap {
- private class SingleEntry implements Entry {
- private K key;
+ private class SingleEntry implements Entry {
+ private K key;
- public SingleEntry( K key) {
- this.key = key;
- }
+ public SingleEntry(K key) {
+ this.key = key;
+ }
- @Override
- public K getKey() {
- return this.key;
- }
+ @Override
+ public K getKey() {
+ return this.key;
+ }
- @Override
- public V getValue() {
- V value = GuavaMapFromSet.this.cache.get(this.key);
- if (value == null) {
- value = GuavaMapFromSet.this.function.apply(this.key);
- GuavaMapFromSet.this.cache.put(this.key, value);
- }
- return value;
- }
+ @Override
+ public V getValue() {
+ V value = GuavaMapFromSet.this.cache.get(this.key);
+ if (value == null) {
+ value = GuavaMapFromSet.this.function.apply(this.key);
+ GuavaMapFromSet.this.cache.put(this.key, value);
+ }
+ return value;
+ }
- @Override
- public V setValue( V value) {
- throw new UnsupportedOperationException();
- }
- }
+ @Override
+ public V setValue(V value) {
+ throw new UnsupportedOperationException();
+ }
+ }
- private class MyEntrySet extends AbstractSet> {
+ private class MyEntrySet extends AbstractSet> {
- public class EntryIterator implements Iterator> {
- private Iterator inner;
+ public class EntryIterator implements Iterator> {
+ private Iterator inner;
- public EntryIterator() {
- this.inner = MyEntrySet.this.keys.iterator();
- }
+ public EntryIterator() {
+ this.inner = MyEntrySet.this.keys.iterator();
+ }
- @Override
- public boolean hasNext() {
- return this.inner.hasNext();
- }
+ @Override
+ public boolean hasNext() {
+ return this.inner.hasNext();
+ }
- @Override
- public Map.Entry next() {
- K key = this.inner.next();
- return new SingleEntry(key);
- }
+ @Override
+ public Map.Entry next() {
+ K key = this.inner.next();
+ return new SingleEntry(key);
+ }
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ }
- private Set keys;
+ private Set keys;
- public MyEntrySet( Set keys) {
- this.keys = keys;
- }
+ public MyEntrySet(Set keys) {
+ this.keys = keys;
+ }
- @Override
- public Iterator> iterator() {
- return new EntryIterator();
- }
+ @Override
+ public Iterator> iterator() {
+ return new EntryIterator();
+ }
- @Override
- public int size() {
- return this.keys.size();
- }
+ @Override
+ public int size() {
+ return this.keys.size();
+ }
- }
+ }
- private WeakHashMap cache;
- private Set> entries;
- private Function super K, ? extends V> function;
+ private WeakHashMap cache;
+ private Set> entries;
+ private Function super K, ? extends V> function;
- public GuavaMapFromSet( Set keys, Function super K, ? extends V> function) {
- this.function = function;
- this.cache = new WeakHashMap();
- this.entries = new MyEntrySet(keys);
- }
+ public GuavaMapFromSet(Set keys, Function super K, ? extends V> function) {
+ this.function = function;
+ this.cache = new WeakHashMap();
+ this.entries = new MyEntrySet(keys);
+ }
- @Override
- public Set> entrySet() {
- return this.entries;
- }
+ @Override
+ public Set> entrySet() {
+ return this.entries;
+ }
}
diff --git a/guava/src/test/java/org/baeldung/guava/GuavaMapFromSetTests.java b/guava/src/test/java/org/baeldung/guava/GuavaMapFromSetTests.java
index 9abb5d14a9..7dc4550c09 100644
--- a/guava/src/test/java/org/baeldung/guava/GuavaMapFromSetTests.java
+++ b/guava/src/test/java/org/baeldung/guava/GuavaMapFromSetTests.java
@@ -13,54 +13,52 @@ import com.google.common.base.Function;
public class GuavaMapFromSetTests {
- @Test
- public void givenStringSet_whenMapsToElementLength_thenCorrect() {
- Function function = new Function() {
+ @Test
+ public void givenStringSet_whenMapsToElementLength_thenCorrect() {
+ Function function = new Function() {
+ @Override
+ public String apply(Integer from) {
+ return Integer.toBinaryString(from);
+ }
+ };
+ Set set = new TreeSet<>(Arrays.asList(32, 64, 128));
+ Map map = new GuavaMapFromSet(set, function);
+ assertTrue(map.get(32).equals("100000")
+ && map.get(64).equals("1000000")
+ && map.get(128).equals("10000000"));
+ }
- @Override
- public String apply(Integer from) {
- return Integer.toBinaryString(from.intValue());
- }
- };
- Set set = (Set) new TreeSet(Arrays.asList(
- 32, 64, 128));
- Map map = new GuavaMapFromSet(set,
- function);
- assertTrue(map.get(32).equals("100000")
- && map.get(64).equals("1000000")
- && map.get(128).equals("10000000"));
- }
+ @Test
+ public void givenIntSet_whenMapsToElementBinaryValue_thenCorrect() {
+ Function function = new Function() {
- @Test
- public void givenIntSet_whenMapsToElementBinaryValue_thenCorrect() {
- Function function = new Function() {
+ @Override
+ public Integer apply(String from) {
+ return from.length();
+ }
+ };
+ Set set = new TreeSet<>(Arrays.asList(
+ "four", "three", "twelve"));
+ Map map = new GuavaMapFromSet(set,
+ function);
+ assertTrue(map.get("four") == 4 && map.get("three") == 5
+ && map.get("twelve") == 6);
+ }
- @Override
- public Integer apply(String from) {
- return from.length();
- }
- };
- Set set = (Set) new TreeSet(Arrays.asList(
- "four", "three", "twelve"));
- Map map = new GuavaMapFromSet(set,
- function);
- assertTrue(map.get("four") == 4 && map.get("three") == 5
- && map.get("twelve") == 6);
- }
- @Test
- public void givenSet_whenNewSetElementAddedAndMappedLive_thenCorrect() {
- Function function = new Function() {
+ @Test
+ public void givenSet_whenNewSetElementAddedAndMappedLive_thenCorrect() {
+ Function function = new Function() {
- @Override
- public Integer apply(String from) {
- return from.length();
- }
- };
- Set set = (Set) new TreeSet(Arrays.asList(
- "four", "three", "twelve"));
- Map map = new GuavaMapFromSet(set,
- function);
- set.add("one");
- assertTrue(map.get("one") == 3 && map.size()==4);
- }
+ @Override
+ public Integer apply(String from) {
+ return from.length();
+ }
+ };
+ Set set = new TreeSet<>(Arrays.asList(
+ "four", "three", "twelve"));
+ Map map = new GuavaMapFromSet(set,
+ function);
+ set.add("one");
+ assertTrue(map.get("one") == 3 && map.size() == 4);
+ }
}
diff --git a/httpclient/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/httpclient/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
deleted file mode 100644
index 627021fb96..0000000000
--- a/httpclient/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/httpclient/.settings/.jsdtscope b/httpclient/.settings/.jsdtscope
deleted file mode 100644
index 7b3f0c8b9f..0000000000
--- a/httpclient/.settings/.jsdtscope
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/httpclient/.settings/org.eclipse.jdt.core.prefs b/httpclient/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index b126d6476b..0000000000
--- a/httpclient/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,95 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-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.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-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.8
diff --git a/httpclient/.settings/org.eclipse.m2e.core.prefs b/httpclient/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f1cb..0000000000
--- a/httpclient/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/httpclient/.settings/org.eclipse.m2e.wtp.prefs b/httpclient/.settings/org.eclipse.m2e.wtp.prefs
deleted file mode 100644
index ef86089622..0000000000
--- a/httpclient/.settings/org.eclipse.m2e.wtp.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false
diff --git a/httpclient/.settings/org.eclipse.wst.common.component b/httpclient/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index e98377cb0f..0000000000
--- a/httpclient/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/httpclient/.settings/org.eclipse.wst.common.project.facet.core.xml b/httpclient/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index f4ef8aa0a5..0000000000
--- a/httpclient/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/httpclient/.settings/org.eclipse.wst.jsdt.ui.superType.container b/httpclient/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a480..0000000000
--- a/httpclient/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/httpclient/.settings/org.eclipse.wst.jsdt.ui.superType.name b/httpclient/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b6ec..0000000000
--- a/httpclient/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window
\ No newline at end of file
diff --git a/httpclient/.settings/org.eclipse.wst.validation.prefs b/httpclient/.settings/org.eclipse.wst.validation.prefs
deleted file mode 100644
index cacf5451ae..0000000000
--- a/httpclient/.settings/org.eclipse.wst.validation.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-DELEGATES_PREFERENCE=delegateValidatorList
-USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.303.v201202090300
-eclipse.preferences.version=1
-override=true
-suspend=false
-vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01
-vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01
-vals/org.eclipse.wst.jsdt.web.core.JsBatchValidator/global=TF02
-vf.version=3
diff --git a/httpclient/.settings/org.eclipse.wst.ws.service.policy.prefs b/httpclient/.settings/org.eclipse.wst.ws.service.policy.prefs
deleted file mode 100644
index 9cfcabe16f..0000000000
--- a/httpclient/.settings/org.eclipse.wst.ws.service.policy.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.wst.ws.service.policy.projectEnabled=false
diff --git a/jackson/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/jackson/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
deleted file mode 100644
index 627021fb96..0000000000
--- a/jackson/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/jackson/.settings/.jsdtscope b/jackson/.settings/.jsdtscope
deleted file mode 100644
index 7b3f0c8b9f..0000000000
--- a/jackson/.settings/.jsdtscope
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/jackson/.settings/org.eclipse.jdt.core.prefs b/jackson/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index b126d6476b..0000000000
--- a/jackson/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,95 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-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.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-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.8
diff --git a/jackson/.settings/org.eclipse.jdt.ui.prefs b/jackson/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 471e9b0d81..0000000000
--- a/jackson/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,55 +0,0 @@
-#Sat Jan 21 23:04:06 EET 2012
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=true
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=true
-sp_cleanup.make_local_variable_final=true
-sp_cleanup.make_parameters_final=true
-sp_cleanup.make_private_fields_final=false
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=false
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=true
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=true
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=true
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/jackson/.settings/org.eclipse.m2e.core.prefs b/jackson/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f1cb..0000000000
--- a/jackson/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/jackson/.settings/org.eclipse.m2e.wtp.prefs b/jackson/.settings/org.eclipse.m2e.wtp.prefs
deleted file mode 100644
index ef86089622..0000000000
--- a/jackson/.settings/org.eclipse.m2e.wtp.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false
diff --git a/jackson/.settings/org.eclipse.wst.common.component b/jackson/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index e98377cb0f..0000000000
--- a/jackson/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/jackson/.settings/org.eclipse.wst.common.project.facet.core.xml b/jackson/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index f4ef8aa0a5..0000000000
--- a/jackson/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/jackson/.settings/org.eclipse.wst.jsdt.ui.superType.container b/jackson/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a480..0000000000
--- a/jackson/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/jackson/.settings/org.eclipse.wst.jsdt.ui.superType.name b/jackson/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b6ec..0000000000
--- a/jackson/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window
\ No newline at end of file
diff --git a/jackson/.settings/org.eclipse.wst.validation.prefs b/jackson/.settings/org.eclipse.wst.validation.prefs
deleted file mode 100644
index cacf5451ae..0000000000
--- a/jackson/.settings/org.eclipse.wst.validation.prefs
+++ /dev/null
@@ -1,14 +0,0 @@
-DELEGATES_PREFERENCE=delegateValidatorList
-USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.303.v201202090300
-eclipse.preferences.version=1
-override=true
-suspend=false
-vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01
-vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01
-vals/org.eclipse.wst.jsdt.web.core.JsBatchValidator/global=TF02
-vf.version=3
diff --git a/jackson/.settings/org.eclipse.wst.ws.service.policy.prefs b/jackson/.settings/org.eclipse.wst.ws.service.policy.prefs
deleted file mode 100644
index 9cfcabe16f..0000000000
--- a/jackson/.settings/org.eclipse.wst.ws.service.policy.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.wst.ws.service.policy.projectEnabled=false
diff --git a/mocks/jmockit/README.md b/mocks/jmockit/README.md
index d04a07fdc5..db78b2a3ac 100644
--- a/mocks/jmockit/README.md
+++ b/mocks/jmockit/README.md
@@ -6,3 +6,4 @@
### Relevant Articles:
- [JMockit 101](http://www.baeldung.com/jmockit-101)
- [A Guide to JMockit Expectations](http://www.baeldung.com/jmockit-expectations)
+- [JMockit Advanced Topics](http://www.baeldung.com/jmockit-advanced-topics)
diff --git a/mocks/jmockit/src/main/java/org/baeldung/mocks/jmockit/AdvancedCollaborator.java b/mocks/jmockit/src/main/java/org/baeldung/mocks/jmockit/AdvancedCollaborator.java
new file mode 100644
index 0000000000..4d25f466a6
--- /dev/null
+++ b/mocks/jmockit/src/main/java/org/baeldung/mocks/jmockit/AdvancedCollaborator.java
@@ -0,0 +1,20 @@
+package org.baeldung.mocks.jmockit;
+
+public class AdvancedCollaborator {
+ int i;
+ private int privateField = 5;
+ public AdvancedCollaborator(){}
+ public AdvancedCollaborator(String string) throws Exception{
+ i = string.length();
+ }
+ public String methodThatCallsPrivateMethod(int i){
+ return privateMethod() + i;
+ }
+ public int methodThatReturnsThePrivateField(){
+ return privateField;
+ }
+ private String privateMethod(){
+ return "default:";
+ }
+ class InnerAdvancedCollaborator{}
+}
diff --git a/mocks/jmockit/src/test/java/org/baeldung/mocks/jmockit/AdvancedCollaboratorTest.java b/mocks/jmockit/src/test/java/org/baeldung/mocks/jmockit/AdvancedCollaboratorTest.java
new file mode 100644
index 0000000000..aaabe44f66
--- /dev/null
+++ b/mocks/jmockit/src/test/java/org/baeldung/mocks/jmockit/AdvancedCollaboratorTest.java
@@ -0,0 +1,110 @@
+package org.baeldung.mocks.jmockit;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.baeldung.mocks.jmockit.AdvancedCollaborator.InnerAdvancedCollaborator;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import mockit.Deencapsulation;
+import mockit.Expectations;
+import mockit.Invocation;
+import mockit.Mock;
+import mockit.MockUp;
+import mockit.Mocked;
+import mockit.Tested;
+import mockit.integration.junit4.JMockit;
+
+@RunWith(JMockit.class)
+public class AdvancedCollaboratorTest & Comparable>> {
+
+ @Tested
+ private AdvancedCollaborator mock;
+
+ @Mocked
+ private MultiMock multiMock;
+
+ @Test
+ public void testToMockUpPrivateMethod() {
+ new MockUp() {
+ @Mock
+ private String privateMethod() {
+ return "mocked: ";
+ }
+ };
+ String res = mock.methodThatCallsPrivateMethod(1);
+ assertEquals("mocked: 1", res);
+ }
+
+ @Test
+ public void testToMockUpDifficultConstructor() throws Exception {
+ new MockUp() {
+ @Mock
+ public void $init(Invocation invocation, String string) {
+ ((AdvancedCollaborator) invocation.getInvokedInstance()).i = 1;
+ }
+ };
+ AdvancedCollaborator coll = new AdvancedCollaborator(null);
+ assertEquals(1, coll.i);
+ }
+
+ @Test
+ public void testToCallPrivateMethodsDirectly() {
+ Object value = Deencapsulation.invoke(mock, "privateMethod");
+ assertEquals("default:", value);
+ }
+
+ @Test
+ public void testToSetPrivateFieldDirectly() {
+ Deencapsulation.setField(mock, "privateField", 10);
+ assertEquals(10, mock.methodThatReturnsThePrivateField());
+ }
+
+ @Test
+ public void testToGetPrivateFieldDirectly() {
+ int value = Deencapsulation.getField(mock, "privateField");
+ assertEquals(5, value);
+ }
+
+ @Test
+ public void testToCreateNewInstanceDirectly() {
+ AdvancedCollaborator coll = Deencapsulation.newInstance(AdvancedCollaborator.class, "foo");
+ assertEquals(3, coll.i);
+ }
+
+ @Test
+ public void testToCreateNewInnerClassInstanceDirectly() {
+ InnerAdvancedCollaborator innerCollaborator = Deencapsulation.newInnerInstance(InnerAdvancedCollaborator.class, mock);
+ assertNotNull(innerCollaborator);
+ }
+
+ @Test
+ @SuppressWarnings("unchecked")
+ public void testMultipleInterfacesWholeTest() {
+ new Expectations() {
+ {
+ multiMock.get(5); result = "foo";
+ multiMock.compareTo((List) any); result = 0;
+ }
+ };
+ assertEquals("foo", multiMock.get(5));
+ assertEquals(0, multiMock.compareTo(new ArrayList<>()));
+ }
+
+ @Test
+ @SuppressWarnings("unchecked")
+ public & Comparable>> void testMultipleInterfacesOneMethod(@Mocked M mock) {
+ new Expectations() {
+ {
+ mock.get(5); result = "foo";
+ mock.compareTo((List) any);
+ result = 0; }
+ };
+ assertEquals("foo", mock.get(5));
+ assertEquals(0, mock.compareTo(new ArrayList<>()));
+ }
+}
diff --git a/mocks/jmockit/src/test/java/org/baeldung/mocks/jmockit/ReusingTest.java b/mocks/jmockit/src/test/java/org/baeldung/mocks/jmockit/ReusingTest.java
new file mode 100644
index 0000000000..729cb30cd2
--- /dev/null
+++ b/mocks/jmockit/src/test/java/org/baeldung/mocks/jmockit/ReusingTest.java
@@ -0,0 +1,57 @@
+package org.baeldung.mocks.jmockit;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import mockit.Expectations;
+import mockit.Injectable;
+import mockit.Mocked;
+import mockit.Tested;
+import mockit.Verifications;
+import mockit.integration.junit4.JMockit;
+
+@RunWith(JMockit.class)
+public class ReusingTest {
+
+ @Injectable
+ private Collaborator collaborator;
+
+ @Mocked
+ private Model model;
+
+ @Tested
+ private Performer performer;
+
+ @Before
+ public void setup(){
+ new Expectations(){{
+ model.getInfo(); result = "foo"; minTimes = 0;
+ collaborator.collaborate("foo"); result = true; minTimes = 0;
+ }};
+ }
+
+ @Test
+ public void testWithSetup() {
+ performer.perform(model);
+ verifyTrueCalls(1);
+ }
+
+ protected void verifyTrueCalls(int calls){
+ new Verifications(){{
+ collaborator.receive(true); times = calls;
+ }};
+ }
+
+ final class TrueCallsVerification extends Verifications{
+ public TrueCallsVerification(int calls){
+ collaborator.receive(true); times = calls;
+ }
+ }
+
+ @Test
+ public void testWithFinalClass() {
+ performer.perform(model);
+ new TrueCallsVerification(1);
+ }
+}
diff --git a/pom.xml b/pom.xml
index 419916de86..46e6ef145f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,6 +16,7 @@
assertj
apache-cxf
apache-fop
+ autovalue-tutorial
core-java
core-java-8
couchbase-sdk-intro
@@ -52,6 +53,7 @@
log4j
spring-all
+ spring-akka
spring-apache-camel
spring-autowire
spring-batch
@@ -106,6 +108,7 @@
mutation-testing
spring-mvc-velocity
xstream
+ dozer
diff --git a/spring-akka/pom.xml b/spring-akka/pom.xml
new file mode 100644
index 0000000000..6299448ec8
--- /dev/null
+++ b/spring-akka/pom.xml
@@ -0,0 +1,80 @@
+
+ 4.0.0
+ com.baeldung
+ spring-akka
+ 0.1-SNAPSHOT
+
+ spring-akka
+
+
+
+
+ org.springframework
+ spring-context
+
+
+
+ com.typesafe.akka
+ akka-actor_2.11
+ ${akka.version}
+
+
+
+ org.springframework
+ spring-test
+ test
+
+
+
+ junit
+ junit
+ ${junit.version}
+ test
+
+
+
+
+
+
+
+
+
+ org.springframework
+ spring-framework-bom
+ ${spring.version}
+ pom
+ import
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ ${maven-compiler-plugin.version}
+
+
+ 1.8
+
+
+
+
+
+
+
+
+ 4.3.2.RELEASE
+ 2.4.8
+ 4.12
+
+ 3.5.1
+
+
+
\ No newline at end of file
diff --git a/spring-all/src/main/java/org/baeldung/akka/AppConfiguration.java b/spring-akka/src/main/java/org/baeldung/akka/AppConfiguration.java
similarity index 100%
rename from spring-all/src/main/java/org/baeldung/akka/AppConfiguration.java
rename to spring-akka/src/main/java/org/baeldung/akka/AppConfiguration.java
diff --git a/spring-all/src/main/java/org/baeldung/akka/GreetingActor.java b/spring-akka/src/main/java/org/baeldung/akka/GreetingActor.java
similarity index 88%
rename from spring-all/src/main/java/org/baeldung/akka/GreetingActor.java
rename to spring-akka/src/main/java/org/baeldung/akka/GreetingActor.java
index 1a9386c769..6366c277a4 100644
--- a/spring-all/src/main/java/org/baeldung/akka/GreetingActor.java
+++ b/spring-akka/src/main/java/org/baeldung/akka/GreetingActor.java
@@ -1,13 +1,12 @@
package org.baeldung.akka;
import akka.actor.UntypedActor;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
-import static org.springframework.beans.factory.config.ConfigurableBeanFactory.SCOPE_PROTOTYPE;
-
@Component
-@Scope(SCOPE_PROTOTYPE)
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class GreetingActor extends UntypedActor {
private GreetingService greetingService;
diff --git a/spring-all/src/main/java/org/baeldung/akka/GreetingService.java b/spring-akka/src/main/java/org/baeldung/akka/GreetingService.java
similarity index 100%
rename from spring-all/src/main/java/org/baeldung/akka/GreetingService.java
rename to spring-akka/src/main/java/org/baeldung/akka/GreetingService.java
diff --git a/spring-all/src/main/java/org/baeldung/akka/SpringActorProducer.java b/spring-akka/src/main/java/org/baeldung/akka/SpringActorProducer.java
similarity index 100%
rename from spring-all/src/main/java/org/baeldung/akka/SpringActorProducer.java
rename to spring-akka/src/main/java/org/baeldung/akka/SpringActorProducer.java
diff --git a/spring-all/src/main/java/org/baeldung/akka/SpringExtension.java b/spring-akka/src/main/java/org/baeldung/akka/SpringExtension.java
similarity index 100%
rename from spring-all/src/main/java/org/baeldung/akka/SpringExtension.java
rename to spring-akka/src/main/java/org/baeldung/akka/SpringExtension.java
diff --git a/spring-all/src/test/java/org/baeldung/akka/SpringAkkaTest.java b/spring-akka/src/test/java/org/baeldung/akka/SpringAkkaTest.java
similarity index 100%
rename from spring-all/src/test/java/org/baeldung/akka/SpringAkkaTest.java
rename to spring-akka/src/test/java/org/baeldung/akka/SpringAkkaTest.java
diff --git a/spring-all/pom.xml b/spring-all/pom.xml
index b7a8fcc79e..25a45d9bae 100644
--- a/spring-all/pom.xml
+++ b/spring-all/pom.xml
@@ -87,14 +87,6 @@
runtime
-
-
-
- com.typesafe.akka
- akka-actor_2.11
- 2.4.8
-
-
diff --git a/spring-all/src/main/java/org/baeldung/controller/config/StudentControllerConfig.java b/spring-all/src/main/java/org/baeldung/controller/config/StudentControllerConfig.java
new file mode 100644
index 0000000000..443635fb70
--- /dev/null
+++ b/spring-all/src/main/java/org/baeldung/controller/config/StudentControllerConfig.java
@@ -0,0 +1,31 @@
+package org.baeldung.controller.config;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRegistration;
+
+import org.springframework.web.WebApplicationInitializer;
+import org.springframework.web.context.ContextLoaderListener;
+import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
+import org.springframework.web.context.support.GenericWebApplicationContext;
+import org.springframework.web.servlet.DispatcherServlet;
+
+public class StudentControllerConfig implements WebApplicationInitializer {
+
+ @Override
+ public void onStartup(ServletContext sc) throws ServletException {
+ AnnotationConfigWebApplicationContext root = new AnnotationConfigWebApplicationContext();
+ root.register(WebConfig.class);
+
+ root.setServletContext(sc);
+
+ // Manages the lifecycle of the root application context
+ sc.addListener(new ContextLoaderListener(root));
+
+ DispatcherServlet dv = new DispatcherServlet(new GenericWebApplicationContext());
+
+ ServletRegistration.Dynamic appServlet = sc.addServlet("test-mvc", dv);
+ appServlet.setLoadOnStartup(1);
+ appServlet.addMapping("/test/*");
+ }
+}
diff --git a/spring-all/src/main/java/org/baeldung/controller/config/WebConfig.java b/spring-all/src/main/java/org/baeldung/controller/config/WebConfig.java
new file mode 100644
index 0000000000..f55af69c88
--- /dev/null
+++ b/spring-all/src/main/java/org/baeldung/controller/config/WebConfig.java
@@ -0,0 +1,28 @@
+package org.baeldung.controller.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.ViewResolver;
+import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+import org.springframework.web.servlet.view.InternalResourceViewResolver;
+
+@Configuration
+@EnableWebMvc
+@ComponentScan(basePackages= {"org.baeldung.controller.controller","org.baeldung.controller.config" })
+public class WebConfig extends WebMvcConfigurerAdapter {
+ @Override
+ public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
+ configurer.enable();
+ }
+
+ @Bean
+ public ViewResolver viewResolver() {
+ InternalResourceViewResolver bean = new InternalResourceViewResolver();
+ bean.setPrefix("/WEB-INF/");
+ bean.setSuffix(".jsp");
+ return bean;
+ }
+}
\ No newline at end of file
diff --git a/spring-all/src/test/java/org/baeldung/controller/ControllerAnnotationTest.java b/spring-all/src/test/java/org/baeldung/controller/ControllerAnnotationTest.java
new file mode 100644
index 0000000000..44f1767405
--- /dev/null
+++ b/spring-all/src/test/java/org/baeldung/controller/ControllerAnnotationTest.java
@@ -0,0 +1,86 @@
+package org.baeldung.controller;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.baeldung.controller.config.WebConfig;
+import org.baeldung.controller.student.Student;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.web.AnnotationConfigWebContextLoader;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.servlet.ModelAndView;
+
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@WebAppConfiguration
+@ContextConfiguration(classes={WebConfig.class}, loader=AnnotationConfigWebContextLoader.class )
+public class ControllerAnnotationTest {
+
+ private MockMvc mockMvc;
+
+ @Autowired
+ private WebApplicationContext wac;
+
+ private Student selectedStudent;
+
+ @Before
+ public void setUp() {
+ this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
+
+ selectedStudent = new Student();
+ selectedStudent.setId(1);
+ selectedStudent.setName("Peter");
+ }
+
+ @Test
+ public void testTestController() throws Exception {
+
+ ModelAndView mv = this.mockMvc.perform(MockMvcRequestBuilders.get("/test/"))
+ .andReturn()
+ .getModelAndView();
+
+ // validate modal data
+ Assert.assertSame(mv.getModelMap().get("data").toString(), "Welcome home man");
+
+ // validate view name
+ Assert.assertSame(mv.getViewName(), "welcome");
+ }
+
+ @Test
+ public void testRestController() throws Exception {
+
+ String responseBody = this.mockMvc.perform(MockMvcRequestBuilders.get("/student/{studentId}", 1))
+ .andReturn().getResponse()
+ .getContentAsString();
+
+ ObjectMapper reader = new ObjectMapper();
+
+ Student studentDetails = reader.readValue(responseBody, Student.class);
+
+ Assert.assertEquals(selectedStudent, studentDetails);
+
+ }
+
+ @Test
+ public void testRestAnnotatedController() throws Exception {
+
+ String responseBody = this.mockMvc.perform(MockMvcRequestBuilders.get("/annotated/student/{studentId}", 1))
+ .andReturn().getResponse()
+ .getContentAsString();
+
+ ObjectMapper reader = new ObjectMapper();
+
+ Student studentDetails = reader.readValue(responseBody, Student.class);
+
+ Assert.assertEquals(selectedStudent, studentDetails);
+ }
+
+}
diff --git a/spring-cucumber/src/main/java/com/baeldung/BaeldungController.java b/spring-cucumber/src/main/java/com/baeldung/BaeldungController.java
index 0bb249b814..8e87ed3028 100644
--- a/spring-cucumber/src/main/java/com/baeldung/BaeldungController.java
+++ b/spring-cucumber/src/main/java/com/baeldung/BaeldungController.java
@@ -8,14 +8,14 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
public class BaeldungController {
-
- @RequestMapping(method={RequestMethod.GET},value={"/hello"})
- public String sayHello(HttpServletResponse response){
+
+ @RequestMapping(method = { RequestMethod.GET }, value = { "/hello" })
+ public String sayHello(HttpServletResponse response) {
return "hello";
}
-
- @RequestMapping(method={RequestMethod.POST},value={"/baeldung"})
- public String sayHelloPost(HttpServletResponse response){
+
+ @RequestMapping(method = { RequestMethod.POST }, value = { "/baeldung" })
+ public String sayHelloPost(HttpServletResponse response) {
return "hello";
}
diff --git a/spring-cucumber/src/main/java/com/baeldung/SpringDemoApplication.java b/spring-cucumber/src/main/java/com/baeldung/SpringDemoApplication.java
index d490b23aa2..ecb8909de9 100644
--- a/spring-cucumber/src/main/java/com/baeldung/SpringDemoApplication.java
+++ b/spring-cucumber/src/main/java/com/baeldung/SpringDemoApplication.java
@@ -6,14 +6,14 @@ import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
@SpringBootApplication
-public class SpringDemoApplication extends SpringBootServletInitializer{
+public class SpringDemoApplication extends SpringBootServletInitializer {
- public static void main(String[] args) {
- SpringApplication.run(SpringDemoApplication.class, args);
- }
-
- @Override
- protected SpringApplicationBuilder configure(SpringApplicationBuilder application){
+ public static void main(String[] args) {
+ SpringApplication.run(SpringDemoApplication.class, args);
+ }
+
+ @Override
+ protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(SpringDemoApplication.class);
}
}
diff --git a/spring-cucumber/src/main/java/com/baeldung/VersionController.java b/spring-cucumber/src/main/java/com/baeldung/VersionController.java
index 7c72a78a05..f673f0e31f 100644
--- a/spring-cucumber/src/main/java/com/baeldung/VersionController.java
+++ b/spring-cucumber/src/main/java/com/baeldung/VersionController.java
@@ -6,9 +6,9 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
public class VersionController {
-
- @RequestMapping(method={RequestMethod.GET},value={"/version"})
- public String getVersion(){
- return "1.0";
- }
+
+ @RequestMapping(method = { RequestMethod.GET }, value = { "/version" })
+ public String getVersion() {
+ return "1.0";
+ }
}
diff --git a/spring-cucumber/src/test/java/com/baeldung/CucumberTest.java b/spring-cucumber/src/test/java/com/baeldung/CucumberTest.java
index 3e950709b3..c31a35b271 100644
--- a/spring-cucumber/src/test/java/com/baeldung/CucumberTest.java
+++ b/spring-cucumber/src/test/java/com/baeldung/CucumberTest.java
@@ -4,8 +4,7 @@ import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
-
@RunWith(Cucumber.class)
@CucumberOptions(features = "src/test/resources")
-public class CucumberTest{
+public class CucumberTest {
}
\ No newline at end of file
diff --git a/spring-cucumber/src/test/java/com/baeldung/HeaderSettingRequestCallback.java b/spring-cucumber/src/test/java/com/baeldung/HeaderSettingRequestCallback.java
index 1ea72868eb..ab8a9c55b2 100644
--- a/spring-cucumber/src/test/java/com/baeldung/HeaderSettingRequestCallback.java
+++ b/spring-cucumber/src/test/java/com/baeldung/HeaderSettingRequestCallback.java
@@ -7,28 +7,27 @@ import org.springframework.web.client.RequestCallback;
import java.io.IOException;
import java.util.Map;
-
-public class HeaderSettingRequestCallback implements RequestCallback{
- final Map requestHeaders;
+public class HeaderSettingRequestCallback implements RequestCallback {
+ final Map requestHeaders;
private String body;
- public HeaderSettingRequestCallback(final Map headers){
+ public HeaderSettingRequestCallback(final Map headers) {
this.requestHeaders = headers;
}
- public void setBody(final String postBody ){
+ public void setBody(final String postBody) {
this.body = postBody;
}
@Override
- public void doWithRequest(ClientHttpRequest request) throws IOException{
+ public void doWithRequest(ClientHttpRequest request) throws IOException {
final HttpHeaders clientHeaders = request.getHeaders();
- for( final Map.Entry entry : requestHeaders.entrySet() ){
- clientHeaders.add(entry.getKey(),entry.getValue());
+ for (final Map.Entry entry : requestHeaders.entrySet()) {
+ clientHeaders.add(entry.getKey(), entry.getValue());
}
- if( null != body ){
- request.getBody().write( body.getBytes() );
+ if (null != body) {
+ request.getBody().write(body.getBytes());
}
}
}
\ No newline at end of file
diff --git a/spring-cucumber/src/test/java/com/baeldung/OtherDefs.java b/spring-cucumber/src/test/java/com/baeldung/OtherDefs.java
index 428343d06a..edbc14f319 100644
--- a/spring-cucumber/src/test/java/com/baeldung/OtherDefs.java
+++ b/spring-cucumber/src/test/java/com/baeldung/OtherDefs.java
@@ -3,15 +3,14 @@ package com.baeldung;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.When;
-
-public class OtherDefs extends SpringIntegrationTest{
+public class OtherDefs extends SpringIntegrationTest {
@When("^the client calls /baeldung$")
- public void the_client_issues_POST_hello() throws Throwable{
+ public void the_client_issues_POST_hello() throws Throwable {
executePost("http://localhost:8080/baeldung");
}
-
+
@Given("^the client calls /hello$")
- public void the_client_issues_GET_hello() throws Throwable{
+ public void the_client_issues_GET_hello() throws Throwable {
executeGet("http://localhost:8080/hello");
}
}
\ No newline at end of file
diff --git a/spring-cucumber/src/test/java/com/baeldung/ResponseResults.java b/spring-cucumber/src/test/java/com/baeldung/ResponseResults.java
index 6890faf8b5..4c0125e9b4 100644
--- a/spring-cucumber/src/test/java/com/baeldung/ResponseResults.java
+++ b/spring-cucumber/src/test/java/com/baeldung/ResponseResults.java
@@ -7,28 +7,27 @@ import java.io.StringWriter;
import org.apache.commons.io.IOUtils;
import org.springframework.http.client.ClientHttpResponse;
-
-public class ResponseResults{
+public class ResponseResults {
private final ClientHttpResponse theResponse;
private final String body;
- protected ResponseResults(final ClientHttpResponse response) throws IOException{
+ protected ResponseResults(final ClientHttpResponse response) throws IOException {
this.theResponse = response;
final InputStream bodyInputStream = response.getBody();
- if (null == bodyInputStream){
+ if (null == bodyInputStream) {
this.body = "{}";
- }else{
+ } else {
final StringWriter stringWriter = new StringWriter();
IOUtils.copy(bodyInputStream, stringWriter);
this.body = stringWriter.toString();
}
}
- protected ClientHttpResponse getTheResponse(){
+ protected ClientHttpResponse getTheResponse() {
return theResponse;
}
- protected String getBody(){
+ protected String getBody() {
return body;
}
}
\ No newline at end of file
diff --git a/spring-cucumber/src/test/java/com/baeldung/SpringIntegrationTest.java b/spring-cucumber/src/test/java/com/baeldung/SpringIntegrationTest.java
index 5c85dc9400..e37b203c07 100644
--- a/spring-cucumber/src/test/java/com/baeldung/SpringIntegrationTest.java
+++ b/spring-cucumber/src/test/java/com/baeldung/SpringIntegrationTest.java
@@ -4,99 +4,90 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import org.junit.runner.RunWith;
import org.springframework.boot.test.IntegrationTest;
import org.springframework.boot.test.SpringApplicationContextLoader;
import org.springframework.http.HttpMethod;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.client.ResponseErrorHandler;
import org.springframework.web.client.ResponseExtractor;
import org.springframework.web.client.RestTemplate;
-
//@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = SpringDemoApplication.class, loader = SpringApplicationContextLoader.class)
@WebAppConfiguration
@IntegrationTest
public class SpringIntegrationTest {
- protected static ResponseResults latestResponse = null;
+ protected static ResponseResults latestResponse = null;
- protected RestTemplate restTemplate = null;
+ protected RestTemplate restTemplate = null;
- protected void executeGet(String url) throws IOException{
- final Map headers = new HashMap<>();
- headers.put("Accept","application/json");
- final HeaderSettingRequestCallback requestCallback = new HeaderSettingRequestCallback(headers);
- final ResponseResultErrorHandler errorHandler = new ResponseResultErrorHandler();
+ protected void executeGet(String url) throws IOException {
+ final Map headers = new HashMap<>();
+ headers.put("Accept", "application/json");
+ final HeaderSettingRequestCallback requestCallback = new HeaderSettingRequestCallback(headers);
+ final ResponseResultErrorHandler errorHandler = new ResponseResultErrorHandler();
- if (restTemplate == null){
- restTemplate = new RestTemplate();
- }
+ if (restTemplate == null) {
+ restTemplate = new RestTemplate();
+ }
- restTemplate.setErrorHandler(errorHandler);
- latestResponse = restTemplate.execute(url,
- HttpMethod.GET,
- requestCallback,
- new ResponseExtractor(){
- @Override
- public ResponseResults extractData(ClientHttpResponse response) throws IOException {
- if (errorHandler.hadError){
- return (errorHandler.getResults());
- } else{
- return (new ResponseResults(response));
- }
- }
- });
+ restTemplate.setErrorHandler(errorHandler);
+ latestResponse = restTemplate.execute(url, HttpMethod.GET, requestCallback, new ResponseExtractor() {
+ @Override
+ public ResponseResults extractData(ClientHttpResponse response) throws IOException {
+ if (errorHandler.hadError) {
+ return (errorHandler.getResults());
+ } else {
+ return (new ResponseResults(response));
+ }
+ }
+ });
- }
-
- protected void executePost(String url) throws IOException{
- final Map headers = new HashMap<>();
- headers.put("Accept","application/json");
- final HeaderSettingRequestCallback requestCallback = new HeaderSettingRequestCallback(headers);
- final ResponseResultErrorHandler errorHandler = new ResponseResultErrorHandler();
+ }
- if (restTemplate == null){
- restTemplate = new RestTemplate();
- }
+ protected void executePost(String url) throws IOException {
+ final Map headers = new HashMap<>();
+ headers.put("Accept", "application/json");
+ final HeaderSettingRequestCallback requestCallback = new HeaderSettingRequestCallback(headers);
+ final ResponseResultErrorHandler errorHandler = new ResponseResultErrorHandler();
- restTemplate.setErrorHandler(errorHandler);
- latestResponse = restTemplate.execute(url,
- HttpMethod.POST,
- requestCallback,
- new ResponseExtractor(){
- @Override
- public ResponseResults extractData(ClientHttpResponse response) throws IOException {
- if (errorHandler.hadError){
- return (errorHandler.getResults());
- } else{
- return (new ResponseResults(response));
- }
- }
- });
+ if (restTemplate == null) {
+ restTemplate = new RestTemplate();
+ }
- }
+ restTemplate.setErrorHandler(errorHandler);
+ latestResponse = restTemplate.execute(url, HttpMethod.POST, requestCallback, new ResponseExtractor() {
+ @Override
+ public ResponseResults extractData(ClientHttpResponse response) throws IOException {
+ if (errorHandler.hadError) {
+ return (errorHandler.getResults());
+ } else {
+ return (new ResponseResults(response));
+ }
+ }
+ });
- private class ResponseResultErrorHandler implements ResponseErrorHandler{
- private ResponseResults results = null;
- private Boolean hadError = false;
+ }
- private ResponseResults getResults(){
- return results;
- }
+ private class ResponseResultErrorHandler implements ResponseErrorHandler {
+ private ResponseResults results = null;
+ private Boolean hadError = false;
- @Override
- public boolean hasError(ClientHttpResponse response) throws IOException{
- hadError = response.getRawStatusCode() >= 400;
- return hadError;
- }
+ private ResponseResults getResults() {
+ return results;
+ }
- @Override
- public void handleError(ClientHttpResponse response) throws IOException {
- results = new ResponseResults(response);
- }
- }
+ @Override
+ public boolean hasError(ClientHttpResponse response) throws IOException {
+ hadError = response.getRawStatusCode() >= 400;
+ return hadError;
+ }
+
+ @Override
+ public void handleError(ClientHttpResponse response) throws IOException {
+ results = new ResponseResults(response);
+ }
+ }
}
\ No newline at end of file
diff --git a/spring-cucumber/src/test/java/com/baeldung/StepDefs.java b/spring-cucumber/src/test/java/com/baeldung/StepDefs.java
index 3ed25bb09b..865a1e13fa 100644
--- a/spring-cucumber/src/test/java/com/baeldung/StepDefs.java
+++ b/spring-cucumber/src/test/java/com/baeldung/StepDefs.java
@@ -1,28 +1,29 @@
package com.baeldung;
-import cucumber.api.java.en.And;
-import cucumber.api.java.en.Then;
-import cucumber.api.java.en.When;
-import org.springframework.http.HttpStatus;
-
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
-public class StepDefs extends SpringIntegrationTest{
-
- @When("^the client calls /version$")
- public void the_client_issues_GET_version() throws Throwable{
+import org.springframework.http.HttpStatus;
+
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import cucumber.api.java.en.When;
+
+public class StepDefs extends SpringIntegrationTest {
+
+ @When("^the client calls /version$")
+ public void the_client_issues_GET_version() throws Throwable {
executeGet("http://localhost:8080/version");
}
@Then("^the client receives status code of (\\d+)$")
- public void the_client_receives_status_code_of(int statusCode) throws Throwable{
+ public void the_client_receives_status_code_of(int statusCode) throws Throwable {
final HttpStatus currentStatusCode = latestResponse.getTheResponse().getStatusCode();
- assertThat("status code is incorrect : "+ latestResponse.getBody(), currentStatusCode.value(), is(statusCode) );
+ assertThat("status code is incorrect : " + latestResponse.getBody(), currentStatusCode.value(), is(statusCode));
}
@And("^the client receives server version (.+)$")
- public void the_client_receives_server_version_body(String version) throws Throwable{
- assertThat(latestResponse.getBody(), is(version)) ;
+ public void the_client_receives_server_version_body(String version) throws Throwable {
+ assertThat(latestResponse.getBody(), is(version));
}
}
\ No newline at end of file
diff --git a/spring-exceptions/.gitignore b/spring-exceptions/.gitignore
index 83c05e60c8..2d669fa30b 100644
--- a/spring-exceptions/.gitignore
+++ b/spring-exceptions/.gitignore
@@ -1,5 +1,7 @@
*.class
+derby.log
+
#folders#
/target
/neoDb*
diff --git a/spring-exceptions/.settings/.jsdtscope b/spring-exceptions/.settings/.jsdtscope
deleted file mode 100644
index b46b9207a8..0000000000
--- a/spring-exceptions/.settings/.jsdtscope
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/spring-exceptions/.settings/org.eclipse.jdt.core.prefs b/spring-exceptions/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index fb671a82a6..0000000000
--- a/spring-exceptions/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,95 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-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.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-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.8
diff --git a/spring-exceptions/.settings/org.eclipse.jdt.ui.prefs b/spring-exceptions/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 471e9b0d81..0000000000
--- a/spring-exceptions/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,55 +0,0 @@
-#Sat Jan 21 23:04:06 EET 2012
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=true
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=true
-sp_cleanup.make_local_variable_final=true
-sp_cleanup.make_parameters_final=true
-sp_cleanup.make_private_fields_final=false
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=false
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=true
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=true
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=true
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/spring-exceptions/.settings/org.eclipse.m2e.core.prefs b/spring-exceptions/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f1cb..0000000000
--- a/spring-exceptions/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/spring-exceptions/.settings/org.eclipse.m2e.wtp.prefs b/spring-exceptions/.settings/org.eclipse.m2e.wtp.prefs
deleted file mode 100644
index ef86089622..0000000000
--- a/spring-exceptions/.settings/org.eclipse.m2e.wtp.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false
diff --git a/spring-exceptions/.settings/org.eclipse.wst.common.component b/spring-exceptions/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index 7785d041ba..0000000000
--- a/spring-exceptions/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/spring-exceptions/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-exceptions/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 9ca0d1c1b7..0000000000
--- a/spring-exceptions/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/spring-exceptions/.settings/org.eclipse.wst.jsdt.ui.superType.container b/spring-exceptions/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a480..0000000000
--- a/spring-exceptions/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/spring-exceptions/.settings/org.eclipse.wst.jsdt.ui.superType.name b/spring-exceptions/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b6ec..0000000000
--- a/spring-exceptions/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window
\ No newline at end of file
diff --git a/spring-exceptions/.settings/org.eclipse.wst.validation.prefs b/spring-exceptions/.settings/org.eclipse.wst.validation.prefs
deleted file mode 100644
index 0d0aee4f72..0000000000
--- a/spring-exceptions/.settings/org.eclipse.wst.validation.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-DELEGATES_PREFERENCE=delegateValidatorList
-USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.402.v201212031633
-disabled=06target
-eclipse.preferences.version=1
-override=true
-suspend=false
-vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01
-vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01
-vals/org.eclipse.wst.jsdt.web.core.JsBatchValidator/global=TF02
-vf.version=3
diff --git a/spring-exceptions/.settings/org.eclipse.wst.ws.service.policy.prefs b/spring-exceptions/.settings/org.eclipse.wst.ws.service.policy.prefs
deleted file mode 100644
index 9cfcabe16f..0000000000
--- a/spring-exceptions/.settings/org.eclipse.wst.ws.service.policy.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.wst.ws.service.policy.projectEnabled=false
diff --git a/spring-exceptions/pom.xml b/spring-exceptions/pom.xml
index 9e3cb81ef2..9ed3285018 100644
--- a/spring-exceptions/pom.xml
+++ b/spring-exceptions/pom.xml
@@ -135,6 +135,27 @@
el-api
2.2
+
+
+ org.apache.derby
+ derby
+ 10.12.1.1
+
+
+ org.apache.derby
+ derbyclient
+ 10.12.1.1
+
+
+ org.apache.derby
+ derbynet
+ 10.12.1.1
+
+
+ org.apache.derby
+ derbytools
+ 10.12.1.1
+
diff --git a/spring-exceptions/src/main/java/org/baeldung/ex/nontransientexception/cause/Cause1NonTransientConfig.java b/spring-exceptions/src/main/java/org/baeldung/ex/nontransientexception/cause/Cause1NonTransientConfig.java
index 266a04b679..3337e4796d 100644
--- a/spring-exceptions/src/main/java/org/baeldung/ex/nontransientexception/cause/Cause1NonTransientConfig.java
+++ b/spring-exceptions/src/main/java/org/baeldung/ex/nontransientexception/cause/Cause1NonTransientConfig.java
@@ -20,7 +20,7 @@ import com.google.common.base.Preconditions;
@Configuration
@EnableTransactionManagement
-@PropertySource({ "classpath:persistence-mysql.properties" })
+@PropertySource({ "classpath:persistence-derby.properties" })
@ComponentScan({ "org.baeldung.persistence" })
public class Cause1NonTransientConfig {
diff --git a/spring-exceptions/src/main/java/org/baeldung/ex/nontransientexception/cause/Cause4NonTransientConfig.java b/spring-exceptions/src/main/java/org/baeldung/ex/nontransientexception/cause/Cause4NonTransientConfig.java
index 19e2ceebca..3543526f37 100644
--- a/spring-exceptions/src/main/java/org/baeldung/ex/nontransientexception/cause/Cause4NonTransientConfig.java
+++ b/spring-exceptions/src/main/java/org/baeldung/ex/nontransientexception/cause/Cause4NonTransientConfig.java
@@ -20,7 +20,7 @@ import com.google.common.base.Preconditions;
@Configuration
@EnableTransactionManagement
-@PropertySource({ "classpath:persistence-mysql.properties" })
+@PropertySource({ "classpath:persistence-derby.properties" })
@ComponentScan({ "org.baeldung.persistence" })
public class Cause4NonTransientConfig {
@@ -72,5 +72,4 @@ public class Cause4NonTransientConfig {
// hibernateProperties.setProperty("hibernate.globally_quoted_identifiers", "true");
return hibernateProperties;
}
-
}
diff --git a/spring-exceptions/src/main/resources/persistence-derby.properties b/spring-exceptions/src/main/resources/persistence-derby.properties
new file mode 100644
index 0000000000..49fac9877e
--- /dev/null
+++ b/spring-exceptions/src/main/resources/persistence-derby.properties
@@ -0,0 +1,10 @@
+# jdbc.X
+jdbc.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
+jdbc.url=jdbc:derby:memory:spring_exceptions;create=true
+jdbc.user=tutorialuser
+jdbc.pass=tutorialpass
+
+# hibernate.X
+hibernate.dialect=org.hibernate.dialect.DerbyDialect
+hibernate.show_sql=false
+hibernate.hbm2ddl.auto=create
diff --git a/spring-exceptions/src/test/java/org/baeldung/ex/nontransientdataaccessexception/CleanupFailureExceptionTest.java b/spring-exceptions/src/test/java/org/baeldung/ex/nontransientdataaccessexception/CleanupFailureExceptionTest.java
index 2f0a8fe09d..eea9289757 100644
--- a/spring-exceptions/src/test/java/org/baeldung/ex/nontransientdataaccessexception/CleanupFailureExceptionTest.java
+++ b/spring-exceptions/src/test/java/org/baeldung/ex/nontransientdataaccessexception/CleanupFailureExceptionTest.java
@@ -8,15 +8,19 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.CleanupFailureDataAccessException;
-import org.springframework.dao.NonTransientDataAccessException;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.AnnotationConfigContextLoader;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = { Cause1NonTransientConfig.class }, loader = AnnotationConfigContextLoader.class)
public class CleanupFailureExceptionTest {
+ private static final Logger LOG = Logger.getLogger(CleanupFailureExceptionTest.class.getName());
+
@Autowired
private SessionFactory sessionFactory;
@@ -31,8 +35,8 @@ public class CleanupFailureExceptionTest {
} finally {
try {
sessionFactory.close();
- } catch (final NonTransientDataAccessException exc) {
- throw new CleanupFailureDataAccessException("Closing connection failed", exc.getCause());
+ } catch (final CleanupFailureDataAccessException exc) {
+ LOG.log(Level.SEVERE, exc.getMessage());
}
}
}
diff --git a/spring-exceptions/src/test/java/org/baeldung/ex/nontransientdataaccessexception/InvalidResourceUsageExceptionTest.java b/spring-exceptions/src/test/java/org/baeldung/ex/nontransientdataaccessexception/InvalidResourceUsageExceptionTest.java
index 9afe2533de..9c4fd55fa4 100644
--- a/spring-exceptions/src/test/java/org/baeldung/ex/nontransientdataaccessexception/InvalidResourceUsageExceptionTest.java
+++ b/spring-exceptions/src/test/java/org/baeldung/ex/nontransientdataaccessexception/InvalidResourceUsageExceptionTest.java
@@ -1,7 +1,5 @@
package org.baeldung.ex.nontransientdataaccessexception;
-import javax.sql.DataSource;
-
import org.baeldung.ex.nontransientexception.cause.Cause1NonTransientConfig;
import org.baeldung.persistence.service.IFooService;
import org.junit.Test;
@@ -14,25 +12,35 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.AnnotationConfigContextLoader;
+import javax.sql.DataSource;
+
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = { Cause1NonTransientConfig.class }, loader = AnnotationConfigContextLoader.class)
public class InvalidResourceUsageExceptionTest {
- @Autowired
- private IFooService fooService;
- @Autowired
- private DataSource restDataSource;
+ @Autowired
+ private IFooService fooService;
- @Test(expected = InvalidDataAccessResourceUsageException.class)
- public void whenRetrievingDataUserNoSelectRights_thenInvalidResourceUsageException() {
- fooService.findAll();
+ @Autowired
+ private DataSource restDataSource;
+
+ @Test(expected = InvalidDataAccessResourceUsageException.class)
+ public void whenRetrievingDataUserNoSelectRights_thenInvalidResourceUsageException() {
+ final JdbcTemplate jdbcTemplate = new JdbcTemplate(restDataSource);
+ jdbcTemplate.execute("revoke select from tutorialuser");
+
+ try {
+ fooService.findAll();
+ } finally {
+ jdbcTemplate.execute("grant select to tutorialuser");
+ }
}
- @Test(expected = BadSqlGrammarException.class)
- public void whenIncorrectSql_thenBadSqlGrammarException() {
- final JdbcTemplate jdbcTemplate = new JdbcTemplate(restDataSource);
+ @Test(expected = BadSqlGrammarException.class)
+ public void whenIncorrectSql_thenBadSqlGrammarException() {
+ final JdbcTemplate jdbcTemplate = new JdbcTemplate(restDataSource);
- jdbcTemplate.queryForObject("select * fro foo where id=3", Integer.class);
- }
+ jdbcTemplate.queryForObject("select * fro foo where id=3", Integer.class);
+ }
}
diff --git a/spring-exceptions/src/test/java/org/baeldung/ex/nontransientdataaccessexception/PermissionDeniedException.java b/spring-exceptions/src/test/java/org/baeldung/ex/nontransientdataaccessexception/PermissionDeniedException.java
deleted file mode 100644
index 7f91b52e00..0000000000
--- a/spring-exceptions/src/test/java/org/baeldung/ex/nontransientdataaccessexception/PermissionDeniedException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.baeldung.ex.nontransientdataaccessexception;
-
-import org.baeldung.ex.nontransientexception.cause.Cause1NonTransientConfig;
-import org.baeldung.persistence.model.Foo;
-import org.baeldung.persistence.service.IFooService;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.dao.PermissionDeniedDataAccessException;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.support.AnnotationConfigContextLoader;
-
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(classes = { Cause1NonTransientConfig.class }, loader = AnnotationConfigContextLoader.class)
-public class PermissionDeniedException {
-
- @Autowired
- private IFooService fooService;
-
- @Test(expected = PermissionDeniedDataAccessException.class)
- public void whenRetrievingDataUserNoSelectRights_thenPermissionDeniedException() {
- final Foo foo = new Foo("foo");
- fooService.create(foo);
- }
-
-}
diff --git a/spring-hibernate3/.settings/.jsdtscope b/spring-hibernate3/.settings/.jsdtscope
deleted file mode 100644
index b46b9207a8..0000000000
--- a/spring-hibernate3/.settings/.jsdtscope
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/spring-hibernate3/.settings/org.eclipse.jdt.core.prefs b/spring-hibernate3/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 13146d5df6..0000000000
--- a/spring-hibernate3/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,95 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-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.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-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.8
diff --git a/spring-hibernate3/.settings/org.eclipse.jdt.ui.prefs b/spring-hibernate3/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 471e9b0d81..0000000000
--- a/spring-hibernate3/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,55 +0,0 @@
-#Sat Jan 21 23:04:06 EET 2012
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=true
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=true
-sp_cleanup.make_local_variable_final=true
-sp_cleanup.make_parameters_final=true
-sp_cleanup.make_private_fields_final=false
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=false
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=true
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=true
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=true
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/spring-hibernate3/.settings/org.eclipse.m2e.core.prefs b/spring-hibernate3/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f1cb..0000000000
--- a/spring-hibernate3/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/spring-hibernate3/.settings/org.eclipse.m2e.wtp.prefs b/spring-hibernate3/.settings/org.eclipse.m2e.wtp.prefs
deleted file mode 100644
index ef86089622..0000000000
--- a/spring-hibernate3/.settings/org.eclipse.m2e.wtp.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false
diff --git a/spring-hibernate3/.settings/org.eclipse.wst.common.component b/spring-hibernate3/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index 14b1679703..0000000000
--- a/spring-hibernate3/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/spring-hibernate3/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-hibernate3/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 9ca0d1c1b7..0000000000
--- a/spring-hibernate3/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/spring-hibernate3/.settings/org.eclipse.wst.jsdt.ui.superType.container b/spring-hibernate3/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a480..0000000000
--- a/spring-hibernate3/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/spring-hibernate3/.settings/org.eclipse.wst.jsdt.ui.superType.name b/spring-hibernate3/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b6ec..0000000000
--- a/spring-hibernate3/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window
\ No newline at end of file
diff --git a/spring-hibernate3/.settings/org.eclipse.wst.validation.prefs b/spring-hibernate3/.settings/org.eclipse.wst.validation.prefs
deleted file mode 100644
index 0d0aee4f72..0000000000
--- a/spring-hibernate3/.settings/org.eclipse.wst.validation.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-DELEGATES_PREFERENCE=delegateValidatorList
-USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.402.v201212031633
-disabled=06target
-eclipse.preferences.version=1
-override=true
-suspend=false
-vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01
-vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01
-vals/org.eclipse.wst.jsdt.web.core.JsBatchValidator/global=TF02
-vf.version=3
diff --git a/spring-hibernate3/.settings/org.eclipse.wst.ws.service.policy.prefs b/spring-hibernate3/.settings/org.eclipse.wst.ws.service.policy.prefs
deleted file mode 100644
index 9cfcabe16f..0000000000
--- a/spring-hibernate3/.settings/org.eclipse.wst.ws.service.policy.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.wst.ws.service.policy.projectEnabled=false
diff --git a/spring-hibernate4/.settings/.jsdtscope b/spring-hibernate4/.settings/.jsdtscope
deleted file mode 100644
index b46b9207a8..0000000000
--- a/spring-hibernate4/.settings/.jsdtscope
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/spring-hibernate4/.settings/org.eclipse.jdt.core.prefs b/spring-hibernate4/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 4561074422..0000000000
--- a/spring-hibernate4/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,95 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-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.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-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.8
diff --git a/spring-hibernate4/.settings/org.eclipse.jdt.ui.prefs b/spring-hibernate4/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 471e9b0d81..0000000000
--- a/spring-hibernate4/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,55 +0,0 @@
-#Sat Jan 21 23:04:06 EET 2012
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=true
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=true
-sp_cleanup.make_local_variable_final=true
-sp_cleanup.make_parameters_final=true
-sp_cleanup.make_private_fields_final=false
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=false
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=true
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=true
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=true
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/spring-hibernate4/.settings/org.eclipse.m2e.core.prefs b/spring-hibernate4/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f1cb..0000000000
--- a/spring-hibernate4/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/spring-hibernate4/.settings/org.eclipse.m2e.wtp.prefs b/spring-hibernate4/.settings/org.eclipse.m2e.wtp.prefs
deleted file mode 100644
index ef86089622..0000000000
--- a/spring-hibernate4/.settings/org.eclipse.m2e.wtp.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false
diff --git a/spring-hibernate4/.settings/org.eclipse.wst.common.component b/spring-hibernate4/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index 6192602079..0000000000
--- a/spring-hibernate4/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/spring-hibernate4/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-hibernate4/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 9ca0d1c1b7..0000000000
--- a/spring-hibernate4/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/spring-hibernate4/.settings/org.eclipse.wst.jsdt.ui.superType.container b/spring-hibernate4/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a480..0000000000
--- a/spring-hibernate4/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/spring-hibernate4/.settings/org.eclipse.wst.jsdt.ui.superType.name b/spring-hibernate4/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b6ec..0000000000
--- a/spring-hibernate4/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window
\ No newline at end of file
diff --git a/spring-hibernate4/.settings/org.eclipse.wst.validation.prefs b/spring-hibernate4/.settings/org.eclipse.wst.validation.prefs
deleted file mode 100644
index 0d0aee4f72..0000000000
--- a/spring-hibernate4/.settings/org.eclipse.wst.validation.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-DELEGATES_PREFERENCE=delegateValidatorList
-USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.402.v201212031633
-disabled=06target
-eclipse.preferences.version=1
-override=true
-suspend=false
-vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01
-vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01
-vals/org.eclipse.wst.jsdt.web.core.JsBatchValidator/global=TF02
-vf.version=3
diff --git a/spring-hibernate4/.settings/org.eclipse.wst.ws.service.policy.prefs b/spring-hibernate4/.settings/org.eclipse.wst.ws.service.policy.prefs
deleted file mode 100644
index 9cfcabe16f..0000000000
--- a/spring-hibernate4/.settings/org.eclipse.wst.ws.service.policy.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.wst.ws.service.policy.projectEnabled=false
diff --git a/spring-hibernate4/.settings/org.hibernate.eclipse.console.prefs b/spring-hibernate4/.settings/org.hibernate.eclipse.console.prefs
deleted file mode 100644
index 7505c63770..0000000000
--- a/spring-hibernate4/.settings/org.hibernate.eclipse.console.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-default.configuration=
-eclipse.preferences.version=1
-hibernate3.enabled=true
diff --git a/spring-jpa/.settings/.jsdtscope b/spring-jpa/.settings/.jsdtscope
deleted file mode 100644
index b46b9207a8..0000000000
--- a/spring-jpa/.settings/.jsdtscope
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/spring-jpa/.settings/org.eclipse.jdt.core.prefs b/spring-jpa/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 4561074422..0000000000
--- a/spring-jpa/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,95 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-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.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-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.8
diff --git a/spring-jpa/.settings/org.eclipse.jdt.ui.prefs b/spring-jpa/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 471e9b0d81..0000000000
--- a/spring-jpa/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,55 +0,0 @@
-#Sat Jan 21 23:04:06 EET 2012
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=true
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=true
-sp_cleanup.make_local_variable_final=true
-sp_cleanup.make_parameters_final=true
-sp_cleanup.make_private_fields_final=false
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=false
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=true
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=true
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=true
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/spring-jpa/.settings/org.eclipse.m2e.core.prefs b/spring-jpa/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f1cb..0000000000
--- a/spring-jpa/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/spring-jpa/.settings/org.eclipse.m2e.wtp.prefs b/spring-jpa/.settings/org.eclipse.m2e.wtp.prefs
deleted file mode 100644
index ef86089622..0000000000
--- a/spring-jpa/.settings/org.eclipse.m2e.wtp.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false
diff --git a/spring-jpa/.settings/org.eclipse.wst.common.component b/spring-jpa/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index 0327e45de6..0000000000
--- a/spring-jpa/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/spring-jpa/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-jpa/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index b1c99d7726..0000000000
--- a/spring-jpa/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/spring-jpa/.settings/org.eclipse.wst.jsdt.ui.superType.container b/spring-jpa/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a480..0000000000
--- a/spring-jpa/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/spring-jpa/.settings/org.eclipse.wst.jsdt.ui.superType.name b/spring-jpa/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b6ec..0000000000
--- a/spring-jpa/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window
\ No newline at end of file
diff --git a/spring-jpa/.settings/org.eclipse.wst.validation.prefs b/spring-jpa/.settings/org.eclipse.wst.validation.prefs
deleted file mode 100644
index 0d0aee4f72..0000000000
--- a/spring-jpa/.settings/org.eclipse.wst.validation.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-DELEGATES_PREFERENCE=delegateValidatorList
-USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.402.v201212031633
-disabled=06target
-eclipse.preferences.version=1
-override=true
-suspend=false
-vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01
-vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01
-vals/org.eclipse.wst.jsdt.web.core.JsBatchValidator/global=TF02
-vf.version=3
diff --git a/spring-jpa/.settings/org.eclipse.wst.ws.service.policy.prefs b/spring-jpa/.settings/org.eclipse.wst.ws.service.policy.prefs
deleted file mode 100644
index 9cfcabe16f..0000000000
--- a/spring-jpa/.settings/org.eclipse.wst.ws.service.policy.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.wst.ws.service.policy.projectEnabled=false
diff --git a/spring-jpa/.settings/org.hibernate.eclipse.console.prefs b/spring-jpa/.settings/org.hibernate.eclipse.console.prefs
deleted file mode 100644
index 7505c63770..0000000000
--- a/spring-jpa/.settings/org.hibernate.eclipse.console.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-default.configuration=
-eclipse.preferences.version=1
-hibernate3.enabled=true
diff --git a/spring-mvc-java/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/spring-mvc-java/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
deleted file mode 100644
index 627021fb96..0000000000
--- a/spring-mvc-java/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/spring-mvc-java/.settings/.jsdtscope b/spring-mvc-java/.settings/.jsdtscope
deleted file mode 100644
index b46b9207a8..0000000000
--- a/spring-mvc-java/.settings/.jsdtscope
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/spring-mvc-java/.settings/org.eclipse.jdt.core.prefs b/spring-mvc-java/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 5ff04b9f96..0000000000
--- a/spring-mvc-java/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,91 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-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.8
-org.eclipse.jdt.core.compiler.compliance=1.8
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-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.8
diff --git a/spring-mvc-java/.settings/org.eclipse.jdt.ui.prefs b/spring-mvc-java/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 471e9b0d81..0000000000
--- a/spring-mvc-java/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,55 +0,0 @@
-#Sat Jan 21 23:04:06 EET 2012
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=true
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=true
-sp_cleanup.make_local_variable_final=true
-sp_cleanup.make_parameters_final=true
-sp_cleanup.make_private_fields_final=false
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=false
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=true
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=true
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=true
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/spring-mvc-java/.settings/org.eclipse.m2e.core.prefs b/spring-mvc-java/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f1cb..0000000000
--- a/spring-mvc-java/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/spring-mvc-java/.settings/org.eclipse.m2e.wtp.prefs b/spring-mvc-java/.settings/org.eclipse.m2e.wtp.prefs
deleted file mode 100644
index ef86089622..0000000000
--- a/spring-mvc-java/.settings/org.eclipse.m2e.wtp.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false
diff --git a/spring-mvc-java/.settings/org.eclipse.wst.common.component b/spring-mvc-java/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index b23283ab37..0000000000
--- a/spring-mvc-java/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/spring-mvc-java/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-mvc-java/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 9ca0d1c1b7..0000000000
--- a/spring-mvc-java/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/spring-mvc-java/.settings/org.eclipse.wst.jsdt.ui.superType.container b/spring-mvc-java/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a480..0000000000
--- a/spring-mvc-java/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/spring-mvc-java/.settings/org.eclipse.wst.jsdt.ui.superType.name b/spring-mvc-java/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b6ec..0000000000
--- a/spring-mvc-java/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window
\ No newline at end of file
diff --git a/spring-mvc-java/.settings/org.eclipse.wst.validation.prefs b/spring-mvc-java/.settings/org.eclipse.wst.validation.prefs
deleted file mode 100644
index 0d0aee4f72..0000000000
--- a/spring-mvc-java/.settings/org.eclipse.wst.validation.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-DELEGATES_PREFERENCE=delegateValidatorList
-USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.402.v201212031633
-disabled=06target
-eclipse.preferences.version=1
-override=true
-suspend=false
-vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01
-vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01
-vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01
-vals/org.eclipse.wst.jsdt.web.core.JsBatchValidator/global=TF02
-vf.version=3
diff --git a/spring-mvc-java/.settings/org.eclipse.wst.ws.service.policy.prefs b/spring-mvc-java/.settings/org.eclipse.wst.ws.service.policy.prefs
deleted file mode 100644
index 9cfcabe16f..0000000000
--- a/spring-mvc-java/.settings/org.eclipse.wst.ws.service.policy.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.wst.ws.service.policy.projectEnabled=false
diff --git a/spring-mvc-java/src/main/java/com/baeldung/web/controller/CompanyController.java b/spring-mvc-java/src/main/java/com/baeldung/web/controller/CompanyController.java
index 8228eafd5c..8dcfe68a84 100644
--- a/spring-mvc-java/src/main/java/com/baeldung/web/controller/CompanyController.java
+++ b/spring-mvc-java/src/main/java/com/baeldung/web/controller/CompanyController.java
@@ -1,56 +1,80 @@
package com.baeldung.web.controller;
-import com.baeldung.model.Company;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.ModelMap;
-import org.springframework.validation.BindingResult;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.servlet.ModelAndView;
-
import java.util.HashMap;
import java.util.Map;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.MatrixVariable;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.baeldung.model.Company;
+
@Controller
public class CompanyController {
- Map companyMap = new HashMap<>();
+ Map companyMap = new HashMap<>();
- @RequestMapping(value = "/company", method = RequestMethod.GET)
- public ModelAndView showForm() {
- return new ModelAndView("companyHome", "company", new Company());
- }
+ @RequestMapping(value = "/company", method = RequestMethod.GET)
+ public ModelAndView showForm() {
+ return new ModelAndView("companyHome", "company", new Company());
+ }
- @RequestMapping(value = "/company/{Id}", produces = { "application/json", "application/xml" }, method = RequestMethod.GET)
- public @ResponseBody Company getCompanyById(@PathVariable final long Id) {
- return companyMap.get(Id);
- }
+ @RequestMapping(value = "/company/{Id}", produces = { "application/json",
+ "application/xml" }, method = RequestMethod.GET)
+ public @ResponseBody Company getCompanyById(@PathVariable final long Id) {
+ return companyMap.get(Id);
+ }
- @RequestMapping(value = "/addCompany", method = RequestMethod.POST)
- public String submit(@ModelAttribute("company") final Company company, final BindingResult result, final ModelMap model) {
- if (result.hasErrors()) {
- return "error";
- }
- model.addAttribute("name", company.getName());
- model.addAttribute("id", company.getId());
+ @RequestMapping(value = "/addCompany", method = RequestMethod.POST)
+ public String submit(@ModelAttribute("company") final Company company,
+ final BindingResult result, final ModelMap model) {
+ if (result.hasErrors()) {
+ return "error";
+ }
+ model.addAttribute("name", company.getName());
+ model.addAttribute("id", company.getId());
- companyMap.put(company.getId(), company);
+ companyMap.put(company.getId(), company);
- return "companyView";
- }
+ return "companyView";
+ }
- @RequestMapping(value = "/companyEmployee/{company}/employeeData/{employee}", method = RequestMethod.GET)
- @ResponseBody
- public ResponseEntity