Skip to content

Commit a16584c

Browse files
Merge remote-tracking branch 'origin/master'
2 parents dd146fc + 24ee4fb commit a16584c

80 files changed

Lines changed: 1320 additions & 921 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apache-cxf/cxf-jaxrs-implementation/src/main/java/com/baeldung/cxf/jaxrs/implementation/Baeldung.java renamed to apache-cxf/cxf-jaxrs-implementation/src/main/java/com/baeldung/cxf/jaxrs/implementation/CourseRepository.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
@Path("baeldung")
1111
@Produces("text/xml")
12-
public class Baeldung {
12+
public class CourseRepository {
1313
private Map<Integer, Course> courses = new HashMap<>();
1414

1515
{
@@ -69,4 +69,4 @@ private Course findById(int id) {
6969
}
7070
return null;
7171
}
72-
}
72+
}

‎apache-cxf/cxf-jaxrs-implementation/src/main/java/com/baeldung/cxf/jaxrs/implementation/RestfulServer.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
public class RestfulServer {
88
public static void main(String args[]) throws Exception {
99
JAXRSServerFactoryBean factoryBean = new JAXRSServerFactoryBean();
10-
factoryBean.setResourceClasses(Baeldung.class);
11-
factoryBean.setResourceProvider(new SingletonResourceProvider(new Baeldung()));
10+
factoryBean.setResourceClasses(CourseRepository.class);
11+
factoryBean.setResourceProvider(new SingletonResourceProvider(new CourseRepository()));
1212
factoryBean.setAddress("http://localhost:8080/");
1313
Server server = factoryBean.create();
1414

@@ -18,4 +18,4 @@ public static void main(String args[]) throws Exception {
1818
server.destroy();
1919
System.exit(0);
2020
}
21-
}
21+
}

‎core-java/pom.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@
162162
<configuration>
163163
<excludes>
164164
<exclude>**/*IntegrationTest.java</exclude>
165+
<exclude>**/*LongRunningUnitTest.java</exclude>
166+
<exclude>**/*ManualTest.java</exclude>
165167
</excludes>
166168
</configuration>
167169
</plugin>

‎core-java/src/main/java/com/baeldung/datetime/UseDuration.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
import java.time.Period;
66

77
public class UseDuration {
8-
9-
public LocalTime modifyDates(LocalTime localTime,Duration duration){
8+
9+
public LocalTime modifyDates(LocalTime localTime, Duration duration) {
1010
return localTime.plus(duration);
1111
}
12-
13-
public Duration getDifferenceBetweenDates(LocalTime localTime1,LocalTime localTime2){
12+
13+
public Duration getDifferenceBetweenDates(LocalTime localTime1, LocalTime localTime2) {
1414
return Duration.between(localTime1, localTime2);
1515
}
1616
}

‎core-java/src/main/java/com/baeldung/datetime/UseLocalDate.java‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,39 @@
77
import java.time.temporal.TemporalAdjusters;
88

99
public class UseLocalDate {
10-
11-
public LocalDate getLocalDateUsingFactoryOfMethod(int year, int month, int dayOfMonth){
10+
11+
public LocalDate getLocalDateUsingFactoryOfMethod(int year, int month, int dayOfMonth) {
1212
return LocalDate.of(year, month, dayOfMonth);
1313
}
14-
15-
public LocalDate getLocalDateUsingParseMethod(String representation){
14+
15+
public LocalDate getLocalDateUsingParseMethod(String representation) {
1616
return LocalDate.parse(representation);
1717
}
18-
19-
public LocalDate getLocalDateFromClock(){
18+
19+
public LocalDate getLocalDateFromClock() {
2020
LocalDate localDate = LocalDate.now();
2121
return localDate;
2222
}
23-
24-
public LocalDate getNextDay(LocalDate localDate){
23+
24+
public LocalDate getNextDay(LocalDate localDate) {
2525
return localDate.plusDays(1);
2626
}
27-
28-
public LocalDate getPreviousDay(LocalDate localDate){
27+
28+
public LocalDate getPreviousDay(LocalDate localDate) {
2929
return localDate.minus(1, ChronoUnit.DAYS);
3030
}
31-
32-
public DayOfWeek getDayOfWeek(LocalDate localDate){
31+
32+
public DayOfWeek getDayOfWeek(LocalDate localDate) {
3333
DayOfWeek day = localDate.getDayOfWeek();
3434
return day;
3535
}
36-
37-
public LocalDate getFirstDayOfMonth(){
36+
37+
public LocalDate getFirstDayOfMonth() {
3838
LocalDate firstDayOfMonth = LocalDate.now().with(TemporalAdjusters.firstDayOfMonth());
3939
return firstDayOfMonth;
4040
}
41-
42-
public LocalDateTime getStartOfDay(LocalDate localDate){
41+
42+
public LocalDateTime getStartOfDay(LocalDate localDate) {
4343
LocalDateTime startofDay = localDate.atStartOfDay();
4444
return startofDay;
4545
}

‎core-java/src/main/java/com/baeldung/datetime/UseLocalDateTime.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import java.time.LocalDateTime;
44

55
public class UseLocalDateTime {
6-
7-
public LocalDateTime getLocalDateTimeUsingParseMethod(String representation){
6+
7+
public LocalDateTime getLocalDateTimeUsingParseMethod(String representation) {
88
return LocalDateTime.parse(representation);
99
}
1010

‎core-java/src/main/java/com/baeldung/datetime/UseLocalTime.java‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@
44
import java.time.temporal.ChronoUnit;
55

66
public class UseLocalTime {
7-
8-
public LocalTime getLocalTimeUsingFactoryOfMethod(int hour, int min, int seconds){
7+
8+
public LocalTime getLocalTimeUsingFactoryOfMethod(int hour, int min, int seconds) {
99
LocalTime localTime = LocalTime.of(hour, min, seconds);
1010
return localTime;
1111
}
12-
13-
public LocalTime getLocalTimeUsingParseMethod(String timeRepresentation){
12+
13+
public LocalTime getLocalTimeUsingParseMethod(String timeRepresentation) {
1414
LocalTime localTime = LocalTime.parse(timeRepresentation);
1515
return localTime;
1616
}
17-
18-
public LocalTime getLocalTimeFromClock(){
17+
18+
public LocalTime getLocalTimeFromClock() {
1919
LocalTime localTime = LocalTime.now();
2020
return localTime;
2121
}
22-
23-
public LocalTime addAnHour(LocalTime localTime){
24-
LocalTime newTime = localTime.plus(1,ChronoUnit.HOURS);
22+
23+
public LocalTime addAnHour(LocalTime localTime) {
24+
LocalTime newTime = localTime.plus(1, ChronoUnit.HOURS);
2525
return newTime;
2626
}
27-
28-
public int getHourFromLocalTime(LocalTime localTime){
27+
28+
public int getHourFromLocalTime(LocalTime localTime) {
2929
return localTime.getHour();
3030
}
31-
32-
public LocalTime getLocalTimeWithMinuteSetToValue(LocalTime localTime, int minute){
31+
32+
public LocalTime getLocalTimeWithMinuteSetToValue(LocalTime localTime, int minute) {
3333
return localTime.withMinute(minute);
3434
}
3535
}

‎core-java/src/main/java/com/baeldung/datetime/UsePeriod.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
import java.time.Period;
55

66
public class UsePeriod {
7-
8-
public LocalDate modifyDates(LocalDate localDate,Period period){
7+
8+
public LocalDate modifyDates(LocalDate localDate, Period period) {
99
return localDate.plus(period);
1010
}
11-
12-
public Period getDifferenceBetweenDates(LocalDate localDate1,LocalDate localDate2){
11+
12+
public Period getDifferenceBetweenDates(LocalDate localDate1, LocalDate localDate2) {
1313
return Period.between(localDate1, localDate2);
1414
}
1515
}

‎core-java/src/main/java/com/baeldung/datetime/UseToInstant.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
import java.util.Date;
77

88
public class UseToInstant {
9-
10-
public LocalDateTime convertDateToLocalDate(Date date){
9+
10+
public LocalDateTime convertDateToLocalDate(Date date) {
1111
LocalDateTime localDateTime = LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
1212
return localDateTime;
1313
}
14-
15-
public LocalDateTime convertDateToLocalDate(Calendar calendar){
14+
15+
public LocalDateTime convertDateToLocalDate(Calendar calendar) {
1616
LocalDateTime localDateTime = LocalDateTime.ofInstant(calendar.toInstant(), ZoneId.systemDefault());
1717
return localDateTime;
1818
}

‎core-java/src/main/java/com/baeldung/datetime/UseZonedDateTime.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import java.time.ZonedDateTime;
66

77
public class UseZonedDateTime {
8-
9-
public ZonedDateTime getZonedDateTime(LocalDateTime localDateTime,ZoneId zoneId){
8+
9+
public ZonedDateTime getZonedDateTime(LocalDateTime localDateTime, ZoneId zoneId) {
1010
ZonedDateTime zonedDateTime = ZonedDateTime.of(localDateTime, zoneId);
1111
return zonedDateTime;
1212
}

0 commit comments

Comments
 (0)