Permalink
Browse files

Corrected compiler warnings

  • Loading branch information...
1 parent 3cc674b commit 9898e68f992387e3822ae2a72e5a07bc64621324 @rhauch rhauch committed Mar 6, 2013
View
11 ...-jbossas-subsystem/src/main/java/org/modeshape/jboss/subsystem/ModeShapeRootResource.java
@@ -23,12 +23,10 @@
*/
package org.modeshape.jboss.subsystem;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIBE;
import org.jboss.as.controller.ReloadRequiredRemoveStepHandler;
import org.jboss.as.controller.SimpleResourceDefinition;
import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler;
import org.jboss.as.controller.registry.ManagementResourceRegistration;
-import org.jboss.as.controller.registry.OperationEntry;
/**
* @author <a href="mailto:tomaz.cerar@redhat.com">Tomaz Cerar</a>
@@ -44,13 +42,8 @@ private ModeShapeRootResource() {
@Override
public void registerOperations( ManagementResourceRegistration resourceRegistration ) {
super.registerOperations(resourceRegistration);
- // TODO: AS7.2 Use this next line in AS7.2 (but it doesn't work in 7.1.1!) ...
- // resourceRegistration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION,
- // GenericSubsystemDescribeHandler.INSTANCE);
- resourceRegistration.registerOperationHandler(DESCRIBE,
+ resourceRegistration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION,
GenericSubsystemDescribeHandler.INSTANCE,
- GenericSubsystemDescribeHandler.INSTANCE,
- false,
- OperationEntry.EntryType.PRIVATE);
+ false);
}
}
View
248 ...eshape-jbossas-subsystem/src/main/java/org/modeshape/jboss/subsystem/ModelAttributes.java
@@ -355,48 +355,47 @@ public void validateParameter( String parameterName,
FieldName.MONITORING_ENABLED)
.build();
- public static final SimpleAttributeDefinition ENABLE_QUERIES = new MappedAttributeDefinitionBuilder(
- ModelKeys.ENABLE_QUERIES,
- ModelType.BOOLEAN).setXmlName(Attribute.ENABLE_QUERIES.getLocalName())
- .setAllowNull(true)
- .setAllowExpression(true)
- .setDefaultValue(new ModelNode().set(true))
- .setFlags(AttributeAccess.Flag.RESTART_NONE)
- .setFieldPathInRepositoryConfiguration(FieldName.QUERY,
- FieldName.QUERY_ENABLED)
- .build();
+ public static final SimpleAttributeDefinition ENABLE_QUERIES = new MappedAttributeDefinitionBuilder(ModelKeys.ENABLE_QUERIES,
+ ModelType.BOOLEAN).setXmlName(Attribute.ENABLE_QUERIES.getLocalName())
+ .setAllowNull(true)
+ .setAllowExpression(true)
+ .setDefaultValue(new ModelNode().set(true))
+ .setFlags(AttributeAccess.Flag.RESTART_NONE)
+ .setFieldPathInRepositoryConfiguration(FieldName.QUERY,
+ FieldName.QUERY_ENABLED)
+ .build();
public static final SimpleAttributeDefinition GARBAGE_COLLECTION_THREAD_POOL = new MappedAttributeDefinitionBuilder(
ModelKeys.GARBAGE_COLLECTION_THREAD_POOL,
ModelType.STRING).setXmlName(Attribute.GARBAGE_COLLECTION_THREAD_POOL.getLocalName())
- .setAllowExpression(true)
- .setAllowNull(true)
- .setDefaultValue(new ModelNode().set("modeshape-gc"))
- .setFlags(AttributeAccess.Flag.RESTART_NONE)
- .setFieldPathInRepositoryConfiguration(FieldName.GARBAGE_COLLECTION,
- FieldName.THREAD_POOL)
- .build();
+ .setAllowExpression(true)
+ .setAllowNull(true)
+ .setDefaultValue(new ModelNode().set("modeshape-gc"))
+ .setFlags(AttributeAccess.Flag.RESTART_NONE)
+ .setFieldPathInRepositoryConfiguration(FieldName.GARBAGE_COLLECTION,
+ FieldName.THREAD_POOL)
+ .build();
public static final SimpleAttributeDefinition GARBAGE_COLLECTION_INITIAL_TIME = new MappedAttributeDefinitionBuilder(
- ModelKeys.GARBAGE_COLLECTION_INITIAL_TIME,
- ModelType.STRING).setXmlName(Attribute.GARBAGE_COLLECTION_INITIAL_TIME.getLocalName())
- .setAllowExpression(true)
- .setAllowNull(true)
- .setDefaultValue(new ModelNode().set("00:00"))
- .setFlags(AttributeAccess.Flag.RESTART_NONE)
- .setFieldPathInRepositoryConfiguration(FieldName.GARBAGE_COLLECTION,
- FieldName.INITIAL_TIME)
- .build();
+ ModelKeys.GARBAGE_COLLECTION_INITIAL_TIME,
+ ModelType.STRING).setXmlName(Attribute.GARBAGE_COLLECTION_INITIAL_TIME.getLocalName())
+ .setAllowExpression(true)
+ .setAllowNull(true)
+ .setDefaultValue(new ModelNode().set("00:00"))
+ .setFlags(AttributeAccess.Flag.RESTART_NONE)
+ .setFieldPathInRepositoryConfiguration(FieldName.GARBAGE_COLLECTION,
+ FieldName.INITIAL_TIME)
+ .build();
public static final SimpleAttributeDefinition GARBAGE_COLLECTION_INTERVAL = new MappedAttributeDefinitionBuilder(
- ModelKeys.GARBAGE_COLLECTION_INTERVAL,
- ModelType.INT).setXmlName(Attribute.GARBAGE_COLLECTION_INTERVAL.getLocalName())
- .setAllowExpression(true)
- .setAllowNull(true)
- .setDefaultValue(new ModelNode().set(24))
- .setMeasurementUnit(MeasurementUnit.HOURS)
- .setFlags(AttributeAccess.Flag.RESTART_NONE)
- .setFieldPathInRepositoryConfiguration(FieldName.GARBAGE_COLLECTION,
- FieldName.INTERVAL_IN_HOURS)
- .build();
+ ModelKeys.GARBAGE_COLLECTION_INTERVAL,
+ ModelType.INT).setXmlName(Attribute.GARBAGE_COLLECTION_INTERVAL.getLocalName())
+ .setAllowExpression(true)
+ .setAllowNull(true)
+ .setDefaultValue(new ModelNode().set(24))
+ .setMeasurementUnit(MeasurementUnit.HOURS)
+ .setFlags(AttributeAccess.Flag.RESTART_NONE)
+ .setFieldPathInRepositoryConfiguration(FieldName.GARBAGE_COLLECTION,
+ FieldName.INTERVAL_IN_HOURS)
+ .build();
public static final SimpleAttributeDefinition INDEX_FORMAT = new MappedAttributeDefinitionBuilder(ModelKeys.INDEX_FORMAT,
ModelType.STRING).setXmlName(Attribute.FORMAT.getLocalName())
.setAllowExpression(true)
@@ -482,7 +481,8 @@ public void validateParameter( String parameterName,
.build();
/**
- * @deprecated use the REBUILD_INDEXES_UPON_STARTUP,REBUILD_INDEXES_UPON_STARTUP_MODE, REBUILD_INDEXES_UPON_INCLUDE_SYSTEM_CONTENT attributes
+ * @deprecated use the REBUILD_INDEXES_UPON_STARTUP,REBUILD_INDEXES_UPON_STARTUP_MODE,
+ * REBUILD_INDEXES_UPON_INCLUDE_SYSTEM_CONTENT attributes
*/
@Deprecated
public static final SimpleAttributeDefinition SYSTEM_CONTENT_MODE = new MappedAttributeDefinitionBuilder(
@@ -530,46 +530,48 @@ public void validateParameter( String parameterName,
.build();
public static final ListAttributeDefinition PROJECTIONS = MappedListAttributeDefinition.Builder.of(ModelKeys.PROJECTIONS,
- new MappedAttributeDefinitionBuilder(
- ModelKeys.PROJECTION,
- ModelType.STRING).setAllowExpression(true)
- .setAllowNull(false)
- .setValidator(PROJECTION_VALIDATOR)
- .setFlags(AttributeAccess.Flag.RESTART_NONE)
- .build())
- .setAllowNull(true)
- .setMinSize(1)
- .build();
+ new MappedAttributeDefinitionBuilder(
+ ModelKeys.PROJECTION,
+ ModelType.STRING).setAllowExpression(true)
+ .setAllowNull(false)
+ .setValidator(PROJECTION_VALIDATOR)
+ .setFlags(AttributeAccess.Flag.RESTART_NONE)
+ .build())
+ .setAllowNull(true)
+ .setMinSize(1)
+ .build();
+
+ public static final SimpleAttributeDefinition CONNECTOR_CLASSNAME = new MappedAttributeDefinitionBuilder(
+ ModelKeys.CONNECTOR_CLASSNAME,
+ ModelType.STRING).setXmlName(Attribute.CLASSNAME.getLocalName())
+ .setAllowExpression(false)
+ .setAllowNull(true)
+ .setFlags(AttributeAccess.Flag.RESTART_NONE)
+ .build();
- public static final SimpleAttributeDefinition CONNECTOR_CLASSNAME = new MappedAttributeDefinitionBuilder(ModelKeys.CONNECTOR_CLASSNAME, ModelType.STRING)
- .setXmlName(Attribute.CLASSNAME.getLocalName())
- .setAllowExpression(false)
- .setAllowNull(true)
- .setFlags(AttributeAccess.Flag.RESTART_NONE)
- .build();
-
- public static final SimpleAttributeDefinition CACHE_TTL_SECONDS = new MappedAttributeDefinitionBuilder(ModelKeys.CACHE_TTL_SECONDS, ModelType.INT)
- .setXmlName(Attribute.CACHE_TTL_SECONDS.getLocalName())
- .setAllowExpression(false)
- .setAllowNull(true)
- .setFlags(AttributeAccess.Flag.RESTART_NONE)
- .build();
-
- public static final SimpleAttributeDefinition QUERYABLE = new MappedAttributeDefinitionBuilder(ModelKeys.QUERYABLE, ModelType.BOOLEAN)
- .setXmlName(Attribute.QUERYABLE.getLocalName())
- .setAllowExpression(false)
- .setAllowNull(true)
- .setFlags(AttributeAccess.Flag.RESTART_NONE)
- .build();
-
- public static final SimpleAttributeDefinition READONLY = new MappedAttributeDefinitionBuilder(ModelKeys.READONLY, ModelType.BOOLEAN)
- .setXmlName(Attribute.READONLY.getLocalName())
- .setAllowExpression(false)
- .setAllowNull(true)
- .setFlags(AttributeAccess.Flag.RESTART_NONE)
- .setDefaultValue(new ModelNode(false))
- .build();
+ public static final SimpleAttributeDefinition CACHE_TTL_SECONDS = new MappedAttributeDefinitionBuilder(
+ ModelKeys.CACHE_TTL_SECONDS,
+ ModelType.INT).setXmlName(Attribute.CACHE_TTL_SECONDS.getLocalName())
+ .setAllowExpression(false)
+ .setAllowNull(true)
+ .setFlags(AttributeAccess.Flag.RESTART_NONE)
+ .build();
+ public static final SimpleAttributeDefinition QUERYABLE = new MappedAttributeDefinitionBuilder(ModelKeys.QUERYABLE,
+ ModelType.BOOLEAN).setXmlName(Attribute.QUERYABLE.getLocalName())
+ .setAllowExpression(false)
+ .setAllowNull(true)
+ .setFlags(AttributeAccess.Flag.RESTART_NONE)
+ .build();
+
+ public static final SimpleAttributeDefinition READONLY = new MappedAttributeDefinitionBuilder(ModelKeys.READONLY,
+ ModelType.BOOLEAN).setXmlName(Attribute.READONLY.getLocalName())
+ .setAllowExpression(false)
+ .setAllowNull(true)
+ .setFlags(AttributeAccess.Flag.RESTART_NONE)
+ .setDefaultValue(new ModelNode(
+ false))
+ .build();
public static final ListAttributeDefinition PREDEFINED_WORKSPACE_NAMES = MappedListAttributeDefinition.Builder.of(ModelKeys.PREDEFINED_WORKSPACE_NAMES,
new MappedAttributeDefinitionBuilder(
@@ -619,7 +621,7 @@ public void validateParameter( String parameterName,
public static final SimpleAttributeDefinition PROPERTY = new SimpleAttributeDefinition(ModelKeys.PROPERTY,
ModelType.PROPERTY, true);
public static final SimpleListAttributeDefinition PROPERTIES = SimpleListAttributeDefinition.Builder.of(ModelKeys.PROPERTIES,
- PROPERTY)
+ (AttributeDefinition)PROPERTY)
.setAllowNull(true)
.build();
public static final SimpleAttributeDefinition QUEUE_JNDI_NAME = new MappedAttributeDefinitionBuilder(
@@ -634,68 +636,52 @@ public void validateParameter( String parameterName,
ModelKeys.READER_STRATEGY,
ModelType.STRING).setXmlName(Attribute.READER_STRATEGY.getLocalName())
.setAllowExpression(true)
- .setAllowNull(
- true)
- .setDefaultValue(
- new ModelNode()
- .set(IndexReaderStrategy
- .SHARED
- .toString()))
- .setValidator(
- READER_STRATEGY_VALIDATOR)
+ .setAllowNull(true)
+ .setDefaultValue(new ModelNode().set(IndexReaderStrategy.SHARED.toString()))
+ .setValidator(READER_STRATEGY_VALIDATOR)
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
.build();
public static final SimpleAttributeDefinition REBUILD_INDEXES_UPON_STARTUP = new MappedAttributeDefinitionBuilder(
ModelKeys.REBUILD_INDEXES_UPON_STARTUP,
ModelType.STRING).setXmlName(Attribute.REBUILD_UPON_STARTUP.getLocalName())
- .setAllowExpression(
- true)
- .setAllowNull(
- true)
- .setDefaultValue(
- new ModelNode()
- .set(QueryRebuild
- .IF_MISSING
- .toString()))
- .setValidator(
- REBUILD_INDEXES_VALIDATOR)
- .setFlags(
- AttributeAccess.Flag.RESTART_NONE)
- .setFieldPathInRepositoryConfiguration(
- FieldName.QUERY,
- FieldName.INDEXING,
- FieldName.REBUILD_ON_STARTUP,
- FieldName.REBUILD_WHEN)
- .build();
-
- public static final SimpleAttributeDefinition REBUILD_INDEXES_UPON_INCLUDE_SYSTEM_CONTENT = new MappedAttributeDefinitionBuilder(
- ModelKeys.REBUILD_INDEXES_UPON_STARTUP_MODE,
- ModelType.BOOLEAN).setXmlName(Attribute.REBUILD_UPON_STARTUP_INCLUDE_SYSTEM_CONTENT.getLocalName())
- .setAllowExpression(false)
+ .setAllowExpression(true)
.setAllowNull(true)
- .setDefaultValue(new ModelNode().set(false))
+ .setDefaultValue(new ModelNode().set(QueryRebuild.IF_MISSING.toString()))
+ .setValidator(REBUILD_INDEXES_VALIDATOR)
.setFlags(AttributeAccess.Flag.RESTART_NONE)
.setFieldPathInRepositoryConfiguration(FieldName.QUERY,
FieldName.INDEXING,
FieldName.REBUILD_ON_STARTUP,
- FieldName.REBUILD_INCLUDE_SYSTEM_CONTENT)
+ FieldName.REBUILD_WHEN)
.build();
+ public static final SimpleAttributeDefinition REBUILD_INDEXES_UPON_INCLUDE_SYSTEM_CONTENT = new MappedAttributeDefinitionBuilder(
+ ModelKeys.REBUILD_INDEXES_UPON_STARTUP_MODE,
+ ModelType.BOOLEAN).setXmlName(Attribute.REBUILD_UPON_STARTUP_INCLUDE_SYSTEM_CONTENT.getLocalName())
+ .setAllowExpression(false)
+ .setAllowNull(true)
+ .setDefaultValue(new ModelNode().set(false))
+ .setFlags(AttributeAccess.Flag.RESTART_NONE)
+ .setFieldPathInRepositoryConfiguration(FieldName.QUERY,
+ FieldName.INDEXING,
+ FieldName.REBUILD_ON_STARTUP,
+ FieldName.REBUILD_INCLUDE_SYSTEM_CONTENT)
+ .build();
public static final SimpleAttributeDefinition REBUILD_INDEXES_UPON_STARTUP_MODE = new MappedAttributeDefinitionBuilder(
- ModelKeys.REBUILD_INDEXES_UPON_STARTUP_INCLUDE_SYSTEM_CONTENT,
- ModelType.STRING).setXmlName(Attribute.REBUILD_UPON_STARTUP_MODE.getLocalName())
- .setAllowExpression(true)
- .setAllowNull(true)
- .setDefaultValue(new ModelNode().set(IndexingMode.SYNC.toString()))
- .setValidator(INDEXING_MODE_VALIDATOR)
- .setFlags(AttributeAccess.Flag.RESTART_NONE)
- .setFieldPathInRepositoryConfiguration(FieldName.QUERY,
- FieldName.INDEXING,
- FieldName.REBUILD_ON_STARTUP,
- FieldName.REBUILD_MODE)
- .build();
+ ModelKeys.REBUILD_INDEXES_UPON_STARTUP_INCLUDE_SYSTEM_CONTENT,
+ ModelType.STRING).setXmlName(Attribute.REBUILD_UPON_STARTUP_MODE.getLocalName())
+ .setAllowExpression(true)
+ .setAllowNull(true)
+ .setDefaultValue(new ModelNode().set(IndexingMode.SYNC.toString()))
+ .setValidator(INDEXING_MODE_VALIDATOR)
+ .setFlags(AttributeAccess.Flag.RESTART_NONE)
+ .setFieldPathInRepositoryConfiguration(FieldName.QUERY,
+ FieldName.INDEXING,
+ FieldName.REBUILD_ON_STARTUP,
+ FieldName.REBUILD_MODE)
+ .build();
public static final SimpleAttributeDefinition REFRESH_PERIOD = new MappedAttributeDefinitionBuilder(ModelKeys.REFRESH_PERIOD,
ModelType.INT).setXmlName(Attribute.REFRESH_PERIOD.getLocalName())
@@ -809,12 +795,12 @@ public void validateParameter( String parameterName,
public static final AttributeDefinition[] SUBSYSTEM_ATTRIBUTES = {};
public static final AttributeDefinition[] REPOSITORY_ATTRIBUTES = {CACHE_NAME, CACHE_CONTAINER, JNDI_NAME, ENABLE_MONITORING,
- ENABLE_QUERIES, SECURITY_DOMAIN, ANONYMOUS_ROLES, ANONYMOUS_USERNAME, USE_ANONYMOUS_IF_AUTH_FAILED, NODE_TYPES, DEFAULT_WORKSPACE,
- PREDEFINED_WORKSPACE_NAMES, ALLOW_WORKSPACE_CREATION, WORKSPACES_CACHE_CONTAINER, DEFAULT_INITIAL_CONTENT,
- WORKSPACES_INITIAL_CONTENT, MINIMUM_BINARY_SIZE, MINIMUM_STRING_SIZE, THREAD_POOL, BATCH_SIZE, READER_STRATEGY, MODE,
- SYSTEM_CONTENT_MODE, ASYNC_THREAD_POOL_SIZE, ASYNC_MAX_QUEUE_SIZE, ANALYZER_CLASSNAME, ANALYZER_MODULE,
- REBUILD_INDEXES_UPON_STARTUP, CLUSTER_NAME, CLUSTER_STACK,
- GARBAGE_COLLECTION_THREAD_POOL, GARBAGE_COLLECTION_INITIAL_TIME, GARBAGE_COLLECTION_INTERVAL};
+ ENABLE_QUERIES, SECURITY_DOMAIN, ANONYMOUS_ROLES, ANONYMOUS_USERNAME, USE_ANONYMOUS_IF_AUTH_FAILED, NODE_TYPES,
+ DEFAULT_WORKSPACE, PREDEFINED_WORKSPACE_NAMES, ALLOW_WORKSPACE_CREATION, WORKSPACES_CACHE_CONTAINER,
+ DEFAULT_INITIAL_CONTENT, WORKSPACES_INITIAL_CONTENT, MINIMUM_BINARY_SIZE, MINIMUM_STRING_SIZE, THREAD_POOL, BATCH_SIZE,
+ READER_STRATEGY, MODE, SYSTEM_CONTENT_MODE, ASYNC_THREAD_POOL_SIZE, ASYNC_MAX_QUEUE_SIZE, ANALYZER_CLASSNAME,
+ ANALYZER_MODULE, REBUILD_INDEXES_UPON_STARTUP, CLUSTER_NAME, CLUSTER_STACK, GARBAGE_COLLECTION_THREAD_POOL,
+ GARBAGE_COLLECTION_INITIAL_TIME, GARBAGE_COLLECTION_INTERVAL};
public static final AttributeDefinition[] RAM_INDEX_STORAGE_ATTRIBUTES = {INDEX_STORAGE_TYPE,};
@@ -848,8 +834,8 @@ public void validateParameter( String parameterName,
MINIMUM_STRING_SIZE, CLASSNAME, MODULE,};
public static final AttributeDefinition[] SEQUENCER_ATTRIBUTES = {PATH_EXPRESSIONS, SEQUENCER_CLASSNAME, MODULE, PROPERTIES};
- public static final AttributeDefinition[] SOURCE_ATTRIBUTES = {PROJECTIONS, CONNECTOR_CLASSNAME, READONLY,
- CACHE_TTL_SECONDS, QUERYABLE, MODULE, PROPERTIES};
+ public static final AttributeDefinition[] SOURCE_ATTRIBUTES = {PROJECTIONS, CONNECTOR_CLASSNAME, READONLY, CACHE_TTL_SECONDS,
+ QUERYABLE, MODULE, PROPERTIES};
public static final AttributeDefinition[] TEXT_EXTRACTOR_ATTRIBUTES = {TEXT_EXTRACTOR_CLASSNAME, MODULE, PROPERTIES};
public static final AttributeDefinition[] AUTHENTICATOR_ATTRIBUTES = {AUTHENTICATOR_CLASSNAME, MODULE, PROPERTIES};
}
View
26 modeshape-jcr/src/test/java/org/modeshape/junit/SkipLongRunningRule.java
@@ -29,15 +29,21 @@
import org.junit.runners.model.Statement;
/**
- * JUnit rule that inspects the presence of the {@link SkipLongRunning} annotation either on a test method or on a test suite.
- * If it finds the annotation, it will only run the test method/suite if the system property {@code skipLongRunningTests}
- * has the value {@code true}
- *
+ * JUnit rule that inspects the presence of the {@link SkipLongRunning} annotation either on a test method or on a test suite. If
+ * it finds the annotation, it will only run the test method/suite if the system property {@code skipLongRunningTests} has the
+ * value {@code true}
+ *
* @author Horia Chiorean (hchiorea@redhat.com)
*/
public class SkipLongRunningRule implements TestRule {
- private static final Statement EMPTY_STATEMENT = new EmptyStatement();
+ private static final Statement EMPTY_STATEMENT = new Statement() {
+ @Override
+ public void evaluate() throws Throwable {
+ // do nothing, this is the equivalent of an empty test
+ }
+ };
+
private static final String SKIP_LONG_RUNNING_PROPERTY = "skipLongRunningTests";
@Override
@@ -46,7 +52,7 @@ public Statement apply( Statement base,
SkipLongRunning ignoreIfLongRunning = description.getAnnotation(SkipLongRunning.class);
if (ignoreIfLongRunning == null) {
if (description.isTest()) {
- //search for the annotation on the test suite class
+ // search for the annotation on the test suite class
Class<?> testClass = description.getTestClass();
if (!testClass.isAnnotationPresent(SkipLongRunning.class)) {
return base;
@@ -63,12 +69,4 @@ public Statement apply( Statement base,
return base;
}
-
-
- private static class EmptyStatement extends Statement {
- @Override
- public void evaluate() throws Throwable {
- //do nothing, this is the equivalent of an empty test
- }
- }
}
View
9 modeshape-schematic/src/test/java/org/infinispan/schematic/SchematicDbWithBerkleyTest.java
@@ -2,9 +2,8 @@
import java.io.File;
import org.infinispan.configuration.cache.ConfigurationBuilder;
-import org.infinispan.configuration.cache.LoaderConfigurationBuilder;
import org.infinispan.configuration.global.GlobalConfigurationBuilder;
-import org.infinispan.loaders.bdbje.BdbjeCacheStore;
+import org.infinispan.loaders.bdbje.configuration.BdbjeCacheStoreConfigurationBuilder;
import org.infinispan.schematic.document.Document;
import org.infinispan.schematic.document.EditableDocument;
import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -27,8 +26,10 @@ public void beforeTest() {
configurationBuilder.invocationBatching().enable().transaction()
// .lockingMode(LockingMode.PESSIMISTIC)
.transactionManagerLookup(new DummyTransactionManagerLookup());
- LoaderConfigurationBuilder lb = configurationBuilder.loaders().addCacheLoader().cacheLoader(new BdbjeCacheStore());
- lb.addProperty("location", dbDir.getAbsolutePath());
+ configurationBuilder.loaders()
+ .addStore(BdbjeCacheStoreConfigurationBuilder.class)
+ .location(dbDir.getAbsolutePath())
+ .purgeOnStartup(true);
cm = TestCacheManagerFactory.createClusteredCacheManager(globalConfigurationBuilder, configurationBuilder);
tm = cm.getCache().getAdvancedCache().getTransactionManager();
View
2 ...pe-web-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/FileNode.java
@@ -43,6 +43,8 @@
@Immutable
public final class FileNode extends JsonNode {
+ private static final long serialVersionUID = 1L;
+
// ===========================================================================================================================
// Fields
// ===========================================================================================================================
View
8 ...-web-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/FolderNode.java
@@ -24,8 +24,8 @@
package org.modeshape.web.jcr.rest.client.json;
import java.net.URL;
-import org.modeshape.common.annotation.Immutable;
import org.codehaus.jettison.json.JSONObject;
+import org.modeshape.common.annotation.Immutable;
import org.modeshape.web.jcr.rest.client.IJcrConstants;
import org.modeshape.web.jcr.rest.client.domain.Workspace;
@@ -36,6 +36,8 @@
@Immutable
public final class FolderNode extends JsonNode {
+ private static final long serialVersionUID = 1L;
+
// ===========================================================================================================================
// Fields
// ===========================================================================================================================
@@ -57,8 +59,8 @@
public FolderNode( Workspace workspace,
String fullPath ) throws Exception {
super(fullPath);
- assert workspace != null;
- assert fullPath != null;
+ assert workspace != null;
+ assert fullPath != null;
this.workspace = workspace;
View
4 ...pe-web-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/JsonNode.java
@@ -32,6 +32,8 @@
*/
public abstract class JsonNode extends JSONObject {
+ private static final long serialVersionUID = 1L;
+
// ===========================================================================================================================
// Fields
// ===========================================================================================================================
@@ -49,7 +51,7 @@
* @param id the node identifier (never <code>null</code>)
*/
protected JsonNode( String id ) {
- assert id != null;
+ assert id != null;
this.id = id;
}
View
4 ...eb-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/NodeTypeNode.java
@@ -34,9 +34,9 @@
import java.util.Set;
import javax.jcr.PropertyType;
import javax.jcr.version.OnParentVersionAction;
-import org.modeshape.common.annotation.Immutable;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONObject;
+import org.modeshape.common.annotation.Immutable;
import org.modeshape.common.util.CheckArg;
import org.modeshape.web.jcr.rest.client.domain.ChildNodeDefinition;
import org.modeshape.web.jcr.rest.client.domain.NodeType;
@@ -54,6 +54,8 @@
@Immutable
public final class NodeTypeNode extends JsonNode {
+ private static final long serialVersionUID = 1L;
+
protected static final String NODE_TYPES_PATH = "jcr:system/jcr:nodeTypes";
protected static final int NODE_TYPE_DEPTH = 5;
private static final Map<String, Integer> PROPERTY_TYPES_BY_LOWERCASE_NAME;
View
2 ...-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/RepositoryNode.java
@@ -38,6 +38,8 @@
*/
public final class RepositoryNode extends JsonNode {
+ private static final long serialVersionUID = 1L;
+
// ===========================================================================================================================
// Fields
// ===========================================================================================================================
View
2 ...-web-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/ServerNode.java
@@ -42,6 +42,8 @@
*/
public final class ServerNode extends JsonNode {
+ private static final long serialVersionUID = 1L;
+
// ===========================================================================================================================
// Fields
// ===========================================================================================================================
View
2 ...b-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/WorkspaceNode.java
@@ -32,6 +32,8 @@
*/
public class WorkspaceNode extends JsonNode {
+ private static final long serialVersionUID = 1L;
+
// ===========================================================================================================================
// Fields
// ===========================================================================================================================

0 comments on commit 9898e68

Please sign in to comment.