Skip to content

Commit 5320a0a

Browse files
authored
Merge pull request #58240 from MikeDodaro/fixJavaSamples
Fix java samples: image and custom search.
2 parents 71d2521 + 6621cc7 commit 5320a0a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

articles/cognitive-services/Bing-Custom-Search/call-endpoint-java.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ To run this example, follow these steps:
118118
}
119119

120120
// Container class for search results encapsulates relevant headers and JSON data
121-
class SearchResults{
121+
static class SearchResults{
122122
HashMap<String, String> relevantHeaders;
123123
String jsonResponse;
124124
SearchResults(HashMap<String, String> headers, String json) {

articles/cognitive-services/Bing-Image-Search/image-sdk-java-quickstart.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Install the Bing Image Search SDK dependencies by using Maven, Gradle, or anothe
2929
<dependency>
3030
<groupId>com.microsoft.azure.cognitiveservices</groupId>
3131
<artifactId>azure-cognitiveservices-imagesearch</artifactId>
32-
<version>0.0.1-beta-SNAPSHOT</version>
32+
<version>1.0.1</version>
3333
</dependency>
3434
</dependencies>
3535
```
@@ -59,7 +59,7 @@ Install the Bing Image Search SDK dependencies by using Maven, Gradle, or anothe
5959
## Send a search request to the Bing Image Search API
6060

6161
1. Using `bingImages().search()`, send the HTTP request containing the search query. Save the response as a `ImagesModel`.
62-
```java
62+
```java
6363
ImagesModel imageResults = client.bingImages().search()
6464
.withQuery(searchTerm)
6565
.withMarket("en-us")
@@ -82,8 +82,8 @@ if (imageResults != null && imageResults.value().size() > 0) {
8282
}
8383
else {
8484
System.out.println("Couldn't find image results!");
85-
}
86-
}
85+
}
86+
8787
```
8888

8989
## Next steps

0 commit comments

Comments
 (0)