kumaab commented on code in PR #462:
URL: https://github.com/apache/ranger/pull/462#discussion_r1890843450


##########
ranger-util/src/main/java/org/apache/ranger/common/RangerVersionInfo.java:
##########
@@ -23,113 +23,113 @@
 
 /**
  * RangerVersionInfo.
- *
  */
 @InterfaceAudience.Private
 @InterfaceStability.Unstable
 public class RangerVersionInfo {
-
-       private static Package myPackage;
-       private static RangerVersionAnnotation version;
-
-       static {
-               myPackage = RangerVersionAnnotation.class.getPackage();
-               version = 
myPackage.getAnnotation(RangerVersionAnnotation.class);
-       }
-
-       /**
-        * Get the meta-data for the Ranger package.
-        *
-        * @return
-        */
-       static Package getPackage() {
-               return myPackage;
-       }
-
-       /**
-        * Get the Ranger version.
-        *
-        * @return the Ranger version string, eg. "0.6.3-dev"
-        */
-       public static String getVersion() {
-               return version != null ? version.version() : "Unknown";
-       }
-
-       /**
-        * Get the Ranger short version, with major/minor/change version 
numbers.
-        *
-        * @return short version string, eg. "0.6.3"
-        */
-       public static String getShortVersion() {
-               return version != null ? version.shortVersion() : "Unknown";
-       }
-
-       /**
-        * Get the subversion revision number for the root directory
-        *
-        * @return the revision number, eg. "451451"
-        */
-       public static String getRevision() {
-               return version != null ? version.revision() : "Unknown";
-       }
-
-       /**
-        * Get the branch on which this originated.
-        *
-        * @return The branch name, e.g. "trunk" or "branches/branch-0.20"
-        */
-       public static String getBranch() {
-               return version != null ? version.branch() : "Unknown";
-       }
-
-       /**
-        * The date that Ranger was compiled.
-        *
-        * @return the compilation date in unix date format
-        */
-       public static String getDate() {
-               return version != null ? version.date() : "Unknown";
-       }
-
-       /**
-        * The user that compiled Ranger.
-        *
-        * @return the username of the user
-        */
-       public static String getUser() {
-               return version != null ? version.user() : "Unknown";
-       }
-
-       /**
-        * Get the subversion URL for the root Ranger directory.
-        */
-       public static String getUrl() {
-               return version != null ? version.url() : "Unknown";
-       }
-
-       /**
-        * Get the checksum of the source files from which Ranger was built.
-        **/
-       public static String getSrcChecksum() {
-               return version != null ? version.srcChecksum() : "Unknown";
-       }
-
-       /**
-        * Returns the buildVersion which includes version, revision, user and 
date.
-        */
-       public static String getBuildVersion() {
-               return RangerVersionInfo.getVersion() + " from "
-                               + RangerVersionInfo.getRevision() + " by "
-                               + RangerVersionInfo.getUser() + " source 
checksum "
-                               + RangerVersionInfo.getSrcChecksum();
-       }
-
-       public static void main(String[] args) {
-               System.out.println("");
-               System.out.println("Ranger " + getVersion());
-               System.out.println("Subversion " + getUrl() + " -r " + 
getRevision());
-               System.out.println("Compiled by " + getUser() + " on " + 
getDate());
-               System.out.println("From source with checksum " + 
getSrcChecksum());
-       }
-
+    private static Package                 myPackage;
+    private static RangerVersionAnnotation version;
+
+    private RangerVersionInfo(){

Review Comment:
   Apparently, rules don't work for empty functions.
   
   Like for ex, the rule does not kick here:
   ```
   public void doNothing(){
           // do nothing
       }
   ```
   whereas it kicks here:
   
   ```
   public boolean doNothing(){
           return true;
       }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ranger.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to