Skip to content

Commit f510c99

Browse files
Updated v1.1 with conflicts.
1 parent 00fb242 commit f510c99

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

Diff for: fourth-app/src/main/java/com/fourthcompany/app/Fourth.java

+6
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22

33
public class Fourth {
44
public String getMessage() { return "hello"; }
5+
6+
// new in 1.1 (semver OK)
7+
public String getMessage(boolean arriving) {
8+
return arriving ? "hello" : "bye";
9+
}
10+
511
}

Diff for: my-app/pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
<artifactId>other-app</artifactId>
2525
<version>1.1</version>
2626
</dependency>
27+
<dependency>
28+
<groupId>com.fourthcompany.app</groupId>
29+
<artifactId>fourth-app</artifactId>
30+
<version>1.0</version>
31+
</dependency>
2732
<dependency>
2833
<groupId>junit</groupId>
2934
<artifactId>junit</artifactId>

Diff for: my-app/src/main/java/com/mycompany/app/App.java

+5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
package com.mycompany.app;
22
import com.othercompany.app.Second;
3+
import com.fourthcompany.app.Fourth;
34

45
public class App {
56
public static void main(String... args) {
67
String message = new Second().wrapMessageIn("|");
8+
// dev decided to use fourth v1.0 directly, but
9+
// upgraded to third 1.1, failing to notice it requires fourth 1.1
10+
message += new Fourth().getMessage();
711
System.out.println(message);
12+
813
}
914
}

Diff for: third-app/src/main/java/com/thirdcompany/app/Third.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
public class Third {
55
public String upperCaseMessage() {
6-
return new Fourth().getMessage().toUpperCase();
6+
// the dev decided to use the new method from v1.1!
7+
return new Fourth().getMessage(true).toUpperCase();
78
}
89
}

0 commit comments

Comments
 (0)