Skip to content

Commit 130a092

Browse files
committed
---
yaml --- r: 3423 b: refs/heads/master c: ce2ace0 h: refs/heads/master i: 3421: a789c89 3419: 4f29273 3415: 9aaff25 3407: 6301b27 3391: be36209
1 parent 07d1cbb commit 130a092

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 47c4c1c3d8138b5891472e099fed5d71d932c393
2+
refs/heads/master: ce2ace01ac8c6080aa3972e3fcff5b510fed48f1
33
refs/heads/travis: e21ee7b88a5edc3f3d8c71f90c3fc32abf7e8dd6
44
refs/heads/gh-pages: 4e0561bb4504bf647db669a14417b2b2c87ba45d
55
refs/heads/pubsub-alpha: 1a0e970f265af871e02274085b9662b3fe29058b

trunk/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/TopicId.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
public final class TopicId implements Serializable {
3434

3535
private static final long serialVersionUID = -4913169763174877777L;
36-
private static final String DELETED_TOPIC_NAME = "_deleted_topic_";
36+
private static final String DELETED_TOPIC_NAME = "_deleted-topic_";
3737
private static final TopicId DELETED_TOPIC = new TopicId(null, DELETED_TOPIC_NAME, true);
3838

3939
private final String project;
@@ -68,7 +68,7 @@ public String topic() {
6868
/**
6969
* Returns {@code true} if this object is the identity of a deleted topic, {@code false}
7070
* otherwhise. If {@code isDeleted()} is {@code true}, {@link #topic()} returns
71-
* "{@code _deleted_topic_}" and {@link #project()} returns {@code null}.
71+
* "{@code _deleted-topic_}" and {@link #project()} returns {@code null}.
7272
*/
7373
public boolean isDeleted() {
7474
return isDeleted;

trunk/gcloud-java-pubsub/src/test/java/com/google/cloud/pubsub/SubscriptionInfoTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void testToAndFromPb() {
113113
SubscriptionInfo.fromPb(subscriptionInfo.toPb("project")));
114114
com.google.pubsub.v1.Subscription subscription = SUBSCRIPTION_INFO.toPb("project");
115115
subscriptionInfo =
116-
SubscriptionInfo.fromPb(subscription.toBuilder().setTopic("_deleted_topic_").build());
116+
SubscriptionInfo.fromPb(subscription.toBuilder().setTopic("_deleted-topic_").build());
117117
assertEquals(TopicId.deletedTopic(), subscriptionInfo.topic());
118118
assertEquals(NAME, subscriptionInfo.name());
119119
assertEquals(PUSH_CONFIG, subscriptionInfo.pushConfig());

trunk/gcloud-java-pubsub/src/test/java/com/google/cloud/pubsub/TopicIdTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class TopicIdTest {
2929
private static final String PROJECT = "project";
3030
private static final String NAME = "topic";
3131
private static final String TOPIC_PB = "projects/project/topics/topic";
32+
private static final String DELETED_TOPIC_NAME = "_deleted-topic_";
3233

3334
@Test
3435
public void testOf() {
@@ -45,7 +46,7 @@ public void testOf() {
4546
public void testDeletedTopic() {
4647
TopicId deletedTopic = TopicId.deletedTopic();
4748
assertNull(deletedTopic.project());
48-
assertEquals("_deleted_topic_", deletedTopic.topic());
49+
assertEquals(DELETED_TOPIC_NAME, deletedTopic.topic());
4950
assertTrue(deletedTopic.isDeleted());
5051
assertSame(deletedTopic, TopicId.deletedTopic());
5152
}
@@ -60,6 +61,7 @@ public void testToAndFromPb() {
6061
topicPb = topicId.toPb("otherProject");
6162
assertEquals("projects/otherProject/topics/topic", topicPb);
6263
compareTopicId(TopicId.of("otherProject", NAME), TopicId.fromPb(topicPb));
64+
assertSame(TopicId.deletedTopic(), TopicId.fromPb(DELETED_TOPIC_NAME));
6365
}
6466

6567
private void compareTopicId(TopicId expected, TopicId value) {

0 commit comments

Comments
 (0)