Skip to content

Commit 1e58b0a

Browse files
Merge pull request #127 from cap-java/sonarfix
Excluding class from sonar scan
2 parents 50db637 + 7661fc2 commit 1e58b0a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.github/workflows/sonarqube.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
-Dsonar.junit.reportPaths=sdm/target/surefire-reports \
7171
-Dsonar.coverage.jacoco.xmlReportPaths=sdm/target/site/jacoco/jacoco.xml \
7272
-Dsonar.inclusions=**/*.java \
73-
-Dsonar.exclusions=**/target/**,**/node_modules/**,sdm/src/main/test/**,cap-notebook/*.capnb,sdm/src/main/java/com/sap/cds/sdm/model/**,sdm/src/main/java/com/sap/cds/sdm/caching/CacheKey.java,sdm/src/main/java/com/sap/cds/sdm/caching/RepoKey.java,sdm/src/main/java/com/sap/cds/sdm/caching/TokenCacheKey.java \
73+
-Dsonar.exclusions=**/target/**,**/node_modules/**,sdm/src/main/test/**,cap-notebook/*.capnb,sdm/src/main/java/com/sap/cds/sdm/model/**,sdm/src/main/java/com/sap/cds/sdm/caching/CacheKey.java,sdm/src/main/java/com/sap/cds/sdm/caching/RepoKey.java,sdm/src/main/java/com/sap/cds/sdm/caching/TokenCacheKey.java,sdm/src/main/java/com/sap/cds/sdm/caching/SecondaryTypesKey.java \
7474
-Dsonar.java.file.suffixes=.java \
7575
-Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \
7676
-Dsonar.login=${{ secrets.SONAR_TOKEN }}

sdm/src/main/java/com/sap/cds/sdm/constants/SDMConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private SDMConstants() {
4141
public static final int CONNECTION_TIMEOUT = 1200;
4242
public static final String ONBOARD_REPO_MESSAGE =
4343
"Repository with name %s and id %s onboarded successfully";
44-
public static final String ONBOARD_REPO__ERROR_MESSAGE =
44+
public static final String ONBOARD_REPO_ERROR_MESSAGE =
4545
"Error in onboarding repository with name %s";
4646
public static final String UPDATE_ATTACHMENT_ERROR = "Could not update the attachment";
4747

sdm/src/main/java/com/sap/cds/sdm/handler/TokenHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public static HttpClient getHttpClient(
189189
DefaultHttpClientFactory.DefaultHttpClientFactoryBuilder builder =
190190
DefaultHttpClientFactory.builder();
191191
if (connectionPoolConfig == null) {
192-
Duration timeout = Duration.ofSeconds((long) SDMConstants.CONNECTION_TIMEOUT);
192+
Duration timeout = Duration.ofSeconds(SDMConstants.CONNECTION_TIMEOUT);
193193
builder.timeoutMilliseconds((int) timeout.toMillis());
194194
builder.maxConnectionsPerRoute(SDMConstants.MAX_CONNECTIONS);
195195
builder.maxConnectionsTotal(SDMConstants.MAX_CONNECTIONS);

sdm/src/main/java/com/sap/cds/sdm/service/SDMAdminServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public String onboardRepository(Repository repository)
4343
SDMConstants.ONBOARD_REPO_MESSAGE, repository.getDisplayName(), repositoryId);
4444
} catch (IOException e) {
4545
throw new ServiceException(
46-
String.format(SDMConstants.ONBOARD_REPO__ERROR_MESSAGE, repository.getDisplayName()),
46+
String.format(SDMConstants.ONBOARD_REPO_ERROR_MESSAGE, repository.getDisplayName()),
4747
e.getMessage());
4848
}
4949
}

0 commit comments

Comments
 (0)