uschindler edited a comment on issue #618: #Lucene-2562: Make Luke a 
Lucene/Solr Module
URL: https://github.com/apache/lucene-solr/pull/618#issuecomment-480354222
 
 
   I fixed the compiler warnings. While doing this (especially because the 
eclipse compiler complained heavily), I also moved some of the "auxiliary 
classes" to be inner classes.
   
   Especially with IDEs it's a problem if you have multiple classes in the same 
java file next to each other like: 
   
   ```java
   public class Main {
    // main class code
   }
   
   class Auxiliary {
     // code
   }
   ```
   
   This brings problems with Javac when you change code (it wont compile). This 
type of classes was used in Java 1.0, but are bad code style nowadays.
   
   It's better to just move those classes as static inner classes:
   
   ```java
   public class Main {
    // main class code
   
    static class Auxiliary {
       // code
     }
   }
   ```
   
   Lucene wanted to add a special precommit task to detect that, but it's 
actually not easy to do with pure regular expressions. I moved some of them, 
but it looks like there are more (it's often Model classes in Factories or 
Providers).

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to