Skip to content

Commit

Permalink
Merge pull request #130 from ligangty/2.0-refactor
Browse files Browse the repository at this point in the history
IDE warning fix
  • Loading branch information
ligangty authored Dec 21, 2023
2 parents 5d4a6b3 + 3e3c280 commit 3945d3c
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
package org.commonjava.indy.service.ui.client;

import io.quarkus.oidc.IdToken;
import io.quarkus.oidc.RefreshToken;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.microprofile.jwt.JsonWebToken;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
package org.commonjava.indy.service.ui.jaxrs.content;

import org.commonjava.indy.service.ui.client.content.ContentBrowseReGenClient;
import org.commonjava.indy.service.ui.client.content.ContentBrowseServiceClient;
import org.commonjava.indy.service.ui.models.content.ContentBrowseResult;
import org.commonjava.indy.service.ui.models.repository.StoreType;
import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.openapi.annotations.media.Content;
Expand All @@ -27,9 +25,6 @@
import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
import org.eclipse.microprofile.openapi.annotations.responses.APIResponses;
import org.eclipse.microprofile.openapi.annotations.tags.Tag;
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.inject.Inject;
import javax.ws.rs.GET;
Expand All @@ -48,8 +43,6 @@
@Path( "/api/browse/{packageType}/{type: (hosted|group|remote)}/{name}" )
public class ContentBrowseResource
{
private final Logger logger = LoggerFactory.getLogger( this.getClass() );

@Inject
ContentBrowseReGenClient client;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@
@Path( "/api/content/maven/{type: (hosted|group|remote)}/{name}" )
public class MavenContentAccessResource
{
private final Logger logger = LoggerFactory.getLogger( this.getClass() );

@Inject
@RestClient
MavenContentAccessServiceClient client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
import java.nio.charset.Charset;
import java.util.Map;
import java.util.function.Function;
import java.util.function.Supplier;

import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
import static org.eclipse.microprofile.openapi.annotations.enums.ParameterIn.PATH;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@
*/
package org.commonjava.indy.service.ui.jaxrs.stats;

import io.quarkus.launcher.QuarkusLauncher;
import io.quarkus.runtime.LaunchMode;
import org.apache.commons.io.IOUtils;
import org.commonjava.indy.service.ui.client.stats.StatsClient;
import org.commonjava.indy.service.ui.exception.IndyUIException;
import org.commonjava.indy.service.ui.jaxrs.ResponseHelper;
import org.commonjava.indy.service.ui.models.stats.AddOnListing;
import org.commonjava.indy.service.ui.models.stats.EndpointView;
import org.commonjava.indy.service.ui.models.stats.IndyVersioning;
import org.commonjava.indy.service.ui.util.ResourceUtils;
import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.openapi.annotations.media.Content;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
Expand All @@ -41,9 +38,6 @@
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.Map;

import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
Expand All @@ -54,7 +48,7 @@
@Path( "/api/stats" )
public class StatsResource
{
private Logger logger = LoggerFactory.getLogger( this.getClass() );
private final Logger logger = LoggerFactory.getLogger( this.getClass() );

@Inject
@RestClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,15 @@
package org.commonjava.indy.service.ui.keycloak;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.codehaus.plexus.interpolation.InterpolationException;
import org.codehaus.plexus.interpolation.PropertiesBasedValueSource;
import org.codehaus.plexus.interpolation.StringSearchInterpolator;
import org.commonjava.indy.service.ui.exception.IndyUIException;
import org.commonjava.indy.service.ui.util.ResourceUtils;
import org.commonjava.indy.service.ui.util.UrlUtils;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.nio.charset.Charset;
import java.util.Properties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,6 @@ public void writeExternal( final ObjectOutput out )
public void readExternal( final ObjectInput in )
throws IOException, ClassNotFoundException
{
int keyVersion = in.readInt();

this.packageType = (String) in.readObject();

Object rawType = in.readObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import javax.enterprise.context.ApplicationScoped;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;

@ApplicationScoped
public class MimeTyper
Expand All @@ -40,7 +41,7 @@ public MimeTyper()
{
try
{
final String extraTypes = IOUtils.toString( stream );
final String extraTypes = IOUtils.toString( stream, Charset.defaultCharset() );
typeMap.addMimeTypes( extraTypes );
}
catch ( final IOException e )
Expand Down

0 comments on commit 3945d3c

Please sign in to comment.