diff --git a/src/fr/devinsy/util/DataFile.java b/src/fr/devinsy/util/DataFile.java index e661b7f..6f73939 100755 --- a/src/fr/devinsy/util/DataFile.java +++ b/src/fr/devinsy/util/DataFile.java @@ -24,8 +24,8 @@ package fr.devinsy.util; */ public class DataFile { - static public int NOID = 0; - static public int DEFAULT_SIZE = 0; + public static int NOID = 0; + public static int DEFAULT_SIZE = 0; // protected int id; @@ -44,7 +44,7 @@ public class DataFile this.id = NOID; this.contentId = NOID; this.name = null; - this.size = DEFAULT_SIZE; + this.size = this.DEFAULT_SIZE; this.data = null; this.creationDate = null; this.creationUser = null; diff --git a/src/fr/devinsy/util/DateHelper.java b/src/fr/devinsy/util/DateHelper.java index 2c29c32..3caea96 100755 --- a/src/fr/devinsy/util/DateHelper.java +++ b/src/fr/devinsy/util/DateHelper.java @@ -33,21 +33,21 @@ public class DateHelper // static private final Logger logger = // LoggerFactory.getLogger(DateHelper.class); - static final String EUROPEAN_DATE_FORMAT = "%02d/%02d/%04d"; - static final String SHORT_EUROPEAN_DATE_FORMAT = "%02d/%02d"; - static final String RAW_DATE_FORMAT = "%04d%02d%02d"; - static final String ISO_DATE_FORMAT = "%04d-%02d-%02d"; - static final String AMERICAN_DATE_FORMAT = "%02d/%02d/%04d"; + private static final String EUROPEAN_DATE_FORMAT = "%02d/%02d/%04d"; + private static final String SHORT_EUROPEAN_DATE_FORMAT = "%02d/%02d"; + private static final String RAW_DATE_FORMAT = "%04d%02d%02d"; + private static final String ISO_DATE_FORMAT = "%04d-%02d-%02d"; + private static final String AMERICAN_DATE_FORMAT = "%02d/%02d/%04d"; - static final String EUROPEAN_DATE_PATTERN = "^([0123]{0,1}\\d)/([01]{0,1}\\d)/(\\d\\d\\d\\d)$"; - static final String RAW_DATE_PATTERN = "^(\\d\\d\\d\\d)([01]\\d)([0123]\\d)$"; - static final String ISO_DATE_PATTERN = "^(\\d\\d\\d\\d)-([01]\\d)-([0123]\\d)$"; - static final String AMERICAN_DATE_PATTERN = "^([01]{0,1}\\d)/([0123]{0,1}\\d)/(\\d\\d\\d\\d)$"; + private static final String EUROPEAN_DATE_PATTERN = "^([0123]{0,1}\\d)/([01]{0,1}\\d)/(\\d\\d\\d\\d)$"; + private static final String RAW_DATE_PATTERN = "^(\\d\\d\\d\\d)([01]\\d)([0123]\\d)$"; + private static final String ISO_DATE_PATTERN = "^(\\d\\d\\d\\d)-([01]\\d)-([0123]\\d)$"; + private static final String AMERICAN_DATE_PATTERN = "^([01]{0,1}\\d)/([0123]{0,1}\\d)/(\\d\\d\\d\\d)$"; /** * */ - static public String americanFormat(final Calendar time) + public static String americanFormat(final Calendar time) { String result; @@ -67,7 +67,7 @@ public class DateHelper /** * */ - static public String europeanFormat(final Calendar time) + public static String europeanFormat(final Calendar time) { String result; @@ -87,7 +87,7 @@ public class DateHelper /** * */ - static public boolean isAmericanFormat(final String date) + public static boolean isAmericanFormat(final String date) { boolean result; @@ -107,7 +107,7 @@ public class DateHelper /** * */ - static public boolean isEuropeanFormat(final String date) + public static boolean isEuropeanFormat(final String date) { boolean result; @@ -127,7 +127,7 @@ public class DateHelper /** * */ - static public boolean isISOFormat(final String date) + public static boolean isISOFormat(final String date) { boolean result; @@ -147,7 +147,7 @@ public class DateHelper /** * */ - static public String ISOFormat(final Calendar time) + public static String ISOFormat(final Calendar time) { String result; @@ -167,7 +167,7 @@ public class DateHelper /** * */ - static public boolean isRawFormat(final String date) + public static boolean isRawFormat(final String date) { boolean result; @@ -187,7 +187,7 @@ public class DateHelper /** * */ - static public boolean isValidDate(final String date) + public static boolean isValidDate(final String date) { boolean result; @@ -207,7 +207,7 @@ public class DateHelper /** * */ - static public Calendar parseAmericanDate(final String date) + public static Calendar parseAmericanDate(final String date) { Calendar result; @@ -230,7 +230,7 @@ public class DateHelper /** * Note: European parsing test made before the American parsing one. */ - static public Calendar parseDate(final String date) + public static Calendar parseDate(final String date) { Calendar result; @@ -262,7 +262,7 @@ public class DateHelper /** * */ - static public Calendar parseEuropeanDate(final String date) + public static Calendar parseEuropeanDate(final String date) { Calendar result; @@ -285,7 +285,7 @@ public class DateHelper /** * */ - static public Calendar parseISODate(final String date) + public static Calendar parseISODate(final String date) { Calendar result; @@ -308,7 +308,7 @@ public class DateHelper /** * */ - static public Calendar parseRawDate(final String date) + public static Calendar parseRawDate(final String date) { Calendar result; @@ -331,7 +331,7 @@ public class DateHelper /** * */ - static public String rawFormat(final Calendar time) + public static String rawFormat(final Calendar time) { String result; @@ -351,7 +351,7 @@ public class DateHelper /** * */ - static public String shortEuropeanFormat(final Calendar time) + public static String shortEuropeanFormat(final Calendar time) { String result; diff --git a/src/fr/devinsy/util/DateTimeHelper.java b/src/fr/devinsy/util/DateTimeHelper.java index 31ef720..bcd4aca 100755 --- a/src/fr/devinsy/util/DateTimeHelper.java +++ b/src/fr/devinsy/util/DateTimeHelper.java @@ -28,20 +28,20 @@ public class DateTimeHelper // static private final Logger logger = // LoggerFactory.getLogger(DateTimeHelper.class); - static final String EUROPEAN_DATE_FORMAT = "%02d/%02d/%04d %02d:%02d:%02d"; - static final String RAW_DATE_FORMAT = "%04d%02d%02d %02d:%02d:%02d"; - static final String ISO_DATE_FORMAT = "%04d-%02d-%02d %02d:%02d:%02d"; - static final String AMERICAN_DATE_FORMAT = "%02d/%02d/%04d %02d:%02d:%02d"; + private static final String EUROPEAN_DATE_FORMAT = "%02d/%02d/%04d %02d:%02d:%02d"; + private static final String RAW_DATE_FORMAT = "%04d%02d%02d %02d:%02d:%02d"; + private static final String ISO_DATE_FORMAT = "%04d-%02d-%02d %02d:%02d:%02d"; + private static final String AMERICAN_DATE_FORMAT = "%02d/%02d/%04d %02d:%02d:%02d"; - static final String EUROPEAN_DATE_PATTERN = "^([0123]{0,1}\\d)/([01]{0,1}\\d)/(\\d\\d\\d\\d)$"; - static final String RAW_DATE_PATTERN = "^(\\d\\d\\d\\d)([01]\\d)([0123]\\d)$"; - static final String ISO_DATE_PATTERN = "^(\\d\\d\\d\\d)-([01]\\d)-([0123]\\d)$"; - static final String AMERICAN_DATE_PATTERN = "^([01]{0,1}\\d)/([0123]{0,1}\\d)/(\\d\\d\\d\\d)$"; + private static final String EUROPEAN_DATE_PATTERN = "^([0123]{0,1}\\d)/([01]{0,1}\\d)/(\\d\\d\\d\\d)$"; + private static final String RAW_DATE_PATTERN = "^(\\d\\d\\d\\d)([01]\\d)([0123]\\d)$"; + private static final String ISO_DATE_PATTERN = "^(\\d\\d\\d\\d)-([01]\\d)-([0123]\\d)$"; + private static final String AMERICAN_DATE_PATTERN = "^([01]{0,1}\\d)/([0123]{0,1}\\d)/(\\d\\d\\d\\d)$"; /** * */ - static public String americanFormat(final Calendar time) + public static String americanFormat(final Calendar time) { String result; @@ -62,7 +62,7 @@ public class DateTimeHelper /** * */ - static public String europeanFormat(final Calendar time) + public static String europeanFormat(final Calendar time) { String result; @@ -83,7 +83,7 @@ public class DateTimeHelper /** * */ - static public String ISOFormat(final Calendar time) + public static String ISOFormat(final Calendar time) { String result; @@ -104,7 +104,7 @@ public class DateTimeHelper /** * */ - static public String rawFormat(final Calendar time) + public static String rawFormat(final Calendar time) { String result; diff --git a/src/fr/devinsy/util/Digester.java b/src/fr/devinsy/util/Digester.java index 0a43772..731f9db 100644 --- a/src/fr/devinsy/util/Digester.java +++ b/src/fr/devinsy/util/Digester.java @@ -35,7 +35,7 @@ public class Digester /** * "SHA-1", "MD5", "SHA-256", and "SHA-512" */ - static public String computeHash(final String digestMethod, final File file) throws Exception + public static String computeHash(final String digestMethod, final File file) throws Exception { String result; @@ -100,7 +100,7 @@ public class Digester /** * */ - static public String humanReadableDigest(final byte[] digest) + public static String humanReadableDigest(final byte[] digest) { String result; diff --git a/src/fr/devinsy/util/FileCopier.java b/src/fr/devinsy/util/FileCopier.java index c762249..3c99aaf 100644 --- a/src/fr/devinsy/util/FileCopier.java +++ b/src/fr/devinsy/util/FileCopier.java @@ -27,12 +27,12 @@ import java.io.FileOutputStream; */ public class FileCopier { - static final public int BUFFER_SIZE = 4 * 1024; + public static final int BUFFER_SIZE = 4 * 1024; /** * */ - static void copy(final File source, final File target) throws Exception + public static void copy(final File source, final File target) throws Exception { if ((source == null) || (target == null)) { diff --git a/src/fr/devinsy/util/FileIterator.java b/src/fr/devinsy/util/FileIterator.java index 3743849..e5e7170 100644 --- a/src/fr/devinsy/util/FileIterator.java +++ b/src/fr/devinsy/util/FileIterator.java @@ -433,7 +433,7 @@ public class FileIterator extends Vector implements Iterator< /** * */ - static public boolean isLink(final File file) throws Exception + public static boolean isLink(final File file) throws Exception { boolean result; diff --git a/src/fr/devinsy/util/FileTools.java b/src/fr/devinsy/util/FileTools.java index 24e4ce6..f1712ab 100644 --- a/src/fr/devinsy/util/FileTools.java +++ b/src/fr/devinsy/util/FileTools.java @@ -181,7 +181,7 @@ public class FileTools * @return * @throws IOException */ - static public String load(final File source) throws IOException + public static String load(final File source) throws IOException { String result; @@ -213,7 +213,7 @@ public class FileTools * @return * @throws IOException */ - static public String load(final URL source) throws IOException + public static String load(final URL source) throws IOException { String result; diff --git a/src/fr/devinsy/util/Fraction.java b/src/fr/devinsy/util/Fraction.java index b7e4988..1746795 100644 --- a/src/fr/devinsy/util/Fraction.java +++ b/src/fr/devinsy/util/Fraction.java @@ -119,7 +119,7 @@ public class Fraction /** * */ - static public long percentage(final long numerator, final long denominator) throws Exception + public static long percentage(final long numerator, final long denominator) throws Exception { long result; @@ -139,7 +139,7 @@ public class Fraction /** * */ - static public String percentageFullString(final long numerator, final long denominator) + public static String percentageFullString(final long numerator, final long denominator) { String result; @@ -152,7 +152,7 @@ public class Fraction /** * */ - static public String percentageString(final long numerator, final long denominator) + public static String percentageString(final long numerator, final long denominator) { String result; diff --git a/src/fr/devinsy/util/SimpleChronometer.java b/src/fr/devinsy/util/SimpleChronometer.java index dcf86d3..4ae2e98 100755 --- a/src/fr/devinsy/util/SimpleChronometer.java +++ b/src/fr/devinsy/util/SimpleChronometer.java @@ -60,7 +60,7 @@ public class SimpleChronometer /** * TO BE COMPLETED. */ - static public String humanString(final long interval) + public static String humanString(final long interval) { String result; @@ -97,7 +97,7 @@ public class SimpleChronometer /** * */ - static public String shortHumanString(final long interval) + public static String shortHumanString(final long interval) { String result; diff --git a/src/fr/devinsy/util/StacktraceWriter.java b/src/fr/devinsy/util/StacktraceWriter.java index 3541093..89f62a3 100644 --- a/src/fr/devinsy/util/StacktraceWriter.java +++ b/src/fr/devinsy/util/StacktraceWriter.java @@ -29,7 +29,7 @@ public class StacktraceWriter /** * */ - static public String toString(final Exception exception) + public static String toString(final Exception exception) { String result; diff --git a/src/fr/devinsy/util/StringConcatenator.java b/src/fr/devinsy/util/StringConcatenator.java index d67d6d9..ef55b82 100755 --- a/src/fr/devinsy/util/StringConcatenator.java +++ b/src/fr/devinsy/util/StringConcatenator.java @@ -25,7 +25,10 @@ import java.util.ArrayList; * This class is a collection of String objects with specific methods. It makes * possible to build a string without any copy. The goal is to optimize the * building of strings where they are lot of concatenation action. + * + * @deprecated Replaced by StringList. */ +@Deprecated public class StringConcatenator extends ArrayList { private static final long serialVersionUID = -1154185934830213732L; diff --git a/src/fr/devinsy/util/StringList.java b/src/fr/devinsy/util/StringList.java index a90d921..d28fcfe 100755 --- a/src/fr/devinsy/util/StringList.java +++ b/src/fr/devinsy/util/StringList.java @@ -809,7 +809,7 @@ public class StringList extends ArrayList implements CharSequence /** * */ - static public String multiply(final String source, final int number) + public static String multiply(final String source, final int number) { String result; @@ -828,7 +828,7 @@ public class StringList extends ArrayList implements CharSequence /** * */ - static public String toString(final String[] source) + public static String toString(final String[] source) { String result; @@ -848,7 +848,7 @@ public class StringList extends ArrayList implements CharSequence /** * */ - static public String toStringNotNull(final String[] strings) + public static String toStringNotNull(final String[] strings) { String result; @@ -866,7 +866,7 @@ public class StringList extends ArrayList implements CharSequence /** * */ - static public String toStringWithBracket(final String[] strings) + public static String toStringWithBracket(final String[] strings) { String result; @@ -892,7 +892,7 @@ public class StringList extends ArrayList implements CharSequence /** * */ - static public String toStringWithBracketNotNull(final String[] strings) + public static String toStringWithBracketNotNull(final String[] strings) { String result; @@ -910,7 +910,7 @@ public class StringList extends ArrayList implements CharSequence /** * */ - static public String toStringWithBrackets(final String[] source) + public static String toStringWithBrackets(final String[] source) { String result; @@ -937,7 +937,7 @@ public class StringList extends ArrayList implements CharSequence /** * */ - static public String toStringWithCommas(final String[] source) + public static String toStringWithCommas(final String[] source) { String result; @@ -957,7 +957,7 @@ public class StringList extends ArrayList implements CharSequence /** * */ - static public String toStringWithFrenchCommas(final String[] source) + public static String toStringWithFrenchCommas(final String[] source) { String result; diff --git a/src/fr/devinsy/util/cmdexec/CmdExec.java b/src/fr/devinsy/util/cmdexec/CmdExec.java index fdd6945..9417118 100644 --- a/src/fr/devinsy/util/cmdexec/CmdExec.java +++ b/src/fr/devinsy/util/cmdexec/CmdExec.java @@ -30,7 +30,7 @@ import fr.devinsy.util.StringConcatenator; */ public class CmdExec { - static private final Logger logger = LoggerFactory.getLogger(CmdExec.class); + private static final Logger logger = LoggerFactory.getLogger(CmdExec.class); protected int exitValue; protected String out; diff --git a/src/fr/devinsy/util/cmdexec/StreamGobbler.java b/src/fr/devinsy/util/cmdexec/StreamGobbler.java index c26a92f..9383551 100644 --- a/src/fr/devinsy/util/cmdexec/StreamGobbler.java +++ b/src/fr/devinsy/util/cmdexec/StreamGobbler.java @@ -31,11 +31,11 @@ import org.slf4j.LoggerFactory; */ public class StreamGobbler extends Thread { - static private final Logger logger = LoggerFactory.getLogger(CmdExec.class); + private static final Logger logger = LoggerFactory.getLogger(CmdExec.class); - static final public int NONE = 0; - static final public int PRINT = 1; - static final public int BUFFER = 2; + public static final int NONE = 0; + public static final int PRINT = 1; + public static final int BUFFER = 2; protected InputStream is; protected String type; diff --git a/src/fr/devinsy/util/cmdexec/Wrapper.java b/src/fr/devinsy/util/cmdexec/Wrapper.java index b46a3ae..c363422 100644 --- a/src/fr/devinsy/util/cmdexec/Wrapper.java +++ b/src/fr/devinsy/util/cmdexec/Wrapper.java @@ -32,8 +32,8 @@ import org.slf4j.LoggerFactory; @Deprecated public class Wrapper { - static private final Wrapper instance = new Wrapper(); - static private final Logger logger = LoggerFactory.getLogger(Wrapper.class); + private static final Wrapper instance = new Wrapper(); + private static final Logger logger = LoggerFactory.getLogger(Wrapper.class); /** * return instance of the controller diff --git a/src/fr/devinsy/util/unix/CachedFile.java b/src/fr/devinsy/util/unix/CachedFile.java index 8671bef..c155108 100644 --- a/src/fr/devinsy/util/unix/CachedFile.java +++ b/src/fr/devinsy/util/unix/CachedFile.java @@ -33,7 +33,7 @@ public class CachedFile NOT_LOAD, EXPIRED, UPDATED } - static private final Logger logger = LoggerFactory.getLogger(CachedFile.class); + private static final Logger logger = LoggerFactory.getLogger(CachedFile.class); protected String sourceName; protected long sourceTime; diff --git a/src/fr/devinsy/util/unix/EtcGroupFile.java b/src/fr/devinsy/util/unix/EtcGroupFile.java index 8d2c6ab..959f531 100644 --- a/src/fr/devinsy/util/unix/EtcGroupFile.java +++ b/src/fr/devinsy/util/unix/EtcGroupFile.java @@ -28,7 +28,7 @@ public class EtcGroupFile extends CachedFile // static private final Logger logger = // LoggerFactory.getLogger(EtcGroupFile.class); - static EtcGroupFile instance = null; + private static EtcGroupFile instance = null; protected Groups groups; /** diff --git a/src/fr/devinsy/util/unix/EtcGroupFileReader.java b/src/fr/devinsy/util/unix/EtcGroupFileReader.java index d815126..e5e044f 100644 --- a/src/fr/devinsy/util/unix/EtcGroupFileReader.java +++ b/src/fr/devinsy/util/unix/EtcGroupFileReader.java @@ -30,12 +30,12 @@ import org.slf4j.LoggerFactory; */ public class EtcGroupFileReader { - static private final Logger logger = LoggerFactory.getLogger(EtcGroupFileReader.class); + private static final Logger logger = LoggerFactory.getLogger(EtcGroupFileReader.class); /** * */ - static public Groups load() + public static Groups load() { Groups result; diff --git a/src/fr/devinsy/util/unix/EtcPasswdFile.java b/src/fr/devinsy/util/unix/EtcPasswdFile.java index e0777f5..5a0094a 100644 --- a/src/fr/devinsy/util/unix/EtcPasswdFile.java +++ b/src/fr/devinsy/util/unix/EtcPasswdFile.java @@ -26,9 +26,9 @@ import org.slf4j.LoggerFactory; */ public class EtcPasswdFile extends CachedFile { - static private final Logger logger = LoggerFactory.getLogger(EtcPasswdFile.class); + private static final Logger logger = LoggerFactory.getLogger(EtcPasswdFile.class); - static EtcPasswdFile instance = null; + private static EtcPasswdFile instance = null; protected Users users; /** @@ -166,7 +166,7 @@ public class EtcPasswdFile extends CachedFile /** * */ - static public EtcPasswdFile instance() + public static EtcPasswdFile instance() { EtcPasswdFile result; diff --git a/src/fr/devinsy/util/unix/EtcPasswdFileReader.java b/src/fr/devinsy/util/unix/EtcPasswdFileReader.java index d7d38c0..b3dc87d 100644 --- a/src/fr/devinsy/util/unix/EtcPasswdFileReader.java +++ b/src/fr/devinsy/util/unix/EtcPasswdFileReader.java @@ -30,12 +30,12 @@ import org.slf4j.LoggerFactory; */ public class EtcPasswdFileReader { - static private final Logger logger = LoggerFactory.getLogger(EtcPasswdFileReader.class); + private static final Logger logger = LoggerFactory.getLogger(EtcPasswdFileReader.class); /** * */ - static public Users load() + public static Users load() { Users result; diff --git a/src/fr/devinsy/util/unix/Unix.java b/src/fr/devinsy/util/unix/Unix.java index 8488a38..d3f4936 100644 --- a/src/fr/devinsy/util/unix/Unix.java +++ b/src/fr/devinsy/util/unix/Unix.java @@ -34,13 +34,13 @@ import fr.devinsy.util.unix.acl.AclManager; */ public class Unix { - static private final Logger logger = LoggerFactory.getLogger(Unix.class); - static public final String SUDO = "/usr/bin/sudo"; + private static final Logger logger = LoggerFactory.getLogger(Unix.class); + public static final String SUDO = "/usr/bin/sudo"; /** * */ - static public void appendToFile(final String text, final String path) throws Exception + public static void appendToFile(final String text, final String path) throws Exception { if ((text == null) || (text.length() == 0) || (path == null) || (path.length() == 0)) { @@ -62,7 +62,7 @@ public class Unix /** * */ - static public void chmod(final String changes, final String path) throws Exception + public static void chmod(final String changes, final String path) throws Exception { if ((changes == null) || (changes.length() == 0) || (path == null) || (path.length() == 0)) { @@ -88,7 +88,7 @@ public class Unix /** * */ - static public void clearAcl(final String id, final String filePathName) throws Exception + public static void clearAcl(final String id, final String filePathName) throws Exception { AclManager.clearId(id, filePathName); } @@ -96,7 +96,7 @@ public class Unix /** * */ - static public void clearAclGroup(final String group, final String filePathName) throws Exception + public static void clearAclGroup(final String group, final String filePathName) throws Exception { AclManager.clearGroup(group, filePathName); } @@ -104,7 +104,7 @@ public class Unix /** * */ - static public void clearAclUser(final String login, final String filePathName) throws Exception + public static void clearAclUser(final String login, final String filePathName) throws Exception { AclManager.clearUser(login, filePathName); } @@ -112,7 +112,7 @@ public class Unix /** * */ - static public void createUserAccount(final String login) throws Exception + public static void createUserAccount(final String login) throws Exception { if ((login == null) || (login.length() == 0)) { @@ -127,7 +127,7 @@ public class Unix /** * */ - static public void createUserAccount(final String login, final String name) throws Exception + public static void createUserAccount(final String login, final String name) throws Exception { if ((login == null) || (login.length() == 0)) { @@ -146,7 +146,7 @@ public class Unix /** * */ - static public void createUserAccount(final String login, final String name, final String home) throws Exception + public static void createUserAccount(final String login, final String name, final String home) throws Exception { if ((login == null) || (login.length() == 0)) { @@ -179,7 +179,7 @@ public class Unix /** * */ - static public void createUserAccount(final String login, final String name, final String home, final String password) throws Exception + public static void createUserAccount(final String login, final String name, final String home, final String password) throws Exception { if ((password == null) || (password.length() == 0)) { @@ -199,7 +199,7 @@ public class Unix /** * */ - static public void deleteGroup(final String group) throws Exception + public static void deleteGroup(final String group) throws Exception { if ((group == null) || (group.length() == 0)) { @@ -223,7 +223,7 @@ public class Unix /** * */ - static public void deleteUserAccount(final String login) throws Exception + public static void deleteUserAccount(final String login) throws Exception { if ((login == null) || (login.length() == 0)) { @@ -247,7 +247,7 @@ public class Unix /** * */ - static public String getAclData(final String filePathName) throws Exception + public static String getAclData(final String filePathName) throws Exception { String result; @@ -260,7 +260,7 @@ public class Unix /** * */ - static public String[] getAclUsers(final String filePathName) throws Exception + public static String[] getAclUsers(final String filePathName) throws Exception { String[] result; @@ -275,7 +275,7 @@ public class Unix /** * */ - static public boolean isGroup(final String groupName) + public static boolean isGroup(final String groupName) { boolean result; @@ -288,7 +288,7 @@ public class Unix /** * */ - static public boolean isLogin(final String login) + public static boolean isLogin(final String login) { boolean result; @@ -301,7 +301,7 @@ public class Unix /** * */ - static public void link(final String sourcePath, final String targetPath) throws Exception + public static void link(final String sourcePath, final String targetPath) throws Exception { logger.info("[" + sourcePath + "][" + targetPath + "]"); if ((sourcePath == null) || (sourcePath.length() == 0) || (targetPath == null) || (targetPath.length() == 0)) @@ -338,7 +338,7 @@ public class Unix /** * */ - static public void modifyLogin(final String sourceLogin, final String targetLogin, final String sourceHomeDirectory) throws Exception + public static void modifyLogin(final String sourceLogin, final String targetLogin, final String sourceHomeDirectory) throws Exception { logger.info("Starting login modifying: [" + sourceLogin + "] -> [" + targetLogin + "]"); if ((sourceLogin == null) || (sourceLogin.length() == 0)) @@ -403,7 +403,7 @@ public class Unix /** * */ - static public void recursiveChmod(final String changes, final String path) throws Exception + public static void recursiveChmod(final String changes, final String path) throws Exception { if ((changes == null) || (changes.length() == 0) || (path == null) || (path.length() == 0)) { @@ -429,7 +429,7 @@ public class Unix /** * */ - static public void renameGroup(final String sourceGroup, final String targetGroup) throws Exception + public static void renameGroup(final String sourceGroup, final String targetGroup) throws Exception { logger.info("Starting group renaming: [" + sourceGroup + "] -> [" + targetGroup + "]"); if ((sourceGroup == null) || (sourceGroup.length() == 0)) @@ -467,7 +467,7 @@ public class Unix /** * */ - static public Group searchGroup(final String groupName) + public static Group searchGroup(final String groupName) { Group result; @@ -480,7 +480,7 @@ public class Unix /** * */ - static public User searchLogin(final String login) + public static User searchLogin(final String login) { User result; @@ -493,7 +493,7 @@ public class Unix /** * */ - static public Vector searchLoginGroups(final String login) + public static Vector searchLoginGroups(final String login) { Vector result; @@ -506,7 +506,7 @@ public class Unix /** * */ - static public void setfacl(final String... args) throws Exception + public static void setfacl(final String... args) throws Exception { try { @@ -522,7 +522,7 @@ public class Unix * As 'passwd' command has not the option '--stdin' in all systems (eg. * Debian), this method uses the 'chpasswd' command. */ - static public void setPassword(final String login, final String newPassword) throws Exception + public static void setPassword(final String login, final String newPassword) throws Exception { if ((login == null) || (login.length() == 0)) { @@ -550,7 +550,7 @@ public class Unix /** * chfn [ -f full-name ] [ username ] */ - static public void setRealName(final String login, final String newRealName) throws Exception + public static void setRealName(final String login, final String newRealName) throws Exception { if ((login == null) || (login.length() == 0)) { @@ -579,7 +579,7 @@ public class Unix /** * */ - static public void unlink(final String filePathName) throws Exception + public static void unlink(final String filePathName) throws Exception { logger.info("[" + filePathName + "]"); if (filePathName == null) diff --git a/src/fr/devinsy/util/unix/User.java b/src/fr/devinsy/util/unix/User.java index 584b6c2..1ff4cbc 100644 --- a/src/fr/devinsy/util/unix/User.java +++ b/src/fr/devinsy/util/unix/User.java @@ -23,7 +23,7 @@ package fr.devinsy.util.unix; */ public class User { - // static private final Logger logger = LoggerFactory.getLogger(User.class); + // private static final Logger logger = LoggerFactory.getLogger(User.class); /* * /usr/include/pwd.h diff --git a/src/fr/devinsy/util/unix/Users.java b/src/fr/devinsy/util/unix/Users.java index a20428b..d45b7ec 100644 --- a/src/fr/devinsy/util/unix/Users.java +++ b/src/fr/devinsy/util/unix/Users.java @@ -28,7 +28,7 @@ public class Users extends Vector { private static final long serialVersionUID = -7178304512851592399L; - // static private final Logger logger = + // private static final Logger logger = // LoggerFactory.getLogger(Users.class); /** diff --git a/src/fr/devinsy/util/unix/acl/Acl.java b/src/fr/devinsy/util/unix/acl/Acl.java index fc934fa..c88a538 100644 --- a/src/fr/devinsy/util/unix/acl/Acl.java +++ b/src/fr/devinsy/util/unix/acl/Acl.java @@ -23,7 +23,7 @@ package fr.devinsy.util.unix.acl; */ public class Acl { - // static private final Logger logger = LoggerFactory.getLogger(Acl.class); + // private static final Logger logger = LoggerFactory.getLogger(Acl.class); /* # file: goo39 diff --git a/src/fr/devinsy/util/unix/acl/AclEntries.java b/src/fr/devinsy/util/unix/acl/AclEntries.java index a43ca5c..1056efb 100644 --- a/src/fr/devinsy/util/unix/acl/AclEntries.java +++ b/src/fr/devinsy/util/unix/acl/AclEntries.java @@ -28,7 +28,7 @@ public class AclEntries extends Vector { private static final long serialVersionUID = 5802487312198869603L; - // static private final Logger logger = + // private static final Logger logger = // LoggerFactory.getLogger(AclEntries.class); /** diff --git a/src/fr/devinsy/util/unix/acl/AclEntry.java b/src/fr/devinsy/util/unix/acl/AclEntry.java index 95ae70d..693e44f 100644 --- a/src/fr/devinsy/util/unix/acl/AclEntry.java +++ b/src/fr/devinsy/util/unix/acl/AclEntry.java @@ -23,7 +23,7 @@ package fr.devinsy.util.unix.acl; */ public class AclEntry { - // static private final Logger logger = + // private static final Logger logger = // LoggerFactory.getLogger(AclEntry.class); /* diff --git a/src/fr/devinsy/util/unix/acl/AclManager.java b/src/fr/devinsy/util/unix/acl/AclManager.java index befbf5f..b9f0a71 100644 --- a/src/fr/devinsy/util/unix/acl/AclManager.java +++ b/src/fr/devinsy/util/unix/acl/AclManager.java @@ -34,17 +34,17 @@ import fr.devinsy.util.unix.Unix; */ public class AclManager { - static private final Logger logger = LoggerFactory.getLogger(AclManager.class); - static public final String SUDO = "/usr/bin/sudo"; + private static final Logger logger = LoggerFactory.getLogger(AclManager.class); + public static final String SUDO = "/usr/bin/sudo"; - static final public Pattern USER_PATTERN = Pattern.compile("^user:(.*):(.*)$"); - static final public Pattern GROUP_PATTERN = Pattern.compile("^group:(.*):(.*)$"); - static final public Pattern MASK_PATTERN = Pattern.compile("^mask:(.*):(.*)$"); - static final public Pattern OTHER_PATTERN = Pattern.compile("^other:(.*):(.*)$"); - static final public Pattern DEFAULT_USER_PATTERN = Pattern.compile("^default:user:(.*):(.*)$"); - static final public Pattern DEFAULT_GROUP_PATTERN = Pattern.compile("^default:group:(.*):(.*)$"); - static final public Pattern DEFAULT_MASK_PATTERN = Pattern.compile("^default:mask:(.*):(.*)$"); - static final public Pattern DEFAULT_OTHER_PATTERN = Pattern.compile("^default:other:(.*):(.*)$"); + final static public Pattern USER_PATTERN = Pattern.compile("^user:(.*):(.*)$"); + final static public Pattern GROUP_PATTERN = Pattern.compile("^group:(.*):(.*)$"); + final static public Pattern MASK_PATTERN = Pattern.compile("^mask:(.*):(.*)$"); + final static public Pattern OTHER_PATTERN = Pattern.compile("^other:(.*):(.*)$"); + final static public Pattern DEFAULT_USER_PATTERN = Pattern.compile("^default:user:(.*):(.*)$"); + final static public Pattern DEFAULT_GROUP_PATTERN = Pattern.compile("^default:group:(.*):(.*)$"); + final static public Pattern DEFAULT_MASK_PATTERN = Pattern.compile("^default:mask:(.*):(.*)$"); + final static public Pattern DEFAULT_OTHER_PATTERN = Pattern.compile("^default:other:(.*):(.*)$"); /** * @@ -90,7 +90,7 @@ public class AclManager /** * */ - static public Acl getAcl(final String filePathName) throws Exception + public static Acl getAcl(final String filePathName) throws Exception { Acl result; @@ -187,7 +187,7 @@ public class AclManager /** * */ - static public String getAclData(final String filePathName) throws Exception + public static String getAclData(final String filePathName) throws Exception { String result; @@ -209,7 +209,7 @@ public class AclManager /** * */ - static public String[] getAclEntryLines(final String filePathName) + public static String[] getAclEntryLines(final String filePathName) { String[] result; @@ -407,7 +407,7 @@ public class AclManager /** * */ - static public void setfacl(final String... args) throws Exception + public static void setfacl(final String... args) throws Exception { try { diff --git a/src/fr/devinsy/util/xml/XMLAttributes.java b/src/fr/devinsy/util/xml/XMLAttributes.java index cc265ce..5dc3fec 100644 --- a/src/fr/devinsy/util/xml/XMLAttributes.java +++ b/src/fr/devinsy/util/xml/XMLAttributes.java @@ -28,11 +28,8 @@ import javax.xml.stream.events.Attribute; /** * - * @author christian.momon@devinsy.fr, 2013, copyright. + * @author christian.momon@devinsy.fr * - * This file is free software under the terms of the GNU Library General - * Public License as published by the Free Software Foundation version 3 - * or any later version. */ public class XMLAttributes extends HashMap implements Iterable { diff --git a/src/fr/devinsy/util/xml/XMLBadFormatException.java b/src/fr/devinsy/util/xml/XMLBadFormatException.java index 9b6d31e..aa57f0e 100644 --- a/src/fr/devinsy/util/xml/XMLBadFormatException.java +++ b/src/fr/devinsy/util/xml/XMLBadFormatException.java @@ -19,11 +19,8 @@ package fr.devinsy.util.xml; /** - * @author christian.momon@devinsy.fr, 2013, copyright. * - * This file is free software under the terms of the GNU Library General - * Public License as published by the Free Software Foundation version 3 - * or any later version. + * @author christian.momon@devinsy.fr. */ public class XMLBadFormatException extends Exception { diff --git a/src/fr/devinsy/util/xml/XMLReader.java b/src/fr/devinsy/util/xml/XMLReader.java index 975e826..ded8a90 100644 --- a/src/fr/devinsy/util/xml/XMLReader.java +++ b/src/fr/devinsy/util/xml/XMLReader.java @@ -41,16 +41,12 @@ import fr.devinsy.util.xml.XMLTag.TagType; /** * - @author christian.momon@devinsy.fr, 2013, copyright. - * - * This file is free software under the terms of the GNU Library General - * Public License as published by the Free Software Foundation version 3 - * or any later version. + @author christian.momon@devinsy.fr */ public class XMLReader { - static private final Logger logger = LoggerFactory.getLogger(XMLReader.class); + private static final Logger logger = LoggerFactory.getLogger(XMLReader.class); protected XMLEventReader in; private XMLEvent nextEvent; diff --git a/src/fr/devinsy/util/xml/XMLTag.java b/src/fr/devinsy/util/xml/XMLTag.java index 6bedb11..1267ada 100644 --- a/src/fr/devinsy/util/xml/XMLTag.java +++ b/src/fr/devinsy/util/xml/XMLTag.java @@ -22,11 +22,7 @@ import javax.xml.namespace.QName; /** * - @author christian.momon@devinsy.fr, 2013, copyright. - * - * This file is free software under the terms of the GNU Library General - * Public License as published by the Free Software Foundation version 3 - * or any later version. + @author christian.momon@devinsy.fr */ public class XMLTag { diff --git a/src/fr/devinsy/util/xml/XMLTools.java b/src/fr/devinsy/util/xml/XMLTools.java index ef90a9e..09f4fe0 100644 --- a/src/fr/devinsy/util/xml/XMLTools.java +++ b/src/fr/devinsy/util/xml/XMLTools.java @@ -40,11 +40,8 @@ import org.xml.sax.InputSource; import org.xml.sax.SAXException; /** - * @author christian.momon@devinsy.fr, 2013, copyright. * - * This file is free software under the terms of the GNU Library General - * Public License as published by the Free Software Foundation version 3 - * or any later version. + * @author christian.momon@devinsy.fr */ public class XMLTools { @@ -78,7 +75,7 @@ public class XMLTools * @throws IOException * @throws PuckException */ - static public boolean isValid(final File xmlFile, final File xsdFile) throws SAXException, IOException + public static boolean isValid(final File xmlFile, final File xsdFile) throws SAXException, IOException { boolean result; @@ -110,7 +107,7 @@ public class XMLTools * @throws IOException * @throws PuckException */ - static public boolean isValid(final File xmlFile, final InputStream xsdSource) throws SAXException, IOException + public static boolean isValid(final File xmlFile, final InputStream xsdSource) throws SAXException, IOException { boolean result; @@ -142,7 +139,7 @@ public class XMLTools * @throws IOException * @throws PuckException */ - static public boolean isValid(final InputStream xmlSource, final InputStream xsdSource) throws SAXException, IOException + public static boolean isValid(final InputStream xmlSource, final InputStream xsdSource) throws SAXException, IOException { boolean result; @@ -220,7 +217,7 @@ public class XMLTools /** * */ - static public String readTag(final BufferedReader in) throws Exception + public static String readTag(final BufferedReader in) throws Exception { String result; diff --git a/src/fr/devinsy/util/xml/XMLWriter.java b/src/fr/devinsy/util/xml/XMLWriter.java index a016ec3..0326715 100644 --- a/src/fr/devinsy/util/xml/XMLWriter.java +++ b/src/fr/devinsy/util/xml/XMLWriter.java @@ -31,11 +31,8 @@ import java.io.Writer; import org.apache.commons.lang3.ArrayUtils; /** - * @author christian.momon@devinsy.fr, 2013, copyright. * - * This file is free software under the terms of the GNU Library General - * Public License as published by the Free Software Foundation version 3 - * or any later version. + * @author christian.momon@devinsy.fr */ public class XMLWriter { diff --git a/src/fr/devinsy/util/xml/XMLZipReader.java b/src/fr/devinsy/util/xml/XMLZipReader.java index 92145a0..688c5ff 100644 --- a/src/fr/devinsy/util/xml/XMLZipReader.java +++ b/src/fr/devinsy/util/xml/XMLZipReader.java @@ -29,11 +29,7 @@ import javax.xml.stream.XMLStreamException; /** * - @author christian.momon@devinsy.fr, 2013, copyright. - * - * This file is free software under the terms of the GNU Library General - * Public License as published by the Free Software Foundation version 3 - * or any later version. + * @author christian.momon@devinsy.fr */ public class XMLZipReader extends XMLReader { diff --git a/src/fr/devinsy/util/xml/XMLZipWriter.java b/src/fr/devinsy/util/xml/XMLZipWriter.java index eac5faf..4fa29ed 100644 --- a/src/fr/devinsy/util/xml/XMLZipWriter.java +++ b/src/fr/devinsy/util/xml/XMLZipWriter.java @@ -32,11 +32,7 @@ import fr.devinsy.util.FileTools; /** * - @author christian.momon@devinsy.fr, 2013, copyright. - * - * This file is free software under the terms of the GNU Library General - * Public License as published by the Free Software Foundation version 3 - * or any later version. + * @author christian.momon@devinsy.fr */ public class XMLZipWriter extends XMLWriter {