Skip to content

Commit 6f503ee

Browse files
committed
---
yaml --- r: 4721 b: refs/heads/logging-alpha c: 9e4692d h: refs/heads/master i: 4719: afd1077
1 parent bb7a019 commit 6f503ee

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ refs/heads/compute-alpha: 969cba2627f1d53d352cc4a5ffe0879dacf65e6c
1212
refs/heads/dns-alpha: 2f90e7e338349287ace33375896907af0f032ca1
1313
refs/heads/dns-alpha-batch: 17442b07867021b85d0452f5f3eda29a3413288f
1414
refs/heads/gcs-nio: 283aeaf15efdcf3621eb6859f05e55ad7764375d
15-
refs/heads/logging-alpha: 241960f2a24d4dbec27288589ccf72f91c431816
15+
refs/heads/logging-alpha: 9e4692d3c7ee17b3f10f4073144fbab780bb63ea
1616
refs/tags/v0.1.0: a615317f7424ed58621b1f65d5c4d8cbbe8a6ed8
1717
refs/tags/v0.1.1: 7a7f6985fe465e9dd6a075af55493f42b4933be0
1818
refs/tags/v0.1.2: 3eb3fe866ba22487686048f45d927b8c8638ea3f

branches/logging-alpha/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ protected B self() {
122122
}
123123

124124
public B projectId(String projectId) {
125-
this.projectId = projectId;
125+
this.projectId =
126+
checkNotNull(projectId, "Project ID cannot be set to null. Leave unset for default.");
126127
return self();
127128
}
128129

branches/logging-alpha/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/KeyFactory.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.gcloud.datastore;
1818

19-
import com.google.common.base.MoreObjects;
2019
import com.google.common.collect.ImmutableList;
2120

2221
/**
@@ -29,14 +28,14 @@ public final class KeyFactory extends BaseKey.Builder<KeyFactory> {
2928
private final String ns;
3029

3130
public KeyFactory(String projectId) {
32-
this(projectId, null);
31+
this(projectId, "");
3332
}
3433

3534
public KeyFactory(String projectId, String namespace) {
3635
super(projectId);
3736
namespace(namespace);
3837
this.pi = projectId;
39-
this.ns = MoreObjects.firstNonNull(namespace, "");
38+
this.ns = namespace;
4039
}
4140

4241
public IncompleteKey newKey() {

branches/logging-alpha/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/Validator.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ static String validateDatabase(String projectId) {
4545
}
4646

4747
static String validateNamespace(String namespace) {
48-
if (Strings.isNullOrEmpty(namespace)) {
49-
return "";
50-
}
48+
checkArgument(namespace != null, "Namespace cannot be null. Leave unset for default.");
5149
checkArgument(namespace.length() <= MAX_NAMESPACE_LENGTH,
5250
"namespace must not contain more than 100 characters");
5351
checkArgument(NAMESPACE_PATTERN.matcher(namespace).matches(),

0 commit comments

Comments
 (0)