Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6d824ec

Browse filesBrowse files
author
chaos2418
committed
JAVA-8637: addressing PR review comments.
1 parent a62c0f3 commit 6d824ec
Copy full SHA for 6d824ec

File tree

Expand file treeCollapse file tree

5 files changed

+7
-12
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+7
-12
lines changed
Open diff view settings
Collapse file

‎core-java-modules/core-java-lambdas/src/main/java/com/baeldung/java8/lambda/exceptions/LambdaExceptionWrappers.java‎

Copy file name to clipboardExpand all lines: core-java-modules/core-java-lambdas/src/main/java/com/baeldung/java8/lambda/exceptions/LambdaExceptionWrappers.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static Consumer<Integer> lambdaWrapper(Consumer<Integer> consumer) {
1414
try {
1515
consumer.accept(i);
1616
} catch (ArithmeticException e) {
17-
LOGGER.error("Arithmetic Exception occured : {}", e.getMessage());
17+
LOGGER.error("Arithmetic Exception occurred.", e);
1818
}
1919
};
2020
}
@@ -26,7 +26,7 @@ static <T, E extends Exception> Consumer<T> consumerWrapper(Consumer<T> consumer
2626
} catch (Exception ex) {
2727
try {
2828
E exCast = clazz.cast(ex);
29-
LOGGER.error("Exception occured : {}", exCast.getMessage());
29+
LOGGER.error("Exception occurred.", exCast);
3030
} catch (ClassCastException ccEx) {
3131
throw ex;
3232
}
@@ -51,7 +51,7 @@ public static <T, E extends Exception> Consumer<T> handlingConsumerWrapper(Throw
5151
} catch (Exception ex) {
5252
try {
5353
E exCast = exceptionClass.cast(ex);
54-
LOGGER.error("Exception occured : {}", exCast.getMessage());
54+
LOGGER.error("Exception occurred.", exCast);
5555
} catch (ClassCastException ccEx) {
5656
throw new RuntimeException(ex);
5757
}
Collapse file

‎persistence-modules/spring-data-jpa-enterprise/src/main/resources/application.properties‎

Copy file name to clipboardExpand all lines: persistence-modules/spring-data-jpa-enterprise/src/main/resources/application.properties
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spring.datasource.url=jdbc:h2:mem:baeldung
99
#spring.jpa.properties.javax.persistence.schema-generation.scripts.create-source=metadata
1010
#spring.jpa.properties.hibernate.format_sql=true
1111

12-
spring.jpa.show-sql=true
12+
spring.jpa.show-sql=false
1313

1414
#hibernate.dialect=org.hibernate.dialect.H2Dialect
1515
spring.jpa.properties.hibernate.id.new_generator_mappings=false
Collapse file

‎persistence-modules/spring-data-jpa-enterprise/src/test/java/com/baeldung/SpringContextTest.java‎

Copy file name to clipboardExpand all lines: persistence-modules/spring-data-jpa-enterprise/src/test/java/com/baeldung/SpringContextTest.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
@RunWith(SpringRunner.class)
1212
@SpringBootTest(classes = Application.class)
13-
@TestPropertySource(properties = {"spring.jpa.show-sql=false "})
1413
public class SpringContextTest {
1514

1615
@Test
Collapse file

‎persistence-modules/spring-data-jpa-enterprise/src/test/java/com/baeldung/partialupdate/PartialUpdateUnitTest.java‎

Copy file name to clipboardExpand all lines: persistence-modules/spring-data-jpa-enterprise/src/test/java/com/baeldung/partialupdate/PartialUpdateUnitTest.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
@RunWith(SpringRunner.class)
1919
@SpringBootTest(classes = PartialUpdateApplication.class)
20-
@TestPropertySource(properties = {"spring.jpa.show-sql=false "})
2120
public class PartialUpdateUnitTest {
2221

2322
@Autowired
Collapse file

‎spring-caching/src/test/java/com/baeldung/ehcache/SquareCalculatorUnitTest.java‎

Copy file name to clipboardExpand all lines: spring-caching/src/test/java/com/baeldung/ehcache/SquareCalculatorUnitTest.java
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,20 @@ public void setup() {
2525
@Test
2626
public void whenCalculatingSquareValueOnce_thenCacheDontHaveValues() {
2727
for (int i = 10; i < 15; i++) {
28-
assertFalse(cacheHelper.getSquareNumberCache()
29-
.containsKey(i));
28+
assertFalse(cacheHelper.getSquareNumberCache().containsKey(i));
3029
LOGGER.debug("Square value of {} is: {}", i, squaredCalculator.getSquareValueOfNumber(i));
3130
}
3231
}
3332

3433
@Test
3534
public void whenCalculatingSquareValueAgain_thenCacheHasAllValues() {
3635
for (int i = 10; i < 15; i++) {
37-
assertFalse(cacheHelper.getSquareNumberCache()
38-
.containsKey(i));
36+
assertFalse(cacheHelper.getSquareNumberCache().containsKey(i));
3937
LOGGER.debug("Square value of {} is: {}", i, squaredCalculator.getSquareValueOfNumber(i));
4038
}
4139

4240
for (int i = 10; i < 15; i++) {
43-
assertTrue(cacheHelper.getSquareNumberCache()
44-
.containsKey(i));
41+
assertTrue(cacheHelper.getSquareNumberCache().containsKey(i));
4542
LOGGER.debug("Square value of {} is: {}", i, squaredCalculator.getSquareValueOfNumber(i) + "\n");
4643
}
4744
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.