Skip to content

Commit 32205e0

Browse files
committed
Seperate API call from response processing.
1 parent db17f6d commit 32205e0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

dlp/src/main/java/dlp/snippets/InspectFile.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ public static void inspectFile(String projectId, String filePath, String fileTyp
7575
.setInspectConfig(config)
7676
.build();
7777

78-
// Use the client to send the request and parse results
78+
// Use the client to send the API request
7979
InspectContentResponse response = dlp.inspectContent(request);
80+
81+
// Parse the response and process results
8082
System.out.println("Findings: " + response.getResult().getFindingsCount());
8183
for (Finding f : response.getResult().getFindingsList()) {
8284
System.out.println("\tQuote: " + f.getQuote());

dlp/src/main/java/dlp/snippets/InspectString.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ public static void inspectString(String projectId, String textToInspect) {
7070
.setInspectConfig(config)
7171
.build();
7272

73-
// Run request and parse response
73+
// Use the client to send the API request
7474
InspectContentResponse response = dlp.inspectContent(request);
75+
76+
// Parse the response and process results
7577
System.out.println("Findings: " + response.getResult().getFindingsCount());
7678
for (Finding f : response.getResult().getFindingsList()) {
7779
System.out.println("\tQuote: " + f.getQuote());

0 commit comments

Comments
 (0)