经过20多年的Java编程,我希望自己有多重继承.但我并非如此,我正在为这个具体问题寻找替代方案.
真正的应用程序是某种ERP,有点复杂,所以我试图将这个问题转化为汽车.这只是到目前为止,但这是我能做的最好的.
让我们从描述汽车可以做什么的界面开始:
public interface Car {
public String accelerate();
public String decelerate();
public String steerLeft();
public String steerRight();
}
Run Code Online (Sandbox Code Playgroud)
现在我们有一个基本的(但不是抽象的)实现:
public class BasicCar implements Car {
protected final String name;
public BasicCar( String name ) {
this.name = name;
}
// In the real word this method is important and does lots of stuff like calculations and caching
protected String doDrive( String how ) {
return name + " is " + how + "ing";
}
@Override
public String …Run Code Online (Sandbox Code Playgroud) 我的问题是围绕 gitflow 过程中的一个非常具体的点(如此处所述)。
我已经将错误修正从release/1.2into合并master,并适当标记。
除了历史长相,有什么之间的差异是如何从背合并release/1.2从VS背合并master成develop。
我已经尝试了两种方法,在我简单的、人为的例子中,我看不出有什么不同develop,正如我预期的那样。
这有危险吗?我以后会遇到麻烦的问题吗?我错过了一些明显的东西吗?我怀疑答案可能与已经进入的其他功能有关master,但目前应该保留develop。
合并发布以开发:
合并主开发: