Commit 609124ab authored by Peter Harrison's avatar Peter Harrison

Fixing 'high' issues identified by Findbugs.

parent dac060dc
...@@ -442,11 +442,33 @@ ...@@ -442,11 +442,33 @@
<reporting> <reporting>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId> <artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.3</version> <version>3.0.3</version>
</plugin> </plugin>
</plugins>
</reporting> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
</configuration>
</plugin>
</plugins>
</reporting>
</project> </project>
...@@ -73,7 +73,7 @@ public class BoardController { ...@@ -73,7 +73,7 @@ public class BoardController {
private static final Logger logger = LoggerFactory.getLogger(BoardController.class); private static final Logger logger = LoggerFactory.getLogger(BoardController.class);
public static String BOARD = "BOARD"; public static final String BOARD = "BOARD";
@Resource(name="ocmFactory") @Resource(name="ocmFactory")
OcmMapperFactory ocmFactory; OcmMapperFactory ocmFactory;
......
...@@ -62,7 +62,7 @@ public class RuleController { ...@@ -62,7 +62,7 @@ public class RuleController {
private static final Logger logger = LoggerFactory.getLogger(RuleController.class); private static final Logger logger = LoggerFactory.getLogger(RuleController.class);
public static String RULE = "RULE"; public static final String RULE = "RULE";
@Resource(name="ocmFactory") @Resource(name="ocmFactory")
OcmMapperFactory ocmFactory; OcmMapperFactory ocmFactory;
......
...@@ -21,13 +21,20 @@ ...@@ -21,13 +21,20 @@
package nz.net.orcon.kanban.model; package nz.net.orcon.kanban.model;
import java.io.Serializable;
import org.apache.jackrabbit.ocm.manager.enumconverter.EnumTypeConverter; import org.apache.jackrabbit.ocm.manager.enumconverter.EnumTypeConverter;
import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field; import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node; import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
@Node @Node
public class Condition { public class Condition implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@Field @Field
private String fieldName; private String fieldName;
......
...@@ -32,6 +32,11 @@ import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node; ...@@ -32,6 +32,11 @@ import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
@Node @Node
public class Filter extends AbstractNamedModelClass implements Serializable{ public class Filter extends AbstractNamedModelClass implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
@Field @Field
private String expression; private String expression;
......
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
package nz.net.orcon.kanban.model; package nz.net.orcon.kanban.model;
public enum Operation { import java.io.Serializable;
public enum Operation implements Serializable {
CONTAINS("contains", "jcr:contains(fields/@${field},'${value}')"), CONTAINS("contains", "jcr:contains(fields/@${field},'${value}')"),
EQUALTO("equal to","fn:lower-case(fields/@${field})='${value}'"), EQUALTO("equal to","fn:lower-case(fields/@${field})='${value}'"),
......
...@@ -47,7 +47,7 @@ public class SecurityTool { ...@@ -47,7 +47,7 @@ public class SecurityTool {
private static final Logger LOG = LoggerFactory.getLogger(SecurityTool.class); private static final Logger LOG = LoggerFactory.getLogger(SecurityTool.class);
public static String SYSTEM = "system"; public static final String SYSTEM = "system";
@Autowired @Autowired
TeamCache teamCache; TeamCache teamCache;
......
...@@ -110,8 +110,7 @@ public class ListTools { ...@@ -110,8 +110,7 @@ public class ListTools {
String filterId, String filterId,
ObjectContentManager ocm){ ObjectContentManager ocm){
Filter filter = (Filter) ocm.getObject(Filter.class,String.format(URI.FIELDS_URI, boardId, filterId)); Filter filter = (Filter) ocm.getObject(Filter.class,String.format(URI.FILTER_URI, boardId, filterId));
QueryManager qm = ocm.getQueryManager(); QueryManager qm = ocm.getQueryManager();
org.apache.jackrabbit.ocm.query.Filter qmFilter = qm.createFilter(Card.class); org.apache.jackrabbit.ocm.query.Filter qmFilter = qm.createFilter(Card.class);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment