Skip to content

Commit 8b9a775

Browse files
committed
Fix documentation and imports
1 parent f8e18a3 commit 8b9a775

File tree

14 files changed

+67
-50
lines changed

14 files changed

+67
-50
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Assuming you have your Cloudinary configuration parameters defined (`cloud_name`
124124

125125
The following example uploads a local JPG to the cloud:
126126

127-
cloudinary.uploader().upload("my_picture.jpg", Cloudinary.emptyMap())
127+
cloudinary.uploader().upload("my_picture.jpg", ObjectUtils.emptyMap())
128128

129129
The uploaded image is assigned a randomly generated public ID. The image is immediately available for download through a CDN:
130130

cloudinary-android/src/main/java/com/cloudinary/android/MultipartUtility.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void addFormField(String name, String value) {
7474
* Adds a upload file section to the request
7575
*
7676
* @param fieldName
77-
* name attribute in <input type="file" name="..." />
77+
* name attribute in {@code <input type="file" name="..." />}
7878
* @param uploadFile
7979
* a File to be uploaded
8080
* @throws IOException

cloudinary-core/src/main/java/com/cloudinary/Configuration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public Configuration(Configuration other) {
115115
/**
116116
* Create a new Configuration from an existing one
117117
* @param other
118-
* @return
118+
* @return a new configuration with the arguments supplied by another configuration object
119119
*/
120120
public static Configuration from(Configuration other) {
121121
return new Builder().from(other).build();
@@ -127,7 +127,7 @@ public static Configuration from(Configuration other) {
127127
* Example url: cloudinary://123456789012345:abcdeghijklmnopqrstuvwxyz12@n07t21i7
128128
*
129129
* @param cloudinaryUrl configuration url
130-
* @return
130+
* @return a new configuration with the arguments supplied by the url
131131
*/
132132
public static Configuration from(String cloudinaryUrl) {
133133
return from(parseConfigUrl(cloudinaryUrl));
@@ -314,8 +314,8 @@ public Builder setUseRootPath(boolean useRootPath) {
314314

315315
/**
316316
* Initialize builder from existing {@link Configuration}
317-
* @param other
318-
* @return
317+
* @param other a different configuration object
318+
* @return an initialized builder configured with <code>other</code>
319319
*/
320320
public Builder from(Configuration other) {
321321
this.cloudName = other.cloudName;

cloudinary-core/src/main/java/com/cloudinary/Url.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ public Url(Cloudinary cloudinary) {
3636
private static Pattern identifierPattern = Pattern.compile("^(?:([^/]+)/)??(?:([^/]+)/)??(?:v(\\d+)/)?" + "(?:([^#/]+?)(?:\\.([^.#/]+))?)(?:#([^/]+))?$");
3737

3838
/**
39-
* Parses a cloudinary identifier of the form:
40-
* [<resource_type>/][<image_type
41-
* >/][v<version>/]<public_id>[.<format>][#<signature>]
39+
* Parses a cloudinary identifier of the form:<br>
40+
* {@code [<resource_type>/][<image_type>/][v<version>/]<public_id>[.<format>][#<signature>]}
4241
*/
4342
public Url fromIdentifier(String identifier) {
4443
Matcher matcher = identifierPattern.matcher(identifier);
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package com.cloudinary.api;
22

3+
import java.text.ParseException;
34
import java.util.Map;
45

56
@SuppressWarnings("rawtypes")
67
public interface ApiResponse extends Map {
7-
Map<String, RateLimit> rateLimits() throws java.text.ParseException;
8-
RateLimit apiRateLimit() throws java.text.ParseException;
8+
Map<String, RateLimit> rateLimits() throws ParseException;
9+
RateLimit apiRateLimit() throws ParseException;
910
}

cloudinary-core/src/main/java/com/cloudinary/utils/Base64Coder.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static String encodeString(String s) {
7070
/**
7171
* Encodes a byte array into Base 64 format and breaks the output into lines
7272
* of 76 characters. This method is compatible with
73-
* <code>sun.misc.BASE64Encoder.encodeBuffer(byte[])</code>.
73+
* {@code sun.misc.BASE64Encoder.encodeBuffer(byte[])}.
7474
*
7575
* @param in
7676
* An array containing the data bytes to be encoded.
@@ -87,10 +87,10 @@ public static String encodeLines(byte[] in) {
8787
* @param in
8888
* An array containing the data bytes to be encoded.
8989
* @param iOff
90-
* Offset of the first byte in <code>in</code> to be processed.
90+
* Offset of the first byte in {@code in} to be processed.
9191
* @param iLen
92-
* Number of bytes to be processed in <code>in</code>, starting
93-
* at <code>iOff</code>.
92+
* Number of bytes to be processed in {@code in}, starting
93+
* at {@code iOff}.
9494
* @param lineLen
9595
* Line length for the output data. Should be a multiple of 4.
9696
* @param lineSeparator
@@ -134,7 +134,7 @@ public static char[] encode(byte[] in) {
134134
* @param in
135135
* An array containing the data bytes to be encoded.
136136
* @param iLen
137-
* Number of bytes to process in <code>in</code>.
137+
* Number of bytes to process in {@code in}.
138138
* @return A character array containing the Base64 encoded data.
139139
*/
140140
public static char[] encode(byte[] in, int iLen) {
@@ -148,10 +148,10 @@ public static char[] encode(byte[] in, int iLen) {
148148
* @param in
149149
* An array containing the data bytes to be encoded.
150150
* @param iOff
151-
* Offset of the first byte in <code>in</code> to be processed.
151+
* Offset of the first byte in {@code in} to be processed.
152152
* @param iLen
153-
* Number of bytes to process in <code>in</code>, starting at
154-
* <code>iOff</code>.
153+
* Number of bytes to process in {@code in}, starting at
154+
* {@code iOff}.
155155
* @return A character array containing the Base64 encoded data.
156156
*/
157157
public static char[] encode(byte[] in, int iOff, int iLen) {
@@ -197,7 +197,7 @@ public static String decodeString(String s) {
197197
* Decodes a byte array from Base64 format and ignores line separators, tabs
198198
* and blanks. CR, LF, Tab and Space characters are ignored in the input
199199
* data. This method is compatible with
200-
* <code>sun.misc.BASE64Decoder.decodeBuffer(String)</code>.
200+
* {@code sun.misc.BASE64Decoder.decodeBuffer(String)}.
201201
*
202202
* @param s
203203
* A Base64 String to be decoded.
@@ -251,11 +251,11 @@ public static byte[] decode(char[] in) {
251251
* @param in
252252
* A character array containing the Base64 encoded data.
253253
* @param iOff
254-
* Offset of the first character in <code>in</code> to be
254+
* Offset of the first character in {@code in} to be
255255
* processed.
256256
* @param iLen
257-
* Number of characters to process in <code>in</code>, starting
258-
* at <code>iOff</code>.
257+
* Number of characters to process in {@code in}, starting
258+
* at {@code iOff}.
259259
* @return An array containing the decoded data bytes.
260260
* @throws IllegalArgumentException
261261
* If the input is not valid Base64 encoded data.

cloudinary-core/src/main/java/org/cloudinary/json/JSONObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ public JSONObject putOpt(String key, Object value) throws JSONException {
11961196

11971197
/**
11981198
* Produce a string in double quotes with backslash sequences in all the
1199-
* right places. A backslash will be inserted within </, producing <\/,
1199+
* right places. A backslash will be inserted within &lt;/, producing &lt;\/,
12001200
* allowing JSON text to be delivered in HTML. In JSON text, a string cannot
12011201
* contain a control character or an unescaped quote or backslash.
12021202
*

cloudinary-http42/src/main/java/com/cloudinary/http42/ApiStrategy.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import java.util.Arrays;
77
import java.util.Map;
88

9+
import com.cloudinary.strategies.AbstractApiStrategy;
910
import org.apache.http.HttpResponse;
1011
import org.apache.http.client.methods.HttpDelete;
1112
import org.apache.http.client.methods.HttpGet;
@@ -30,7 +31,7 @@
3031
import com.cloudinary.utils.ObjectUtils;
3132
import com.cloudinary.utils.StringUtils;
3233

33-
public class ApiStrategy extends com.cloudinary.strategies.AbstractApiStrategy {
34+
public class ApiStrategy extends AbstractApiStrategy {
3435

3536

3637
@SuppressWarnings({ "rawtypes", "unchecked" })

cloudinary-http42/src/main/java/com/cloudinary/http42/UrlBuilderStrategy.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package com.cloudinary.http42;
22

3+
import com.cloudinary.strategies.AbstractUrlBuilderStrategy;
34
import org.apache.http.client.utils.URIBuilder;
45

5-
public class UrlBuilderStrategy extends com.cloudinary.strategies.AbstractUrlBuilderStrategy {
6+
public class UrlBuilderStrategy extends AbstractUrlBuilderStrategy {
67

78
private URIBuilder builder;
89
@Override

cloudinary-http42/src/main/java/com/cloudinary/http42/api/Response.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.cloudinary.http42.api;
22

33
import java.text.DateFormat;
4+
import java.text.ParseException;
45
import java.text.SimpleDateFormat;
56
import java.util.HashMap;
67
import java.util.Map;
@@ -35,7 +36,7 @@ public HttpResponse getRawHttpResponse() {
3536
private static final DateFormat RFC1123 = new SimpleDateFormat(
3637
RFC1123_PATTERN);
3738

38-
public Map<String, RateLimit> rateLimits() throws java.text.ParseException {
39+
public Map<String, RateLimit> rateLimits() throws ParseException {
3940
Header[] headers = this.response.getAllHeaders();
4041
Map<String, RateLimit> limits = new HashMap<String, RateLimit>();
4142
for (Header header : headers) {
@@ -63,7 +64,7 @@ public Map<String, RateLimit> rateLimits() throws java.text.ParseException {
6364
return limits;
6465
}
6566

66-
public RateLimit apiRateLimit() throws java.text.ParseException {
67+
public RateLimit apiRateLimit() throws ParseException {
6768
return rateLimits().get("Api");
6869
}
6970
}

0 commit comments

Comments
 (0)