| Chunk |
|---|
| Conflicting content |
|---|
private static final String COMPLIANCE_NAME = "Compliance";
private static final String COMPLIANCE_KEY_SUFFIX = "_COMPLIANCE";
<<<<<<< HEAD:server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/AddCharacteristicUsabilityAndSubCharacteristicsComplianceMigration.java
private static final String SECURITY_KEY = "SECURITY";
private static final String USABILITY_KEY = "USABILITY";
=======
private static final String ERROR_SUFFIX = "Please restore your DB backup, start the previous version of SonarQube " +
"and update your SQALE model to fix this issue before trying again to run the migration.";
>>>>>>> c90c909c19c3e8004a070d64aae235d5f1ca92f9:server/sonar-server/src/main/java/org/sonar/server/db/migrations/v501/AddCharacteristicUsabilityAndSubCharacteristicsComplianceMigration.java
private final System2 system;
|
| Solution content |
|---|
private static final String COMPLIANCE_NAME = "Compliance"; private static final String COMPLIANCE_KEY_SUFFIX = "_COMPLIANCE"; private static final String SECURITY_KEY = "SECURITY"; private static final String USABILITY_KEY = "USABILITY"; private final System2 system; |
| File |
|---|
| AddCharacteristicUsabilityAndSubCharacteristicsComplianceMigration.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
return input != null && input.key.equals(key);
}
}, null);
<<<<<<< HEAD:server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/AddCharacteristicUsabilityAndSubCharacteristicsComplianceMigration.java
if (characteristic != null && characteristic.getParentId() != null) {
throw new IllegalStateException(String.format("'%s' must be a characteristic", characteristic.getName()));
=======
if (characteristic != null) {
if (characteristic.getParentId() != null) {
throw MessageException.of(String.format("'%s' must be a characteristic. " + ERROR_SUFFIX, characteristic.getName()));
}
>>>>>>> c90c909c19c3e8004a070d64aae235d5f1ca92f9:server/sonar-server/src/main/java/org/sonar/server/db/migrations/v501/AddCharacteristicUsabilityAndSubCharacteristicsComplianceMigration.java
}
return characteristic;
} |
| Solution content |
|---|
return input != null && input.key.equals(key);
}
}, null);
if (characteristic != null && characteristic.getParentId() != null) {
throw new IllegalStateException(String.format("'%s' must be a characteristic", characteristic.getName()));
}
return characteristic;
} |
| File |
|---|
| AddCharacteristicUsabilityAndSubCharacteristicsComplianceMigration.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Throw statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (characteristic != null) {
Integer parentId = characteristic.getParentId();
if (parentId == null) {
<<<<<<< HEAD:server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/AddCharacteristicUsabilityAndSubCharacteristicsComplianceMigration.java
throw new IllegalStateException(String.format("'%s' must be a sub-characteristic", characteristic.getName()));
} else if (!parentId.equals(parent.getId())) {
throw new IllegalStateException(String.format("'%s' must be defined under '%s'", characteristic.getName(), parent.getName()));
=======
throw MessageException.of(String.format("'%s' must be a sub-characteristic. " + ERROR_SUFFIX, characteristic.getName()));
} else if (!characteristic.getParentId().equals(parent.getId())) {
throw MessageException.of(String.format("'%s' must be defined under '%s'. " + ERROR_SUFFIX, characteristic.getName(), parent.getName()));
>>>>>>> c90c909c19c3e8004a070d64aae235d5f1ca92f9:server/sonar-server/src/main/java/org/sonar/server/db/migrations/v501/AddCharacteristicUsabilityAndSubCharacteristicsComplianceMigration.java
}
}
return characteristic; |
| Solution content |
|---|
if (characteristic != null) {
Integer parentId = characteristic.getParentId();
if (parentId == null) {
throw new IllegalStateException(String.format("'%s' must be a sub-characteristic", characteristic.getName()));
} else if (!parentId.equals(parent.getId())) {
throw new IllegalStateException(String.format("'%s' must be defined under '%s'", characteristic.getName(), parent.getName()));
}
}
return characteristic; |
| File |
|---|
| AddCharacteristicUsabilityAndSubCharacteristicsComplianceMigration.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Throw statement |