This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a59f86  SYNCOPE-1486: upgrade checkstyle; fix syntax issues and line 
lengths (#112)
3a59f86 is described below

commit 3a59f86140728d66441d2a45cff2957553b24898
Author: Misagh Moayyed <mm1...@gmail.com>
AuthorDate: Mon Sep 9 12:33:14 2019 +0430

    SYNCOPE-1486: upgrade checkstyle; fix syntax issues and line lengths (#112)
---
 .../ide/netbeans/view/ServerDetailsView.java       | 129 ++++++++++++---------
 pom.xml                                            |   7 ++
 .../resources/org/apache/syncope/checkstyle.xml    |  12 +-
 3 files changed, 88 insertions(+), 60 deletions(-)

diff --git 
a/ide/netbeans/src/main/java/org/apache/syncope/ide/netbeans/view/ServerDetailsView.java
 
b/ide/netbeans/src/main/java/org/apache/syncope/ide/netbeans/view/ServerDetailsView.java
index 58ebde2..88635ec 100644
--- 
a/ide/netbeans/src/main/java/org/apache/syncope/ide/netbeans/view/ServerDetailsView.java
+++ 
b/ide/netbeans/src/main/java/org/apache/syncope/ide/netbeans/view/ServerDetailsView.java
@@ -22,9 +22,19 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.logging.Logger;
 import java.util.prefs.Preferences;
+
+import javax.swing.GroupLayout;
+import javax.swing.JButton;
 import javax.swing.JDialog;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
 import javax.swing.JOptionPane;
+import javax.swing.JPasswordField;
 import javax.swing.JTextField;
+import javax.swing.LayoutStyle;
+import javax.swing.SwingConstants;
+import javax.swing.WindowConstants;
+
 import org.apache.commons.lang3.StringUtils;
 import org.openide.util.NbPreferences;
 
@@ -55,20 +65,20 @@ public class ServerDetailsView extends JDialog {
     // <editor-fold defaultstate="collapsed" desc="Generated 
Code">//GEN-BEGIN:initComponents
     private void initComponents() {
 
-        jLabel1 = new javax.swing.JLabel();
-        jLabel2 = new javax.swing.JLabel();
-        jLabel3 = new javax.swing.JLabel();
-        schemeTxt = new javax.swing.JTextField();
-        userNameTxt = new javax.swing.JTextField();
-        passwordTxt = new javax.swing.JPasswordField();
-        okButton = new javax.swing.JButton();
-        jLabel4 = new javax.swing.JLabel();
-        hostTxt = new javax.swing.JTextField();
-        jLabel5 = new javax.swing.JLabel();
-        portTxt = new javax.swing.JTextField();
-        jLabel6 = new javax.swing.JLabel();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+        jLabel1 = new JLabel();
+        jLabel2 = new JLabel();
+        jLabel3 = new JLabel();
+        schemeTxt = new JTextField();
+        userNameTxt = new JTextField();
+        passwordTxt = new JPasswordField();
+        okButton = new JButton();
+        jLabel4 = new JLabel();
+        hostTxt = new JTextField();
+        jLabel5 = new JLabel();
+        portTxt = new JTextField();
+        jLabel6 = new JLabel();
+
+        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
 
         jLabel1.setLabelFor(schemeTxt);
         org.openide.awt.Mnemonics.setLocalizedText(jLabel1, "Scheme");
@@ -88,7 +98,7 @@ public class ServerDetailsView extends JDialog {
             }
         });
 
-        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
+        jLabel4.setHorizontalAlignment(SwingConstants.CENTER);
         org.openide.awt.Mnemonics.setLocalizedText(jLabel4, "Apache Syncope 
connection");
         jLabel4.setToolTipText("");
 
@@ -102,58 +112,65 @@ public class ServerDetailsView extends JDialog {
         org.openide.awt.Mnemonics.setLocalizedText(jLabel6, "Host");
         jLabel6.setToolTipText("");
 
-        javax.swing.GroupLayout layout = new 
javax.swing.GroupLayout(getContentPane());
+        GroupLayout layout = new GroupLayout(getContentPane());
         getContentPane().setLayout(layout);
         layout.setHorizontalGroup(
-            
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
             .addGroup(layout.createSequentialGroup()
                 .addGap(41, 41, 41)
-                
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(jLabel4, 
javax.swing.GroupLayout.PREFERRED_SIZE, 256, 
javax.swing.GroupLayout.PREFERRED_SIZE)
-                    
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
-                        .addComponent(okButton, 
javax.swing.GroupLayout.PREFERRED_SIZE, 74, 
javax.swing.GroupLayout.PREFERRED_SIZE)
+                
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
+                    .addComponent(jLabel4, GroupLayout.PREFERRED_SIZE,
+                        256, GroupLayout.PREFERRED_SIZE)
+                    
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
+                        .addComponent(okButton, GroupLayout.PREFERRED_SIZE,
+                            74, GroupLayout.PREFERRED_SIZE)
                         .addGroup(layout.createSequentialGroup()
-                            
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                 .addComponent(jLabel1)
                                 .addComponent(jLabel2)
                                 .addComponent(jLabel3)
                                 .addComponent(jLabel5)
                                 .addComponent(jLabel6))
                             .addGap(39, 39, 39)
-                            
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, 
false)
+                            
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                                 .addComponent(portTxt)
                                 .addComponent(hostTxt)
                                 .addComponent(userNameTxt)
                                 .addComponent(schemeTxt)
-                                .addComponent(passwordTxt, 
javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)))))
+                                .addComponent(passwordTxt, 
GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)))))
                 .addContainerGap(40, Short.MAX_VALUE))
         );
         layout.setVerticalGroup(
-            
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, 
layout.createSequentialGroup()
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE)
-                .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 
65, javax.swing.GroupLayout.PREFERRED_SIZE)
+            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
+            .addGroup(GroupLayout.Alignment.TRAILING, 
layout.createSequentialGroup()
+                .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                .addComponent(jLabel4, GroupLayout.PREFERRED_SIZE, 65, 
GroupLayout.PREFERRED_SIZE)
                 .addGap(18, 18, 18)
-                
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                     .addComponent(jLabel1)
-                    .addComponent(schemeTxt, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE))
-                
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(hostTxt, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(schemeTxt, GroupLayout.PREFERRED_SIZE,
+                        GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+                
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
+                    .addComponent(hostTxt, GroupLayout.PREFERRED_SIZE,
+                        GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                     .addComponent(jLabel6))
-                
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(portTxt, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+                
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
+                    .addComponent(portTxt, GroupLayout.PREFERRED_SIZE,
+                        GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                     .addComponent(jLabel5))
-                
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(userNameTxt, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+                
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
+                    .addComponent(userNameTxt, GroupLayout.PREFERRED_SIZE,
+                        GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                     .addComponent(jLabel2))
-                
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+                
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                     .addComponent(jLabel3)
-                    .addComponent(passwordTxt, 
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE))
-                
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                    .addComponent(passwordTxt, GroupLayout.PREFERRED_SIZE,
+                        GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                 .addComponent(okButton)
                 .addContainerGap())
         );
@@ -199,7 +216,7 @@ public class ServerDetailsView extends JDialog {
 
             @Override
             public void run() {
-                ServerDetailsView dialog = new ServerDetailsView(new 
javax.swing.JFrame(), true);
+                ServerDetailsView dialog = new ServerDetailsView(new JFrame(), 
true);
                 dialog.addWindowListener(new java.awt.event.WindowAdapter() {
 
                     @Override
@@ -213,18 +230,18 @@ public class ServerDetailsView extends JDialog {
     }
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JTextField hostTxt;
-    private javax.swing.JLabel jLabel1;
-    private javax.swing.JLabel jLabel2;
-    private javax.swing.JLabel jLabel3;
-    private javax.swing.JLabel jLabel4;
-    private javax.swing.JLabel jLabel5;
-    private javax.swing.JLabel jLabel6;
-    private javax.swing.JButton okButton;
-    private javax.swing.JPasswordField passwordTxt;
-    private javax.swing.JTextField portTxt;
-    private javax.swing.JTextField schemeTxt;
-    private javax.swing.JTextField userNameTxt;
+    private JTextField hostTxt;
+    private JLabel jLabel1;
+    private JLabel jLabel2;
+    private JLabel jLabel3;
+    private JLabel jLabel4;
+    private JLabel jLabel5;
+    private JLabel jLabel6;
+    private JButton okButton;
+    private JPasswordField passwordTxt;
+    private JTextField portTxt;
+    private JTextField schemeTxt;
+    private JTextField userNameTxt;
     // End of variables declaration//GEN-END:variables
 
     private List<String> validate(
diff --git a/pom.xml b/pom.xml
index 5f8ac81..37e489e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2070,6 +2070,13 @@ under the License.
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-checkstyle-plugin</artifactId>
           <version>3.1.0</version>
+          <dependencies>
+            <dependency>
+              <groupId>com.puppycrawl.tools</groupId>
+              <artifactId>checkstyle</artifactId>
+              <version>8.24</version>
+            </dependency>
+          </dependencies>
           <configuration>
             
<configLocation>${rootpom.basedir}/src/main/resources/org/apache/syncope/checkstyle.xml</configLocation>
             <targetJdk>${targetJdk}</targetJdk>
diff --git a/src/main/resources/org/apache/syncope/checkstyle.xml 
b/src/main/resources/org/apache/syncope/checkstyle.xml
index 012e3f3..a5b3033 100644
--- a/src/main/resources/org/apache/syncope/checkstyle.xml
+++ b/src/main/resources/org/apache/syncope/checkstyle.xml
@@ -77,6 +77,14 @@ under the License.
   <!-- See http://checkstyle.sf.net/config_whitespace.html -->
   <module name="FileTabCharacter"/>
 
+  <!-- Checks for Size Violations.                    -->
+  <!-- See http://checkstyle.sf.net/config_sizes.html -->
+  <module name="LineLength">
+    <property name="max" value="120"/>
+    <property name="ignorePattern" value="^import"/>
+    <property name="fileExtensions" value="java,xml"/>
+  </module>
+  
   <!-- Miscellaneous other checks.                   -->
   <!-- See http://checkstyle.sf.net/config_misc.html -->
   <module name="RegexpSingleline">
@@ -145,10 +153,6 @@ under the License.
 
     <!-- Checks for Size Violations.                    -->
     <!-- See http://checkstyle.sf.net/config_sizes.html -->
-    <module name="LineLength">
-      <property name="max" value="120"/>
-      <property name="ignorePattern" value="^import"/>
-    </module>
     <!--<module name="MethodLength"/>-->
     <!--<module name="ParameterNumber"/>-->
 

Reply via email to