diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/SimpleShuffling.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/SimpleShuffling.java index d5671494a81585f9cfb71b59b34b84893734be05..66138fb4cbcbd42cd28558330d119342dcecef78 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/SimpleShuffling.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/SimpleShuffling.java @@ -27,7 +27,6 @@ import java.util.Properties; import org.apache.commons.io.FileUtils; import ch.rinn.restrictions.Private; -import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel; import ch.systemsx.cisd.common.logging.ISimpleLogger; import ch.systemsx.cisd.common.logging.LogCategory; import ch.systemsx.cisd.common.logging.LogFactory; diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/AbstractOmniscientTopLevelDataSetRegistrator.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/AbstractOmniscientTopLevelDataSetRegistrator.java index 5d1ba0c7080b124bb664094e42b3098fe95c53e9..e6269f83a97d1c57f57cbb361607ae8b7e168606 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/AbstractOmniscientTopLevelDataSetRegistrator.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/AbstractOmniscientTopLevelDataSetRegistrator.java @@ -304,6 +304,7 @@ public abstract class AbstractOmniscientTopLevelDataSetRegistrator<T extends Dat } + @Override public OmniscientTopLevelDataSetRegistratorState getRegistratorState() { return state; @@ -315,6 +316,7 @@ public abstract class AbstractOmniscientTopLevelDataSetRegistrator<T extends Dat return state.registrationLock; } + @Override public File getRollBackStackParentFolder() { return getGlobalState().getDssInternalTempDir(); @@ -643,6 +645,7 @@ public abstract class AbstractOmniscientTopLevelDataSetRegistrator<T extends Dat * Subclasses may override, but should call super. */ + @Override public void didRollbackTransaction(DataSetRegistrationService<T> dataSetRegistrationService, DataSetRegistrationTransaction<T> transaction, DataSetStorageAlgorithmRunner<T> algorithm, Throwable ex) @@ -655,6 +658,7 @@ public abstract class AbstractOmniscientTopLevelDataSetRegistrator<T extends Dat * <p> * Subclasses can override and implement their own handling logic. */ + @Override public void didCommitTransaction(DataSetRegistrationService<T> dataSetRegistrationService, DataSetRegistrationTransaction<T> transaction) { @@ -665,6 +669,7 @@ public abstract class AbstractOmniscientTopLevelDataSetRegistrator<T extends Dat * <p> * Subclasses can override and implement their own handling logic. */ + @Override public void didPreRegistration(DataSetRegistrationService<T> service, DataSetRegistrationContext.IHolder registrationContextHolder) { @@ -675,6 +680,7 @@ public abstract class AbstractOmniscientTopLevelDataSetRegistrator<T extends Dat * <p> * Subclasses can override and implement their own handling logic. */ + @Override public void didPostRegistration(DataSetRegistrationService<T> service, DataSetRegistrationContext.IHolder registrationContextHolder) { @@ -685,6 +691,7 @@ public abstract class AbstractOmniscientTopLevelDataSetRegistrator<T extends Dat * <p> * Subclasses can override and implement their own handling logic. */ + @Override public void didEncounterSecondaryTransactionErrors( DataSetRegistrationService<T> dataSetRegistrationService, DataSetRegistrationTransaction<T> transaction, diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/registrator/JavaV2TestcaseRegistrationContext.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/registrator/JavaV2TestcaseRegistrationContext.java index e08301fedf342504344273f294449fd6b6d70709..8d0fa4c59735aff110eb78e4c5a02b9b3f4b860a 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/registrator/JavaV2TestcaseRegistrationContext.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/registrator/JavaV2TestcaseRegistrationContext.java @@ -123,20 +123,22 @@ public class JavaV2TestcaseRegistrationContext implements IJavaDataSetRegistrati String name, String expected) { Object value = context.getPersistentMap().get(name); - if ((expected == null && expected != value) - || (expected != null && (false == expected.equals(value)))) + String expectedString = expected; + if ((expectedString == null && expectedString != value) + || (expectedString != null && (false == expectedString.equals(value)))) { - if (value != null && expected != null && value.getClass() != expected.getClass()) + if (value != null && expectedString != null + && value.getClass() != expectedString.getClass()) { value = String.format("%s:%s", value.getClass(), value); - expected = String.format("%s:%s", expected.getClass(), expected); + expectedString = String.format("%s:%s", expectedString.getClass(), expected); } try { jythonHookTestTool .log(String .format("transaction context failed.in %s the value of %s should have been '%s', but was '%s'", - caller, name, expected, value)); + caller, name, expectedString, value)); } catch (IOException ex) { throw CheckedExceptionTunnel.wrapIfNecessary(ex); diff --git a/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/OpenGettingStartedPageAction.java b/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/OpenGettingStartedPageAction.java index 71319a25afc8df42b4739f44d9392c56616e115d..40f1e356415ff6355ae0d5d3db55a8a54c259a75 100644 --- a/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/OpenGettingStartedPageAction.java +++ b/installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/OpenGettingStartedPageAction.java @@ -21,7 +21,6 @@ import java.io.File; import java.io.IOException; import com.izforge.izpack.api.data.AutomatedInstallData; -import com.izforge.izpack.api.data.Info; import com.izforge.izpack.api.data.PanelActionConfiguration; import com.izforge.izpack.api.handler.AbstractUIHandler; import com.izforge.izpack.data.PanelAction; diff --git a/openbis-common/source/java/ch/systemsx/cisd/openbis/common/conversation/annotation/Progress.java b/openbis-common/source/java/ch/systemsx/cisd/openbis/common/conversation/annotation/Progress.java index dcd935bd959d15a8fa3f4e39f0f4d9475f673326..85a0715efdb1176bad156161307a22ea5923994d 100644 --- a/openbis-common/source/java/ch/systemsx/cisd/openbis/common/conversation/annotation/Progress.java +++ b/openbis-common/source/java/ch/systemsx/cisd/openbis/common/conversation/annotation/Progress.java @@ -26,7 +26,7 @@ public enum Progress /** * Progress has to be reported by calling - * {@link ch.systemsx.cisd.common.conversation.progress.IServiceConversationProgressListener#update + * {@link ch.systemsx.cisd.openbis.common.conversation.progress.IServiceConversationProgressListener#update * IServiceConversationProgressListener.update} method. This option should be used when we know * how much progress has been made, e.g. we processed 12 out of 100 data sets. If the method * execution hangs the progress won't be reported and the conversation will time out. @@ -35,7 +35,7 @@ public enum Progress /** * A separate thread regularly sends progress information without a need of calling - * {@link ch.systemsx.cisd.common.conversation.progress.IServiceConversationProgressListener#update + * {@link ch.systemsx.cisd.openbis.common.conversation.progress.IServiceConversationProgressListener#update * IServiceConversationProgressListener.update} method. This option is useful for methods where * we don't have any information about the current progress (e.g. user defined Python script * execution) but we still want to notify the client that the processing is in progress and the diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeListDeletionConfirmationDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeListDeletionConfirmationDialog.java index bc852a19ae0b04180a7c19ee9f6f54715bf1c1d5..ccd971fb36af87d4df97f44def8b56432b4e1cf2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeListDeletionConfirmationDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeListDeletionConfirmationDialog.java @@ -33,8 +33,6 @@ public final class PropertyTypeListDeletionConfirmationDialog extends AbstractDataListPermanentDeletionConfirmationDialog<TableModelRowWithObject<PropertyType>> { - private final IViewContext<ICommonClientServiceAsync> viewContext; - public PropertyTypeListDeletionConfirmationDialog( IViewContext<ICommonClientServiceAsync> viewContext, List<TableModelRowWithObject<PropertyType>> propertyTypes, @@ -42,7 +40,6 @@ public final class PropertyTypeListDeletionConfirmationDialog extends { super(viewContext, propertyTypes, callback); this.setId("deletion-confirmation-dialog"); - this.viewContext = viewContext; } @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleListDeletionConfirmationDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleListDeletionConfirmationDialog.java index cc53c1fdaec584e7f2e7acce1df08fa254c88e60..8e26a6e3c7bcab086fa6acef43150d402b8a416b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleListDeletionConfirmationDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleListDeletionConfirmationDialog.java @@ -39,8 +39,6 @@ public final class SampleListDeletionConfirmationDialog<T extends IIdHolder> ext AbstractDataListDeletionConfirmationDialog<T> { - private final IViewContext<ICommonClientServiceAsync> viewContext; - private final DisplayedAndSelectedEntities<T> selectedAndDisplayedItemsOrNull; private final T singleDataOrNull; @@ -51,7 +49,6 @@ public final class SampleListDeletionConfirmationDialog<T extends IIdHolder> ext { super(viewContext, data, callback); this.withRadio(); - this.viewContext = viewContext; this.singleDataOrNull = null; this.selectedAndDisplayedItemsOrNull = selectedAndDisplayedItems; } @@ -61,7 +58,6 @@ public final class SampleListDeletionConfirmationDialog<T extends IIdHolder> ext AsyncCallback<Void> deletionCallback, T sample) { super(viewContext, data, deletionCallback); - this.viewContext = viewContext; this.singleDataOrNull = sample; this.selectedAndDisplayedItemsOrNull = null; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/ScriptGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/ScriptGrid.java index 2b69faa7009e7480856e62b2b0a9ca5c0bf9ae86..b6c8d98b09ab133504183ddc55ec137522461b6c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/ScriptGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/ScriptGrid.java @@ -251,14 +251,11 @@ public class ScriptGrid extends TypedTableGrid<Script> AbstractDataListPermanentDeletionConfirmationDialog<TableModelRowWithObject<Script>> { - private final IViewContext<ICommonClientServiceAsync> viewContext; - public ScriptListDeletionConfirmationDialog( IViewContext<ICommonClientServiceAsync> viewContext, List<TableModelRowWithObject<Script>> data, AbstractAsyncCallback<Void> callback) { super(viewContext, data, callback); - this.viewContext = viewContext; } @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/datasetlister/DataSetLister.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/datasetlister/DataSetLister.java index 187d21e19167929e75a94146c647b46fb59fcab7..5c54030338a62c03d837f1696097bbf124a70422 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/datasetlister/DataSetLister.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/datasetlister/DataSetLister.java @@ -56,8 +56,6 @@ public class DataSetLister implements IDataSetLister private IDataSetListingQuery query; - private PersonPE person; - public DataSetLister(IAuthorizationDAOFactory daoFactory, PersonPE person) { this(QueryTool.getQuery(DatabaseContextUtils.getConnection(daoFactory), @@ -75,7 +73,6 @@ public class DataSetLister implements IDataSetLister throw new IllegalArgumentException("Person was null"); } this.query = query; - this.person = person; } @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataPE.java index 2cf131ad936a514a36b45646c9999838c3ec72ac..801dee8af00304a9adb10a796d1c74bcf5e04534 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataPE.java @@ -419,7 +419,6 @@ public class DataPE extends AbstractIdAndCodeHolder<DataPE> implements } // used only by Hibernate Search - @SuppressWarnings("unused") @Transient @Field(index = Index.UN_TOKENIZED, store = Store.YES, name = SearchFieldConstants.SAMPLE_ID) private Long getSampleId() @@ -523,7 +522,6 @@ public class DataPE extends AbstractIdAndCodeHolder<DataPE> implements } // used only by Hibernate Search - @SuppressWarnings("unused") @Transient @Field(index = Index.UN_TOKENIZED, store = Store.YES, name = SearchFieldConstants.CONTAINER_ID) private Long getContainerId() @@ -632,7 +630,6 @@ public class DataPE extends AbstractIdAndCodeHolder<DataPE> implements } // used only by Hibernate Search - @SuppressWarnings("unused") @Transient @Field(index = Index.UN_TOKENIZED, store = Store.YES, name = SearchFieldConstants.EXPERIMENT_ID) private Long getExperimentId() @@ -815,7 +812,6 @@ public class DataPE extends AbstractIdAndCodeHolder<DataPE> implements this.deletion = deletion; } - @SuppressWarnings("unused") @ManyToMany(fetch = FetchType.LAZY) @Fetch(FetchMode.SUBSELECT) @JoinTable(name = TableNames.METAPROJECT_ASSIGNMENTS_VIEW, joinColumns = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataStoreServicePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataStoreServicePE.java index 8f3e2a3e7d29e2b368b3d1a82df1d3c8f7ed485f..8646f7ed9cf192e94979633dfe606564cf3ff95d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataStoreServicePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataStoreServicePE.java @@ -74,7 +74,6 @@ public class DataStoreServicePE implements Serializable // which types of datasets can be processed by this plugin? private Set<DataSetTypePE> datasetTypes; - @SuppressWarnings("unused") @Id @SequenceGenerator(name = SequenceNames.DATA_STORE_SERVICE_SEQUENCE, sequenceName = SequenceNames.DATA_STORE_SERVICE_SEQUENCE, allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.DATA_STORE_SERVICE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EventPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EventPE.java index 15bd66e019293c15d28ad9300e706d315b1c92ea..4b70ec81f2c64c81274b7824c5032ba6816b2850 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EventPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EventPE.java @@ -118,7 +118,6 @@ public class EventPE extends HibernateAbstractRegistrationHolder implements IIdH this.entityType = entityType; } - @SuppressWarnings("unused") @NotNull(message = ValidationMessages.IDENTIFIER_NOT_NULL_MESSAGE) @Column(name = ColumnNames.IDENTIFIERS) private String getIdentifiersInternal() diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentPE.java index d7e7bc32c2dbc6ef9f6e8d5f01b46862170826f6..aa52fae658bc11b25c923e13f79c97bedcf7b51e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentPE.java @@ -554,7 +554,6 @@ public class ExperimentPE extends AttachmentHolderPE implements this.permId = permId; } - @SuppressWarnings("unused") @ManyToMany(fetch = FetchType.LAZY) @Fetch(FetchMode.SUBSELECT) @JoinTable(name = TableNames.METAPROJECT_ASSIGNMENTS_VIEW, joinColumns = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialPE.java index 1936495bed142d350eaadcaaffd85f53a6db85aa..ac216f9baa04c82360aaf3e06b77112ac3c711b6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialPE.java @@ -382,7 +382,6 @@ public class MaterialPE implements IIdAndCodeHolder, Comparable<MaterialPE>, return createPermId(code, materialType.getCode()); } - @SuppressWarnings("unused") @ManyToMany(fetch = FetchType.LAZY) @Fetch(FetchMode.SUBSELECT) @JoinTable(name = TableNames.METAPROJECT_ASSIGNMENTS_VIEW, joinColumns = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePE.java index 23ca3bfe2e0482b3c200514f45f5d034441e5c96..fa8a25f4cdf915b85217d79f9492de04dd81968b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePE.java @@ -388,7 +388,6 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co } // used only by Hibernate Search - @SuppressWarnings("unused") @Transient @Field(index = Index.UN_TOKENIZED, store = Store.YES, name = SearchFieldConstants.CONTAINER_ID) private Long getContainerId() @@ -489,7 +488,6 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co } // used only by Hibernate Search - @SuppressWarnings("unused") @Transient @Field(index = Index.UN_TOKENIZED, store = Store.YES, name = SearchFieldConstants.EXPERIMENT_ID) private Long getExperimentId() @@ -527,7 +525,6 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co } // used only by Hibernate Search - @SuppressWarnings("unused") @Transient @Field(index = Index.TOKENIZED, store = Store.YES, name = SearchFieldConstants.CODE) private String getFullCode() @@ -812,7 +809,6 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co return map; } - @SuppressWarnings("unused") @ManyToMany(fetch = FetchType.LAZY) @Fetch(FetchMode.SUBSELECT) @JoinTable(name = TableNames.METAPROJECT_ASSIGNMENTS_VIEW, joinColumns = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryBrowserGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryBrowserGrid.java index 1ac4139fdca73f84fad3a37c8e90e67d25d307fb..65ef16ec674084d6db207da4a22437c766b647ae 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryBrowserGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryBrowserGrid.java @@ -70,7 +70,11 @@ public class QueryBrowserGrid extends TypedTableGrid<QueryExpression> List<TableModelRowWithObject<QueryExpression>> data, AbstractAsyncCallback<Void> callback) { - super(viewContext, data, viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.DELETE_CONFIRMATION_TITLE)); + super( + viewContext, + data, + viewContext + .getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.DELETE_CONFIRMATION_TITLE)); this.callback = callback; this.viewContext = viewContext; } @@ -108,6 +112,7 @@ public class QueryBrowserGrid extends TypedTableGrid<QueryExpression> return new DatabaseModificationAwareComponent(browser, browser); } + @SuppressWarnings("hiding") private final IViewContext<IQueryClientServiceAsync> viewContext; QueryBrowserGrid(IViewContext<IQueryClientServiceAsync> viewContext) @@ -136,7 +141,8 @@ public class QueryBrowserGrid extends TypedTableGrid<QueryExpression> addButton(addButton); final Button editButton = createSelectedItemButton( - viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.BUTTON_EDIT), + viewContext + .getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.BUTTON_EDIT), new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<QueryExpression>>>() { @Override @@ -153,7 +159,8 @@ public class QueryBrowserGrid extends TypedTableGrid<QueryExpression> }); addButton(editButton); Button deleteButton = - createSelectedItemsButton(viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.BUTTON_DELETE), + createSelectedItemsButton( + viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.BUTTON_DELETE), new AbstractCreateDialogListener() { @Override diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/CommonServerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/CommonServerTest.java index 6d034293708b88f0a71d71a9c7e3976529cb6424..629f3156846cb0fa17affd5a303a5645d769f871 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/CommonServerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/CommonServerTest.java @@ -190,12 +190,12 @@ public final class CommonServerTest extends AbstractServerTestCase @Test public void testLogout() { - final Session session = createSession(CommonTestUtils.USER_ID); + final Session mySession = createSession(CommonTestUtils.USER_ID); context.checking(new Expectations() { { allowing(sessionManager).getSession(SESSION_TOKEN); - will(returnValue(session)); + will(returnValue(mySession)); one(sessionManager).closeSession(SESSION_TOKEN); } }); @@ -209,13 +209,13 @@ public final class CommonServerTest extends AbstractServerTestCase { final String user = "user"; final String password = "password"; - final Session session = createSession(user); + final Session mySession = createSession(user); context.checking(new Expectations() { { // Artefact of our test code allowing(sessionManager).getSession(SESSION_TOKEN); - will(returnValue(session)); + will(returnValue(mySession)); one(sessionManager).tryToOpenSession(user, password); will(returnValue(null)); @@ -232,7 +232,7 @@ public final class CommonServerTest extends AbstractServerTestCase { final String user = "user"; final String password = "password"; - final Session session = createSession(user); + final Session mySession = createSession(user); final PersonPE systemPerson = createSystemUser(); final PersonPE person = createPersonWithRoleAssignmentsFromPrincipal(PRINCIPAL); context.checking(new Expectations() @@ -242,7 +242,7 @@ public final class CommonServerTest extends AbstractServerTestCase will(returnValue(SESSION_TOKEN)); allowing(sessionManager).getSession(SESSION_TOKEN); - will(returnValue(session)); + will(returnValue(mySession)); one(personDAO).listPersons(); will(returnValue(Arrays.asList(systemPerson))); // only 'system' in database @@ -279,7 +279,7 @@ public final class CommonServerTest extends AbstractServerTestCase { final String user = "user"; final String password = "password"; - final Session session = createSession(user); + final Session mySession = createSession(user); final PersonPE systemPerson = createSystemUser(); final PersonPE person = createPersonWithRoleAssignmentsFromPrincipal(PRINCIPAL); context.checking(new Expectations() @@ -289,7 +289,7 @@ public final class CommonServerTest extends AbstractServerTestCase will(returnValue(SESSION_TOKEN)); allowing(sessionManager).getSession(SESSION_TOKEN); - will(returnValue(session)); + will(returnValue(mySession)); one(personDAO).listPersons(); will(returnValue(Arrays.asList(systemPerson, person))); @@ -316,7 +316,7 @@ public final class CommonServerTest extends AbstractServerTestCase { final String user = "user"; final String password = "password"; - final Session session = createSession(user); + final Session mySession = createSession(user); final PersonPE person = createPersonWithRoleAssignmentsFromPrincipal(PRINCIPAL); context.checking(new Expectations() { @@ -325,13 +325,13 @@ public final class CommonServerTest extends AbstractServerTestCase will(returnValue(SESSION_TOKEN)); allowing(sessionManager).getSession(SESSION_TOKEN); - will(returnValue(session)); + will(returnValue(mySession)); one(personDAO).tryFindPersonByUserId(user); will(returnValue(person)); } }); - assertEquals(null, session.tryGetPerson()); + assertEquals(null, mySession.tryGetPerson()); final SessionContextDTO s = createServer().tryToAuthenticate(user, password); @@ -346,15 +346,15 @@ public final class CommonServerTest extends AbstractServerTestCase final DatabaseInstanceIdentifier identifier = DatabaseInstanceIdentifier.createHome(); final SpacePE g1 = CommonTestUtils.createSpace("g1", homeDatabaseInstance); final SpacePE g2 = CommonTestUtils.createSpace("g2", homeDatabaseInstance); - final Session session = createSession(CommonTestUtils.USER_ID); - session.setPerson(person); + final Session mySession = createSession(CommonTestUtils.USER_ID); + mySession.setPerson(person); person.setHomeSpace(g1); g1.setId(42L); context.checking(new Expectations() { { allowing(sessionManager).getSession(SESSION_TOKEN); - will(returnValue(session)); + will(returnValue(mySession)); one(groupDAO).listSpaces(homeDatabaseInstance); will(returnValue(Arrays.asList(g1, g2))); } @@ -1535,9 +1535,9 @@ public final class CommonServerTest extends AbstractServerTestCase { { allowing(sessionManager).getSession(SESSION_TOKEN); - Session session = createSession(CommonTestUtils.USER_ID); - session.setPerson(person); - will(returnValue(session)); + Session mySession = createSession(CommonTestUtils.USER_ID); + mySession.setPerson(person); + will(returnValue(mySession)); one(personDAO).updatePerson(person); } @@ -1593,9 +1593,9 @@ public final class CommonServerTest extends AbstractServerTestCase { { allowing(sessionManager).getSession(SESSION_TOKEN); - Session session = createSession(CommonTestUtils.USER_ID); - session.setPerson(person); - will(returnValue(session)); + Session mySession = createSession(CommonTestUtils.USER_ID); + mySession.setPerson(person); + will(returnValue(mySession)); one(groupDAO).getByTechId(groupId); will(returnValue(group)); @@ -1622,9 +1622,9 @@ public final class CommonServerTest extends AbstractServerTestCase { { allowing(sessionManager).getSession(SESSION_TOKEN); - Session session = createSession(CommonTestUtils.USER_ID); - session.setPerson(person); - will(returnValue(session)); + Session mySession = createSession(CommonTestUtils.USER_ID); + mySession.setPerson(person); + will(returnValue(mySession)); } }); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PropertyValidatorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PropertyValidatorTest.java index ef07c94e8a52b93b2de67fbf7b7590446d6e00cc..c62f13f35630f98d4e9d85393ee7ff8595c475ad 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PropertyValidatorTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PropertyValidatorTest.java @@ -27,13 +27,13 @@ import org.testng.annotations.Test; import ch.rinn.restrictions.Friend; import ch.systemsx.cisd.common.exception.UserFailureException; import ch.systemsx.cisd.openbis.generic.server.dataaccess.PropertyValidator; -import ch.systemsx.cisd.openbis.generic.shared.util.SimplePropertyValidator.SupportedDatePattern; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataTypeCode; import ch.systemsx.cisd.openbis.generic.shared.dto.DataTypePE; import ch.systemsx.cisd.openbis.generic.shared.dto.MaterialTypePE; import ch.systemsx.cisd.openbis.generic.shared.dto.PropertyTypePE; import ch.systemsx.cisd.openbis.generic.shared.dto.VocabularyPE; import ch.systemsx.cisd.openbis.generic.shared.dto.VocabularyTermPE; +import ch.systemsx.cisd.openbis.generic.shared.util.SimplePropertyValidator.SupportedDatePattern; import ch.systemsx.cisd.openbis.generic.shared.util.XmlUtilsTest; /** @@ -104,41 +104,39 @@ public final class PropertyValidatorTest extends AbstractBOTest return propertyType; } - @SuppressWarnings("unused") @DataProvider private final static Object[][] getNonWorkingValues() { return new Object[][] { - { createTimestampPropertyType(), DateFormatUtils.format(new Date(), "yyyy") }, - { createIntegerPropertyType(), "a" }, - { createIntegerPropertyType(), "1.1" }, - { createRealPropertyType(), "b" }, - { createBooleanPropertyType(), "BOB" }, }; + { createTimestampPropertyType(), DateFormatUtils.format(new Date(), "yyyy") }, + { createIntegerPropertyType(), "a" }, + { createIntegerPropertyType(), "1.1" }, + { createRealPropertyType(), "b" }, + { createBooleanPropertyType(), "BOB" }, }; } - @SuppressWarnings("unused") @DataProvider private final static Object[][] getWorkingValues() { return new Object[][] { - { createVarcharPropertyType(), "" }, - { createVarcharPropertyType(), "varchar" }, - { - createTimestampPropertyType(), - DateFormatUtils.format(new Date(), - SupportedDatePattern.CANONICAL_DATE_PATTERN.getPattern()) }, - { - createTimestampPropertyType(), - DateFormatUtils.format(new Date(), - SupportedDatePattern.US_DATE_TIME_24_PATTERN.getPattern()) }, - { createIntegerPropertyType(), "1" }, - { createRealPropertyType(), "1" }, - { createRealPropertyType(), "1.1" }, - { createBooleanPropertyType(), "yes" }, - { createBooleanPropertyType(), "1" }, - { createBooleanPropertyType(), "true" } }; + { createVarcharPropertyType(), "" }, + { createVarcharPropertyType(), "varchar" }, + { + createTimestampPropertyType(), + DateFormatUtils.format(new Date(), + SupportedDatePattern.CANONICAL_DATE_PATTERN.getPattern()) }, + { + createTimestampPropertyType(), + DateFormatUtils.format(new Date(), + SupportedDatePattern.US_DATE_TIME_24_PATTERN.getPattern()) }, + { createIntegerPropertyType(), "1" }, + { createRealPropertyType(), "1" }, + { createRealPropertyType(), "1.1" }, + { createBooleanPropertyType(), "yes" }, + { createBooleanPropertyType(), "1" }, + { createBooleanPropertyType(), "true" } }; } @Test diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ScriptBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ScriptBOTest.java index e987fc8d70f293d566bf601a7f8e6ba57aca5d3b..07f50bb492cbba73484659e31ed0bf2f0050a292 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ScriptBOTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ScriptBOTest.java @@ -45,24 +45,23 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.properties.EntityKind; public final class ScriptBOTest extends AbstractBOTest { - @SuppressWarnings("unused") @DataProvider private final static Object[][] scriptTypes() { return new Object[][] { - { - ScriptType.DYNAMIC_PROPERTY, - "Error evaluating '1+': SyntaxError: " - + "(\"no viable alternative at input ')'\", " - + "('expression: 1+', 1, 14, '__result__=(1+)\\n'))" }, - { - ScriptType.MANAGED_PROPERTY, - "SyntaxError: (\"no viable alternative at input '\\\\n\\\\n'\", " - + "('<string>', 1, 2, '1+\\n'))" } - - }; - } + { + ScriptType.DYNAMIC_PROPERTY, + "Error evaluating '1+': SyntaxError: " + + "(\"no viable alternative at input ')'\", " + + "('expression: 1+', 1, 14, '__result__=(1+)\\n'))" }, + { + ScriptType.MANAGED_PROPERTY, + "SyntaxError: (\"no viable alternative at input '\\\\n\\\\n'\", " + + "('<string>', 1, 2, '1+\\n'))" } + + }; +} private static final String SCRIPT = "1+1"; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityPropertyTypeDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityPropertyTypeDAOTest.java index 4b7d0d6a7500c11cf43c1e4a60c19c2af0e88062..8139a04376596d95a6667f2fcc622b174ab250f3 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityPropertyTypeDAOTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityPropertyTypeDAOTest.java @@ -168,25 +168,23 @@ public class EntityPropertyTypeDAOTest extends AbstractDAOTest return assignment; } - @SuppressWarnings("unused") @DataProvider private final static Object[][] entityKindsWithEntityTypeAndPropertyTypeMandatory() { return new Object[][] { - { EntityKind.EXPERIMENT, "SIRNA_HCS", "DESCRIPTION" }, - { EntityKind.SAMPLE, "CONTROL_LAYOUT", "$PLATE_GEOMETRY" }, - { EntityKind.MATERIAL, "BACTERIUM", "DESCRIPTION" } }; + { EntityKind.EXPERIMENT, "SIRNA_HCS", "DESCRIPTION" }, + { EntityKind.SAMPLE, "CONTROL_LAYOUT", "$PLATE_GEOMETRY" }, + { EntityKind.MATERIAL, "BACTERIUM", "DESCRIPTION" } }; } - @SuppressWarnings("unused") @DataProvider private final static Object[][] entityKindsWithEntityTypeAndPropertyTypeNotAssigned() { return new Object[][] { - { EntityKind.EXPERIMENT, "SIRNA_HCS", "IS_VALID" }, - { EntityKind.SAMPLE, "CONTROL_LAYOUT", "IS_VALID" }, - { EntityKind.MATERIAL, "BACTERIUM", "IS_VALID" }, }; + { EntityKind.EXPERIMENT, "SIRNA_HCS", "IS_VALID" }, + { EntityKind.SAMPLE, "CONTROL_LAYOUT", "IS_VALID" }, + { EntityKind.MATERIAL, "BACTERIUM", "IS_VALID" }, }; } } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ExperimentDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ExperimentDAOTest.java index e3b82e7f93bb9d0d905b628cf80dff174d26f3ab..18568fee2e5b60e7936d2a352d6a1fef1aca5975 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ExperimentDAOTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ExperimentDAOTest.java @@ -620,16 +620,15 @@ public class ExperimentDAOTest extends AbstractDAOTest assertEquals(e1.getRegistrationDate(), e2.getRegistrationDate()); } - @SuppressWarnings("unused") @DataProvider private final static Object[][] illegalCodesProvider() { return new Object[][] { - { EXCEED_CODE_LENGTH_CHARACTERS }, - { "" }, - { null }, - { "@XPERIMENT" }, }; + { EXCEED_CODE_LENGTH_CHARACTERS }, + { "" }, + { null }, + { "@XPERIMENT" }, }; } @Test diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAOTest.java index 78e7fc85f101c4a6b88fd017a4d5bfe5f0513683..c6dc42be7f13587958df055530cfae07fdc6a810 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAOTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAOTest.java @@ -79,15 +79,14 @@ public final class HibernateSearchDAOTest extends AbstractDAOTest private static final String FILE_TYPE_XML = "XML"; - @SuppressWarnings("unused") @DataProvider(name = "registratorTerm") private final static Object[][] getRegistratorTerm() { return new Object[][] { - { "john" }, - { "Jo?n" }, - { "*ohn" } }; + { "john" }, + { "Jo?n" }, + { "*ohn" } }; } @Test @@ -143,8 +142,8 @@ public final class HibernateSearchDAOTest extends AbstractDAOTest { return new Object[][] { - { "exp-*", "exp-", true }, - { "exp-", "exp-", false } }; + { "exp-*", "exp-", true }, + { "exp-", "exp-", false } }; } @Test(dataProvider = "experimentQueriestAndModeToTest") diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PropertyTypeDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PropertyTypeDAOTest.java index 93738b145e04266c0b95e4ed5a6dc43e238bcc93..ec30456c793799d2ef620017ae24d01aca84aedd 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PropertyTypeDAOTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PropertyTypeDAOTest.java @@ -111,17 +111,16 @@ public final class PropertyTypeDAOTest extends AbstractDAOTest assertNotNull(propertyTypeDAO.getDataTypeByCode(DataTypeCode.INTEGER)); } - @SuppressWarnings("unused") @DataProvider private final Object[][] getEntityDataType() { return new Object[][] { - { DataTypeCode.BOOLEAN }, - { DataTypeCode.INTEGER }, - { DataTypeCode.REAL }, - { DataTypeCode.TIMESTAMP }, - { DataTypeCode.VARCHAR }, }; + { DataTypeCode.BOOLEAN }, + { DataTypeCode.INTEGER }, + { DataTypeCode.REAL }, + { DataTypeCode.TIMESTAMP }, + { DataTypeCode.VARCHAR }, }; } @Test(dataProvider = "getEntityDataType") diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ScriptDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ScriptDAOTest.java index 2879d7051e2f797f7e0d2261121c531a1c4838aa..0c80c371620bf7ded22463155d109eabb0aa68a2 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ScriptDAOTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ScriptDAOTest.java @@ -43,17 +43,16 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE; public final class ScriptDAOTest extends AbstractDAOTest { - @SuppressWarnings("unused") @DataProvider private final static Object[][] scriptTypes() { return new Object[][] { - { ScriptType.DYNAMIC_PROPERTY }, - { ScriptType.MANAGED_PROPERTY } + { ScriptType.DYNAMIC_PROPERTY }, + { ScriptType.MANAGED_PROPERTY } - }; - } + }; +} private static final String DESCRIPTION = "desc"; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/IndexingQueryOptimizerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/IndexingQueryOptimizerTest.java index 3b94d46d1bca9cacba1a3ec31e70554c67d5985d..bffebf8ce94d801eda9596fce4264ea745dece6b 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/IndexingQueryOptimizerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/IndexingQueryOptimizerTest.java @@ -67,7 +67,6 @@ public class IndexingQueryOptimizerTest class Entity { - @SuppressWarnings("unused") @ManyToOne(fetch = FetchType.EAGER) public Object getContent() { @@ -95,7 +94,6 @@ public class IndexingQueryOptimizerTest class OuterContent { - @SuppressWarnings("unused") @IndexedEmbedded public InnerContent getInnerContent() { @@ -105,7 +103,6 @@ public class IndexingQueryOptimizerTest class Entity { - @SuppressWarnings("unused") @IndexedEmbedded public OuterContent getContent() { @@ -129,56 +126,48 @@ public class IndexingQueryOptimizerTest final class LazyEagerEntity { - @SuppressWarnings("unused") @OneToOne(fetch = FetchType.LAZY) public Object getOneToOneLazily() { return null; } - @SuppressWarnings("unused") @OneToOne(fetch = FetchType.EAGER) public Object getOneToOneEagerly() { return null; } - @SuppressWarnings("unused") @OneToMany(fetch = FetchType.LAZY) public Object getOneToManyLazily() { return null; } - @SuppressWarnings("unused") @OneToMany(fetch = FetchType.EAGER) public Object getOneToManyEagerly() { return null; } - @SuppressWarnings("unused") @ManyToOne(fetch = FetchType.LAZY) public Object getManyToOneLazily() { return null; } - @SuppressWarnings("unused") @ManyToOne(fetch = FetchType.EAGER) public Object getManyToOneEagerly() { return null; } - @SuppressWarnings("unused") @ManyToMany(fetch = FetchType.LAZY) public Object getManyToManyLazily() { return null; } - @SuppressWarnings("unused") @ManyToMany(fetch = FetchType.EAGER) public Object getManyToManyEagerly() { @@ -206,21 +195,18 @@ public class IndexingQueryOptimizerTest final class NonPublicEntity { - @SuppressWarnings("unused") @OneToOne(fetch = FetchType.EAGER) protected Object getProtected() { return null; } - @SuppressWarnings("unused") @ManyToOne(fetch = FetchType.EAGER) Object getPackageProtected() { return null; } - @SuppressWarnings("unused") @IndexedEmbedded private Object getPrivate() { @@ -277,14 +263,12 @@ public class IndexingQueryOptimizerTest { final class RecursiveEntity { - @SuppressWarnings("unused") @IndexedEmbedded public RecursiveEntity getSelf() { return null; } - @SuppressWarnings("unused") @IndexedEmbedded public Object getSome() { @@ -307,7 +291,6 @@ public class IndexingQueryOptimizerTest class Super { - @SuppressWarnings("unused") @IndexedEmbedded public Object getObject() { @@ -317,7 +300,6 @@ public class IndexingQueryOptimizerTest class Derived extends Super { - @SuppressWarnings("unused") @IndexedEmbedded public Object getAnotherObject() { @@ -341,7 +323,6 @@ public class IndexingQueryOptimizerTest { class AnotherEntity { - @SuppressWarnings("unused") @IndexedEmbedded public Object getValue() { @@ -350,7 +331,6 @@ public class IndexingQueryOptimizerTest } class Entity { - @SuppressWarnings("unused") @IndexedEmbedded public Set<AnotherEntity> getSet() { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/util/SimpleDateRendererTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/util/SimpleDateRendererTest.java index e8fb191a67993d40660e5cb36dfb23b0f6639d73..50e4856adbede723899975216a05dc1d093f0141 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/util/SimpleDateRendererTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/util/SimpleDateRendererTest.java @@ -34,15 +34,14 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.SimpleDateRenderer; */ public class SimpleDateRendererTest extends AssertJUnit { - @SuppressWarnings("unused") @DataProvider(name = "dates") private Object[][] getDates() { return new Object[][] { - { toDate(1991, 12, 3, 3, 13, 59, "CET"), "1991-12-03 03:13:59 GMT+01:00" }, - { toDate(2008, 12, 6, 15, 35, 17, "CET"), "2008-12-06 15:35:17 GMT+01:00" }, - { toDate(2008, 7, 31, 1, 2, 3, "CET"), "2008-07-31 01:02:03 GMT+02:00" } }; + { toDate(1991, 12, 3, 3, 13, 59, "CET"), "1991-12-03 03:13:59 GMT+01:00" }, + { toDate(2008, 12, 6, 15, 35, 17, "CET"), "2008-12-06 15:35:17 GMT+01:00" }, + { toDate(2008, 7, 31, 1, 2, 3, "CET"), "2008-07-31 01:02:03 GMT+02:00" } }; } @Test(dataProvider = "dates") @@ -51,7 +50,7 @@ public class SimpleDateRendererTest extends AssertJUnit String renderDate = SimpleDateRenderer.renderDate(date); assertEquals(formattedDate, renderDate); } - + @Test public void testDateRendererForNullArgument() { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/parser/NewSampleParserObjectFactoryTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/parser/NewSampleParserObjectFactoryTest.java index ed80876c42cd7ff18d6d6219a6a00150132f25b8..bd98454124a5a7c78eef7eb452a54f8e2b2de8ab 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/parser/NewSampleParserObjectFactoryTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/parser/NewSampleParserObjectFactoryTest.java @@ -93,35 +93,33 @@ public final class NewSampleParserObjectFactoryTest } } - @SuppressWarnings("unused") @DataProvider private final static Object[][] getLineTokensForAutoGeneratedCodes() { return new Object[][] { - { new String[] - { "", "" }, 0 }, - { new String[] - { null, null }, 0 }, - { new String[] - { "1", "hello" }, 2 }, - - }; - } + { new String[] + { "", "" }, 0 }, + { new String[] + { null, null }, 0 }, + { new String[] + { "1", "hello" }, 2 }, + + }; +} - @SuppressWarnings("unused") @DataProvider private final static Object[][] getLineTokens() { return new Object[][] { - { new String[] - { "", "", "", "", "", "" }, 0 }, - { new String[] - { "ignoreMe", "id1", "cont1", "par1", "1", "hello" }, 2 }, + { new String[] + { "", "", "", "", "", "" }, 0 }, + { new String[] + { "ignoreMe", "id1", "cont1", "par1", "1", "hello" }, 2 }, - }; - } + }; +} @Test(dataProvider = "getLineTokens") public final void testFailCreateObjectForAutoGeneratedCodesWithIdentifierSpecified( diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/parser/UpdatedSampleParserObjectFactoryTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/parser/UpdatedSampleParserObjectFactoryTest.java index cf8ef8e11b4f4bfcff3e7fe8a8f4f3fa53edeb96..f15efeb94e4c3d1f65dcc42edb81ae034468c359 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/parser/UpdatedSampleParserObjectFactoryTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/parser/UpdatedSampleParserObjectFactoryTest.java @@ -65,24 +65,23 @@ public final class UpdatedSampleParserObjectFactoryTest return propertyMapper; } - @SuppressWarnings("unused") @DataProvider private final static Object[][] getLineTokens() { return new Object[][] { - { new String[] - { "", "", "", "" }, 0, 0 }, - { new String[] - { "id1", "cont1", "1", "hello" }, 2, 2 }, - { new String[] - { "id1", "", "1", "" }, 1, 1 }, - { new String[] - { "", "cont1", "", "hello" }, 1, 1 }, - { new String[] - { "id1", "cont1", "--DELETE--", "__DELETE__" }, 0, 2 }, - { new String[] - { "__DELETE__", "--DELETE--", "--DELETE--", "hello" }, 1, 2 } }; + { new String[] + { "", "", "", "" }, 0, 0 }, + { new String[] + { "id1", "cont1", "1", "hello" }, 2, 2 }, + { new String[] + { "id1", "", "1", "" }, 1, 1 }, + { new String[] + { "", "cont1", "", "hello" }, 1, 1 }, + { new String[] + { "id1", "cont1", "--DELETE--", "__DELETE__" }, 0, 2 }, + { new String[] + { "__DELETE__", "--DELETE--", "--DELETE--", "hello" }, 1, 2 } }; } @Test(dataProvider = "getLineTokens") diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/GenericSystemTestCase.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/GenericSystemTestCase.java index 2039f990fe757665ff0b55773f16120ee6b55b79..eef627556d4dfdf082db7145059839204af7b123 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/GenericSystemTestCase.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/GenericSystemTestCase.java @@ -30,18 +30,18 @@ import ch.systemsx.cisd.openbis.plugin.generic.shared.IGenericServer; import ch.systemsx.cisd.openbis.systemtest.SystemTestCase; /** - * - * * @author Franz-Josef Elmer */ public class GenericSystemTestCase extends SystemTestCase { + @SuppressWarnings("hiding") @Autowired protected IGenericClientService genericClientService; - + + @SuppressWarnings("hiding") @Autowired protected IGenericServer genericServer; - + protected void addMultiPartFile(String sessionAttributeKey, String fileName, byte[] data) { HttpSession session = request.getSession(); diff --git a/openbis_all/source/java/TransferAuthorizationAnnotations.java b/openbis_all/source/java/TransferAuthorizationAnnotations.java index 2483347da9408a2cd51da643e0a97400de65e791..cf10d7ebec77272d76ee807a90b2ef07a83d2709 100644 --- a/openbis_all/source/java/TransferAuthorizationAnnotations.java +++ b/openbis_all/source/java/TransferAuthorizationAnnotations.java @@ -98,12 +98,16 @@ public class TransferAuthorizationAnnotations void addMethodSignatureLine(String line) { + final String methodSignatureLine; if (line.lastIndexOf(';') >= 0) { - line = line.substring(0, line.lastIndexOf(';')); + methodSignatureLine = line.substring(0, line.lastIndexOf(';')); + } else + { + methodSignatureLine = line; } - signatureLines.add(line); - joinedSignatureLines += line.trim(); + signatureLines.add(methodSignatureLine); + joinedSignatureLines += methodSignatureLine.trim(); } String getSignature() diff --git a/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/etlserver/proteomics/ResultDataSetUploaderTest.java b/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/etlserver/proteomics/ResultDataSetUploaderTest.java index f67522ca11e8655efce4cdf265ea10c2c6bc2aab..f2476642689d35a6f2944b063ad4238a5677b3c2 100644 --- a/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/etlserver/proteomics/ResultDataSetUploaderTest.java +++ b/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/etlserver/proteomics/ResultDataSetUploaderTest.java @@ -38,9 +38,6 @@ import ch.systemsx.cisd.common.exception.UserFailureException; import ch.systemsx.cisd.common.test.AssertionUtil; import ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService; import ch.systemsx.cisd.openbis.dss.generic.shared.dto.DataSetInformation; -import ch.systemsx.cisd.openbis.etlserver.proteomics.IProtDAO; -import ch.systemsx.cisd.openbis.etlserver.proteomics.ProteinDescription; -import ch.systemsx.cisd.openbis.etlserver.proteomics.ResultDataSetUploader; import ch.systemsx.cisd.openbis.etlserver.proteomics.dto.AminoAcidMass; import ch.systemsx.cisd.openbis.etlserver.proteomics.dto.AnnotatedProtein; import ch.systemsx.cisd.openbis.etlserver.proteomics.dto.DataSet; @@ -64,7 +61,6 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewSample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Space; import ch.systemsx.cisd.openbis.generic.shared.dto.ListSamplesByPropertyCriteria; import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifier; -import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SpaceIdentifier; import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleIdentifier; import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SpaceIdentifier; import ch.systemsx.cisd.openbis.plugin.proteomics.shared.basic.CommonConstants; diff --git a/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/proteomics/server/api/v1/ProteomicsDataServiceTest.java b/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/proteomics/server/api/v1/ProteomicsDataServiceTest.java index 02f30261ee5d2ce7491db47dc17cc469ce71a731..5196e4e359404e00db870100717e5dd930ce0039 100644 --- a/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/proteomics/server/api/v1/ProteomicsDataServiceTest.java +++ b/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/proteomics/server/api/v1/ProteomicsDataServiceTest.java @@ -369,17 +369,17 @@ public class ProteomicsDataServiceTest extends AbstractServerTestCase context.assertIsSatisfied(); } - private void prepareLoginLogout(final SessionContextDTO session) + private void prepareLoginLogout(final SessionContextDTO mySession) { context.checking(new Expectations() { { one(internalService).tryToAuthenticate("abc", "dummy-password"); - will(returnValue(session)); + will(returnValue(mySession)); - if (session != null) + if (mySession != null) { - one(internalService).logout(session.getSessionToken()); + one(internalService).logout(mySession.getSessionToken()); } } }); diff --git a/screening/source/java/ch/systemsx/cisd/openbis/dss/screening/server/plugins/jython/ScreeningJythonIngestionService.java b/screening/source/java/ch/systemsx/cisd/openbis/dss/screening/server/plugins/jython/ScreeningJythonIngestionService.java index 7090932f0697d1b204742caa8c837beca1efc57e..9e89cf55c41244968bdebc72e14b08b107feb5af 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/dss/screening/server/plugins/jython/ScreeningJythonIngestionService.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/dss/screening/server/plugins/jython/ScreeningJythonIngestionService.java @@ -69,8 +69,8 @@ public class ScreeningJythonIngestionService extends JythonIngestionService NoOpDelegate delegate) { IDataSetRegistrationDetailsFactory<DataSetInformation> registrationDetailsFactory = - (IDataSetRegistrationDetailsFactory<DataSetInformation>) new JythonPlateDatasetFactory( - getRegistratorState(), null); + new JythonPlateDatasetFactory( + getRegistratorState(), null); DataSetRegistrationService<DataSetInformation> service = new DataSetRegistrationService<DataSetInformation>(this, incoming, diff --git a/screening/sourceTest/java/ch/systemsx/cisd/openbis/screening/systemtests/JsonAnnotationTest.java b/screening/sourceTest/java/ch/systemsx/cisd/openbis/screening/systemtests/JsonAnnotationTest.java index ff4282d51fc9f3610e18c088fd4da6df968d1122..2db9fa9cbf011e546ee9d71df873b21c18184e8f 100644 --- a/screening/sourceTest/java/ch/systemsx/cisd/openbis/screening/systemtests/JsonAnnotationTest.java +++ b/screening/sourceTest/java/ch/systemsx/cisd/openbis/screening/systemtests/JsonAnnotationTest.java @@ -61,7 +61,6 @@ public class JsonAnnotationTest new HashMap<String, Collection<Class<?>>>(); // Used by TestNG - @SuppressWarnings("unused") @BeforeClass private void findAllClassesUsedByJsonRpcApi() {