Merge branch 'eugenp:master' into PR-6865
This commit is contained in:
+7
-7
@@ -5,7 +5,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
public class KadaneAlgorithm {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(BruteForceAlgorithm.class.getName());
|
||||
private Logger logger = LoggerFactory.getLogger(KadaneAlgorithm.class.getName());
|
||||
|
||||
public int maxSubArraySum(int[] arr) {
|
||||
|
||||
@@ -14,15 +14,15 @@ public class KadaneAlgorithm {
|
||||
int end = 0;
|
||||
|
||||
int maxSoFar = arr[0], maxEndingHere = arr[0];
|
||||
|
||||
for (int i = 1; i < size; i++) {
|
||||
|
||||
if (arr[i] > maxEndingHere + arr[i]) {
|
||||
start = i;
|
||||
maxEndingHere = maxEndingHere + arr[i];
|
||||
if (arr[i] > maxEndingHere) {
|
||||
maxEndingHere = arr[i];
|
||||
} else {
|
||||
maxEndingHere = maxEndingHere + arr[i];
|
||||
if (maxSoFar < maxEndingHere) {
|
||||
start = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (maxSoFar < maxEndingHere) {
|
||||
maxSoFar = maxEndingHere;
|
||||
end = i;
|
||||
|
||||
+13
-2
@@ -7,7 +7,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
class KadaneAlgorithmUnitTest {
|
||||
|
||||
@Test
|
||||
void givenArrayWithNegativeNumberWhenMaximumSubarrayThenReturns6() {
|
||||
void givenArrayWithNegativeNumberWhenMaximumSubarrayThenReturnsExpectedResult() {
|
||||
//given
|
||||
int[] arr = new int[] { -3, 1, -8, 4, -1, 2, 1, -5, 5 };
|
||||
//when
|
||||
@@ -27,7 +27,7 @@ class KadaneAlgorithmUnitTest {
|
||||
//then
|
||||
assertEquals(-1, maxSum);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
void givenArrayWithAllPosiitveNumbersWhenMaximumSubarrayThenReturnsExpectedResult() {
|
||||
//given
|
||||
@@ -39,4 +39,15 @@ class KadaneAlgorithmUnitTest {
|
||||
assertEquals(10, maxSum);
|
||||
}
|
||||
|
||||
@Test
|
||||
void givenArrayToTestStartIndexWhenMaximumSubarrayThenReturnsExpectedResult() {
|
||||
//given
|
||||
int[] arr = new int[] { 1, 2, -1, 3, -6, -2 };
|
||||
//when
|
||||
KadaneAlgorithm algorithm = new KadaneAlgorithm();
|
||||
int maxSum = algorithm.maxSubArraySum(arr);
|
||||
//then
|
||||
assertEquals(5, maxSum);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,4 +3,5 @@
|
||||
- [Algorithm to Identify and Validate a Credit Card Number](https://www.baeldung.com/java-validate-cc-number)
|
||||
- [Find the N Most Frequent Elements in a Java Array](https://www.baeldung.com/java-n-most-frequent-elements-array)
|
||||
- [Getting Pixel Array From Image in Java](https://www.baeldung.com/java-getting-pixel-array-from-image)
|
||||
- [Calculate Distance Between Two Coordinates in Java](https://www.baeldung.com/java-find-distance-between-points)
|
||||
- More articles: [[<-- prev]](/algorithms-miscellaneous-6)
|
||||
|
||||
@@ -43,19 +43,19 @@
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.ws</groupId>
|
||||
<artifactId>jaxws-ri</artifactId>
|
||||
<version>2.3.3</version>
|
||||
<version>${jaxws-ri.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<version>${javax.servlet-api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>1.2</version>
|
||||
<version>${jstl.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -117,7 +117,9 @@
|
||||
<properties>
|
||||
<spring.version>5.3.25</spring.version>
|
||||
<cargo-maven2-plugin.version>1.6.1</cargo-maven2-plugin.version>
|
||||
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
|
||||
<jstl.version>1.2</jstl.version>
|
||||
<javax.servlet-api.version>4.0.1</javax.servlet-api.version>
|
||||
<jaxws-ri.version>2.3.3</jaxws-ri.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -241,8 +241,6 @@
|
||||
<httpcore.version>4.4.16</httpcore.version>
|
||||
<httpclient.version>4.5.14</httpclient.version>
|
||||
<mockserver.version>5.11.2</mockserver.version>
|
||||
<!-- maven plugins -->
|
||||
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -21,7 +21,6 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
<properties>
|
||||
<javax.validation.validation-api.version>2.0.1.Final</javax.validation.validation-api.version>
|
||||
</properties>
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
<org.apache.httpcomponents.version>4.5.2</org.apache.httpcomponents.version>
|
||||
<velocity-version>1.7</velocity-version>
|
||||
<velocity-tools-version>2.0</velocity-tools-version>
|
||||
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -49,7 +49,6 @@
|
||||
|
||||
<properties>
|
||||
<asm.version>5.2</asm.version>
|
||||
<maven-jar-plugin.version>2.4</maven-jar-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -1,6 +1,7 @@
|
||||
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>aws-s3-update-object</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
|
||||
@@ -8,4 +8,5 @@ This module contains articles about Simple Storage Service (S3) on AWS
|
||||
- [Multipart Uploads in Amazon S3 with Java](https://www.baeldung.com/aws-s3-multipart-upload)
|
||||
- [Using the JetS3t Java Client With Amazon S3](https://www.baeldung.com/jets3t-amazon-s3)
|
||||
- [Check if a Specified Key Exists in a Given S3 Bucket Using Java](https://www.baeldung.com/java-aws-s3-check-specified-key-exists)
|
||||
- [Listing All AWS S3 Objects in a Bucket Using Java](https://www.baeldung.com/java-aws-s3-list-bucket-objects)
|
||||
- [Listing All AWS S3 Objects in a Bucket Using Java](https://www.baeldung.com/java-aws-s3-list-bucket-objects)
|
||||
- [Update an Existing Amazon S3 Object Using Java](https://www.baeldung.com/java-update-amazon-s3-object)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?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">
|
||||
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>aws-s3</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
|
||||
@@ -122,7 +122,6 @@
|
||||
<docker.image.prefix>${azure.containerRegistry}.azurecr.io</docker.image.prefix>
|
||||
<docker-maven-plugin.version>1.1.0</docker-maven-plugin.version>
|
||||
<azure-webapp-maven-plugin.version>1.1.0</azure-webapp-maven-plugin.version>
|
||||
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -27,6 +27,7 @@
|
||||
<hsqldb.version>2.7.1</hsqldb.version>
|
||||
<spock-core.version>2.3-groovy-3.0</spock-core.version>
|
||||
<gmavenplus-plugin.version>2.1.0</gmavenplus-plugin.version>
|
||||
<maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
|
||||
<properties>
|
||||
<maven.compiler.release>14</maven.compiler.release>
|
||||
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||
<surefire.plugin.version>3.0.0-M3</surefire.plugin.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
|
||||
<properties>
|
||||
<maven.compiler.release>15</maven.compiler.release>
|
||||
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||
<surefire.plugin.version>3.0.0-M3</surefire.plugin.version>
|
||||
</properties>
|
||||
|
||||
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
package com.baeldung.multipleorwithif;
|
||||
|
||||
import static java.time.Month.DECEMBER;
|
||||
import static java.time.Month.NOVEMBER;
|
||||
import static java.time.Month.OCTOBER;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.in;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.time.Month;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class MultipleOrWithIfUnitTest {
|
||||
|
||||
private final Random rand = new Random();
|
||||
|
||||
final Set<Month> months = Set.of(OCTOBER, NOVEMBER, DECEMBER);
|
||||
|
||||
@Test
|
||||
public void givenIfStatement_whenMultipleOrOperator_thenAssert() {
|
||||
assertTrue(multipleOrOperatorIf(monthIn()));
|
||||
assertFalse(multipleOrOperatorIf(monthNotIn()));
|
||||
}
|
||||
|
||||
boolean multipleOrOperatorIf(Month month) {
|
||||
if (month == OCTOBER || month == NOVEMBER || month == DECEMBER) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenSwitch_whenMultipleCase_thenBreakAndAssert() {
|
||||
assertTrue(switchMonth(monthIn()));
|
||||
assertFalse(switchMonth(monthNotIn()));
|
||||
}
|
||||
|
||||
boolean switchMonth(Month month) {
|
||||
return switch (month) {
|
||||
case OCTOBER, NOVEMBER, DECEMBER -> true;
|
||||
default -> false;
|
||||
};
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAllowedValuesList_whenContains_thenAssert() {
|
||||
assertTrue(contains(monthIn()));
|
||||
assertFalse(contains(monthNotIn()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenPredicates_whenTestMultipleOr_thenAssert() {
|
||||
assertTrue(predicateWithIf(monthIn()));
|
||||
assertFalse(predicateWithIf(monthNotIn()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenInputList_whenFilterWithPredicate_thenAssert() {
|
||||
|
||||
List<Month> list = List.of(monthIn(), monthIn(), monthNotIn());
|
||||
|
||||
list.stream()
|
||||
.filter(this::predicateWithIf)
|
||||
.forEach(m -> assertThat(m, is(in(months))));
|
||||
}
|
||||
|
||||
Predicate<Month> orPredicate() {
|
||||
Predicate<Month> predicate = x -> x == OCTOBER;
|
||||
Predicate<Month> predicate1 = x -> x == NOVEMBER;
|
||||
Predicate<Month> predicate2 = x -> x == DECEMBER;
|
||||
|
||||
return predicate.or(predicate1)
|
||||
.or(predicate2);
|
||||
}
|
||||
|
||||
boolean predicateWithIf(Month month) {
|
||||
if (orPredicate().test(month)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenContainsInSetPredicate_whenTestPredicate_thenAssert() {
|
||||
Predicate<Month> collectionPredicate = this::contains;
|
||||
|
||||
assertTrue(collectionPredicate.test(monthIn()));
|
||||
assertFalse(collectionPredicate.test(monthNotIn()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenInputList_whenFilterWithContains_thenAssert() {
|
||||
|
||||
List<Month> monthList = List.of(monthIn(), monthIn(), monthNotIn());
|
||||
|
||||
monthList.stream()
|
||||
.filter(this::contains)
|
||||
.forEach(m -> assertThat(m, is(in(months))));
|
||||
}
|
||||
|
||||
private boolean contains(Month month) {
|
||||
if (months.contains(month)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private Month monthIn() {
|
||||
return Month.of(rand.ints(10, 13)
|
||||
.findFirst()
|
||||
.orElse(10));
|
||||
}
|
||||
|
||||
private Month monthNotIn() {
|
||||
return Month.of(rand.ints(1, 10)
|
||||
.findFirst()
|
||||
.orElse(1));
|
||||
}
|
||||
}
|
||||
@@ -152,7 +152,6 @@
|
||||
<awaitility.version>4.0.2</awaitility.version>
|
||||
<maven.compiler.source>1.9</maven.compiler.source>
|
||||
<maven.compiler.target>1.9</maven.compiler.target>
|
||||
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -13,3 +13,4 @@ This module contains articles about advanced operations on arrays in Java. They
|
||||
- [Performance of System.arraycopy() vs. Arrays.copyOf()](https://www.baeldung.com/java-system-arraycopy-arrays-copyof-performance)
|
||||
- [Slicing Arrays in Java](https://www.baeldung.com/java-slicing-arrays)
|
||||
- [Combining Two or More Byte Arrays](https://www.baeldung.com/java-concatenate-byte-arrays)
|
||||
- [Calculating the Sum of Two Arrays in Java](https://www.baeldung.com/java-sum-arrays-element-wise)
|
||||
|
||||
@@ -13,4 +13,5 @@ This module contains articles about conversions among Collection types and array
|
||||
- [Combining Two Lists Into a Map in Java](https://www.baeldung.com/java-combine-two-lists-into-map)
|
||||
- [Convert a List of Strings to a List of Integers](https://www.baeldung.com/java-convert-list-strings-to-integers)
|
||||
- [Convert List to Long[] Array in Java](https://www.baeldung.com/java-convert-list-object-to-long-array)
|
||||
- [Get the First n Elements of a List Into an Array](https://www.baeldung.com/java-take-start-elements-list-array)
|
||||
- More articles: [[<-- prev]](../core-java-collections-conversions)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?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">
|
||||
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>core-java-collections-list-5</artifactId>
|
||||
<name>core-java-collections-list-5</name>
|
||||
|
||||
@@ -9,4 +9,5 @@ This module contains articles about Map data structures in Java.
|
||||
- [Collections.synchronizedMap vs. ConcurrentHashMap](https://www.baeldung.com/java-synchronizedmap-vs-concurrenthashmap)
|
||||
- [Java HashMap Load Factor](https://www.baeldung.com/java-hashmap-load-factor)
|
||||
- [Converting Java Properties to HashMap](https://www.baeldung.com/java-convert-properties-to-hashmap)
|
||||
- [Get Values and Keys as ArrayList From a HashMap](https://www.baeldung.com/java-values-keys-arraylists-hashmap)
|
||||
- More articles: [[<-- prev]](/core-java-modules/core-java-collections-maps-2)
|
||||
|
||||
+4
@@ -58,4 +58,8 @@ public class DataQueue {
|
||||
return queue.poll();
|
||||
}
|
||||
}
|
||||
|
||||
public Integer getSize() {
|
||||
return queue.size();
|
||||
}
|
||||
}
|
||||
|
||||
+30
-16
@@ -1,12 +1,13 @@
|
||||
package com.baeldung.producerconsumer;
|
||||
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class Producer implements Runnable {
|
||||
private static final Logger log = Logger.getLogger(Producer.class.getCanonicalName());
|
||||
private final DataQueue dataQueue;
|
||||
|
||||
private static int idSequence = 0;
|
||||
final ReentrantLock lock = new ReentrantLock();
|
||||
|
||||
public Producer(DataQueue dataQueue) {
|
||||
this.dataQueue = dataQueue;
|
||||
@@ -19,22 +20,38 @@ public class Producer implements Runnable {
|
||||
|
||||
public void produce() {
|
||||
while (dataQueue.runFlag) {
|
||||
while (dataQueue.isFull() && dataQueue.runFlag) {
|
||||
try {
|
||||
dataQueue.waitOnFull();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
try {
|
||||
lock.lock();
|
||||
|
||||
while (dataQueue.isFull() && dataQueue.runFlag) {
|
||||
try {
|
||||
dataQueue.waitOnFull();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!dataQueue.runFlag) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!dataQueue.runFlag) {
|
||||
break;
|
||||
}
|
||||
Message message = generateMessage();
|
||||
dataQueue.add(message);
|
||||
dataQueue.notifyAllForEmpty();
|
||||
|
||||
Message message = generateMessage();
|
||||
dataQueue.add(message);
|
||||
dataQueue.notifyAllForEmpty();
|
||||
|
||||
log.info("Size of the queue is: " + dataQueue.getSize());
|
||||
|
||||
}
|
||||
finally{
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
//Sleeping on random time to make it realistic
|
||||
ThreadUtil.sleep((long) (Math.random() * 100));
|
||||
}
|
||||
|
||||
log.info("Producer Stopped");
|
||||
}
|
||||
|
||||
@@ -43,9 +60,6 @@ public class Producer implements Runnable {
|
||||
log.info(String.format("[%s] Generated Message. Id: %d, Data: %f%n",
|
||||
Thread.currentThread().getName(), message.getId(), message.getData()));
|
||||
|
||||
//Sleeping on random time to make it realistic
|
||||
ThreadUtil.sleep((long) (message.getData() * 100));
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
+5
-4
@@ -36,8 +36,8 @@ public class ProducerConsumerDemonstrator {
|
||||
|
||||
public static void demoMultipleProducersAndMultipleConsumers() {
|
||||
DataQueue dataQueue = new DataQueue(MAX_QUEUE_CAPACITY);
|
||||
int producerCount = 3;
|
||||
int consumerCount = 3;
|
||||
int producerCount = 5;
|
||||
int consumerCount = 5;
|
||||
List<Thread> threads = new ArrayList<>();
|
||||
Producer producer = new Producer(dataQueue);
|
||||
for(int i = 0; i < producerCount; i++) {
|
||||
@@ -45,6 +45,7 @@ public class ProducerConsumerDemonstrator {
|
||||
producerThread.start();
|
||||
threads.add(producerThread);
|
||||
}
|
||||
|
||||
Consumer consumer = new Consumer(dataQueue);
|
||||
for(int i = 0; i < consumerCount; i++) {
|
||||
Thread consumerThread = new Thread(consumer);
|
||||
@@ -52,8 +53,8 @@ public class ProducerConsumerDemonstrator {
|
||||
threads.add(consumerThread);
|
||||
}
|
||||
|
||||
// let threads run for two seconds
|
||||
sleep(2000);
|
||||
// let threads run for ten seconds
|
||||
sleep(10000);
|
||||
|
||||
// Stop threads
|
||||
producer.stop();
|
||||
|
||||
@@ -11,4 +11,5 @@ This module contains articles about basic Java concurrency
|
||||
- [Runnable vs. Callable in Java](https://www.baeldung.com/java-runnable-callable)
|
||||
- [What Is Thread-Safety and How to Achieve It?](https://www.baeldung.com/java-thread-safety)
|
||||
- [How to Get Notified When a Task Completes in Java Executors](https://www.baeldung.com/java-executors-task-completed-notification)
|
||||
- [Difference Between Future, CompletableFuture, and Rxjava’s Observable](https://www.baeldung.com/java-future-completablefuture-rxjavas-observable)
|
||||
- [[Next -->]](/core-java-modules/core-java-concurrency-basic-2)
|
||||
|
||||
@@ -37,20 +37,19 @@
|
||||
<compilerArgs>--enable-preview</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${surefire.plugin.version}</version>
|
||||
<configuration>
|
||||
<argLine>--enable-preview</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${surefire.plugin.version}</version>
|
||||
<configuration>
|
||||
<argLine>--enable-preview</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source.version>14</maven.compiler.source.version>
|
||||
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||
<maven.compiler.target.version>14</maven.compiler.target.version>
|
||||
<surefire.plugin.version>3.0.0-M3</surefire.plugin.version>
|
||||
</properties>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<artifactId>core-java-modules</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
@@ -25,7 +25,7 @@
|
||||
<version>${commons-lang3.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
<properties>
|
||||
<joda-time.version>2.12.5</joda-time.version>
|
||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||
|
||||
@@ -9,3 +9,4 @@ This module contains articles about converting between Java date and time object
|
||||
- [Convert Between java.time.Instant and java.sql.Timestamp](https://www.baeldung.com/java-time-instant-to-java-sql-timestamp)
|
||||
- [Convert Between LocalDateTime and ZonedDateTime](https://www.baeldung.com/java-localdatetime-zoneddatetime)
|
||||
- [Conversion From 12-Hour Time to 24-Hour Time in Java](https://www.baeldung.com/java-convert-time-format)
|
||||
- [Convert Epoch Time to LocalDate and LocalDateTime](https://www.baeldung.com/java-convert-epoch-localdate)
|
||||
|
||||
@@ -132,7 +132,6 @@
|
||||
<!-- Mime Type Libraries -->
|
||||
<tika.version>2.8.0</tika.version>
|
||||
<jmime-magic.version>0.1.5</jmime-magic.version>
|
||||
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
|
||||
<fscontext.version>4.4.2</fscontext.version>
|
||||
<jakarta-activation-api.version>2.1.2</jakarta-activation-api.version>
|
||||
<angus-activation.version>2.0.1</angus-activation.version>
|
||||
|
||||
@@ -275,7 +275,6 @@
|
||||
<!-- maven plugins -->
|
||||
<javamoney.moneta.version>1.1</javamoney.moneta.version>
|
||||
<maven-javadoc-plugin.version>3.0.0-M1</maven-javadoc-plugin.version>
|
||||
<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
|
||||
<onejar-maven-plugin.version>1.4.4</onejar-maven-plugin.version>
|
||||
<maven-shade-plugin.version>3.1.1</maven-shade-plugin.version>
|
||||
<maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user