Skip to content

Commit

Permalink
Fix some typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ligangty committed May 8, 2023
1 parent 3a54958 commit 57550ea
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 49 deletions.
10 changes: 6 additions & 4 deletions compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ services:
keycloak:
image: quay.io/keycloak/keycloak:17.0.0
command: [
"start --hostname-strict=false --https-key-store-file=/etc/keycloak-keystore.jks"
# "start --hostname-strict=false --https-key-store-file=/etc/keycloak-keystore.jks"
"start-dev --hostname-strict=false"
]
ports:
- "8543:8443"
- "8180:8080"
# - "8543:8443"
environment:
KEYCLOAK_ADMIN: "admin"
KEYCLOAK_ADMIN_PASSWORD: "admin"
volumes:
- ./config/keycloak-keystore.jks:/etc/keycloak-keystore.jks
# volumes:
# - ./config/keycloak-keystore.jks:/etc/keycloak-keystore.jks
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.commonjava.indy.service.repository.data.annotations.ClusterStoreDataManager;
import org.commonjava.indy.service.repository.data.infinispan.CacheHandle;
import org.commonjava.indy.service.repository.data.infinispan.CacheProducer;
import org.commonjava.indy.service.repository.exception.IndyDataException;
import org.commonjava.indy.service.repository.model.AbstractRepository;
import org.commonjava.indy.service.repository.model.ArtifactStore;
import org.commonjava.indy.service.repository.model.Group;
Expand Down Expand Up @@ -82,6 +81,7 @@ public class CassandraStoreDataManager

private final Integer STORE_EXPIRATION_IN_MINS = 15;

@SuppressWarnings( "unused" )
protected CassandraStoreDataManager()
{
}
Expand Down Expand Up @@ -116,7 +116,7 @@ protected Optional<ArtifactStore> getArtifactStoreInternal( StoreKey key )
}
}

return Optional.ofNullable( computeIfAbsent( ARTIFACT_STORE, key, STORE_EXPIRATION_IN_MINS, Boolean.FALSE ) );
return Optional.ofNullable( computeIfAbsent( key, STORE_EXPIRATION_IN_MINS, Boolean.FALSE ) );
}

@Override
Expand Down Expand Up @@ -230,7 +230,7 @@ protected ArtifactStore putArtifactStoreInternal( StoreKey storeKey, ArtifactSto
DtxArtifactStore dtxArtifactStore = toDtxArtifactStore( storeKey, store );
storeQuery.createDtxArtifactStore( dtxArtifactStore );

return computeIfAbsent( ARTIFACT_STORE, storeKey, STORE_EXPIRATION_IN_MINS, Boolean.TRUE );
return computeIfAbsent( storeKey, STORE_EXPIRATION_IN_MINS, Boolean.TRUE );
}

@Override
Expand Down Expand Up @@ -635,11 +635,11 @@ public void initRemoteStoresCache()
.forEach( s -> remoteKojiStores.put( s.getKey(), s ) );
}

private ArtifactStore computeIfAbsent( String name, StoreKey key, int expirationMins, boolean forceQuery )
private ArtifactStore computeIfAbsent( StoreKey key, int expirationMins, boolean forceQuery )
{
logger.debug( "computeIfAbsent, cache: {}, key: {}", name, key );
logger.debug( "computeIfAbsent, cache: {}, key: {}", ARTIFACT_STORE, key );

CacheHandle<StoreKey, ArtifactStore> cache = cacheProducer.getCache( name );
CacheHandle<StoreKey, ArtifactStore> cache = cacheProducer.getCache( ARTIFACT_STORE );
ArtifactStore store = cache.get( key );
if ( store == null || forceQuery )
{
Expand All @@ -662,7 +662,7 @@ private ArtifactStore computeIfAbsent( String name, StoreKey key, int expiration
}
}

logger.trace( "Return value, cache: {}, key: {}, ret: {}", name, key, store );
logger.trace( "Return value, cache: {}, key: {}, ret: {}", ARTIFACT_STORE, key, store );
return store;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public Response getPackageTypeMap()
@APIResponse( responseCode = "200", content = @Content( schema = @Schema( implementation = Set.class ),
example = "[\"generic-http\",\"maven\",\"npm\"]" ),
description = "The package type listing" )
@Path( "/responseCode-type/keys" )
@Path( "/package-type/keys" )
@GET
@Produces( APPLICATION_JSON )
public Response getPackageTypeNames()
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ quarkus:
always-include: true

indy_security:
enabled: True
enabled: False

repository:
data-storage: mem
Expand Down
35 changes: 0 additions & 35 deletions src/main/resources/security-bindings.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void testGetAppVersion()
@Test
public void testGetPackageTypeNames()
{
given().get( "/api/stats/responseCode-type/keys" )
given().get( "/api/stats/package-type/keys" )
.then()
.statusCode( OK.getStatusCode() )
.body( containsString( "maven" ) );
Expand Down

0 comments on commit 57550ea

Please sign in to comment.