Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Corrected compiler warnings

  • Loading branch information...
commit 9898e68f992387e3822ae2a72e5a07bc64621324 1 parent 3cc674b
Randall Hauch rhauch authored
11 ...ossas/modeshape-jbossas-subsystem/src/main/java/org/modeshape/jboss/subsystem/ModeShapeRootResource.java
@@ -23,12 +23,10 @@
23 23 */
24 24 package org.modeshape.jboss.subsystem;
25 25
26   -import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIBE;
27 26 import org.jboss.as.controller.ReloadRequiredRemoveStepHandler;
28 27 import org.jboss.as.controller.SimpleResourceDefinition;
29 28 import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler;
30 29 import org.jboss.as.controller.registry.ManagementResourceRegistration;
31   -import org.jboss.as.controller.registry.OperationEntry;
32 30
33 31 /**
34 32 * @author <a href="mailto:tomaz.cerar@redhat.com">Tomaz Cerar</a>
@@ -44,13 +42,8 @@ private ModeShapeRootResource() {
44 42 @Override
45 43 public void registerOperations( ManagementResourceRegistration resourceRegistration ) {
46 44 super.registerOperations(resourceRegistration);
47   - // TODO: AS7.2 Use this next line in AS7.2 (but it doesn't work in 7.1.1!) ...
48   - // resourceRegistration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION,
49   - // GenericSubsystemDescribeHandler.INSTANCE);
50   - resourceRegistration.registerOperationHandler(DESCRIBE,
  45 + resourceRegistration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION,
51 46 GenericSubsystemDescribeHandler.INSTANCE,
52   - GenericSubsystemDescribeHandler.INSTANCE,
53   - false,
54   - OperationEntry.EntryType.PRIVATE);
  47 + false);
55 48 }
56 49 }
248 deploy/jbossas/modeshape-jbossas-subsystem/src/main/java/org/modeshape/jboss/subsystem/ModelAttributes.java
@@ -355,48 +355,47 @@ public void validateParameter( String parameterName,
355 355 FieldName.MONITORING_ENABLED)
356 356 .build();
357 357
358   - public static final SimpleAttributeDefinition ENABLE_QUERIES = new MappedAttributeDefinitionBuilder(
359   - ModelKeys.ENABLE_QUERIES,
360   - ModelType.BOOLEAN).setXmlName(Attribute.ENABLE_QUERIES.getLocalName())
361   - .setAllowNull(true)
362   - .setAllowExpression(true)
363   - .setDefaultValue(new ModelNode().set(true))
364   - .setFlags(AttributeAccess.Flag.RESTART_NONE)
365   - .setFieldPathInRepositoryConfiguration(FieldName.QUERY,
366   - FieldName.QUERY_ENABLED)
367   - .build();
  358 + public static final SimpleAttributeDefinition ENABLE_QUERIES = new MappedAttributeDefinitionBuilder(ModelKeys.ENABLE_QUERIES,
  359 + ModelType.BOOLEAN).setXmlName(Attribute.ENABLE_QUERIES.getLocalName())
  360 + .setAllowNull(true)
  361 + .setAllowExpression(true)
  362 + .setDefaultValue(new ModelNode().set(true))
  363 + .setFlags(AttributeAccess.Flag.RESTART_NONE)
  364 + .setFieldPathInRepositoryConfiguration(FieldName.QUERY,
  365 + FieldName.QUERY_ENABLED)
  366 + .build();
368 367
369 368 public static final SimpleAttributeDefinition GARBAGE_COLLECTION_THREAD_POOL = new MappedAttributeDefinitionBuilder(
370 369 ModelKeys.GARBAGE_COLLECTION_THREAD_POOL,
371 370 ModelType.STRING).setXmlName(Attribute.GARBAGE_COLLECTION_THREAD_POOL.getLocalName())
372   - .setAllowExpression(true)
373   - .setAllowNull(true)
374   - .setDefaultValue(new ModelNode().set("modeshape-gc"))
375   - .setFlags(AttributeAccess.Flag.RESTART_NONE)
376   - .setFieldPathInRepositoryConfiguration(FieldName.GARBAGE_COLLECTION,
377   - FieldName.THREAD_POOL)
378   - .build();
  371 + .setAllowExpression(true)
  372 + .setAllowNull(true)
  373 + .setDefaultValue(new ModelNode().set("modeshape-gc"))
  374 + .setFlags(AttributeAccess.Flag.RESTART_NONE)
  375 + .setFieldPathInRepositoryConfiguration(FieldName.GARBAGE_COLLECTION,
  376 + FieldName.THREAD_POOL)
  377 + .build();
379 378 public static final SimpleAttributeDefinition GARBAGE_COLLECTION_INITIAL_TIME = new MappedAttributeDefinitionBuilder(
380   - ModelKeys.GARBAGE_COLLECTION_INITIAL_TIME,
381   - ModelType.STRING).setXmlName(Attribute.GARBAGE_COLLECTION_INITIAL_TIME.getLocalName())
382   - .setAllowExpression(true)
383   - .setAllowNull(true)
384   - .setDefaultValue(new ModelNode().set("00:00"))
385   - .setFlags(AttributeAccess.Flag.RESTART_NONE)
386   - .setFieldPathInRepositoryConfiguration(FieldName.GARBAGE_COLLECTION,
387   - FieldName.INITIAL_TIME)
388   - .build();
  379 + ModelKeys.GARBAGE_COLLECTION_INITIAL_TIME,
  380 + ModelType.STRING).setXmlName(Attribute.GARBAGE_COLLECTION_INITIAL_TIME.getLocalName())
  381 + .setAllowExpression(true)
  382 + .setAllowNull(true)
  383 + .setDefaultValue(new ModelNode().set("00:00"))
  384 + .setFlags(AttributeAccess.Flag.RESTART_NONE)
  385 + .setFieldPathInRepositoryConfiguration(FieldName.GARBAGE_COLLECTION,
  386 + FieldName.INITIAL_TIME)
  387 + .build();
389 388 public static final SimpleAttributeDefinition GARBAGE_COLLECTION_INTERVAL = new MappedAttributeDefinitionBuilder(
390   - ModelKeys.GARBAGE_COLLECTION_INTERVAL,
391   - ModelType.INT).setXmlName(Attribute.GARBAGE_COLLECTION_INTERVAL.getLocalName())
392   - .setAllowExpression(true)
393   - .setAllowNull(true)
394   - .setDefaultValue(new ModelNode().set(24))
395   - .setMeasurementUnit(MeasurementUnit.HOURS)
396   - .setFlags(AttributeAccess.Flag.RESTART_NONE)
397   - .setFieldPathInRepositoryConfiguration(FieldName.GARBAGE_COLLECTION,
398   - FieldName.INTERVAL_IN_HOURS)
399   - .build();
  389 + ModelKeys.GARBAGE_COLLECTION_INTERVAL,
  390 + ModelType.INT).setXmlName(Attribute.GARBAGE_COLLECTION_INTERVAL.getLocalName())
  391 + .setAllowExpression(true)
  392 + .setAllowNull(true)
  393 + .setDefaultValue(new ModelNode().set(24))
  394 + .setMeasurementUnit(MeasurementUnit.HOURS)
  395 + .setFlags(AttributeAccess.Flag.RESTART_NONE)
  396 + .setFieldPathInRepositoryConfiguration(FieldName.GARBAGE_COLLECTION,
  397 + FieldName.INTERVAL_IN_HOURS)
  398 + .build();
400 399 public static final SimpleAttributeDefinition INDEX_FORMAT = new MappedAttributeDefinitionBuilder(ModelKeys.INDEX_FORMAT,
401 400 ModelType.STRING).setXmlName(Attribute.FORMAT.getLocalName())
402 401 .setAllowExpression(true)
@@ -482,7 +481,8 @@ public void validateParameter( String parameterName,
482 481 .build();
483 482
484 483 /**
485   - * @deprecated use the REBUILD_INDEXES_UPON_STARTUP,REBUILD_INDEXES_UPON_STARTUP_MODE, REBUILD_INDEXES_UPON_INCLUDE_SYSTEM_CONTENT attributes
  484 + * @deprecated use the REBUILD_INDEXES_UPON_STARTUP,REBUILD_INDEXES_UPON_STARTUP_MODE,
  485 + * REBUILD_INDEXES_UPON_INCLUDE_SYSTEM_CONTENT attributes
486 486 */
487 487 @Deprecated
488 488 public static final SimpleAttributeDefinition SYSTEM_CONTENT_MODE = new MappedAttributeDefinitionBuilder(
@@ -530,46 +530,48 @@ public void validateParameter( String parameterName,
530 530 .build();
531 531
532 532 public static final ListAttributeDefinition PROJECTIONS = MappedListAttributeDefinition.Builder.of(ModelKeys.PROJECTIONS,
533   - new MappedAttributeDefinitionBuilder(
534   - ModelKeys.PROJECTION,
535   - ModelType.STRING).setAllowExpression(true)
536   - .setAllowNull(false)
537   - .setValidator(PROJECTION_VALIDATOR)
538   - .setFlags(AttributeAccess.Flag.RESTART_NONE)
539   - .build())
540   - .setAllowNull(true)
541   - .setMinSize(1)
542   - .build();
  533 + new MappedAttributeDefinitionBuilder(
  534 + ModelKeys.PROJECTION,
  535 + ModelType.STRING).setAllowExpression(true)
  536 + .setAllowNull(false)
  537 + .setValidator(PROJECTION_VALIDATOR)
  538 + .setFlags(AttributeAccess.Flag.RESTART_NONE)
  539 + .build())
  540 + .setAllowNull(true)
  541 + .setMinSize(1)
  542 + .build();
  543 +
  544 + public static final SimpleAttributeDefinition CONNECTOR_CLASSNAME = new MappedAttributeDefinitionBuilder(
  545 + ModelKeys.CONNECTOR_CLASSNAME,
  546 + ModelType.STRING).setXmlName(Attribute.CLASSNAME.getLocalName())
  547 + .setAllowExpression(false)
  548 + .setAllowNull(true)
  549 + .setFlags(AttributeAccess.Flag.RESTART_NONE)
  550 + .build();
543 551
544   - public static final SimpleAttributeDefinition CONNECTOR_CLASSNAME = new MappedAttributeDefinitionBuilder(ModelKeys.CONNECTOR_CLASSNAME, ModelType.STRING)
545   - .setXmlName(Attribute.CLASSNAME.getLocalName())
546   - .setAllowExpression(false)
547   - .setAllowNull(true)
548   - .setFlags(AttributeAccess.Flag.RESTART_NONE)
549   - .build();
550   -
551   - public static final SimpleAttributeDefinition CACHE_TTL_SECONDS = new MappedAttributeDefinitionBuilder(ModelKeys.CACHE_TTL_SECONDS, ModelType.INT)
552   - .setXmlName(Attribute.CACHE_TTL_SECONDS.getLocalName())
553   - .setAllowExpression(false)
554   - .setAllowNull(true)
555   - .setFlags(AttributeAccess.Flag.RESTART_NONE)
556   - .build();
557   -
558   - public static final SimpleAttributeDefinition QUERYABLE = new MappedAttributeDefinitionBuilder(ModelKeys.QUERYABLE, ModelType.BOOLEAN)
559   - .setXmlName(Attribute.QUERYABLE.getLocalName())
560   - .setAllowExpression(false)
561   - .setAllowNull(true)
562   - .setFlags(AttributeAccess.Flag.RESTART_NONE)
563   - .build();
564   -
565   - public static final SimpleAttributeDefinition READONLY = new MappedAttributeDefinitionBuilder(ModelKeys.READONLY, ModelType.BOOLEAN)
566   - .setXmlName(Attribute.READONLY.getLocalName())
567   - .setAllowExpression(false)
568   - .setAllowNull(true)
569   - .setFlags(AttributeAccess.Flag.RESTART_NONE)
570   - .setDefaultValue(new ModelNode(false))
571   - .build();
  552 + public static final SimpleAttributeDefinition CACHE_TTL_SECONDS = new MappedAttributeDefinitionBuilder(
  553 + ModelKeys.CACHE_TTL_SECONDS,
  554 + ModelType.INT).setXmlName(Attribute.CACHE_TTL_SECONDS.getLocalName())
  555 + .setAllowExpression(false)
  556 + .setAllowNull(true)
  557 + .setFlags(AttributeAccess.Flag.RESTART_NONE)
  558 + .build();
572 559
  560 + public static final SimpleAttributeDefinition QUERYABLE = new MappedAttributeDefinitionBuilder(ModelKeys.QUERYABLE,
  561 + ModelType.BOOLEAN).setXmlName(Attribute.QUERYABLE.getLocalName())
  562 + .setAllowExpression(false)
  563 + .setAllowNull(true)
  564 + .setFlags(AttributeAccess.Flag.RESTART_NONE)
  565 + .build();
  566 +
  567 + public static final SimpleAttributeDefinition READONLY = new MappedAttributeDefinitionBuilder(ModelKeys.READONLY,
  568 + ModelType.BOOLEAN).setXmlName(Attribute.READONLY.getLocalName())
  569 + .setAllowExpression(false)
  570 + .setAllowNull(true)
  571 + .setFlags(AttributeAccess.Flag.RESTART_NONE)
  572 + .setDefaultValue(new ModelNode(
  573 + false))
  574 + .build();
573 575
574 576 public static final ListAttributeDefinition PREDEFINED_WORKSPACE_NAMES = MappedListAttributeDefinition.Builder.of(ModelKeys.PREDEFINED_WORKSPACE_NAMES,
575 577 new MappedAttributeDefinitionBuilder(
@@ -619,7 +621,7 @@ public void validateParameter( String parameterName,
619 621 public static final SimpleAttributeDefinition PROPERTY = new SimpleAttributeDefinition(ModelKeys.PROPERTY,
620 622 ModelType.PROPERTY, true);
621 623 public static final SimpleListAttributeDefinition PROPERTIES = SimpleListAttributeDefinition.Builder.of(ModelKeys.PROPERTIES,
622   - PROPERTY)
  624 + (AttributeDefinition)PROPERTY)
623 625 .setAllowNull(true)
624 626 .build();
625 627 public static final SimpleAttributeDefinition QUEUE_JNDI_NAME = new MappedAttributeDefinitionBuilder(
@@ -634,68 +636,52 @@ public void validateParameter( String parameterName,
634 636 ModelKeys.READER_STRATEGY,
635 637 ModelType.STRING).setXmlName(Attribute.READER_STRATEGY.getLocalName())
636 638 .setAllowExpression(true)
637   - .setAllowNull(
638   - true)
639   - .setDefaultValue(
640   - new ModelNode()
641   - .set(IndexReaderStrategy
642   - .SHARED
643   - .toString()))
644   - .setValidator(
645   - READER_STRATEGY_VALIDATOR)
  639 + .setAllowNull(true)
  640 + .setDefaultValue(new ModelNode().set(IndexReaderStrategy.SHARED.toString()))
  641 + .setValidator(READER_STRATEGY_VALIDATOR)
646 642 .setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
647 643 .build();
648 644
649 645 public static final SimpleAttributeDefinition REBUILD_INDEXES_UPON_STARTUP = new MappedAttributeDefinitionBuilder(
650 646 ModelKeys.REBUILD_INDEXES_UPON_STARTUP,
651 647 ModelType.STRING).setXmlName(Attribute.REBUILD_UPON_STARTUP.getLocalName())
652   - .setAllowExpression(
653   - true)
654   - .setAllowNull(
655   - true)
656   - .setDefaultValue(
657   - new ModelNode()
658   - .set(QueryRebuild
659   - .IF_MISSING
660   - .toString()))
661   - .setValidator(
662   - REBUILD_INDEXES_VALIDATOR)
663   - .setFlags(
664   - AttributeAccess.Flag.RESTART_NONE)
665   - .setFieldPathInRepositoryConfiguration(
666   - FieldName.QUERY,
667   - FieldName.INDEXING,
668   - FieldName.REBUILD_ON_STARTUP,
669   - FieldName.REBUILD_WHEN)
670   - .build();
671   -
672   - public static final SimpleAttributeDefinition REBUILD_INDEXES_UPON_INCLUDE_SYSTEM_CONTENT = new MappedAttributeDefinitionBuilder(
673   - ModelKeys.REBUILD_INDEXES_UPON_STARTUP_MODE,
674   - ModelType.BOOLEAN).setXmlName(Attribute.REBUILD_UPON_STARTUP_INCLUDE_SYSTEM_CONTENT.getLocalName())
675   - .setAllowExpression(false)
  648 + .setAllowExpression(true)
676 649 .setAllowNull(true)
677   - .setDefaultValue(new ModelNode().set(false))
  650 + .setDefaultValue(new ModelNode().set(QueryRebuild.IF_MISSING.toString()))
  651 + .setValidator(REBUILD_INDEXES_VALIDATOR)
678 652 .setFlags(AttributeAccess.Flag.RESTART_NONE)
679 653 .setFieldPathInRepositoryConfiguration(FieldName.QUERY,
680 654 FieldName.INDEXING,
681 655 FieldName.REBUILD_ON_STARTUP,
682   - FieldName.REBUILD_INCLUDE_SYSTEM_CONTENT)
  656 + FieldName.REBUILD_WHEN)
683 657 .build();
684 658
  659 + public static final SimpleAttributeDefinition REBUILD_INDEXES_UPON_INCLUDE_SYSTEM_CONTENT = new MappedAttributeDefinitionBuilder(
  660 + ModelKeys.REBUILD_INDEXES_UPON_STARTUP_MODE,
  661 + ModelType.BOOLEAN).setXmlName(Attribute.REBUILD_UPON_STARTUP_INCLUDE_SYSTEM_CONTENT.getLocalName())
  662 + .setAllowExpression(false)
  663 + .setAllowNull(true)
  664 + .setDefaultValue(new ModelNode().set(false))
  665 + .setFlags(AttributeAccess.Flag.RESTART_NONE)
  666 + .setFieldPathInRepositoryConfiguration(FieldName.QUERY,
  667 + FieldName.INDEXING,
  668 + FieldName.REBUILD_ON_STARTUP,
  669 + FieldName.REBUILD_INCLUDE_SYSTEM_CONTENT)
  670 + .build();
685 671
686 672 public static final SimpleAttributeDefinition REBUILD_INDEXES_UPON_STARTUP_MODE = new MappedAttributeDefinitionBuilder(
687   - ModelKeys.REBUILD_INDEXES_UPON_STARTUP_INCLUDE_SYSTEM_CONTENT,
688   - ModelType.STRING).setXmlName(Attribute.REBUILD_UPON_STARTUP_MODE.getLocalName())
689   - .setAllowExpression(true)
690   - .setAllowNull(true)
691   - .setDefaultValue(new ModelNode().set(IndexingMode.SYNC.toString()))
692   - .setValidator(INDEXING_MODE_VALIDATOR)
693   - .setFlags(AttributeAccess.Flag.RESTART_NONE)
694   - .setFieldPathInRepositoryConfiguration(FieldName.QUERY,
695   - FieldName.INDEXING,
696   - FieldName.REBUILD_ON_STARTUP,
697   - FieldName.REBUILD_MODE)
698   - .build();
  673 + ModelKeys.REBUILD_INDEXES_UPON_STARTUP_INCLUDE_SYSTEM_CONTENT,
  674 + ModelType.STRING).setXmlName(Attribute.REBUILD_UPON_STARTUP_MODE.getLocalName())
  675 + .setAllowExpression(true)
  676 + .setAllowNull(true)
  677 + .setDefaultValue(new ModelNode().set(IndexingMode.SYNC.toString()))
  678 + .setValidator(INDEXING_MODE_VALIDATOR)
  679 + .setFlags(AttributeAccess.Flag.RESTART_NONE)
  680 + .setFieldPathInRepositoryConfiguration(FieldName.QUERY,
  681 + FieldName.INDEXING,
  682 + FieldName.REBUILD_ON_STARTUP,
  683 + FieldName.REBUILD_MODE)
  684 + .build();
699 685
700 686 public static final SimpleAttributeDefinition REFRESH_PERIOD = new MappedAttributeDefinitionBuilder(ModelKeys.REFRESH_PERIOD,
701 687 ModelType.INT).setXmlName(Attribute.REFRESH_PERIOD.getLocalName())
@@ -809,12 +795,12 @@ public void validateParameter( String parameterName,
809 795 public static final AttributeDefinition[] SUBSYSTEM_ATTRIBUTES = {};
810 796
811 797 public static final AttributeDefinition[] REPOSITORY_ATTRIBUTES = {CACHE_NAME, CACHE_CONTAINER, JNDI_NAME, ENABLE_MONITORING,
812   - ENABLE_QUERIES, SECURITY_DOMAIN, ANONYMOUS_ROLES, ANONYMOUS_USERNAME, USE_ANONYMOUS_IF_AUTH_FAILED, NODE_TYPES, DEFAULT_WORKSPACE,
813   - PREDEFINED_WORKSPACE_NAMES, ALLOW_WORKSPACE_CREATION, WORKSPACES_CACHE_CONTAINER, DEFAULT_INITIAL_CONTENT,
814   - WORKSPACES_INITIAL_CONTENT, MINIMUM_BINARY_SIZE, MINIMUM_STRING_SIZE, THREAD_POOL, BATCH_SIZE, READER_STRATEGY, MODE,
815   - SYSTEM_CONTENT_MODE, ASYNC_THREAD_POOL_SIZE, ASYNC_MAX_QUEUE_SIZE, ANALYZER_CLASSNAME, ANALYZER_MODULE,
816   - REBUILD_INDEXES_UPON_STARTUP, CLUSTER_NAME, CLUSTER_STACK,
817   - GARBAGE_COLLECTION_THREAD_POOL, GARBAGE_COLLECTION_INITIAL_TIME, GARBAGE_COLLECTION_INTERVAL};
  798 + ENABLE_QUERIES, SECURITY_DOMAIN, ANONYMOUS_ROLES, ANONYMOUS_USERNAME, USE_ANONYMOUS_IF_AUTH_FAILED, NODE_TYPES,
  799 + DEFAULT_WORKSPACE, PREDEFINED_WORKSPACE_NAMES, ALLOW_WORKSPACE_CREATION, WORKSPACES_CACHE_CONTAINER,
  800 + DEFAULT_INITIAL_CONTENT, WORKSPACES_INITIAL_CONTENT, MINIMUM_BINARY_SIZE, MINIMUM_STRING_SIZE, THREAD_POOL, BATCH_SIZE,
  801 + READER_STRATEGY, MODE, SYSTEM_CONTENT_MODE, ASYNC_THREAD_POOL_SIZE, ASYNC_MAX_QUEUE_SIZE, ANALYZER_CLASSNAME,
  802 + ANALYZER_MODULE, REBUILD_INDEXES_UPON_STARTUP, CLUSTER_NAME, CLUSTER_STACK, GARBAGE_COLLECTION_THREAD_POOL,
  803 + GARBAGE_COLLECTION_INITIAL_TIME, GARBAGE_COLLECTION_INTERVAL};
818 804
819 805 public static final AttributeDefinition[] RAM_INDEX_STORAGE_ATTRIBUTES = {INDEX_STORAGE_TYPE,};
820 806
@@ -848,8 +834,8 @@ public void validateParameter( String parameterName,
848 834 MINIMUM_STRING_SIZE, CLASSNAME, MODULE,};
849 835
850 836 public static final AttributeDefinition[] SEQUENCER_ATTRIBUTES = {PATH_EXPRESSIONS, SEQUENCER_CLASSNAME, MODULE, PROPERTIES};
851   - public static final AttributeDefinition[] SOURCE_ATTRIBUTES = {PROJECTIONS, CONNECTOR_CLASSNAME, READONLY,
852   - CACHE_TTL_SECONDS, QUERYABLE, MODULE, PROPERTIES};
  837 + public static final AttributeDefinition[] SOURCE_ATTRIBUTES = {PROJECTIONS, CONNECTOR_CLASSNAME, READONLY, CACHE_TTL_SECONDS,
  838 + QUERYABLE, MODULE, PROPERTIES};
853 839 public static final AttributeDefinition[] TEXT_EXTRACTOR_ATTRIBUTES = {TEXT_EXTRACTOR_CLASSNAME, MODULE, PROPERTIES};
854 840 public static final AttributeDefinition[] AUTHENTICATOR_ATTRIBUTES = {AUTHENTICATOR_CLASSNAME, MODULE, PROPERTIES};
855 841 }
26 modeshape-jcr/src/test/java/org/modeshape/junit/SkipLongRunningRule.java
@@ -29,15 +29,21 @@
29 29 import org.junit.runners.model.Statement;
30 30
31 31 /**
32   - * JUnit rule that inspects the presence of the {@link SkipLongRunning} annotation either on a test method or on a test suite.
33   - * If it finds the annotation, it will only run the test method/suite if the system property {@code skipLongRunningTests}
34   - * has the value {@code true}
35   - *
  32 + * JUnit rule that inspects the presence of the {@link SkipLongRunning} annotation either on a test method or on a test suite. If
  33 + * it finds the annotation, it will only run the test method/suite if the system property {@code skipLongRunningTests} has the
  34 + * value {@code true}
  35 + *
36 36 * @author Horia Chiorean (hchiorea@redhat.com)
37 37 */
38 38 public class SkipLongRunningRule implements TestRule {
39 39
40   - private static final Statement EMPTY_STATEMENT = new EmptyStatement();
  40 + private static final Statement EMPTY_STATEMENT = new Statement() {
  41 + @Override
  42 + public void evaluate() throws Throwable {
  43 + // do nothing, this is the equivalent of an empty test
  44 + }
  45 + };
  46 +
41 47 private static final String SKIP_LONG_RUNNING_PROPERTY = "skipLongRunningTests";
42 48
43 49 @Override
@@ -46,7 +52,7 @@ public Statement apply( Statement base,
46 52 SkipLongRunning ignoreIfLongRunning = description.getAnnotation(SkipLongRunning.class);
47 53 if (ignoreIfLongRunning == null) {
48 54 if (description.isTest()) {
49   - //search for the annotation on the test suite class
  55 + // search for the annotation on the test suite class
50 56 Class<?> testClass = description.getTestClass();
51 57 if (!testClass.isAnnotationPresent(SkipLongRunning.class)) {
52 58 return base;
@@ -63,12 +69,4 @@ public Statement apply( Statement base,
63 69
64 70 return base;
65 71 }
66   -
67   -
68   - private static class EmptyStatement extends Statement {
69   - @Override
70   - public void evaluate() throws Throwable {
71   - //do nothing, this is the equivalent of an empty test
72   - }
73   - }
74 72 }
9 modeshape-schematic/src/test/java/org/infinispan/schematic/SchematicDbWithBerkleyTest.java
@@ -2,9 +2,8 @@
2 2
3 3 import java.io.File;
4 4 import org.infinispan.configuration.cache.ConfigurationBuilder;
5   -import org.infinispan.configuration.cache.LoaderConfigurationBuilder;
6 5 import org.infinispan.configuration.global.GlobalConfigurationBuilder;
7   -import org.infinispan.loaders.bdbje.BdbjeCacheStore;
  6 +import org.infinispan.loaders.bdbje.configuration.BdbjeCacheStoreConfigurationBuilder;
8 7 import org.infinispan.schematic.document.Document;
9 8 import org.infinispan.schematic.document.EditableDocument;
10 9 import org.infinispan.test.fwk.TestCacheManagerFactory;
@@ -27,8 +26,10 @@ public void beforeTest() {
27 26 configurationBuilder.invocationBatching().enable().transaction()
28 27 // .lockingMode(LockingMode.PESSIMISTIC)
29 28 .transactionManagerLookup(new DummyTransactionManagerLookup());
30   - LoaderConfigurationBuilder lb = configurationBuilder.loaders().addCacheLoader().cacheLoader(new BdbjeCacheStore());
31   - lb.addProperty("location", dbDir.getAbsolutePath());
  29 + configurationBuilder.loaders()
  30 + .addStore(BdbjeCacheStoreConfigurationBuilder.class)
  31 + .location(dbDir.getAbsolutePath())
  32 + .purgeOnStartup(true);
32 33
33 34 cm = TestCacheManagerFactory.createClusteredCacheManager(globalConfigurationBuilder, configurationBuilder);
34 35 tm = cm.getCache().getAdvancedCache().getTransactionManager();
2  web/modeshape-web-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/FileNode.java
@@ -43,6 +43,8 @@
43 43 @Immutable
44 44 public final class FileNode extends JsonNode {
45 45
  46 + private static final long serialVersionUID = 1L;
  47 +
46 48 // ===========================================================================================================================
47 49 // Fields
48 50 // ===========================================================================================================================
8 web/modeshape-web-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/FolderNode.java
@@ -24,8 +24,8 @@
24 24 package org.modeshape.web.jcr.rest.client.json;
25 25
26 26 import java.net.URL;
27   -import org.modeshape.common.annotation.Immutable;
28 27 import org.codehaus.jettison.json.JSONObject;
  28 +import org.modeshape.common.annotation.Immutable;
29 29 import org.modeshape.web.jcr.rest.client.IJcrConstants;
30 30 import org.modeshape.web.jcr.rest.client.domain.Workspace;
31 31
@@ -36,6 +36,8 @@
36 36 @Immutable
37 37 public final class FolderNode extends JsonNode {
38 38
  39 + private static final long serialVersionUID = 1L;
  40 +
39 41 // ===========================================================================================================================
40 42 // Fields
41 43 // ===========================================================================================================================
@@ -57,8 +59,8 @@
57 59 public FolderNode( Workspace workspace,
58 60 String fullPath ) throws Exception {
59 61 super(fullPath);
60   - assert workspace != null;
61   - assert fullPath != null;
  62 + assert workspace != null;
  63 + assert fullPath != null;
62 64
63 65 this.workspace = workspace;
64 66
4 web/modeshape-web-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/JsonNode.java
@@ -32,6 +32,8 @@
32 32 */
33 33 public abstract class JsonNode extends JSONObject {
34 34
  35 + private static final long serialVersionUID = 1L;
  36 +
35 37 // ===========================================================================================================================
36 38 // Fields
37 39 // ===========================================================================================================================
@@ -49,7 +51,7 @@
49 51 * @param id the node identifier (never <code>null</code>)
50 52 */
51 53 protected JsonNode( String id ) {
52   - assert id != null;
  54 + assert id != null;
53 55 this.id = id;
54 56 }
55 57
4 web/modeshape-web-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/NodeTypeNode.java
@@ -34,9 +34,9 @@
34 34 import java.util.Set;
35 35 import javax.jcr.PropertyType;
36 36 import javax.jcr.version.OnParentVersionAction;
37   -import org.modeshape.common.annotation.Immutable;
38 37 import org.codehaus.jettison.json.JSONArray;
39 38 import org.codehaus.jettison.json.JSONObject;
  39 +import org.modeshape.common.annotation.Immutable;
40 40 import org.modeshape.common.util.CheckArg;
41 41 import org.modeshape.web.jcr.rest.client.domain.ChildNodeDefinition;
42 42 import org.modeshape.web.jcr.rest.client.domain.NodeType;
@@ -54,6 +54,8 @@
54 54 @Immutable
55 55 public final class NodeTypeNode extends JsonNode {
56 56
  57 + private static final long serialVersionUID = 1L;
  58 +
57 59 protected static final String NODE_TYPES_PATH = "jcr:system/jcr:nodeTypes";
58 60 protected static final int NODE_TYPE_DEPTH = 5;
59 61 private static final Map<String, Integer> PROPERTY_TYPES_BY_LOWERCASE_NAME;
2  web/modeshape-web-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/RepositoryNode.java
@@ -38,6 +38,8 @@
38 38 */
39 39 public final class RepositoryNode extends JsonNode {
40 40
  41 + private static final long serialVersionUID = 1L;
  42 +
41 43 // ===========================================================================================================================
42 44 // Fields
43 45 // ===========================================================================================================================
2  web/modeshape-web-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/ServerNode.java
@@ -42,6 +42,8 @@
42 42 */
43 43 public final class ServerNode extends JsonNode {
44 44
  45 + private static final long serialVersionUID = 1L;
  46 +
45 47 // ===========================================================================================================================
46 48 // Fields
47 49 // ===========================================================================================================================
2  web/modeshape-web-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/WorkspaceNode.java
@@ -32,6 +32,8 @@
32 32 */
33 33 public class WorkspaceNode extends JsonNode {
34 34
  35 + private static final long serialVersionUID = 1L;
  36 +
35 37 // ===========================================================================================================================
36 38 // Fields
37 39 // ===========================================================================================================================

0 comments on commit 9898e68

Please sign in to comment.
Something went wrong with that request. Please try again.