Browse Source

Do not allow componentId nor msg on primary location

tags/5.2-RC1
Simon Brandhof 8 years ago
parent
commit
e518e7cde4

+ 22
- 15
server/sonar-server/src/main/java/org/sonar/server/computation/issue/TrackerRawInputFactory.java View File

@@ -131,7 +131,9 @@ public class TrackerRawInputFactory {
DbIssues.Locations.Builder dbLocationsBuilder = DbIssues.Locations.newBuilder();
if (reportIssue.hasPrimaryLocation()) {
BatchReport.IssueLocation location = reportIssue.getPrimaryLocation();
dbLocationsBuilder.setPrimary(convertLocation(location));
if (location.hasTextRange()) {
dbLocationsBuilder.setPrimary(convertTextRange(location.getTextRange()));
}
}
for (BatchReport.IssueLocation location : reportIssue.getAdditionalLocationList()) {
dbLocationsBuilder.addSecondary(convertLocation(location));
@@ -139,7 +141,7 @@ public class TrackerRawInputFactory {
for (BatchReport.ExecutionFlow flow : reportIssue.getExecutionFlowList()) {
DbIssues.ExecutionFlow.Builder dbFlowBuilder = DbIssues.ExecutionFlow.newBuilder();
for (BatchReport.IssueLocation location : flow.getLocationList()) {
dbFlowBuilder.addLocations(convertLocation(location));
dbFlowBuilder.addLocation(convertLocation(location));
}
dbLocationsBuilder.addExecutionFlow(dbFlowBuilder);
}
@@ -167,22 +169,27 @@ public class TrackerRawInputFactory {
}
if (source.hasTextRange()) {
BatchReport.TextRange sourceRange = source.getTextRange();
DbCommons.TextRange.Builder targetRange = DbCommons.TextRange.newBuilder();
if (sourceRange.hasStartLine()) {
targetRange.setStartLine(sourceRange.getStartLine());
}
if (sourceRange.hasStartOffset()) {
targetRange.setStartOffset(sourceRange.getStartOffset());
}
if (sourceRange.hasEndLine()) {
targetRange.setEndLine(sourceRange.getEndLine());
}
if (sourceRange.hasEndOffset()) {
targetRange.setEndOffset(sourceRange.getEndOffset());
}
DbCommons.TextRange.Builder targetRange = convertTextRange(sourceRange);
target.setTextRange(targetRange);
}
return target.build();
}
}

private DbCommons.TextRange.Builder convertTextRange(BatchReport.TextRange sourceRange) {
DbCommons.TextRange.Builder targetRange = DbCommons.TextRange.newBuilder();
if (sourceRange.hasStartLine()) {
targetRange.setStartLine(sourceRange.getStartLine());
}
if (sourceRange.hasStartOffset()) {
targetRange.setStartOffset(sourceRange.getStartOffset());
}
if (sourceRange.hasEndLine()) {
targetRange.setEndLine(sourceRange.getEndLine());
}
if (sourceRange.hasEndOffset()) {
targetRange.setEndOffset(sourceRange.getEndOffset());
}
return targetRange;
}
}

+ 21
- 16
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java View File

@@ -197,15 +197,15 @@ public class SearchResponseFormat {
DbIssues.Locations locations = dto.parseLocations();
if (locations != null) {
if (locations.hasPrimary()) {
DbIssues.Location primary = locations.getPrimary();
issueBuilder.setLocation(convertLocation(primary));
DbCommons.TextRange primary = locations.getPrimary();
issueBuilder.setTextRange(convertTextRange(primary));
}
for (DbIssues.Location secondary : locations.getSecondaryList()) {
issueBuilder.addSecondaryLocations(convertLocation(secondary));
}
for (DbIssues.ExecutionFlow flow : locations.getExecutionFlowList()) {
Issues.ExecutionFlow.Builder targetFlow = Issues.ExecutionFlow.newBuilder();
for (DbIssues.Location flowLocation : flow.getLocationsList()) {
for (DbIssues.Location flowLocation : flow.getLocationList()) {
targetFlow.addLocations(convertLocation(flowLocation));
}
issueBuilder.addExecutionFlows(targetFlow);
@@ -223,24 +223,29 @@ public class SearchResponseFormat {
}
if (source.hasTextRange()) {
DbCommons.TextRange sourceRange = source.getTextRange();
Common.TextRange.Builder targetRange = Common.TextRange.newBuilder();
if (sourceRange.hasStartLine()) {
targetRange.setStartLine(sourceRange.getStartLine());
}
if (sourceRange.hasStartOffset()) {
targetRange.setStartOffset(sourceRange.getStartOffset());
}
if (sourceRange.hasEndLine()) {
targetRange.setEndLine(sourceRange.getEndLine());
}
if (sourceRange.hasEndOffset()) {
targetRange.setEndOffset(sourceRange.getEndOffset());
}
Common.TextRange.Builder targetRange = convertTextRange(sourceRange);
target.setTextRange(targetRange);
}
return target.build();
}

private static Common.TextRange.Builder convertTextRange(DbCommons.TextRange sourceRange) {
Common.TextRange.Builder targetRange = Common.TextRange.newBuilder();
if (sourceRange.hasStartLine()) {
targetRange.setStartLine(sourceRange.getStartLine());
}
if (sourceRange.hasStartOffset()) {
targetRange.setStartOffset(sourceRange.getStartOffset());
}
if (sourceRange.hasEndLine()) {
targetRange.setEndLine(sourceRange.getEndLine());
}
if (sourceRange.hasEndOffset()) {
targetRange.setEndOffset(sourceRange.getEndOffset());
}
return targetRange;
}

private static void formatIssueTransitions(SearchResponseData data, Issues.Issue.Builder issueBuilder, IssueDto dto) {
issueBuilder.setTransitionsPresentIfEmpty(true);
List<Transition> transitions = data.getTransitionsForIssueKey(dto.getKey());

+ 3
- 6
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseLoader.java View File

@@ -182,23 +182,20 @@ public class SearchResponseLoader {
add(RULES, issue.getRuleKey());
add(USERS, issue.getReporter());
add(USERS, issue.getAssignee());
collectIssueLocations(issue);
collectComponentsFromIssueLocations(issue);
}
}

private void collectIssueLocations(IssueDto issue) {
private void collectComponentsFromIssueLocations(IssueDto issue) {
DbIssues.Locations locations = issue.parseLocations();
if (locations != null) {
if (locations.hasPrimary() && locations.getPrimary().hasComponentId()) {
componentUuids.add(locations.getPrimary().getComponentId());
}
for (DbIssues.Location location : locations.getSecondaryList()) {
if (location.hasComponentId()) {
componentUuids.add(location.getComponentId());
}
}
for (DbIssues.ExecutionFlow flow : locations.getExecutionFlowList()) {
for (DbIssues.Location location : flow.getLocationsList()) {
for (DbIssues.Location location : flow.getLocationList()) {
if (location.hasComponentId()) {
componentUuids.add(location.getComponentId());
}

+ 205
- 205
sonar-db/src/main/gen-java/org/sonar/db/protobuf/DbIssues.java View File

@@ -13,17 +13,17 @@ public final class DbIssues {
com.google.protobuf.MessageOrBuilder {

/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
boolean hasPrimary();
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
org.sonar.db.protobuf.DbIssues.Location getPrimary();
org.sonar.db.protobuf.DbCommons.TextRange getPrimary();
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
org.sonar.db.protobuf.DbIssues.LocationOrBuilder getPrimaryOrBuilder();
org.sonar.db.protobuf.DbCommons.TextRangeOrBuilder getPrimaryOrBuilder();

/**
* <code>repeated .sonarqube.db.issues.Location secondary = 2;</code>
@@ -126,11 +126,11 @@ public final class DbIssues {
break;
}
case 10: {
org.sonar.db.protobuf.DbIssues.Location.Builder subBuilder = null;
org.sonar.db.protobuf.DbCommons.TextRange.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = primary_.toBuilder();
}
primary_ = input.readMessage(org.sonar.db.protobuf.DbIssues.Location.PARSER, extensionRegistry);
primary_ = input.readMessage(org.sonar.db.protobuf.DbCommons.TextRange.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(primary_);
primary_ = subBuilder.buildPartial();
@@ -201,23 +201,23 @@ public final class DbIssues {

private int bitField0_;
public static final int PRIMARY_FIELD_NUMBER = 1;
private org.sonar.db.protobuf.DbIssues.Location primary_;
private org.sonar.db.protobuf.DbCommons.TextRange primary_;
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
public boolean hasPrimary() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
public org.sonar.db.protobuf.DbIssues.Location getPrimary() {
public org.sonar.db.protobuf.DbCommons.TextRange getPrimary() {
return primary_;
}
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
public org.sonar.db.protobuf.DbIssues.LocationOrBuilder getPrimaryOrBuilder() {
public org.sonar.db.protobuf.DbCommons.TextRangeOrBuilder getPrimaryOrBuilder() {
return primary_;
}

@@ -292,7 +292,7 @@ public final class DbIssues {
}

private void initFields() {
primary_ = org.sonar.db.protobuf.DbIssues.Location.getDefaultInstance();
primary_ = org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance();
secondary_ = java.util.Collections.emptyList();
executionFlow_ = java.util.Collections.emptyList();
}
@@ -460,7 +460,7 @@ public final class DbIssues {
public Builder clear() {
super.clear();
if (primaryBuilder_ == null) {
primary_ = org.sonar.db.protobuf.DbIssues.Location.getDefaultInstance();
primary_ = org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance();
} else {
primaryBuilder_.clear();
}
@@ -629,19 +629,19 @@ public final class DbIssues {
}
private int bitField0_;

private org.sonar.db.protobuf.DbIssues.Location primary_ = org.sonar.db.protobuf.DbIssues.Location.getDefaultInstance();
private org.sonar.db.protobuf.DbCommons.TextRange primary_ = org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.sonar.db.protobuf.DbIssues.Location, org.sonar.db.protobuf.DbIssues.Location.Builder, org.sonar.db.protobuf.DbIssues.LocationOrBuilder> primaryBuilder_;
org.sonar.db.protobuf.DbCommons.TextRange, org.sonar.db.protobuf.DbCommons.TextRange.Builder, org.sonar.db.protobuf.DbCommons.TextRangeOrBuilder> primaryBuilder_;
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
public boolean hasPrimary() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
public org.sonar.db.protobuf.DbIssues.Location getPrimary() {
public org.sonar.db.protobuf.DbCommons.TextRange getPrimary() {
if (primaryBuilder_ == null) {
return primary_;
} else {
@@ -649,9 +649,9 @@ public final class DbIssues {
}
}
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
public Builder setPrimary(org.sonar.db.protobuf.DbIssues.Location value) {
public Builder setPrimary(org.sonar.db.protobuf.DbCommons.TextRange value) {
if (primaryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
@@ -665,10 +665,10 @@ public final class DbIssues {
return this;
}
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
public Builder setPrimary(
org.sonar.db.protobuf.DbIssues.Location.Builder builderForValue) {
org.sonar.db.protobuf.DbCommons.TextRange.Builder builderForValue) {
if (primaryBuilder_ == null) {
primary_ = builderForValue.build();
onChanged();
@@ -679,14 +679,14 @@ public final class DbIssues {
return this;
}
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
public Builder mergePrimary(org.sonar.db.protobuf.DbIssues.Location value) {
public Builder mergePrimary(org.sonar.db.protobuf.DbCommons.TextRange value) {
if (primaryBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
primary_ != org.sonar.db.protobuf.DbIssues.Location.getDefaultInstance()) {
primary_ != org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance()) {
primary_ =
org.sonar.db.protobuf.DbIssues.Location.newBuilder(primary_).mergeFrom(value).buildPartial();
org.sonar.db.protobuf.DbCommons.TextRange.newBuilder(primary_).mergeFrom(value).buildPartial();
} else {
primary_ = value;
}
@@ -698,11 +698,11 @@ public final class DbIssues {
return this;
}
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
public Builder clearPrimary() {
if (primaryBuilder_ == null) {
primary_ = org.sonar.db.protobuf.DbIssues.Location.getDefaultInstance();
primary_ = org.sonar.db.protobuf.DbCommons.TextRange.getDefaultInstance();
onChanged();
} else {
primaryBuilder_.clear();
@@ -711,17 +711,17 @@ public final class DbIssues {
return this;
}
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
public org.sonar.db.protobuf.DbIssues.Location.Builder getPrimaryBuilder() {
public org.sonar.db.protobuf.DbCommons.TextRange.Builder getPrimaryBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getPrimaryFieldBuilder().getBuilder();
}
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
public org.sonar.db.protobuf.DbIssues.LocationOrBuilder getPrimaryOrBuilder() {
public org.sonar.db.protobuf.DbCommons.TextRangeOrBuilder getPrimaryOrBuilder() {
if (primaryBuilder_ != null) {
return primaryBuilder_.getMessageOrBuilder();
} else {
@@ -729,14 +729,14 @@ public final class DbIssues {
}
}
/**
* <code>optional .sonarqube.db.issues.Location primary = 1;</code>
* <code>optional .sonarqube.db.commons.TextRange primary = 1;</code>
*/
private com.google.protobuf.SingleFieldBuilder<
org.sonar.db.protobuf.DbIssues.Location, org.sonar.db.protobuf.DbIssues.Location.Builder, org.sonar.db.protobuf.DbIssues.LocationOrBuilder>
org.sonar.db.protobuf.DbCommons.TextRange, org.sonar.db.protobuf.DbCommons.TextRange.Builder, org.sonar.db.protobuf.DbCommons.TextRangeOrBuilder>
getPrimaryFieldBuilder() {
if (primaryBuilder_ == null) {
primaryBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.sonar.db.protobuf.DbIssues.Location, org.sonar.db.protobuf.DbIssues.Location.Builder, org.sonar.db.protobuf.DbIssues.LocationOrBuilder>(
org.sonar.db.protobuf.DbCommons.TextRange, org.sonar.db.protobuf.DbCommons.TextRange.Builder, org.sonar.db.protobuf.DbCommons.TextRangeOrBuilder>(
getPrimary(),
getParentForChildren(),
isClean());
@@ -1241,27 +1241,27 @@ public final class DbIssues {
com.google.protobuf.MessageOrBuilder {

/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
java.util.List<org.sonar.db.protobuf.DbIssues.Location>
getLocationsList();
getLocationList();
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
org.sonar.db.protobuf.DbIssues.Location getLocations(int index);
org.sonar.db.protobuf.DbIssues.Location getLocation(int index);
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
int getLocationsCount();
int getLocationCount();
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
java.util.List<? extends org.sonar.db.protobuf.DbIssues.LocationOrBuilder>
getLocationsOrBuilderList();
getLocationOrBuilderList();
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
org.sonar.db.protobuf.DbIssues.LocationOrBuilder getLocationsOrBuilder(
org.sonar.db.protobuf.DbIssues.LocationOrBuilder getLocationOrBuilder(
int index);
}
/**
@@ -1318,10 +1318,10 @@ public final class DbIssues {
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
locations_ = new java.util.ArrayList<org.sonar.db.protobuf.DbIssues.Location>();
location_ = new java.util.ArrayList<org.sonar.db.protobuf.DbIssues.Location>();
mutable_bitField0_ |= 0x00000001;
}
locations_.add(input.readMessage(org.sonar.db.protobuf.DbIssues.Location.PARSER, extensionRegistry));
location_.add(input.readMessage(org.sonar.db.protobuf.DbIssues.Location.PARSER, extensionRegistry));
break;
}
}
@@ -1333,7 +1333,7 @@ public final class DbIssues {
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
locations_ = java.util.Collections.unmodifiableList(locations_);
location_ = java.util.Collections.unmodifiableList(location_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
@@ -1366,43 +1366,43 @@ public final class DbIssues {
return PARSER;
}

public static final int LOCATIONS_FIELD_NUMBER = 1;
private java.util.List<org.sonar.db.protobuf.DbIssues.Location> locations_;
public static final int LOCATION_FIELD_NUMBER = 1;
private java.util.List<org.sonar.db.protobuf.DbIssues.Location> location_;
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public java.util.List<org.sonar.db.protobuf.DbIssues.Location> getLocationsList() {
return locations_;
public java.util.List<org.sonar.db.protobuf.DbIssues.Location> getLocationList() {
return location_;
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public java.util.List<? extends org.sonar.db.protobuf.DbIssues.LocationOrBuilder>
getLocationsOrBuilderList() {
return locations_;
getLocationOrBuilderList() {
return location_;
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public int getLocationsCount() {
return locations_.size();
public int getLocationCount() {
return location_.size();
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public org.sonar.db.protobuf.DbIssues.Location getLocations(int index) {
return locations_.get(index);
public org.sonar.db.protobuf.DbIssues.Location getLocation(int index) {
return location_.get(index);
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public org.sonar.db.protobuf.DbIssues.LocationOrBuilder getLocationsOrBuilder(
public org.sonar.db.protobuf.DbIssues.LocationOrBuilder getLocationOrBuilder(
int index) {
return locations_.get(index);
return location_.get(index);
}

private void initFields() {
locations_ = java.util.Collections.emptyList();
location_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
@@ -1417,8 +1417,8 @@ public final class DbIssues {
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
for (int i = 0; i < locations_.size(); i++) {
output.writeMessage(1, locations_.get(i));
for (int i = 0; i < location_.size(); i++) {
output.writeMessage(1, location_.get(i));
}
getUnknownFields().writeTo(output);
}
@@ -1429,9 +1429,9 @@ public final class DbIssues {
if (size != -1) return size;

size = 0;
for (int i = 0; i < locations_.size(); i++) {
for (int i = 0; i < location_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, locations_.get(i));
.computeMessageSize(1, location_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
@@ -1542,7 +1542,7 @@ public final class DbIssues {
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getLocationsFieldBuilder();
getLocationFieldBuilder();
}
}
private static Builder create() {
@@ -1551,11 +1551,11 @@ public final class DbIssues {

public Builder clear() {
super.clear();
if (locationsBuilder_ == null) {
locations_ = java.util.Collections.emptyList();
if (locationBuilder_ == null) {
location_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
locationsBuilder_.clear();
locationBuilder_.clear();
}
return this;
}
@@ -1584,14 +1584,14 @@ public final class DbIssues {
public org.sonar.db.protobuf.DbIssues.ExecutionFlow buildPartial() {
org.sonar.db.protobuf.DbIssues.ExecutionFlow result = new org.sonar.db.protobuf.DbIssues.ExecutionFlow(this);
int from_bitField0_ = bitField0_;
if (locationsBuilder_ == null) {
if (locationBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
locations_ = java.util.Collections.unmodifiableList(locations_);
location_ = java.util.Collections.unmodifiableList(location_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.locations_ = locations_;
result.location_ = location_;
} else {
result.locations_ = locationsBuilder_.build();
result.location_ = locationBuilder_.build();
}
onBuilt();
return result;
@@ -1608,29 +1608,29 @@ public final class DbIssues {

public Builder mergeFrom(org.sonar.db.protobuf.DbIssues.ExecutionFlow other) {
if (other == org.sonar.db.protobuf.DbIssues.ExecutionFlow.getDefaultInstance()) return this;
if (locationsBuilder_ == null) {
if (!other.locations_.isEmpty()) {
if (locations_.isEmpty()) {
locations_ = other.locations_;
if (locationBuilder_ == null) {
if (!other.location_.isEmpty()) {
if (location_.isEmpty()) {
location_ = other.location_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLocationsIsMutable();
locations_.addAll(other.locations_);
ensureLocationIsMutable();
location_.addAll(other.location_);
}
onChanged();
}
} else {
if (!other.locations_.isEmpty()) {
if (locationsBuilder_.isEmpty()) {
locationsBuilder_.dispose();
locationsBuilder_ = null;
locations_ = other.locations_;
if (!other.location_.isEmpty()) {
if (locationBuilder_.isEmpty()) {
locationBuilder_.dispose();
locationBuilder_ = null;
location_ = other.location_;
bitField0_ = (bitField0_ & ~0x00000001);
locationsBuilder_ =
locationBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getLocationsFieldBuilder() : null;
getLocationFieldBuilder() : null;
} else {
locationsBuilder_.addAllMessages(other.locations_);
locationBuilder_.addAllMessages(other.location_);
}
}
}
@@ -1661,244 +1661,244 @@ public final class DbIssues {
}
private int bitField0_;

private java.util.List<org.sonar.db.protobuf.DbIssues.Location> locations_ =
private java.util.List<org.sonar.db.protobuf.DbIssues.Location> location_ =
java.util.Collections.emptyList();
private void ensureLocationsIsMutable() {
private void ensureLocationIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
locations_ = new java.util.ArrayList<org.sonar.db.protobuf.DbIssues.Location>(locations_);
location_ = new java.util.ArrayList<org.sonar.db.protobuf.DbIssues.Location>(location_);
bitField0_ |= 0x00000001;
}
}

private com.google.protobuf.RepeatedFieldBuilder<
org.sonar.db.protobuf.DbIssues.Location, org.sonar.db.protobuf.DbIssues.Location.Builder, org.sonar.db.protobuf.DbIssues.LocationOrBuilder> locationsBuilder_;
org.sonar.db.protobuf.DbIssues.Location, org.sonar.db.protobuf.DbIssues.Location.Builder, org.sonar.db.protobuf.DbIssues.LocationOrBuilder> locationBuilder_;

/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public java.util.List<org.sonar.db.protobuf.DbIssues.Location> getLocationsList() {
if (locationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(locations_);
public java.util.List<org.sonar.db.protobuf.DbIssues.Location> getLocationList() {
if (locationBuilder_ == null) {
return java.util.Collections.unmodifiableList(location_);
} else {
return locationsBuilder_.getMessageList();
return locationBuilder_.getMessageList();
}
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public int getLocationsCount() {
if (locationsBuilder_ == null) {
return locations_.size();
public int getLocationCount() {
if (locationBuilder_ == null) {
return location_.size();
} else {
return locationsBuilder_.getCount();
return locationBuilder_.getCount();
}
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public org.sonar.db.protobuf.DbIssues.Location getLocations(int index) {
if (locationsBuilder_ == null) {
return locations_.get(index);
public org.sonar.db.protobuf.DbIssues.Location getLocation(int index) {
if (locationBuilder_ == null) {
return location_.get(index);
} else {
return locationsBuilder_.getMessage(index);
return locationBuilder_.getMessage(index);
}
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public Builder setLocations(
public Builder setLocation(
int index, org.sonar.db.protobuf.DbIssues.Location value) {
if (locationsBuilder_ == null) {
if (locationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLocationsIsMutable();
locations_.set(index, value);
ensureLocationIsMutable();
location_.set(index, value);
onChanged();
} else {
locationsBuilder_.setMessage(index, value);
locationBuilder_.setMessage(index, value);
}
return this;
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public Builder setLocations(
public Builder setLocation(
int index, org.sonar.db.protobuf.DbIssues.Location.Builder builderForValue) {
if (locationsBuilder_ == null) {
ensureLocationsIsMutable();
locations_.set(index, builderForValue.build());
if (locationBuilder_ == null) {
ensureLocationIsMutable();
location_.set(index, builderForValue.build());
onChanged();
} else {
locationsBuilder_.setMessage(index, builderForValue.build());
locationBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public Builder addLocations(org.sonar.db.protobuf.DbIssues.Location value) {
if (locationsBuilder_ == null) {
public Builder addLocation(org.sonar.db.protobuf.DbIssues.Location value) {
if (locationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLocationsIsMutable();
locations_.add(value);
ensureLocationIsMutable();
location_.add(value);
onChanged();
} else {
locationsBuilder_.addMessage(value);
locationBuilder_.addMessage(value);
}
return this;
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public Builder addLocations(
public Builder addLocation(
int index, org.sonar.db.protobuf.DbIssues.Location value) {
if (locationsBuilder_ == null) {
if (locationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLocationsIsMutable();
locations_.add(index, value);
ensureLocationIsMutable();
location_.add(index, value);
onChanged();
} else {
locationsBuilder_.addMessage(index, value);
locationBuilder_.addMessage(index, value);
}
return this;
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public Builder addLocations(
public Builder addLocation(
org.sonar.db.protobuf.DbIssues.Location.Builder builderForValue) {
if (locationsBuilder_ == null) {
ensureLocationsIsMutable();
locations_.add(builderForValue.build());
if (locationBuilder_ == null) {
ensureLocationIsMutable();
location_.add(builderForValue.build());
onChanged();
} else {
locationsBuilder_.addMessage(builderForValue.build());
locationBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public Builder addLocations(
public Builder addLocation(
int index, org.sonar.db.protobuf.DbIssues.Location.Builder builderForValue) {
if (locationsBuilder_ == null) {
ensureLocationsIsMutable();
locations_.add(index, builderForValue.build());
if (locationBuilder_ == null) {
ensureLocationIsMutable();
location_.add(index, builderForValue.build());
onChanged();
} else {
locationsBuilder_.addMessage(index, builderForValue.build());
locationBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public Builder addAllLocations(
public Builder addAllLocation(
java.lang.Iterable<? extends org.sonar.db.protobuf.DbIssues.Location> values) {
if (locationsBuilder_ == null) {
ensureLocationsIsMutable();
if (locationBuilder_ == null) {
ensureLocationIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, locations_);
values, location_);
onChanged();
} else {
locationsBuilder_.addAllMessages(values);
locationBuilder_.addAllMessages(values);
}
return this;
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public Builder clearLocations() {
if (locationsBuilder_ == null) {
locations_ = java.util.Collections.emptyList();
public Builder clearLocation() {
if (locationBuilder_ == null) {
location_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
locationsBuilder_.clear();
locationBuilder_.clear();
}
return this;
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public Builder removeLocations(int index) {
if (locationsBuilder_ == null) {
ensureLocationsIsMutable();
locations_.remove(index);
public Builder removeLocation(int index) {
if (locationBuilder_ == null) {
ensureLocationIsMutable();
location_.remove(index);
onChanged();
} else {
locationsBuilder_.remove(index);
locationBuilder_.remove(index);
}
return this;
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public org.sonar.db.protobuf.DbIssues.Location.Builder getLocationsBuilder(
public org.sonar.db.protobuf.DbIssues.Location.Builder getLocationBuilder(
int index) {
return getLocationsFieldBuilder().getBuilder(index);
return getLocationFieldBuilder().getBuilder(index);
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public org.sonar.db.protobuf.DbIssues.LocationOrBuilder getLocationsOrBuilder(
public org.sonar.db.protobuf.DbIssues.LocationOrBuilder getLocationOrBuilder(
int index) {
if (locationsBuilder_ == null) {
return locations_.get(index); } else {
return locationsBuilder_.getMessageOrBuilder(index);
if (locationBuilder_ == null) {
return location_.get(index); } else {
return locationBuilder_.getMessageOrBuilder(index);
}
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public java.util.List<? extends org.sonar.db.protobuf.DbIssues.LocationOrBuilder>
getLocationsOrBuilderList() {
if (locationsBuilder_ != null) {
return locationsBuilder_.getMessageOrBuilderList();
getLocationOrBuilderList() {
if (locationBuilder_ != null) {
return locationBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(locations_);
return java.util.Collections.unmodifiableList(location_);
}
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public org.sonar.db.protobuf.DbIssues.Location.Builder addLocationsBuilder() {
return getLocationsFieldBuilder().addBuilder(
public org.sonar.db.protobuf.DbIssues.Location.Builder addLocationBuilder() {
return getLocationFieldBuilder().addBuilder(
org.sonar.db.protobuf.DbIssues.Location.getDefaultInstance());
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public org.sonar.db.protobuf.DbIssues.Location.Builder addLocationsBuilder(
public org.sonar.db.protobuf.DbIssues.Location.Builder addLocationBuilder(
int index) {
return getLocationsFieldBuilder().addBuilder(
return getLocationFieldBuilder().addBuilder(
index, org.sonar.db.protobuf.DbIssues.Location.getDefaultInstance());
}
/**
* <code>repeated .sonarqube.db.issues.Location locations = 1;</code>
* <code>repeated .sonarqube.db.issues.Location location = 1;</code>
*/
public java.util.List<org.sonar.db.protobuf.DbIssues.Location.Builder>
getLocationsBuilderList() {
return getLocationsFieldBuilder().getBuilderList();
getLocationBuilderList() {
return getLocationFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
org.sonar.db.protobuf.DbIssues.Location, org.sonar.db.protobuf.DbIssues.Location.Builder, org.sonar.db.protobuf.DbIssues.LocationOrBuilder>
getLocationsFieldBuilder() {
if (locationsBuilder_ == null) {
locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
getLocationFieldBuilder() {
if (locationBuilder_ == null) {
locationBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
org.sonar.db.protobuf.DbIssues.Location, org.sonar.db.protobuf.DbIssues.Location.Builder, org.sonar.db.protobuf.DbIssues.LocationOrBuilder>(
locations_,
location_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
locations_ = null;
location_ = null;
}
return locationsBuilder_;
return locationBuilder_;
}

// @@protoc_insertion_point(builder_scope:sonarqube.db.issues.ExecutionFlow)
@@ -2819,16 +2819,16 @@ public final class DbIssues {
static {
java.lang.String[] descriptorData = {
"\n\017db-issues.proto\022\023sonarqube.db.issues\032\020" +
"db-commons.proto\"\251\001\n\tLocations\022.\n\007primar" +
"y\030\001 \001(\0132\035.sonarqube.db.issues.Location\0220" +
"\n\tsecondary\030\002 \003(\0132\035.sonarqube.db.issues." +
"Location\022:\n\016execution_flow\030\003 \003(\0132\".sonar" +
"qube.db.issues.ExecutionFlow\"A\n\rExecutio" +
"nFlow\0220\n\tlocations\030\001 \003(\0132\035.sonarqube.db." +
"issues.Location\"b\n\010Location\022\024\n\014component" +
"_id\030\001 \001(\t\0223\n\ntext_range\030\002 \001(\0132\037.sonarqub" +
"e.db.commons.TextRange\022\013\n\003msg\030\003 \001(\tB\031\n\025o",
"rg.sonar.db.protobufH\001"
"db-commons.proto\"\253\001\n\tLocations\0220\n\007primar" +
"y\030\001 \001(\0132\037.sonarqube.db.commons.TextRange" +
"\0220\n\tsecondary\030\002 \003(\0132\035.sonarqube.db.issue" +
"s.Location\022:\n\016execution_flow\030\003 \003(\0132\".son" +
"arqube.db.issues.ExecutionFlow\"@\n\rExecut" +
"ionFlow\022/\n\010location\030\001 \003(\0132\035.sonarqube.db" +
".issues.Location\"b\n\010Location\022\024\n\014componen" +
"t_id\030\001 \001(\t\0223\n\ntext_range\030\002 \001(\0132\037.sonarqu" +
"be.db.commons.TextRange\022\013\n\003msg\030\003 \001(\tB\031\n\025",
"org.sonar.db.protobufH\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -2854,7 +2854,7 @@ public final class DbIssues {
internal_static_sonarqube_db_issues_ExecutionFlow_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_sonarqube_db_issues_ExecutionFlow_descriptor,
new java.lang.String[] { "Locations", });
new java.lang.String[] { "Location", });
internal_static_sonarqube_db_issues_Location_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_sonarqube_db_issues_Location_fieldAccessorTable = new

+ 2
- 2
sonar-db/src/main/protobuf/db-issues.proto View File

@@ -31,13 +31,13 @@ option java_package = "org.sonar.db.protobuf";
option optimize_for = SPEED;

message Locations {
optional Location primary = 1;
optional sonarqube.db.commons.TextRange primary = 1;
repeated Location secondary = 2;
repeated ExecutionFlow execution_flow = 3;
}

message ExecutionFlow {
repeated Location locations = 1;
repeated Location location = 1;
}

message Location {

+ 43
- 43
sonar-ws/src/main/gen-java/org/sonarqube/ws/Common.java View File

@@ -4193,7 +4193,7 @@ public final class Common {
com.google.protobuf.MessageOrBuilder {

/**
* <code>optional int32 start_line = 1;</code>
* <code>optional int32 startLine = 1;</code>
*
* <pre>
* Start line. Should never be absent
@@ -4201,7 +4201,7 @@ public final class Common {
*/
boolean hasStartLine();
/**
* <code>optional int32 start_line = 1;</code>
* <code>optional int32 startLine = 1;</code>
*
* <pre>
* Start line. Should never be absent
@@ -4210,7 +4210,7 @@ public final class Common {
int getStartLine();

/**
* <code>optional int32 end_line = 2;</code>
* <code>optional int32 endLine = 2;</code>
*
* <pre>
* End line (inclusive). Absent means it is same as start line
@@ -4218,7 +4218,7 @@ public final class Common {
*/
boolean hasEndLine();
/**
* <code>optional int32 end_line = 2;</code>
* <code>optional int32 endLine = 2;</code>
*
* <pre>
* End line (inclusive). Absent means it is same as start line
@@ -4227,7 +4227,7 @@ public final class Common {
int getEndLine();

/**
* <code>optional int32 start_offset = 3;</code>
* <code>optional int32 startOffset = 3;</code>
*
* <pre>
* If absent it means range starts at the first offset of start line
@@ -4235,7 +4235,7 @@ public final class Common {
*/
boolean hasStartOffset();
/**
* <code>optional int32 start_offset = 3;</code>
* <code>optional int32 startOffset = 3;</code>
*
* <pre>
* If absent it means range starts at the first offset of start line
@@ -4244,7 +4244,7 @@ public final class Common {
int getStartOffset();

/**
* <code>optional int32 end_offset = 4;</code>
* <code>optional int32 endOffset = 4;</code>
*
* <pre>
* If absent it means range ends at the last offset of end line
@@ -4252,7 +4252,7 @@ public final class Common {
*/
boolean hasEndOffset();
/**
* <code>optional int32 end_offset = 4;</code>
* <code>optional int32 endOffset = 4;</code>
*
* <pre>
* If absent it means range ends at the last offset of end line
@@ -4376,10 +4376,10 @@ public final class Common {
}

private int bitField0_;
public static final int START_LINE_FIELD_NUMBER = 1;
public static final int STARTLINE_FIELD_NUMBER = 1;
private int startLine_;
/**
* <code>optional int32 start_line = 1;</code>
* <code>optional int32 startLine = 1;</code>
*
* <pre>
* Start line. Should never be absent
@@ -4389,7 +4389,7 @@ public final class Common {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional int32 start_line = 1;</code>
* <code>optional int32 startLine = 1;</code>
*
* <pre>
* Start line. Should never be absent
@@ -4399,10 +4399,10 @@ public final class Common {
return startLine_;
}

public static final int END_LINE_FIELD_NUMBER = 2;
public static final int ENDLINE_FIELD_NUMBER = 2;
private int endLine_;
/**
* <code>optional int32 end_line = 2;</code>
* <code>optional int32 endLine = 2;</code>
*
* <pre>
* End line (inclusive). Absent means it is same as start line
@@ -4412,7 +4412,7 @@ public final class Common {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* <code>optional int32 end_line = 2;</code>
* <code>optional int32 endLine = 2;</code>
*
* <pre>
* End line (inclusive). Absent means it is same as start line
@@ -4422,10 +4422,10 @@ public final class Common {
return endLine_;
}

public static final int START_OFFSET_FIELD_NUMBER = 3;
public static final int STARTOFFSET_FIELD_NUMBER = 3;
private int startOffset_;
/**
* <code>optional int32 start_offset = 3;</code>
* <code>optional int32 startOffset = 3;</code>
*
* <pre>
* If absent it means range starts at the first offset of start line
@@ -4435,7 +4435,7 @@ public final class Common {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* <code>optional int32 start_offset = 3;</code>
* <code>optional int32 startOffset = 3;</code>
*
* <pre>
* If absent it means range starts at the first offset of start line
@@ -4445,10 +4445,10 @@ public final class Common {
return startOffset_;
}

public static final int END_OFFSET_FIELD_NUMBER = 4;
public static final int ENDOFFSET_FIELD_NUMBER = 4;
private int endOffset_;
/**
* <code>optional int32 end_offset = 4;</code>
* <code>optional int32 endOffset = 4;</code>
*
* <pre>
* If absent it means range ends at the last offset of end line
@@ -4458,7 +4458,7 @@ public final class Common {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* <code>optional int32 end_offset = 4;</code>
* <code>optional int32 endOffset = 4;</code>
*
* <pre>
* If absent it means range ends at the last offset of end line
@@ -4754,7 +4754,7 @@ public final class Common {

private int startLine_ ;
/**
* <code>optional int32 start_line = 1;</code>
* <code>optional int32 startLine = 1;</code>
*
* <pre>
* Start line. Should never be absent
@@ -4764,7 +4764,7 @@ public final class Common {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional int32 start_line = 1;</code>
* <code>optional int32 startLine = 1;</code>
*
* <pre>
* Start line. Should never be absent
@@ -4774,7 +4774,7 @@ public final class Common {
return startLine_;
}
/**
* <code>optional int32 start_line = 1;</code>
* <code>optional int32 startLine = 1;</code>
*
* <pre>
* Start line. Should never be absent
@@ -4787,7 +4787,7 @@ public final class Common {
return this;
}
/**
* <code>optional int32 start_line = 1;</code>
* <code>optional int32 startLine = 1;</code>
*
* <pre>
* Start line. Should never be absent
@@ -4802,7 +4802,7 @@ public final class Common {

private int endLine_ ;
/**
* <code>optional int32 end_line = 2;</code>
* <code>optional int32 endLine = 2;</code>
*
* <pre>
* End line (inclusive). Absent means it is same as start line
@@ -4812,7 +4812,7 @@ public final class Common {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* <code>optional int32 end_line = 2;</code>
* <code>optional int32 endLine = 2;</code>
*
* <pre>
* End line (inclusive). Absent means it is same as start line
@@ -4822,7 +4822,7 @@ public final class Common {
return endLine_;
}
/**
* <code>optional int32 end_line = 2;</code>
* <code>optional int32 endLine = 2;</code>
*
* <pre>
* End line (inclusive). Absent means it is same as start line
@@ -4835,7 +4835,7 @@ public final class Common {
return this;
}
/**
* <code>optional int32 end_line = 2;</code>
* <code>optional int32 endLine = 2;</code>
*
* <pre>
* End line (inclusive). Absent means it is same as start line
@@ -4850,7 +4850,7 @@ public final class Common {

private int startOffset_ ;
/**
* <code>optional int32 start_offset = 3;</code>
* <code>optional int32 startOffset = 3;</code>
*
* <pre>
* If absent it means range starts at the first offset of start line
@@ -4860,7 +4860,7 @@ public final class Common {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* <code>optional int32 start_offset = 3;</code>
* <code>optional int32 startOffset = 3;</code>
*
* <pre>
* If absent it means range starts at the first offset of start line
@@ -4870,7 +4870,7 @@ public final class Common {
return startOffset_;
}
/**
* <code>optional int32 start_offset = 3;</code>
* <code>optional int32 startOffset = 3;</code>
*
* <pre>
* If absent it means range starts at the first offset of start line
@@ -4883,7 +4883,7 @@ public final class Common {
return this;
}
/**
* <code>optional int32 start_offset = 3;</code>
* <code>optional int32 startOffset = 3;</code>
*
* <pre>
* If absent it means range starts at the first offset of start line
@@ -4898,7 +4898,7 @@ public final class Common {

private int endOffset_ ;
/**
* <code>optional int32 end_offset = 4;</code>
* <code>optional int32 endOffset = 4;</code>
*
* <pre>
* If absent it means range ends at the last offset of end line
@@ -4908,7 +4908,7 @@ public final class Common {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* <code>optional int32 end_offset = 4;</code>
* <code>optional int32 endOffset = 4;</code>
*
* <pre>
* If absent it means range ends at the last offset of end line
@@ -4918,7 +4918,7 @@ public final class Common {
return endOffset_;
}
/**
* <code>optional int32 end_offset = 4;</code>
* <code>optional int32 endOffset = 4;</code>
*
* <pre>
* If absent it means range ends at the last offset of end line
@@ -4931,7 +4931,7 @@ public final class Common {
return this;
}
/**
* <code>optional int32 end_offset = 4;</code>
* <code>optional int32 endOffset = 4;</code>
*
* <pre>
* If absent it means range ends at the last offset of end line
@@ -5004,13 +5004,13 @@ public final class Common {
"\003 \001(\t\0220\n\006status\030\004 \001(\0162 .sonarqube.ws.com" +
"mons.RuleStatus\022\020\n\010langName\030\005 \001(\t\"B\n\004Use" +
"r\022\r\n\005login\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\r\n\005email\030",
"\003 \001(\t\022\016\n\006active\030\004 \001(\010\"[\n\tTextRange\022\022\n\nst" +
"art_line\030\001 \001(\005\022\020\n\010end_line\030\002 \001(\005\022\024\n\014star" +
"t_offset\030\003 \001(\005\022\022\n\nend_offset\030\004 \001(\005*E\n\010Se" +
"verity\022\010\n\004INFO\020\000\022\t\n\005MINOR\020\001\022\t\n\005MAJOR\020\002\022\014" +
"\n\010CRITICAL\020\003\022\013\n\007BLOCKER\020\004*>\n\nRuleStatus\022" +
"\010\n\004BETA\020\000\022\016\n\nDEPRECATED\020\001\022\t\n\005READY\020\002\022\013\n\007" +
"REMOVED\020\003B\034\n\020org.sonarqube.wsB\006CommonH\001"
"\003 \001(\t\022\016\n\006active\030\004 \001(\010\"W\n\tTextRange\022\021\n\tst" +
"artLine\030\001 \001(\005\022\017\n\007endLine\030\002 \001(\005\022\023\n\013startO" +
"ffset\030\003 \001(\005\022\021\n\tendOffset\030\004 \001(\005*E\n\010Severi" +
"ty\022\010\n\004INFO\020\000\022\t\n\005MINOR\020\001\022\t\n\005MAJOR\020\002\022\014\n\010CR" +
"ITICAL\020\003\022\013\n\007BLOCKER\020\004*>\n\nRuleStatus\022\010\n\004B" +
"ETA\020\000\022\016\n\nDEPRECATED\020\001\022\t\n\005READY\020\002\022\013\n\007REMO" +
"VED\020\003B\034\n\020org.sonarqube.wsB\006CommonH\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {

+ 146
- 146
sonar-ws/src/main/gen-java/org/sonarqube/ws/Issues.java View File

@@ -5836,17 +5836,17 @@ public final class Issues {
int getLine();

/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
boolean hasLocation();
boolean hasTextRange();
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
org.sonarqube.ws.Issues.Location getLocation();
org.sonarqube.ws.Common.TextRange getTextRange();
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
org.sonarqube.ws.Issues.LocationOrBuilder getLocationOrBuilder();
org.sonarqube.ws.Common.TextRangeOrBuilder getTextRangeOrBuilder();

/**
* <code>repeated .sonarqube.ws.issues.Location secondaryLocations = 10;</code>
@@ -6313,14 +6313,14 @@ public final class Issues {
break;
}
case 74: {
org.sonarqube.ws.Issues.Location.Builder subBuilder = null;
org.sonarqube.ws.Common.TextRange.Builder subBuilder = null;
if (((bitField0_ & 0x00000100) == 0x00000100)) {
subBuilder = location_.toBuilder();
subBuilder = textRange_.toBuilder();
}
location_ = input.readMessage(org.sonarqube.ws.Issues.Location.PARSER, extensionRegistry);
textRange_ = input.readMessage(org.sonarqube.ws.Common.TextRange.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(location_);
location_ = subBuilder.buildPartial();
subBuilder.mergeFrom(textRange_);
textRange_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000100;
break;
@@ -6781,25 +6781,25 @@ public final class Issues {
return line_;
}

public static final int LOCATION_FIELD_NUMBER = 9;
private org.sonarqube.ws.Issues.Location location_;
public static final int TEXTRANGE_FIELD_NUMBER = 9;
private org.sonarqube.ws.Common.TextRange textRange_;
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
public boolean hasLocation() {
public boolean hasTextRange() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
public org.sonarqube.ws.Issues.Location getLocation() {
return location_;
public org.sonarqube.ws.Common.TextRange getTextRange() {
return textRange_;
}
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
public org.sonarqube.ws.Issues.LocationOrBuilder getLocationOrBuilder() {
return location_;
public org.sonarqube.ws.Common.TextRangeOrBuilder getTextRangeOrBuilder() {
return textRange_;
}

public static final int SECONDARYLOCATIONS_FIELD_NUMBER = 10;
@@ -7595,7 +7595,7 @@ public final class Issues {
project_ = "";
subProject_ = "";
line_ = 0;
location_ = org.sonarqube.ws.Issues.Location.getDefaultInstance();
textRange_ = org.sonarqube.ws.Common.TextRange.getDefaultInstance();
secondaryLocations_ = java.util.Collections.emptyList();
executionFlows_ = java.util.Collections.emptyList();
resolution_ = "";
@@ -7657,7 +7657,7 @@ public final class Issues {
output.writeInt32(8, line_);
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
output.writeMessage(9, location_);
output.writeMessage(9, textRange_);
}
for (int i = 0; i < secondaryLocations_.size(); i++) {
output.writeMessage(10, secondaryLocations_.get(i));
@@ -7768,7 +7768,7 @@ public final class Issues {
}
if (((bitField0_ & 0x00000100) == 0x00000100)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, location_);
.computeMessageSize(9, textRange_);
}
for (int i = 0; i < secondaryLocations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
@@ -7982,7 +7982,7 @@ public final class Issues {
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getLocationFieldBuilder();
getTextRangeFieldBuilder();
getSecondaryLocationsFieldBuilder();
getExecutionFlowsFieldBuilder();
getCommentsFieldBuilder();
@@ -8010,10 +8010,10 @@ public final class Issues {
bitField0_ = (bitField0_ & ~0x00000040);
line_ = 0;
bitField0_ = (bitField0_ & ~0x00000080);
if (locationBuilder_ == null) {
location_ = org.sonarqube.ws.Issues.Location.getDefaultInstance();
if (textRangeBuilder_ == null) {
textRange_ = org.sonarqube.ws.Common.TextRange.getDefaultInstance();
} else {
locationBuilder_.clear();
textRangeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000100);
if (secondaryLocationsBuilder_ == null) {
@@ -8135,10 +8135,10 @@ public final class Issues {
if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
to_bitField0_ |= 0x00000100;
}
if (locationBuilder_ == null) {
result.location_ = location_;
if (textRangeBuilder_ == null) {
result.textRange_ = textRange_;
} else {
result.location_ = locationBuilder_.build();
result.textRange_ = textRangeBuilder_.build();
}
if (secondaryLocationsBuilder_ == null) {
if (((bitField0_ & 0x00000200) == 0x00000200)) {
@@ -8296,8 +8296,8 @@ public final class Issues {
if (other.hasLine()) {
setLine(other.getLine());
}
if (other.hasLocation()) {
mergeLocation(other.getLocation());
if (other.hasTextRange()) {
mergeTextRange(other.getTextRange());
}
if (secondaryLocationsBuilder_ == null) {
if (!other.secondaryLocations_.isEmpty()) {
@@ -8985,120 +8985,120 @@ public final class Issues {
return this;
}

private org.sonarqube.ws.Issues.Location location_ = org.sonarqube.ws.Issues.Location.getDefaultInstance();
private org.sonarqube.ws.Common.TextRange textRange_ = org.sonarqube.ws.Common.TextRange.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.sonarqube.ws.Issues.Location, org.sonarqube.ws.Issues.Location.Builder, org.sonarqube.ws.Issues.LocationOrBuilder> locationBuilder_;
org.sonarqube.ws.Common.TextRange, org.sonarqube.ws.Common.TextRange.Builder, org.sonarqube.ws.Common.TextRangeOrBuilder> textRangeBuilder_;
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
public boolean hasLocation() {
public boolean hasTextRange() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
public org.sonarqube.ws.Issues.Location getLocation() {
if (locationBuilder_ == null) {
return location_;
public org.sonarqube.ws.Common.TextRange getTextRange() {
if (textRangeBuilder_ == null) {
return textRange_;
} else {
return locationBuilder_.getMessage();
return textRangeBuilder_.getMessage();
}
}
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
public Builder setLocation(org.sonarqube.ws.Issues.Location value) {
if (locationBuilder_ == null) {
public Builder setTextRange(org.sonarqube.ws.Common.TextRange value) {
if (textRangeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
location_ = value;
textRange_ = value;
onChanged();
} else {
locationBuilder_.setMessage(value);
textRangeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000100;
return this;
}
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
public Builder setLocation(
org.sonarqube.ws.Issues.Location.Builder builderForValue) {
if (locationBuilder_ == null) {
location_ = builderForValue.build();
public Builder setTextRange(
org.sonarqube.ws.Common.TextRange.Builder builderForValue) {
if (textRangeBuilder_ == null) {
textRange_ = builderForValue.build();
onChanged();
} else {
locationBuilder_.setMessage(builderForValue.build());
textRangeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000100;
return this;
}
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
public Builder mergeLocation(org.sonarqube.ws.Issues.Location value) {
if (locationBuilder_ == null) {
public Builder mergeTextRange(org.sonarqube.ws.Common.TextRange value) {
if (textRangeBuilder_ == null) {
if (((bitField0_ & 0x00000100) == 0x00000100) &&
location_ != org.sonarqube.ws.Issues.Location.getDefaultInstance()) {
location_ =
org.sonarqube.ws.Issues.Location.newBuilder(location_).mergeFrom(value).buildPartial();
textRange_ != org.sonarqube.ws.Common.TextRange.getDefaultInstance()) {
textRange_ =
org.sonarqube.ws.Common.TextRange.newBuilder(textRange_).mergeFrom(value).buildPartial();
} else {
location_ = value;
textRange_ = value;
}
onChanged();
} else {
locationBuilder_.mergeFrom(value);
textRangeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000100;
return this;
}
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
public Builder clearLocation() {
if (locationBuilder_ == null) {
location_ = org.sonarqube.ws.Issues.Location.getDefaultInstance();
public Builder clearTextRange() {
if (textRangeBuilder_ == null) {
textRange_ = org.sonarqube.ws.Common.TextRange.getDefaultInstance();
onChanged();
} else {
locationBuilder_.clear();
textRangeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000100);
return this;
}
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
public org.sonarqube.ws.Issues.Location.Builder getLocationBuilder() {
public org.sonarqube.ws.Common.TextRange.Builder getTextRangeBuilder() {
bitField0_ |= 0x00000100;
onChanged();
return getLocationFieldBuilder().getBuilder();
return getTextRangeFieldBuilder().getBuilder();
}
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
public org.sonarqube.ws.Issues.LocationOrBuilder getLocationOrBuilder() {
if (locationBuilder_ != null) {
return locationBuilder_.getMessageOrBuilder();
public org.sonarqube.ws.Common.TextRangeOrBuilder getTextRangeOrBuilder() {
if (textRangeBuilder_ != null) {
return textRangeBuilder_.getMessageOrBuilder();
} else {
return location_;
return textRange_;
}
}
/**
* <code>optional .sonarqube.ws.issues.Location location = 9;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 9;</code>
*/
private com.google.protobuf.SingleFieldBuilder<
org.sonarqube.ws.Issues.Location, org.sonarqube.ws.Issues.Location.Builder, org.sonarqube.ws.Issues.LocationOrBuilder>
getLocationFieldBuilder() {
if (locationBuilder_ == null) {
locationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.sonarqube.ws.Issues.Location, org.sonarqube.ws.Issues.Location.Builder, org.sonarqube.ws.Issues.LocationOrBuilder>(
getLocation(),
org.sonarqube.ws.Common.TextRange, org.sonarqube.ws.Common.TextRange.Builder, org.sonarqube.ws.Common.TextRangeOrBuilder>
getTextRangeFieldBuilder() {
if (textRangeBuilder_ == null) {
textRangeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.sonarqube.ws.Common.TextRange, org.sonarqube.ws.Common.TextRange.Builder, org.sonarqube.ws.Common.TextRangeOrBuilder>(
getTextRange(),
getParentForChildren(),
isClean());
location_ = null;
textRange_ = null;
}
return locationBuilder_;
return textRangeBuilder_;
}

private java.util.List<org.sonarqube.ws.Issues.Location> secondaryLocations_ =
@@ -11888,21 +11888,21 @@ public final class Issues {
com.google.protobuf.MessageOrBuilder {

/**
* <code>optional string component_id = 1;</code>
* <code>optional string componentId = 1;</code>
*/
boolean hasComponentId();
/**
* <code>optional string component_id = 1;</code>
* <code>optional string componentId = 1;</code>
*/
java.lang.String getComponentId();
/**
* <code>optional string component_id = 1;</code>
* <code>optional string componentId = 1;</code>
*/
com.google.protobuf.ByteString
getComponentIdBytes();

/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -11910,7 +11910,7 @@ public final class Issues {
*/
boolean hasTextRange();
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -11918,7 +11918,7 @@ public final class Issues {
*/
org.sonarqube.ws.Common.TextRange getTextRange();
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -12057,16 +12057,16 @@ public final class Issues {
}

private int bitField0_;
public static final int COMPONENT_ID_FIELD_NUMBER = 1;
public static final int COMPONENTID_FIELD_NUMBER = 1;
private java.lang.Object componentId_;
/**
* <code>optional string component_id = 1;</code>
* <code>optional string componentId = 1;</code>
*/
public boolean hasComponentId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional string component_id = 1;</code>
* <code>optional string componentId = 1;</code>
*/
public java.lang.String getComponentId() {
java.lang.Object ref = componentId_;
@@ -12083,7 +12083,7 @@ public final class Issues {
}
}
/**
* <code>optional string component_id = 1;</code>
* <code>optional string componentId = 1;</code>
*/
public com.google.protobuf.ByteString
getComponentIdBytes() {
@@ -12099,10 +12099,10 @@ public final class Issues {
}
}

public static final int TEXT_RANGE_FIELD_NUMBER = 2;
public static final int TEXTRANGE_FIELD_NUMBER = 2;
private org.sonarqube.ws.Common.TextRange textRange_;
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -12112,7 +12112,7 @@ public final class Issues {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -12122,7 +12122,7 @@ public final class Issues {
return textRange_;
}
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -12452,13 +12452,13 @@ public final class Issues {

private java.lang.Object componentId_ = "";
/**
* <code>optional string component_id = 1;</code>
* <code>optional string componentId = 1;</code>
*/
public boolean hasComponentId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional string component_id = 1;</code>
* <code>optional string componentId = 1;</code>
*/
public java.lang.String getComponentId() {
java.lang.Object ref = componentId_;
@@ -12475,7 +12475,7 @@ public final class Issues {
}
}
/**
* <code>optional string component_id = 1;</code>
* <code>optional string componentId = 1;</code>
*/
public com.google.protobuf.ByteString
getComponentIdBytes() {
@@ -12491,7 +12491,7 @@ public final class Issues {
}
}
/**
* <code>optional string component_id = 1;</code>
* <code>optional string componentId = 1;</code>
*/
public Builder setComponentId(
java.lang.String value) {
@@ -12504,7 +12504,7 @@ public final class Issues {
return this;
}
/**
* <code>optional string component_id = 1;</code>
* <code>optional string componentId = 1;</code>
*/
public Builder clearComponentId() {
bitField0_ = (bitField0_ & ~0x00000001);
@@ -12513,7 +12513,7 @@ public final class Issues {
return this;
}
/**
* <code>optional string component_id = 1;</code>
* <code>optional string componentId = 1;</code>
*/
public Builder setComponentIdBytes(
com.google.protobuf.ByteString value) {
@@ -12530,7 +12530,7 @@ public final class Issues {
private com.google.protobuf.SingleFieldBuilder<
org.sonarqube.ws.Common.TextRange, org.sonarqube.ws.Common.TextRange.Builder, org.sonarqube.ws.Common.TextRangeOrBuilder> textRangeBuilder_;
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -12540,7 +12540,7 @@ public final class Issues {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -12554,7 +12554,7 @@ public final class Issues {
}
}
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -12574,7 +12574,7 @@ public final class Issues {
return this;
}
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -12592,7 +12592,7 @@ public final class Issues {
return this;
}
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -12615,7 +12615,7 @@ public final class Issues {
return this;
}
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -12632,7 +12632,7 @@ public final class Issues {
return this;
}
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -12644,7 +12644,7 @@ public final class Issues {
return getTextRangeFieldBuilder().getBuilder();
}
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -12658,7 +12658,7 @@ public final class Issues {
}
}
/**
* <code>optional .sonarqube.ws.commons.TextRange text_range = 2;</code>
* <code>optional .sonarqube.ws.commons.TextRange textRange = 2;</code>
*
* <pre>
* Only when component is a file. Can be empty for a file if this is an issue global to the file.
@@ -17887,43 +17887,43 @@ public final class Issues {
"ponent\022)\n\005rules\030\003 \003(\0132\032.sonarqube.ws.com",
"mons.Rule\022)\n\005users\030\004 \003(\0132\032.sonarqube.ws." +
"commons.User\0224\n\013actionPlans\030\005 \003(\0132\037.sona" +
"rqube.ws.issues.ActionPlan\"\225\006\n\005Issue\022\013\n\003" +
"rqube.ws.issues.ActionPlan\"\230\006\n\005Issue\022\013\n\003" +
"key\030\001 \001(\t\022\014\n\004rule\030\002 \001(\t\0220\n\010severity\030\003 \001(" +
"\0162\036.sonarqube.ws.commons.Severity\022\021\n\tcom" +
"ponent\030\004 \001(\t\022\023\n\013componentId\030\005 \001(\003\022\017\n\007pro" +
"ject\030\006 \001(\t\022\022\n\nsubProject\030\007 \001(\t\022\014\n\004line\030\010" +
" \001(\005\022/\n\010location\030\t \001(\0132\035.sonarqube.ws.is" +
"sues.Location\0229\n\022secondaryLocations\030\n \003(" +
"\0132\035.sonarqube.ws.issues.Location\022:\n\016exec",
"utionFlows\030\013 \003(\0132\".sonarqube.ws.issues.E" +
"xecutionFlow\022\022\n\nresolution\030\014 \001(\t\022\016\n\006stat" +
"us\030\r \001(\t\022\017\n\007message\030\016 \001(\t\022\014\n\004debt\030\017 \001(\t\022" +
"\020\n\010assignee\030\020 \001(\t\022\020\n\010reporter\030\021 \001(\t\022\016\n\006a" +
"uthor\030\022 \001(\t\022\022\n\nactionPlan\030\023 \001(\t\022\032\n\022tagsP" +
"resentIfEmpty\030\024 \001(\010\022\014\n\004tags\030\025 \003(\t\022!\n\031tra" +
"nsitionsPresentIfEmpty\030\026 \001(\010\022\023\n\013transiti" +
"ons\030\027 \003(\t\022\035\n\025actionsPresentIfEmpty\030\030 \001(\010" +
"\022\017\n\007actions\030\031 \003(\t\022\036\n\026commentsPresentIfEm" +
"pty\030\032 \001(\010\022.\n\010comments\030\033 \003(\0132\034.sonarqube.",
"ws.issues.Comment\022\024\n\014creationDate\030\034 \001(\t\022" +
"\022\n\nupdateDate\030\035 \001(\t\022\022\n\nfUpdateAge\030\036 \001(\t\022" +
"\021\n\tcloseDate\030\037 \001(\t\"A\n\rExecutionFlow\0220\n\tl" +
"ocations\030\001 \003(\0132\035.sonarqube.ws.issues.Loc" +
"ation\"b\n\010Location\022\024\n\014component_id\030\001 \001(\t\022" +
"3\n\ntext_range\030\002 \001(\0132\037.sonarqube.ws.commo" +
"ns.TextRange\022\013\n\003msg\030\003 \001(\t\"\220\001\n\007Comment\022\013\n" +
"\003key\030\001 \001(\t\022\r\n\005login\030\002 \001(\t\022\r\n\005email\030\003 \001(\t" +
"\022\020\n\010userName\030\004 \001(\t\022\020\n\010htmlText\030\005 \001(\t\022\020\n\010" +
"markdown\030\006 \001(\t\022\021\n\tupdatable\030\007 \001(\010\022\021\n\tcre",
"atedAt\030\010 \001(\t\"Z\n\nActionPlan\022\013\n\003key\030\001 \001(\t\022" +
"\014\n\004name\030\002 \001(\t\022\016\n\006status\030\003 \001(\t\022\020\n\010deadLin" +
"e\030\004 \001(\t\022\017\n\007project\030\005 \001(\t\"%\n\010Language\022\013\n\003" +
"key\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\"\255\001\n\tComponent\022\n\n" +
"\002id\030\001 \001(\003\022\013\n\003key\030\002 \001(\t\022\014\n\004uuid\030\003 \001(\t\022\017\n\007" +
"enabled\030\004 \001(\010\022\021\n\tqualifier\030\005 \001(\t\022\014\n\004name" +
"\030\006 \001(\t\022\020\n\010longName\030\007 \001(\t\022\014\n\004path\030\010 \001(\t\022\021" +
"\n\tprojectId\030\t \001(\003\022\024\n\014subProjectId\030\n \001(\003B" +
"\034\n\020org.sonarqube.wsB\006IssuesH\001"
" \001(\005\0222\n\ttextRange\030\t \001(\0132\037.sonarqube.ws.c" +
"ommons.TextRange\0229\n\022secondaryLocations\030\n" +
" \003(\0132\035.sonarqube.ws.issues.Location\022:\n\016e",
"xecutionFlows\030\013 \003(\0132\".sonarqube.ws.issue" +
"s.ExecutionFlow\022\022\n\nresolution\030\014 \001(\t\022\016\n\006s" +
"tatus\030\r \001(\t\022\017\n\007message\030\016 \001(\t\022\014\n\004debt\030\017 \001" +
"(\t\022\020\n\010assignee\030\020 \001(\t\022\020\n\010reporter\030\021 \001(\t\022\016" +
"\n\006author\030\022 \001(\t\022\022\n\nactionPlan\030\023 \001(\t\022\032\n\022ta" +
"gsPresentIfEmpty\030\024 \001(\010\022\014\n\004tags\030\025 \003(\t\022!\n\031" +
"transitionsPresentIfEmpty\030\026 \001(\010\022\023\n\013trans" +
"itions\030\027 \003(\t\022\035\n\025actionsPresentIfEmpty\030\030 " +
"\001(\010\022\017\n\007actions\030\031 \003(\t\022\036\n\026commentsPresentI" +
"fEmpty\030\032 \001(\010\022.\n\010comments\030\033 \003(\0132\034.sonarqu",
"be.ws.issues.Comment\022\024\n\014creationDate\030\034 \001" +
"(\t\022\022\n\nupdateDate\030\035 \001(\t\022\022\n\nfUpdateAge\030\036 \001" +
"(\t\022\021\n\tcloseDate\030\037 \001(\t\"A\n\rExecutionFlow\0220" +
"\n\tlocations\030\001 \003(\0132\035.sonarqube.ws.issues." +
"Location\"`\n\010Location\022\023\n\013componentId\030\001 \001(" +
"\t\0222\n\ttextRange\030\002 \001(\0132\037.sonarqube.ws.comm" +
"ons.TextRange\022\013\n\003msg\030\003 \001(\t\"\220\001\n\007Comment\022\013" +
"\n\003key\030\001 \001(\t\022\r\n\005login\030\002 \001(\t\022\r\n\005email\030\003 \001(" +
"\t\022\020\n\010userName\030\004 \001(\t\022\020\n\010htmlText\030\005 \001(\t\022\020\n" +
"\010markdown\030\006 \001(\t\022\021\n\tupdatable\030\007 \001(\010\022\021\n\tcr",
"eatedAt\030\010 \001(\t\"Z\n\nActionPlan\022\013\n\003key\030\001 \001(\t" +
"\022\014\n\004name\030\002 \001(\t\022\016\n\006status\030\003 \001(\t\022\020\n\010deadLi" +
"ne\030\004 \001(\t\022\017\n\007project\030\005 \001(\t\"%\n\010Language\022\013\n" +
"\003key\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\"\255\001\n\tComponent\022\n" +
"\n\002id\030\001 \001(\003\022\013\n\003key\030\002 \001(\t\022\014\n\004uuid\030\003 \001(\t\022\017\n" +
"\007enabled\030\004 \001(\010\022\021\n\tqualifier\030\005 \001(\t\022\014\n\004nam" +
"e\030\006 \001(\t\022\020\n\010longName\030\007 \001(\t\022\014\n\004path\030\010 \001(\t\022" +
"\021\n\tprojectId\030\t \001(\003\022\024\n\014subProjectId\030\n \001(\003" +
"B\034\n\020org.sonarqube.wsB\006IssuesH\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -17955,7 +17955,7 @@ public final class Issues {
internal_static_sonarqube_ws_issues_Issue_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_sonarqube_ws_issues_Issue_descriptor,
new java.lang.String[] { "Key", "Rule", "Severity", "Component", "ComponentId", "Project", "SubProject", "Line", "Location", "SecondaryLocations", "ExecutionFlows", "Resolution", "Status", "Message", "Debt", "Assignee", "Reporter", "Author", "ActionPlan", "TagsPresentIfEmpty", "Tags", "TransitionsPresentIfEmpty", "Transitions", "ActionsPresentIfEmpty", "Actions", "CommentsPresentIfEmpty", "Comments", "CreationDate", "UpdateDate", "FUpdateAge", "CloseDate", });
new java.lang.String[] { "Key", "Rule", "Severity", "Component", "ComponentId", "Project", "SubProject", "Line", "TextRange", "SecondaryLocations", "ExecutionFlows", "Resolution", "Status", "Message", "Debt", "Assignee", "Reporter", "Author", "ActionPlan", "TagsPresentIfEmpty", "Tags", "TransitionsPresentIfEmpty", "Transitions", "ActionsPresentIfEmpty", "Actions", "CommentsPresentIfEmpty", "Comments", "CreationDate", "UpdateDate", "FUpdateAge", "CloseDate", });
internal_static_sonarqube_ws_issues_ExecutionFlow_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_sonarqube_ws_issues_ExecutionFlow_fieldAccessorTable = new

+ 4
- 4
sonar-ws/src/main/protobuf/ws-commons.proto View File

@@ -75,14 +75,14 @@ message User {
// Lines start at 1 and line offsets start at 0
message TextRange {
// Start line. Should never be absent
optional int32 start_line = 1;
optional int32 startLine = 1;

// End line (inclusive). Absent means it is same as start line
optional int32 end_line = 2;
optional int32 endLine = 2;

// If absent it means range starts at the first offset of start line
optional int32 start_offset = 3;
optional int32 startOffset = 3;

// If absent it means range ends at the last offset of end line
optional int32 end_offset = 4;
optional int32 endOffset = 4;
}

+ 3
- 3
sonar-ws/src/main/protobuf/ws-issues.proto View File

@@ -69,7 +69,7 @@ message Issue {
optional string project = 6;
optional string subProject = 7;
optional int32 line = 8;
optional Location location = 9;
optional sonarqube.ws.commons.TextRange textRange = 9;
repeated Location secondaryLocations = 10;
repeated ExecutionFlow executionFlows = 11;
optional string resolution = 12;
@@ -107,9 +107,9 @@ message ExecutionFlow {
}

message Location {
optional string component_id = 1;
optional string componentId = 1;
// Only when component is a file. Can be empty for a file if this is an issue global to the file.
optional sonarqube.ws.commons.TextRange text_range = 2;
optional sonarqube.ws.commons.TextRange textRange = 2;
optional string msg = 3;
}


Loading…
Cancel
Save