Merge branch 'eugenp:master' into master
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
## Akka
|
||||
|
||||
This module contains modules about Akka.
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<artifactId>akka-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<artifactId>akka-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>akka-modules</artifactId>
|
||||
<name>akka-modules</name>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
<module>akka-http</module>
|
||||
<module>akka-streams</module>
|
||||
<module>spring-akka</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<artifactId>akka-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
@@ -12,3 +12,4 @@ This module contains articles about Java 9 core features
|
||||
- [Easy Ways to Write a Java InputStream to an OutputStream](https://www.baeldung.com/java-inputstream-to-outputstream)
|
||||
- [Private Methods in Java Interfaces](https://www.baeldung.com/java-interface-private-methods)
|
||||
- [Java Scanner useDelimiter with Examples](https://www.baeldung.com/java-scanner-usedelimiter)
|
||||
- [Is There a Destructor in Java?](https://www.baeldung.com/java-destructor)
|
||||
|
||||
+6
-1
@@ -32,7 +32,7 @@ public class EmptyMapInitializer {
|
||||
return emptyMap;
|
||||
}
|
||||
|
||||
public Map createGenericEmptyMapUsingMapsObject() {
|
||||
public Map createGenericEmptyMapUsingGuavaMapsObject() {
|
||||
Map genericEmptyMap = Maps.<String, Integer>newHashMap();
|
||||
return genericEmptyMap;
|
||||
}
|
||||
@@ -43,6 +43,11 @@ public class EmptyMapInitializer {
|
||||
return emptyMapUsingGuava;
|
||||
}
|
||||
|
||||
public static Map<String, String> createImmutableMapUsingGuava() {
|
||||
Map<String, String> emptyImmutableMapUsingGuava = ImmutableMap.of();
|
||||
return emptyImmutableMapUsingGuava;
|
||||
}
|
||||
|
||||
public SortedMap<String, String> createEmptySortedMap() {
|
||||
SortedMap<String, String> sortedMap = Collections.emptySortedMap();
|
||||
return sortedMap;
|
||||
|
||||
+5
@@ -28,4 +28,9 @@ public class EmptyMapInitializerUnitTest {
|
||||
assertFalse(emptyMapUsingGuava.isEmpty());
|
||||
}
|
||||
|
||||
@Test(expected=UnsupportedOperationException.class)
|
||||
public void givenImmutableEmptyMapUsingGuava_whenAddingEntries_throwsException() {
|
||||
Map<String, String> map = EmptyMapInitializer.createImmutableMapUsingGuava();
|
||||
map.put("key", "value");
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user