Skip to content

Commit 45ce040

Browse files
API docs
1 parent 173ba14 commit 45ce040

File tree

16 files changed

+833
-305
lines changed

16 files changed

+833
-305
lines changed

pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
<groupId>com.contentstack.sdk</groupId>
66
<artifactId>cms</artifactId>
77
<name>contentstack-management-java</name>
8-
<version>1.0.0-SNAPSHOT</version>
8+
<version>1.0.1-SNAPSHOT</version>
99
<description>Contentstack Java Management SDK for Content Management API, Contentstack is a headless CMS with an
1010
API-first approach
1111
</description>
1212
<url>https://github.com/contentstack/contentstack-management-java/</url>
1313

14+
<!-- release the package using mvn clean deploy -->
1415
<parent>
1516
<groupId>org.sonatype.oss</groupId>
1617
<artifactId>oss-parent</artifactId>
@@ -200,6 +201,7 @@
200201
</executions>
201202
</plugin>
202203

204+
<!-- -overview "***REMOVED***tentstack/java/contentstack-management-java/src/main/overview.html" -bottom "<b>Copyright © 2012-2022 Contentstack </b><sup>TM</sup>"-->
203205
<plugin>
204206
<groupId>org.apache.maven.plugins</groupId>
205207
<artifactId>maven-javadoc-plugin</artifactId>

src/main/java/com/contentstack/cms/Contentstack.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public Organization organization() {
264264
public Stack stack() {
265265
if (this.authtoken == null)
266266
throw new IllegalStateException(ILLEGAL_USER);
267-
return new Stack(this.instance);
267+
return new Stack(this.instance, this.authtoken);
268268
}
269269

270270

@@ -288,7 +288,9 @@ public Stack stack() {
288288
*/
289289
public Stack stack(@NotNull Map<String, Object> header) {
290290
if (this.authtoken == null)
291-
throw new IllegalStateException(PLEASE_LOGIN);
291+
if (header.size() == 0) {
292+
throw new IllegalStateException(PLEASE_LOGIN);
293+
}
292294
return new Stack(this.instance, header);
293295
}
294296

0 commit comments

Comments
 (0)