Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.1.8] - 2024-04-25

### Changed

- Fixed a bug where options could not be added to request information. [#1238](https://github.com/microsoft/kiota-java/issues/1238)

## [1.1.7] - 2024-04-23

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import jakarta.annotation.Nonnull;

import java.util.Collections;
import java.util.ArrayList;
import java.util.List;

/**
Expand All @@ -24,5 +24,5 @@ public BaseRequestConfiguration() {
/**
* Request options
*/
@Nonnull public List<RequestOption> options = Collections.emptyList();
@Nonnull public List<RequestOption> options = new ArrayList<RequestOption>();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.microsoft.kiota;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.junit.jupiter.api.Test;

public class BaseRequestConfigurationTest {

public static class TestRequestConfiguration extends BaseRequestConfiguration {
public TestRequestConfiguration() {
super();
}
}

@Test
void testOptions() {
TestRequestConfiguration requestConfiguration = new TestRequestConfiguration();
assertNotNull(requestConfiguration.options);

RequestOption requestOption =
new RequestOption() {
@Override
public <T extends RequestOption> Class<T> getType() {
return null;
}
};
// options should be mutable list
requestConfiguration.options.add(requestOption);
assertEquals(1, requestConfiguration.options.size());
assertEquals(requestOption, requestConfiguration.options.get(0));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public UserAgentHandlerOption() {}

private boolean enabled = true;
@Nonnull private String productName = "kiota-java";
@Nonnull private String productVersion = "1.1.1";
@Nonnull private String productVersion = "1.1.8";

/**
* Gets the product name to be used in the user agent header
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ org.gradle.caching=true
mavenGroupId = com.microsoft.kiota
mavenMajorVersion = 1
mavenMinorVersion = 1
mavenPatchVersion = 7
mavenPatchVersion = 8
mavenArtifactSuffix =

#These values are used to run functional tests
Expand Down