Skip to content

Commit e01a58f

Browse files
authored
Merge pull request #12 from oracle/release_051817
Releasing version 1.2.8 of the Java SDK for Oracle Bare Metal Cloud Services.
2 parents dec7aa0 + a22d135 commit e01a58f

File tree

145 files changed

+10600
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+10600
-132
lines changed

Diff for: CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
1313
### Added
1414
- N/A
1515

16+
## 1.2.8 - 2017-05-18
17+
### Added
18+
- Extended support for FastConnect
19+
- Support for Private VCN
20+
- Support for IAD Region (us-ashburn-1)
21+
1622
## 1.2.7 - 2017-04-27
1723
### Changed
1824
- A new value called UnknownEnumValue has been added to all enums that are used in responses returned from services. If a service returns a value that cannot be recognized by the version of the SDK, then the enum will be set to this value. Previously this would throw an exception.

Diff for: bmc-audit/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.oracle.bmc.sdk</groupId>
77
<artifactId>oracle-bmc-java-sdk</artifactId>
8-
<version>1.2.7</version>
8+
<version>1.2.8</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>com.oracle.bmc.sdk</groupId>
2020
<artifactId>oracle-bmc-java-sdk-common</artifactId>
21-
<version>1.2.7</version>
21+
<version>1.2.8</version>
2222
</dependency>
2323
</dependencies>
2424

Diff for: bmc-bom/pom.xml

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.oracle.bmc.sdk</groupId>
99
<artifactId>oracle-bmc-java-sdk</artifactId>
10-
<version>1.2.7</version>
10+
<version>1.2.8</version>
1111
<relativePath>../pom.xml</relativePath>
1212
</parent>
1313

@@ -24,7 +24,7 @@
2424
<dependency>
2525
<groupId>com.oracle.bmc.sdk</groupId>
2626
<artifactId>oracle-bmc-java-sdk-common</artifactId>
27-
<version>1.2.7</version>
27+
<version>1.2.8</version>
2828
<optional>false</optional>
2929
</dependency>
3030

@@ -33,31 +33,31 @@
3333
<dependency>
3434
<groupId>com.oracle.bmc.sdk</groupId>
3535
<artifactId>oracle-bmc-java-sdk-audit</artifactId>
36-
<version>1.2.7</version>
36+
<version>1.2.8</version>
3737
<optional>false</optional>
3838
</dependency>
3939
<dependency>
4040
<groupId>com.oracle.bmc.sdk</groupId>
4141
<artifactId>oracle-bmc-java-sdk-core</artifactId>
42-
<version>1.2.7</version>
42+
<version>1.2.8</version>
4343
<optional>false</optional>
4444
</dependency>
4545
<dependency>
4646
<groupId>com.oracle.bmc.sdk</groupId>
4747
<artifactId>oracle-bmc-java-sdk-identity</artifactId>
48-
<version>1.2.7</version>
48+
<version>1.2.8</version>
4949
<optional>false</optional>
5050
</dependency>
5151
<dependency>
5252
<groupId>com.oracle.bmc.sdk</groupId>
5353
<artifactId>oracle-bmc-java-sdk-loadbalancer</artifactId>
54-
<version>1.2.7</version>
54+
<version>1.2.8</version>
5555
<optional>false</optional>
5656
</dependency>
5757
<dependency>
5858
<groupId>com.oracle.bmc.sdk</groupId>
5959
<artifactId>oracle-bmc-java-sdk-objectstorage</artifactId>
60-
<version>1.2.7</version>
60+
<version>1.2.8</version>
6161
<optional>false</optional>
6262
</dependency>
6363
</dependencies>

Diff for: bmc-common/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.oracle.bmc.sdk</groupId>
77
<artifactId>oracle-bmc-java-sdk</artifactId>
8-
<version>1.2.7</version>
8+
<version>1.2.8</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

Diff for: bmc-common/src/main/java/com/oracle/bmc/ConfigFileReader.java

+25-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
import java.io.IOException;
1212
import java.io.InputStream;
1313
import java.io.InputStreamReader;
14+
import java.nio.charset.Charset;
15+
import java.nio.charset.StandardCharsets;
1416
import java.util.HashMap;
1517
import java.util.Map;
1618

19+
import javax.annotation.Nonnull;
1720
import javax.annotation.Nullable;
1821

1922
import lombok.AccessLevel;
@@ -90,7 +93,7 @@ public static ConfigFile parse(String configurationFilePath, @Nullable String pr
9093
}
9194

9295
/**
93-
* Create a new instance using an input stream.
96+
* Create a new instance using an UTF-8 input stream.
9497
*
9598
* @param configurationStream
9699
* The path to the config file.
@@ -103,9 +106,29 @@ public static ConfigFile parse(String configurationFilePath, @Nullable String pr
103106
*/
104107
public static ConfigFile parse(InputStream configurationStream, @Nullable String profile)
105108
throws IOException {
109+
return parse(configurationStream, profile, StandardCharsets.UTF_8);
110+
}
111+
112+
/**
113+
* Create a new instance using an input stream.
114+
*
115+
* @param configurationStream
116+
* The path to the config file.
117+
* @param profile
118+
* The profile name to load, or null if you want to load the
119+
* "DEFAULT" profile.
120+
* @param charset
121+
* The charset used when parsing the input stream
122+
* @return A new ConfigFile instance.
123+
* @throws IOException
124+
* if the file could not be read.
125+
*/
126+
public static ConfigFile parse(
127+
InputStream configurationStream, @Nullable String profile, @Nonnull Charset charset)
128+
throws IOException {
106129
final ConfigAccumulator accumulator = new ConfigAccumulator();
107130
try (final BufferedReader reader =
108-
new BufferedReader(new InputStreamReader(configurationStream))) {
131+
new BufferedReader(new InputStreamReader(configurationStream, charset))) {
109132
String line = null;
110133
while ((line = reader.readLine()) != null) {
111134
accumulator.accept(line);

Diff for: bmc-common/src/main/java/com/oracle/bmc/Region.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
@Slf4j
2323
@RequiredArgsConstructor
2424
public enum Region {
25-
US_PHOENIX_1("us-phoenix-1");
25+
US_PHOENIX_1("us-phoenix-1"),
26+
US_ASHBURN_1("us-ashburn-1");
2627

2728
private static final Map<String, Map<Region, String>> SERVICE_TO_REGION_ENDPOINTS =
2829
new HashMap<>();

Diff for: bmc-common/src/main/java/com/oracle/bmc/http/internal/AuthnClientFilter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public void filter(@NonNull ClientRequestContext clientRequestContext) throws IO
3333
clientRequestContext.getStringHeaders(),
3434
clientRequestContext.getEntity());
3535

36-
for (String key : authHeaders.keySet()) {
37-
clientRequestContext.getHeaders().putSingle(key, authHeaders.get(key));
36+
for (Map.Entry<String, String> e : authHeaders.entrySet()) {
37+
clientRequestContext.getHeaders().putSingle(e.getKey(), e.getValue());
3838
}
3939
}
4040
}

Diff for: bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/RequestSignerImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ private List<String> getRequiredSigningHeaders(final String httpMethod) {
380380
private static byte[] getJsonBody(Object body) throws JsonProcessingException {
381381
// empty body is OK
382382
if (body == null) {
383-
return "".getBytes();
383+
return "".getBytes(StandardCharsets.UTF_8);
384384
}
385385
// use the same object mapper as the rest client to ensure the configurations match
386386
// what is sent
@@ -401,7 +401,7 @@ private static String base64Encode(byte[] bytes) {
401401
// encodeBase64String changed from chunked in v1.4 to not chunked in
402402
// v1.5 so we cannot rely on which version is going to be used by clients,
403403
// be explicit that this is not-chunked
404-
return new String(Base64.encodeBase64(bytes, false));
404+
return new String(Base64.encodeBase64(bytes, false), StandardCharsets.UTF_8);
405405
}
406406

407407
private static SimpleDateFormat createFormatter() {

Diff for: bmc-core/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.oracle.bmc.sdk</groupId>
77
<artifactId>oracle-bmc-java-sdk</artifactId>
8-
<version>1.2.7</version>
8+
<version>1.2.8</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>com.oracle.bmc.sdk</groupId>
2020
<artifactId>oracle-bmc-java-sdk-common</artifactId>
21-
<version>1.2.7</version>
21+
<version>1.2.8</version>
2222
</dependency>
2323
</dependencies>
2424

Diff for: bmc-core/src/main/java/com/oracle/bmc/core/Compute.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,9 @@ GetWindowsInstanceInitialCredentialsResponse getWindowsInstanceInitialCredential
231231
* on that resource type, or by viewing the resource in the Console.
232232
* <p>
233233
* When you launch an instance, it is automatically attached to a Virtual
234-
* Network Interface Card (VNIC) and given both a public and private IP address.
235-
* To get both addresses, use the {@link #listVnicAttachments(ListVnicAttachmentsRequest) listVnicAttachments}
234+
* Network Interface Card (VNIC). The VNIC has a private IP address from
235+
* the subnet's CIDR, and optionally a public IP address.
236+
* To get the addresses, use the {@link #listVnicAttachments(ListVnicAttachmentsRequest) listVnicAttachments}
236237
* operation to get the VNIC ID for the instance, and then call
237238
* {@link #getVnic(GetVnicRequest) getVnic} with the VNIC ID.
238239
*

Diff for: bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,9 @@ Future<InstanceActionResponse> instanceAction(
301301
* on that resource type, or by viewing the resource in the Console.
302302
* <p>
303303
* When you launch an instance, it is automatically attached to a Virtual
304-
* Network Interface Card (VNIC) and given both a public and private IP address.
305-
* To get both addresses, use the {@link #listVnicAttachments(ListVnicAttachmentsRequest, Consumer, Consumer) listVnicAttachments}
304+
* Network Interface Card (VNIC). The VNIC has a private IP address from
305+
* the subnet's CIDR, and optionally a public IP address.
306+
* To get the addresses, use the {@link #listVnicAttachments(ListVnicAttachmentsRequest, Consumer, Consumer) listVnicAttachments}
306307
* operation to get the VNIC ID for the instance, and then call
307308
* {@link #getVnic(GetVnicRequest, Consumer, Consumer) getVnic} with the VNIC ID.
308309
*

0 commit comments

Comments
 (0)