Преглед на файлове

fragment:util: Added private constructor to hide the inherit public one

Utility classes, which are collections of static members, are not meant to be instantiated.

Java adds an implicit public constructor to every class which does not define at least one explicitly. Hence, at least one non-public constructor should be defined.
eho преди 7 години
родител
ревизия
d5b500559e
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      src/main/java/com/owncloud/android/ui/fragment/util/FileDetailSharingFragmentHelper.java

+ 4 - 0
src/main/java/com/owncloud/android/ui/fragment/util/FileDetailSharingFragmentHelper.java

@@ -39,6 +39,10 @@ import java.util.Date;
  */
 public class FileDetailSharingFragmentHelper {
 
+    private FileDetailSharingFragmentHelper() {
+        // Private empty constructor
+    }
+
     /**
      * Sets checked/visiblity state on the given {@link MenuItem} based on the given criteria.
      *