Skip to content

Commit

Permalink
Fixing quality and formating bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sashir Estela committed Mar 22, 2024
1 parent fa36d69 commit 1369d49
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
* Before running this example you must have an OpenAI account and keep your Api Key in an
* environment variable called OPENAI_API_KEY.
*
* @see <a href="https://platform.openai.com/docs/api-reference/authentication">OpenAI Authentication</a>
* @see <a href="https://platform.openai.com/docs/api-reference/authentication">OpenAI
* Authentication</a>
*/
public class StreamExample {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ public ReturnType(Method method) {
}

private Map<String, Class<?>> calculateClassByEvent(StreamType[] streamTypeList) {
Map<String, Class<?>> classByEvent = new ConcurrentHashMap<>();
Map<String, Class<?>> map = new ConcurrentHashMap<>();
Arrays.stream(streamTypeList).forEach(streamType -> {
Arrays.stream(streamType.events())
.forEach(event -> classByEvent.put(CleverClientSSE.EVENT_HEADER + event, streamType.type()));
.forEach(event -> map.put(CleverClientSSE.EVENT_HEADER + event, streamType.type()));
});
return classByEvent;
return map;
}

public String toString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

class ReturnTypeTest {

Expand Down Expand Up @@ -72,7 +71,7 @@ void shouldReturnMapClassByEventWhenTheMethodIsAnnotatedWithStreamType()
expectedMap.put(CleverClientSSE.EVENT_HEADER + "first.create", First.class);
expectedMap.put(CleverClientSSE.EVENT_HEADER + "first.complete", First.class);
expectedMap.put(CleverClientSSE.EVENT_HEADER + "second.create", Second.class);
assertTrue(expectedMap.equals(actualMap));
assertEquals(Boolean.TRUE, expectedMap.equals(actualMap));
}

static interface TestInterface {
Expand Down

0 comments on commit 1369d49

Please sign in to comment.