Skip to content

Commit 6da6771

Browse files
committed
cleanup: fix lint errors
1 parent de92d62 commit 6da6771

26 files changed

+86
-77
lines changed

retail/interactive-tutorials/src/main/java/events/setup/EventsCreateBigQueryTable.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
public class EventsCreateBigQueryTable {
3333

3434
public static void main(String[] args) throws IOException {
35-
String dataset = "user_events";
36-
String validEventsTable = "events";
37-
String invalidEventsTable = "events_some_invalid";
38-
String eventsSchemaFilePath = "src/main/resources/events_schema.json";
35+
final String dataset = "user_events";
36+
final String validEventsTable = "events";
37+
final String invalidEventsTable = "events_some_invalid";
38+
final String eventsSchemaFilePath = "src/main/resources/events_schema.json";
3939
// user_events.json and user_events_some_invalid.json are located in the resources folder
40-
String validEventsSourceFile =
40+
final String validEventsSourceFile =
4141
ProductsCreateBigqueryTable.class.getResource("/user_events.json").getPath();
42-
String invalidEventsSourceFile =
42+
final String invalidEventsSourceFile =
4343
ProductsCreateBigqueryTable.class.getResource("/user_events_some_invalid.json").getPath();
4444

4545
BufferedReader bufferedReader = new BufferedReader(new FileReader(eventsSchemaFilePath));

retail/interactive-tutorials/src/main/java/events/setup/RemoveEventsResources.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@
2121

2222
import com.google.api.gax.rpc.PermissionDeniedException;
2323
import com.google.cloud.ServiceOptions;
24-
import com.google.cloud.retail.v2.*;
24+
import com.google.cloud.retail.v2.DeleteProductRequest;
25+
import com.google.cloud.retail.v2.ListProductsRequest;
26+
import com.google.cloud.retail.v2.Product;
27+
import com.google.cloud.retail.v2.ProductServiceClient;
2528
import com.google.cloud.retail.v2.ProductServiceClient.ListProductsPagedResponse;
29+
import com.google.cloud.retail.v2.PurgeUserEventsRequest;
30+
import com.google.cloud.retail.v2.UserEventServiceClient;
2631
import java.io.IOException;
2732

2833
public class RemoveEventsResources {

retail/interactive-tutorials/src/main/java/product/ImportProductsGcs.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public static void main(String[] args) throws IOException, InterruptedException
5151
String gcsErrorBucket = String.format("%s/errors", gcsBucket);
5252

5353
// To check error handling, use an invalid catalog in request
54-
// branchName =
55-
// String.format("projects/%s/locations/global/catalogs/invalid_catalog/branches/default_branch", projectId);
54+
// branchName = String.format(
55+
// "projects/%s/locations/global/catalogs/invalid_catalog/branches/default_branch", projectId);
5656

5757
String gcsProductsObject = "products.json";
5858
// To check error handling, use an invalid product JSON.

retail/interactive-tutorials/src/main/java/product/SetInventory.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@
2121
import static setup.SetupCleanup.getProduct;
2222

2323
import com.google.cloud.ServiceOptions;
24-
import com.google.cloud.retail.v2.*;
24+
import com.google.cloud.retail.v2.FulfillmentInfo;
25+
import com.google.cloud.retail.v2.PriceInfo;
26+
import com.google.cloud.retail.v2.Product;
2527
import com.google.cloud.retail.v2.Product.Availability;
28+
import com.google.cloud.retail.v2.ProductServiceClient;
29+
import com.google.cloud.retail.v2.SetInventoryRequest;
2630
import com.google.protobuf.FieldMask;
2731
import com.google.protobuf.Int32Value;
2832
import java.io.IOException;

retail/interactive-tutorials/src/main/java/product/setup/ProductsCreateBigqueryTable.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
public class ProductsCreateBigqueryTable {
3232

3333
public static void main(String[] args) throws IOException {
34-
String dataset = "products";
35-
String validProductsTable = "products";
36-
String invalidProductsTable = "products_some_invalid";
37-
String productSchemaFilePath = "src/main/resources/product_schema.json";
38-
String validProductsSourceFile =
34+
final String dataset = "products";
35+
final String validProductsTable = "products";
36+
final String invalidProductsTable = "products_some_invalid";
37+
final String productSchemaFilePath = "src/main/resources/product_schema.json";
38+
final String validProductsSourceFile =
3939
ProductsCreateBigqueryTable.class.getResource("/products.json").getPath();
40-
String invalidProductsSourceFile =
40+
final String invalidProductsSourceFile =
4141
ProductsCreateBigqueryTable.class.getResource("/products_some_invalid.json").getPath();
4242

4343
BufferedReader bufferedReader = new BufferedReader(new FileReader(productSchemaFilePath));

retail/interactive-tutorials/src/test/java/events/ImportUserEventsGcsTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ public class ImportUserEventsGcsTest {
4040
public void setUp() throws IOException, InterruptedException {
4141
EventsCreateGcsBucket.main();
4242

43-
String projectId = ServiceOptions.getDefaultProjectId();
44-
String defaultCatalog =
43+
final String projectId = ServiceOptions.getDefaultProjectId();
44+
final String defaultCatalog =
4545
String.format("projects/%s/locations/global/catalogs/default_catalog", projectId);
46-
String bucketName = EventsCreateGcsBucket.getBucketName();
47-
String gcsEventsObject = "user_events.json";
46+
final String bucketName = EventsCreateGcsBucket.getBucketName();
47+
final String gcsEventsObject = "user_events.json";
4848
bout = new ByteArrayOutputStream();
4949
PrintStream out = new PrintStream(bout);
5050
originalPrintStream = System.out;

retail/interactive-tutorials/src/test/java/events/ImportUserEventsInlineTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public class ImportUserEventsInlineTest {
3737

3838
@Before
3939
public void setUp() throws IOException, ExecutionException, InterruptedException {
40-
String projectId = ServiceOptions.getDefaultProjectId();
41-
String defaultCatalog =
40+
final String projectId = ServiceOptions.getDefaultProjectId();
41+
final String defaultCatalog =
4242
String.format("projects/%s/locations/global/catalogs/default_catalog", projectId);
4343
bout = new ByteArrayOutputStream();
4444
PrintStream out = new PrintStream(bout);

retail/interactive-tutorials/src/test/java/events/PurgeUserEventTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public class PurgeUserEventTest {
3838

3939
@Before
4040
public void setUp() throws IOException, InterruptedException, ExecutionException {
41-
String projectId = ServiceOptions.getDefaultProjectId();
42-
String defaultCatalog =
41+
final String projectId = ServiceOptions.getDefaultProjectId();
42+
final String defaultCatalog =
4343
String.format("projects/%s/locations/global/catalogs/default_catalog", projectId);
44-
String visitorId = UUID.randomUUID().toString();
44+
final String visitorId = UUID.randomUUID().toString();
4545
bout = new ByteArrayOutputStream();
4646
PrintStream out = new PrintStream(bout);
4747
originalPrintStream = System.out;

retail/interactive-tutorials/src/test/java/events/RejoinUserEventTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public class RejoinUserEventTest {
3838

3939
@Before
4040
public void setUp() throws IOException, InterruptedException, ExecutionException {
41-
String projectId = ServiceOptions.getDefaultProjectId();
42-
String defaultCatalog =
41+
final String projectId = ServiceOptions.getDefaultProjectId();
42+
final String defaultCatalog =
4343
String.format("projects/%s/locations/global/catalogs/default_catalog", projectId);
44-
String visitorId = UUID.randomUUID().toString();
44+
final String visitorId = UUID.randomUUID().toString();
4545
bout = new ByteArrayOutputStream();
4646
PrintStream out = new PrintStream(bout);
4747
originalPrintStream = System.out;

retail/interactive-tutorials/src/test/java/events/WriteUserEventTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public class WriteUserEventTest {
3838

3939
@Before
4040
public void setUp() throws IOException, InterruptedException, ExecutionException {
41-
String projectId = ServiceOptions.getDefaultProjectId();
42-
String defaultCatalog =
41+
final String projectId = ServiceOptions.getDefaultProjectId();
42+
final String defaultCatalog =
4343
String.format("projects/%s/locations/global/catalogs/default_catalog", projectId);
44-
String visitorId = UUID.randomUUID().toString();
44+
final String visitorId = UUID.randomUUID().toString();
4545
bout = new ByteArrayOutputStream();
4646
PrintStream out = new PrintStream(bout);
4747
originalPrintStream = System.out;

0 commit comments

Comments
 (0)