diff --git a/algorithms/README.md b/algorithms/README.md index dc12b528da..8cf4c35b68 100644 --- a/algorithms/README.md +++ b/algorithms/README.md @@ -8,3 +8,4 @@ - [Check If a Number Is Prime in Java](http://www.baeldung.com/java-prime-numbers) - [Example of Hill Climbing Algorithm](http://www.baeldung.com/java-hill-climbing-algorithm) - [Monte Carlo Tree Search for Tic-Tac-Toe Game](http://www.baeldung.com/java-monte-carlo-tree-search) +- [String Search Algorithms for Large Texts](http://www.baeldung.com/java-full-text-search-algorithms) diff --git a/apache-shiro/README.md b/apache-shiro/README.md index e69de29bb2..bc3480b266 100644 --- a/apache-shiro/README.md +++ b/apache-shiro/README.md @@ -0,0 +1,2 @@ +### Relevant articles +- [Introduction to Apache Shiro](http://www.baeldung.com/apache-shiro) diff --git a/bootique/README.md b/bootique/README.md new file mode 100644 index 0000000000..2ef898fcf7 --- /dev/null +++ b/bootique/README.md @@ -0,0 +1,2 @@ +### Relevant Articles: +- [Introduction to Bootique](http://www.baeldung.com/bootique) diff --git a/core-java-9/README.md b/core-java-9/README.md index c14203ce89..f0b2e3f206 100644 --- a/core-java-9/README.md +++ b/core-java-9/README.md @@ -16,3 +16,4 @@ - [Java 9 Optional API Additions](http://www.baeldung.com/java-9-optional) - [Java 9 Reactive Streams](http://www.baeldung.com/java-9-reactive-streams) - [How to Get All Dates Between Two Dates?](http://www.baeldung.com/java-between-dates) +- [Java 9 java.util.Objects Additions](http://www.baeldung.com/java-9-objects-new) diff --git a/core-java/README.md b/core-java/README.md index 57457e90fe..0f0e4cc858 100644 --- a/core-java/README.md +++ b/core-java/README.md @@ -99,4 +99,10 @@ - [ClassNotFoundException vs NoClassDefFoundError](http://www.baeldung.com/java-classnotfoundexception-and-noclassdeffounderror) - [Guide to UUID in Java](http://www.baeldung.com/java-uuid) - [Guide to Escaping Characters in Java RegExps](http://www.baeldung.com/java-regexp-escape-char) +- [Guide to hashCode() in Java](http://www.baeldung.com/java-hashcode) +- [Collect a Java Stream to an Immutable Collection](http://www.baeldung.com/java-stream-immutable-collection) +- [Difference between URL and URI](http://www.baeldung.com/java-url-vs-uri) +- [Broadcasting and Multicasting in Java](http://www.baeldung.com/java-broadcast-multicast) +- [Converting a List to String in Java](http://www.baeldung.com/java-list-to-string) +- [CharSequence vs. String in Java](http://www.baeldung.com/java-char-sequence-string) - [Period and Duration in Java](http://www.baeldung.com/java-period-duration) diff --git a/grpc/README.md b/grpc/README.md new file mode 100644 index 0000000000..5a60ca2e7e --- /dev/null +++ b/grpc/README.md @@ -0,0 +1,2 @@ +### Relevant Articles: +- [Introduction to gRPC](http://www.baeldung.com/grpc-introduction) diff --git a/jee7/README.md b/jee7/README.md index a2493e561b..08a180cfa3 100644 --- a/jee7/README.md +++ b/jee7/README.md @@ -5,3 +5,4 @@ - [Introduction to JAX-WS](http://www.baeldung.com/jax-ws) - [A Guide to Java EE Web-Related Annotations](http://www.baeldung.com/javaee-web-annotations) - [Introduction to Testing with Arquillian](http://www.baeldung.com/arquillian) +- [Securing Java EE with Spring Security](http://www.baeldung.com/java-ee-spring-security) diff --git a/junit5/README.md b/junit5/README.md index 49cd8e61a4..a3bb8fc1be 100644 --- a/junit5/README.md +++ b/junit5/README.md @@ -5,3 +5,5 @@ - [A Guide to @RepeatedTest in Junit 5](http://www.baeldung.com/junit-5-repeated-test) - [Guide to Dynamic Tests in Junit 5](http://www.baeldung.com/junit5-dynamic-tests) - [A Guied to JUnit 5 Extensions](http://www.baeldung.com/junit-5-extensions) +- [Inject Parameters into JUnit Jupiter Unit Tests](http://www.baeldung.com/junit-5-parameters) + diff --git a/kotlin/README.md b/kotlin/README.md index 91933e94dc..720187dc44 100644 --- a/kotlin/README.md +++ b/kotlin/README.md @@ -13,4 +13,7 @@ - [Overview of Kotlin Collections API](http://www.baeldung.com/kotlin-collections-api) - [Converting a List to Map in Kotlin](http://www.baeldung.com/kotlin-list-to-map) - [Data Classes in Kotlin](http://www.baeldung.com/kotlin-data-classes) +- [Delegated Properties in Kotlin](http://www.baeldung.com/kotlin-delegated-properties) +- [Sealed Classes in Kotlin](http://www.baeldung.com/kotlin-sealed-classes) + diff --git a/libraries-data/README.md b/libraries-data/README.md new file mode 100644 index 0000000000..ca70c61146 --- /dev/null +++ b/libraries-data/README.md @@ -0,0 +1,2 @@ +### Relevant articles +- [Introduction to Reladomo](http://www.baeldung.com/reladomo) diff --git a/libraries/README.md b/libraries/README.md index 510de462c4..74766fb828 100644 --- a/libraries/README.md +++ b/libraries/README.md @@ -30,6 +30,14 @@ - [Introduction to Neuroph](http://www.baeldung.com/neuroph) - [Guide to Apache Commons CircularFifoQueue](http://www.baeldung.com/commons-circular-fifo-queue) - [Quick Guide to RSS with Rome](http://www.baeldung.com/rome-rss) +- [Introduction to NoException](http://www.baeldung.com/intrduction-to-noexception) +- [Introduction to PCollections](http://www.baeldung.com/java-pcollections) +- [Introduction to Hoverfly in Java](http://www.baeldung.com/hoverfly) +- [Apache Commons Chain](http://www.baeldung.com/apache-commons-chain) +- [Introduction to Eclipse Collections](http://www.baeldung.com/eclipse-collections) +- [DistinctBy in Java Stream API](http://www.baeldung.com/java-streams-distinct-by) +- [Introduction to Apache Commons CSV](http://www.baeldung.com/apache-commons-csv) +- [Difference Between Two Dates in Java](http://www.baeldung.com/java-date-difference) - [Introduction to NoException](http://www.baeldung.com/no-exception) - [Introduction to FunctionalJava](http://www.baeldung.com/functional-java) - [Apache Commons IO](http://www.baeldung.com/apache-commons-io) diff --git a/libraries/src/main/java/com/baeldung/commons/lang3/SampleLazyInitializer.java b/libraries/src/main/java/com/baeldung/commons/lang3/SampleLazyInitializer.java new file mode 100644 index 0000000000..56a49d2659 --- /dev/null +++ b/libraries/src/main/java/com/baeldung/commons/lang3/SampleLazyInitializer.java @@ -0,0 +1,11 @@ +package com.baeldung.commons.lang3; + +import org.apache.commons.lang3.concurrent.LazyInitializer; + +public class SampleLazyInitializer extends LazyInitializer { + + @Override + protected SampleObject initialize() { + return new SampleObject(); + } +} \ No newline at end of file diff --git a/libraries/src/main/java/com/baeldung/commons/lang3/SampleObject.java b/libraries/src/main/java/com/baeldung/commons/lang3/SampleObject.java new file mode 100644 index 0000000000..0e61176732 --- /dev/null +++ b/libraries/src/main/java/com/baeldung/commons/lang3/SampleObject.java @@ -0,0 +1,7 @@ +package com.baeldung.commons.lang3; + +public class SampleObject { + + //Ignored + +} diff --git a/libraries/src/test/java/com/baeldung/commons/lang3/Lang3UtilsTest.java b/libraries/src/test/java/com/baeldung/commons/lang3/Lang3UtilsTest.java index 2e74ad3c24..af70ccecc7 100644 --- a/libraries/src/test/java/com/baeldung/commons/lang3/Lang3UtilsTest.java +++ b/libraries/src/test/java/com/baeldung/commons/lang3/Lang3UtilsTest.java @@ -1,6 +1,7 @@ package com.baeldung.commons.lang3; import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertSame; @@ -12,12 +13,14 @@ import java.beans.PropertyChangeListener; import java.io.File; import java.lang.reflect.Field; import java.util.Locale; +import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import org.apache.commons.lang3.ArchUtils; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.SystemUtils; import org.apache.commons.lang3.arch.Processor; +import org.apache.commons.lang3.concurrent.ConcurrentException; import org.apache.commons.lang3.concurrent.ConcurrentRuntimeException; import org.apache.commons.lang3.concurrent.ConcurrentUtils; import org.apache.commons.lang3.event.EventUtils; @@ -97,22 +100,37 @@ public class Lang3UtilsTest { public void testAddEventListenerThrowsException() { final ExceptionEventSource src = new ExceptionEventSource(); try { - EventUtils.addEventListener(src, PropertyChangeListener.class, new PropertyChangeListener() { - @Override - public void propertyChange(final PropertyChangeEvent e) { - // Do nothing! - } - }); + EventUtils.addEventListener(src, PropertyChangeListener.class, (PropertyChangeEvent e) -> { + /* Change event*/}); fail("Add method should have thrown an exception, so method should fail."); } catch (final RuntimeException e) { } } + @Test + public void ConcurrentExceptionSample() throws ConcurrentException { + final Error err = new AssertionError("Test"); + try { + ConcurrentUtils.handleCause(new ExecutionException(err)); + fail("Error not thrown!"); + } catch (final Error e) { + assertEquals("Wrong error", err, e); + } + } + public static class ExceptionEventSource { public void addPropertyChangeListener(final PropertyChangeListener listener) { throw new RuntimeException(); } } + @Test + public void testLazyInitializer() throws Exception { + SampleLazyInitializer sampleLazyInitializer = new SampleLazyInitializer(); + SampleObject sampleObjectOne = sampleLazyInitializer.get(); + SampleObject sampleObjectTwo = sampleLazyInitializer.get(); + assertEquals(sampleObjectOne, sampleObjectTwo); + } + } diff --git a/log4j2/README.md b/log4j2/README.md index 3afd842c82..57ca4df21b 100644 --- a/log4j2/README.md +++ b/log4j2/README.md @@ -1,3 +1,4 @@ ### Relevant articles - [Intro to Log4j2 – Appenders, Layouts and Filters](http://www.baeldung.com/log4j2-appenders-layouts-filters) +- [Log4j 2 and Lambda Expressions](http://www.baeldung.com/log4j-2-lazy-logging) diff --git a/ratpack/README.md b/ratpack/README.md index 8215f74148..02b91da0bd 100644 --- a/ratpack/README.md +++ b/ratpack/README.md @@ -3,3 +3,5 @@ - [Introduction to Ratpack](http://www.baeldung.com/ratpack) - [Ratpack Google Guice Integration](http://www.baeldung.com/ratpack-google-guice) - [Ratpack Integration with Spring Boot](http://www.baeldung.com/ratpack-spring-boot) +- [Ratpack with Hystrix](http://www.baeldung.com/ratpack-hystrix) + diff --git a/rxjava/README.md b/rxjava/README.md index 7670dd4ed3..c7fd0c595d 100644 --- a/rxjava/README.md +++ b/rxjava/README.md @@ -2,3 +2,4 @@ - [Dealing with Backpressure with RxJava](http://www.baeldung.com/rxjava-backpressure) - [How to Test RxJava?](http://www.baeldung.com/rxjava-testing) +- [Implementing Custom Operators in RxJava](http://www.baeldung.com/rxjava-custom-operators) diff --git a/spring-5/README.md b/spring-5/README.md index 4ce0fd4c79..15e12cb5dc 100644 --- a/spring-5/README.md +++ b/spring-5/README.md @@ -9,3 +9,5 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Introduction to the Functional Web Framework in Spring 5](http://www.baeldung.com/spring-5-functional-web) - [Exploring the Spring 5 MVC URL Matching Improvements](http://www.baeldung.com/spring-5-mvc-url-matching) - [Spring 5 WebClient](http://www.baeldung.com/spring-5-webclient) +- [Spring 5 Functional Bean Registration](http://www.baeldung.com/spring-5-functional-beans) + diff --git a/spring-activiti/README.md b/spring-activiti/README.md index fc6eea7f87..3580e29a52 100644 --- a/spring-activiti/README.md +++ b/spring-activiti/README.md @@ -1,3 +1,5 @@ ### Relevant articles - [A Guide to Activiti with Java](http://www.baeldung.com/java-activiti) +- [Introduction to Activiti with Spring](http://www.baeldung.com/spring-activiti) + diff --git a/spring-batch/README.md b/spring-batch/README.md index 953e652cea..5f226e7fd7 100644 --- a/spring-batch/README.md +++ b/spring-batch/README.md @@ -5,3 +5,4 @@ ### Relevant Articles: - [Introduction to Spring Batch](http://www.baeldung.com/introduction-to-spring-batch) +- [Spring Batch using Partitioner](https://github.com/eugenp/tutorials/tree/master/spring-batch) diff --git a/spring-boot-bootstrap/README.md b/spring-boot-bootstrap/README.md index 75a2b35be7..ec6905bf6a 100644 --- a/spring-boot-bootstrap/README.md +++ b/spring-boot-bootstrap/README.md @@ -1,2 +1,3 @@ ### Relevant Articles: - [Bootstrap a Simple Application using Spring Boot](http://www.baeldung.com/spring-boot-start) +- [Spring Boot Dependency Management with a Custom Parent](http://www.baeldung.com/spring-boot-dependency-management-custom-parent) diff --git a/spring-boot/README.MD b/spring-boot/README.MD index e837c88804..5d7eb11954 100644 --- a/spring-boot/README.MD +++ b/spring-boot/README.MD @@ -26,4 +26,5 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [How to Get All Spring-Managed Beans?](http://www.baeldung.com/spring-show-all-beans) - [A Java Client for a WebSockets API](http://www.baeldung.com/websockets-api-java-spring-client) - [Spring Boot and Togglz Aspect](http://www.baeldung.com/spring-togglz) +- [Getting Started with GraphQL and Spring Boot](http://www.baeldung.com/spring-graphql) diff --git a/spring-ldap/README.md b/spring-ldap/README.md index f77572d982..e2517b9d4b 100644 --- a/spring-ldap/README.md +++ b/spring-ldap/README.md @@ -4,6 +4,7 @@ - [Spring LDAP Overview](http://www.baeldung.com/spring-ldap) - [Spring LDAP Example Project](http://www.baeldung.com/spring-ldap-overview/) +- [Guide to Spring Data LDAP](http://www.baeldung.com/spring-data-ldap) diff --git a/spring-mvc-simple/README.md b/spring-mvc-simple/README.md index ffb02c846a..197a22cbac 100644 --- a/spring-mvc-simple/README.md +++ b/spring-mvc-simple/README.md @@ -1,3 +1,4 @@ ## Relevant articles: - [HandlerAdapters in Spring MVC](http://www.baeldung.com/spring-mvc-handler-adapters) +- [Template Engines for Spring](http://www.baeldung.com/spring-template-engines) diff --git a/spring-rest/README.md b/spring-rest/README.md index d9a0e70976..7c0ba325b7 100644 --- a/spring-rest/README.md +++ b/spring-rest/README.md @@ -16,4 +16,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [HTTP PUT vs HTTP PATCH in a REST API](http://www.baeldung.com/http-put-patch-difference-spring) - [Exploring the Spring Boot TestRestTemplate](http://www.baeldung.com/spring-boot-testresttemplate) - [Spring – Log Incoming Requests](http://www.baeldung.com/spring-http-logging) -- [RequestBody and ResponseBody Annotations](http://www.baeldung.com/requestbody-and-responsebody-annotations) \ No newline at end of file +- [RequestBody and ResponseBody Annotations](http://www.baeldung.com/requestbody-and-responsebody-annotations) diff --git a/testing/README.md b/testing/README.md index a691737e4f..3171b67b60 100644 --- a/testing/README.md +++ b/testing/README.md @@ -13,3 +13,5 @@ - [Testing with JGoTesting](http://www.baeldung.com/jgotesting) - [Introduction to JUnitParams](http://www.baeldung.com/junit-params) - [Cucumber Java 8 Support](http://www.baeldung.com/cucumber-java-8-support) +- [Introduction to Lambda Behave](http://www.baeldung.com/lambda-behave) + diff --git a/undertow/README.md b/undertow/README.md new file mode 100644 index 0000000000..8bfb4832e2 --- /dev/null +++ b/undertow/README.md @@ -0,0 +1,2 @@ +### Relevant Articles: +- [Introduction to JBoss Undertow](http://www.baeldung.com/jboss-undertow)