Add instructions to invoke the linter and code formatter plugins to the README and...
[aai/schema-service.git] / aai-schema-gen / src / main / java / org / onap / aai / schemagen / SpringContextAware.java
index d91cf81..4bdc05b 100644 (file)
@@ -8,7 +8,7 @@
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *    http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,8 +17,8 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-package org.onap.aai.schemagen;
 
+package org.onap.aai.schemagen;
 
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
@@ -31,31 +31,30 @@ public class SpringContextAware implements ApplicationContextAware {
     private static ApplicationContext context = null;
 
     public static ApplicationContext getApplicationContext() {
-      return context;
+        return context;
     }
 
     @Override
     public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
-      context = applicationContext;
+        context = applicationContext;
     }
 
-
-  public static <T> T getBean(String beanName, Class<T> requiredType) {
-    if(context != null){
-      return context.getBean(beanName, requiredType);
-     }
+    public static <T> T getBean(String beanName, Class<T> requiredType) {
+        if (context != null) {
+            return context.getBean(beanName, requiredType);
+        }
         return null;
-  }
+    }
 
-  public static <T> T getBean(Class<T> clazz){
-        if(context != null){
+    public static <T> T getBean(Class<T> clazz) {
+        if (context != null) {
             return context.getBean(clazz);
         }
         return null;
     }
 
-    public static Object getBean(String bean){
-        if(context != null){
+    public static Object getBean(String bean) {
+        if (context != null) {
             return context.getBean(bean);
         }
         return null;