Skip to content

Commit

Permalink
Source code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Rogiel committed Mar 25, 2012
1 parent 10cb453 commit 1084905
Show file tree
Hide file tree
Showing 109 changed files with 7,056 additions and 7,331 deletions.
Expand Up @@ -186,7 +186,8 @@ protected synchronized void cleanQueue() {
while ((en = (SoftEntry) refQueue.poll()) != null) {
K key = en.getKey();
if (log.isDebugEnabled())
log.debug("{} : cleaned up value for key: {}", cacheName, key);
log.debug("{} : cleaned up value for key: {}", cacheName,
key);
cacheMap.remove(key);
}
}
Expand Down
Expand Up @@ -185,7 +185,8 @@ protected synchronized void cleanQueue() {
while ((en = (Entry) refQueue.poll()) != null) {
K key = en.getKey();
if (log.isDebugEnabled())
log.debug("{}: cleaned up value for key: {}", cacheName, key);
log.debug("{}: cleaned up value for key: {}", cacheName,
key);
cacheMap.remove(key);
}
}
Expand Down
Expand Up @@ -52,8 +52,7 @@ public Log4JLoggingService() {

@Override
protected void doStart() throws ServiceStartException {
final Layout layout = new PatternLayout(
"[%p %d] %c{1} - %m%n");
final Layout layout = new PatternLayout("[%p %d] %c{1} - %m%n");
rootLogger = Logger.getRootLogger();

rootLogger.removeAllAppenders();
Expand Down
Expand Up @@ -50,7 +50,8 @@ public enum ThreadPoolPriority {
public final int threadPriority;

/**
* @param threadPriority the {@link Thread} priority {@link Integer} index
* @param threadPriority
* the {@link Thread} priority {@link Integer} index
*/
ThreadPoolPriority(int threadPriority) {
this.threadPriority = threadPriority;
Expand Down
Expand Up @@ -70,7 +70,7 @@ protected void doStart() throws ServiceStartException {
public Path resolve(String path) {
return resolve(Paths.get(path));
}

@Override
public Path resolve(Path path) {
log.debug("Resolving file {}", path);
Expand All @@ -81,14 +81,13 @@ public Path resolve(Path path) {
public Path resolveDataFile(String path) {
return resolveDataFile(Paths.get(path));
}

@Override
public Path resolveDataFile(Path path) {
log.debug("Resolving data file {}", path);
return dataRoot.resolve(path);
}


@Override
protected void doStop() throws ServiceStopException {
root = null;
Expand Down
Expand Up @@ -75,7 +75,7 @@ protected void doStart() throws ServiceStartException {
public Path resolve(String path) {
return resolve(Paths.get(path));
}

@Override
public Path resolve(Path path) {
log.debug("Resolving file {}", path);
Expand All @@ -86,7 +86,7 @@ public Path resolve(Path path) {
public Path resolveDataFile(String path) {
return resolveDataFile(Paths.get(path));
}

@Override
public Path resolveDataFile(Path path) {
log.debug("Resolving data file {}", path);
Expand Down
Expand Up @@ -38,7 +38,7 @@ public interface VFSService extends Service {
* @return the resolved file. Will return null if could not resolve.
*/
Path resolve(String path);

/**
* Resolves an file. If the file cannot be resolved, null will be returned.
* <p>
Expand All @@ -63,7 +63,7 @@ public interface VFSService extends Service {
* @return the resolved file. Will return null if could not resolve.
*/
Path resolveDataFile(String path);

/**
* Resolves an file inside the data storage file system. If the file cannot
* be resolved, null will be returned.
Expand Down
Expand Up @@ -19,10 +19,10 @@
import java.util.List;

import com.l2jserver.service.database.ddl.struct.Column;
import com.l2jserver.service.database.ddl.struct.Column.ColumnType;
import com.l2jserver.service.database.ddl.struct.ForeignKey;
import com.l2jserver.service.database.ddl.struct.PrimaryKey;
import com.l2jserver.service.database.ddl.struct.Table;
import com.l2jserver.service.database.ddl.struct.Column.ColumnType;
import com.l2jserver.util.factory.CollectionFactory;

/**
Expand Down
Expand Up @@ -47,10 +47,14 @@ public class Table {
private final List<ForeignKey> foreignKeys = CollectionFactory.newList();

/**
* @param name the table name
* @param columns the column
* @param primaryKey the primary key
* @param foreignKeys the foreign keys
* @param name
* the table name
* @param columns
* the column
* @param primaryKey
* the primary key
* @param foreignKeys
* the foreign keys
*/
public Table(String name, Map<String, Column> columns,
PrimaryKey primaryKey, List<ForeignKey> foreignKeys) {
Expand All @@ -62,8 +66,10 @@ public Table(String name, Map<String, Column> columns,
}

/**
* @param name the table name
* @param primaryKey the primary key
* @param name
* the table name
* @param primaryKey
* the primary key
*/
public Table(String name, PrimaryKey primaryKey) {
this.name = name;
Expand Down Expand Up @@ -104,7 +110,8 @@ public Column addColumn(Column column) {
}

/**
* @param name the column name
* @param name
* the column name
* @return the column represented by <code>name</code>
*/
public Column getColumn(String name) {
Expand Down
Expand Up @@ -1103,7 +1103,8 @@ public final Integer query(
*
* @param q
* the query clause
* @param e the entity
* @param e
* the entity
*/
protected abstract void query(AbstractSQLQuery<?> q, E e);
}
Expand Down
Expand Up @@ -57,7 +57,8 @@ public static Path<?> getPath(RelationalPath<?> relationalPath, String name) {
* @return the {@link Field} holding <code>path</code>
*/
public static Field getReflectionField(Path<?> path) {
return ClassUtils.getFieldWithValue(path.getMetadata().getParent(), path);
return ClassUtils.getFieldWithValue(path.getMetadata().getParent(),
path);
}

/**
Expand All @@ -81,7 +82,7 @@ public static Field getRefelctionField(RelationalPath<?> relationalPath,
*/
public static int getColumnSize(Path<?> path) {
final Field field = getReflectionField(path);
if(field == null)
if (field == null)
return 0;
final ColumnSize size = field.getAnnotation(ColumnSize.class);
if (size != null)
Expand All @@ -96,7 +97,7 @@ public static int getColumnSize(Path<?> path) {
*/
public static boolean isAutoIncrementable(Path<?> path) {
final Field field = getReflectionField(path);
if(field == null)
if (field == null)
return false;
final ColumnAutoIncrement autoInc = field
.getAnnotation(ColumnAutoIncrement.class);
Expand All @@ -112,7 +113,7 @@ public static boolean isAutoIncrementable(Path<?> path) {
*/
public static boolean isNullable(Path<?> path) {
final Field field = getReflectionField(path);
if(field == null)
if (field == null)
return false;
final ColumnNullable nullable = field
.getAnnotation(ColumnNullable.class);
Expand All @@ -130,7 +131,7 @@ public static boolean isNullable(Path<?> path) {
*/
public static boolean hasDefaultValue(Path<?> path) {
final Field field = getReflectionField(path);
if(field == null)
if (field == null)
return false;
final ColumnDefault def = field.getAnnotation(ColumnDefault.class);
if (def == null) {
Expand All @@ -147,7 +148,7 @@ public static boolean hasDefaultValue(Path<?> path) {
*/
public static String getDefaultUntransformedValue(Path<?> path) {
final Field field = getReflectionField(path);
if(field == null)
if (field == null)
return null;
final ColumnDefault def = field.getAnnotation(ColumnDefault.class);
if (def != null)
Expand Down
Expand Up @@ -82,7 +82,7 @@ public static final Transformer<?> getTransfromer(Class<?> type) {
return PathTransformer.SHARED_INSTANCE;
} else if (type.isEnum()) {
return EnumTransformer.SHARED_INSTANCE;
} else if(type.isArray()) {
} else if (type.isArray()) {
return ArrayTransformer.SHARED_INSTANCE;
} else if (type == String.class)
return StringTransformer.SHARED_INSTANCE;
Expand Down
Expand Up @@ -47,6 +47,7 @@ public void testCopyArrayExcept() {

/**
* Simple test class
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
private static class TestClass {
Expand All @@ -56,7 +57,8 @@ private static class TestClass {
private String name;

/**
* @param string the name
* @param string
* the name
*/
public TestClass(String string) {
this.name = string;
Expand Down
Expand Up @@ -5,19 +5,20 @@
// Generated on: 2012.03.25 at 01:03:28 PM BRT
//


package com.l2jserver.model.template;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;


/**
* <p>Java class for AbstractTemplate complex type.
* <p>
* Java class for AbstractTemplate complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* &lt;complexType name="AbstractTemplate">
Expand All @@ -34,15 +35,8 @@
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AbstractTemplate")
@XmlSeeAlso({
ItemTemplate.class,
ActorTemplate.class,
SkillTemplate.class,
com.l2jserver.model.template.Teleports.Teleport.class
})
public abstract class AbstractTemplate
implements Template
{

@XmlSeeAlso({ ItemTemplate.class, ActorTemplate.class, SkillTemplate.class,
com.l2jserver.model.template.Teleports.Teleport.class })
public abstract class AbstractTemplate implements Template {

}
Expand Up @@ -5,19 +5,20 @@
// Generated on: 2012.03.25 at 01:03:28 PM BRT
//


package com.l2jserver.model.template;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;


/**
* <p>Java class for ActorTemplate complex type.
* <p>
* Java class for ActorTemplate complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* &lt;complexType name="ActorTemplate">
Expand All @@ -32,13 +33,7 @@
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ActorTemplate")
@XmlSeeAlso({
CharacterTemplate.class,
NPCTemplate.class
})
public abstract class ActorTemplate
extends AbstractTemplate
{

@XmlSeeAlso({ CharacterTemplate.class, NPCTemplate.class })
public abstract class ActorTemplate extends AbstractTemplate {

}

0 comments on commit 1084905

Please sign in to comment.