Skip to content

Commit

Permalink
Add private constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzhaoyuan committed Apr 17, 2024
1 parent 6567012 commit 6ee609d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

public class PaginationCalculator {

private PaginationCalculator() {}

/**
* PageNumber '0' represents the first page (no offset).
*/
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/cbioportal/utils/Encoding.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

public class Encoding {

private Encoding() {}

private static final Base64.Encoder BASE64_ENCODER = Base64.getEncoder().withoutPadding();
private static final Base64.Decoder BASE64_DECODER = Base64.getDecoder();

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/cbioportal/web/util/UniqueKeyExtractor.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.cbioportal.web.util;

import org.cbioportal.utils.Encoding;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Collection;

@Component
public class UniqueKeyExtractor {

private UniqueKeyExtractor() {}

public static void extractUniqueKeys(List<String> uniqueKeys, Collection<String> studyIdsToReturn) {
extractUniqueKeys(uniqueKeys, studyIdsToReturn, null);
}
Expand Down
4 changes: 0 additions & 4 deletions src/test/java/org/cbioportal/web/config/TestConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.cbioportal.persistence.cachemaputil.CacheMapUtil;
import org.cbioportal.web.error.GlobalExceptionHandler;
import org.cbioportal.web.util.InvolvedCancerStudyExtractorInterceptor;
import org.cbioportal.web.util.UniqueKeyExtractor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.boot.test.mock.mockito.MockBean;
Expand All @@ -20,9 +19,6 @@ public class TestConfig {
@MockBean(name = "staticRefCacheMapUtil")
private CacheMapUtil cacheMapUtil;

@MockBean
private UniqueKeyExtractor uniqueKeyExtractor;

@Bean
public InvolvedCancerStudyExtractorInterceptor involvedCancerStudyExtractorInterceptor() {
return new InvolvedCancerStudyExtractorInterceptor();
Expand Down

0 comments on commit 6ee609d

Please sign in to comment.