Skip to content

Commit f3adad2

Browse files
marcinqualarooscana
authored andcommitted
Prevent creation of some internal-only classes
1 parent 121c883 commit f3adad2

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed

src/main/java/com/filestack/FileLink.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ public class FileLink implements Serializable {
3333
protected final String handle;
3434

3535
/**
36+
* Basic constructor for a FileLink.
37+
*
3638
* @deprecated FileLink objects should not be created by hand - use {@link Client} to acquire them.
37-
* This method is scheduled to be removed in version 1.0.0.
39+
* This method is scheduled to be removed in version 1.0.0.
3840
*/
3941
@Deprecated
4042
public FileLink(Config config, String handle) {

src/main/java/com/filestack/Progress.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ public class Progress<T> {
1010
private final T data;
1111

1212
/**
13+
* Basic constructor for Progress.
14+
*
1315
* @deprecated access to this constructor is scheduled to be limited in 1.0.0 to internal use only.
1416
*/
1517
@Deprecated

src/main/java/com/filestack/internal/CloudServiceUtil.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,7 @@ public static void addStorageJson(JsonObject base, String cloud, StorageOptions
7474

7575
base.getAsJsonObject(KEY_CLOUDS).getAsJsonObject(cloud).add(KEY_STORE, json);
7676
}
77+
78+
private CloudServiceUtil() {}
79+
7780
}

src/main/java/com/filestack/internal/HeaderInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class HeaderInterceptor implements Interceptor {
1818

1919
private String version;
2020

21-
public HeaderInterceptor() {
21+
HeaderInterceptor() {
2222
this.version = Util.getVersion();
2323
}
2424

src/main/java/com/filestack/internal/Networking.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.util.concurrent.TimeUnit;
44

5+
import com.google.common.graph.Network;
56
import okhttp3.OkHttpClient;
67
import retrofit2.Retrofit;
78
import retrofit2.converter.gson.GsonConverterFactory;
@@ -10,7 +11,7 @@
1011
* Holds {@link OkHttpClient} and {@link Retrofit} singletons.
1112
* We only want to instantiate these classes once per app.
1213
*/
13-
public class Networking {
14+
public final class Networking {
1415
private static OkHttpClient httpClient;
1516
private static BaseService baseService;
1617
private static CdnService cdnService;
@@ -115,4 +116,6 @@ private static void invalidateServices() {
115116
uploadService = null;
116117
cloudService = null;
117118
}
119+
120+
private Networking() {}
118121
}

src/test/java/com/filestack/internal/TestNetworking.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import org.junit.Assert;
55
import org.junit.Test;
66

7-
public class TestNetworking extends Networking {
7+
public class TestNetworking {
88

99
@Test
1010
public void testCreation() {

0 commit comments

Comments
 (0)