[exo-jcr-commits] exo-jcr SVN: r5360 - in jcr/trunk: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core and 9 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Dec 27 02:28:28 EST 2011
Author: andrew.plotnikov
Date: 2011-12-27 02:28:24 -0500 (Tue, 27 Dec 2011)
New Revision: 5360
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/ObjectReaderImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/version/VersionHistoryDataHelper.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/DeleteValues.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/VersionHistoryRemover.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/StringNumberParser.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavConst.java
Log:
EXOJCR-1687: Fixed new sonar violations in project
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java 2011-12-26 15:36:07 UTC (rev 5359)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java 2011-12-27 07:28:24 UTC (rev 5360)
@@ -166,8 +166,6 @@
}
catch (Throwable t)
{
- //TODO will be implemented unregistration in managerStartChanges
- //managerStartChanges.removeListeners(repositoryContainer);
repositoryContainers.remove(rEntry.getName());
throw new RepositoryConfigurationException("Repository container " + rEntry.getName() + " was not started.",
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2011-12-26 15:36:07 UTC (rev 5359)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2011-12-27 07:28:24 UTC (rev 5360)
@@ -1340,8 +1340,6 @@
}
}
- // TODO: review. Won't work if renamed states for descendants are not fired
- // Node will be only updated with the same NodeData with same outdated path
void reloadPool(ItemData fromItem) throws RepositoryException
{
Collection<ItemImpl> pooledItems = itemsPool.getAll();
@@ -1536,11 +1534,6 @@
ItemState vhState = changesLog.getItemState(vhID);
if (vhState != null && vhState.isDeleted())
{
- // [PN] TODO check why we here if VH already isn't exists.
- // usecase: child version remove when child versionable node is located
- // as child
- // of its containing history versionable node.
- // We may check this case in ChildVersionRemoveVisitor.
return;
}
@@ -1646,10 +1639,6 @@
ItemState reindexedState = ItemState.createUpdatedState(reindexed);
changes.add(reindexedState);
- // reload pooled implies... it's actual for session and workspace scope
- // operations
- // TODO this operation must respect all sub-tree of reindexed node
- // http://jira.exoplatform.org/browse/JCR-340
itemsPool.reload(reindexed);
// next...
@@ -1788,8 +1777,6 @@
public List<PropertyData> getReferencesData(String identifier, boolean skipVersionStorage)
throws RepositoryException
{
- // simple locate now
- // TODO list copy?
List<PropertyData> persisted = transactionableManager.getReferencesData(identifier, skipVersionStorage);
List<PropertyData> sessionTransient = new ArrayList<PropertyData>();
for (PropertyData p : persisted)
@@ -2627,8 +2614,6 @@
}
else
{
- // TODO if (changesLog.get) check if DELETED!!
-
item = itemFactory.createItem(newData, parent);
items.put(item.getInternalIdentifier(), new WeakReference<ItemImpl>(item));
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java 2011-12-26 15:36:07 UTC (rev 5359)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java 2011-12-27 07:28:24 UTC (rev 5360)
@@ -93,9 +93,6 @@
*/
public static final int DEF_BLOCKING_USERS_COUNT = 0;
- /**
- * TODO remove it
- */
public static final String DEEP_DELETE_PARAMETER_NAME = "deep-delete";
/**
@@ -1104,9 +1101,7 @@
public void addChildProperties(final NodeData parentData, final List<PropertyData> childItems)
{
if (enabled && parentData != null && childItems != null)
- { // TODO don't check parentData !=
- // null && childItems != null
-
+ {
String logInfo = null;
if (LOG.isDebugEnabled())
{
@@ -1170,9 +1165,7 @@
public void addChildPropertiesList(final NodeData parentData, final List<PropertyData> childItems)
{
if (enabled && parentData != null && childItems != null)
- { // TODO don't check parentData !=
- // null && childItems != null
-
+ {
String logInfo = null;
if (LOG.isDebugEnabled())
{
@@ -1223,9 +1216,7 @@
public void addChildNodes(final NodeData parentData, final List<NodeData> childItems)
{
if (enabled && parentData != null && childItems != null)
- { // TODO don't check parentData !=
- // null && childItems != null
-
+ {
String logInfo = null;
if (LOG.isDebugEnabled())
{
@@ -1736,10 +1727,6 @@
*/
public void setMaxSize(int maxSize)
{
- // TODO not supported now, but it's possible as an option
- // e.g. we will create new cache instance with new size and fill it with
- // current cache size.
- // it's fully synchronized operation, i.e. method
LOG.warn("setMaxSize not supported now");
}
@@ -1968,9 +1955,7 @@
}
else if (item.getQPath().getName().equals(Constants.EXO_PERMISSIONS))
{
- // TODO EXOJCR-12 place to put workaround for JCR cache exo:permissions updated
// get parent Node
-
// check if parent is mix:privilegeable
ItemData parent = get(item.getParentIdentifier());
// delete parent
@@ -2138,19 +2123,16 @@
public void beginTransaction()
{
- // TODO Auto-generated method stub
}
public void commitTransaction()
{
- // TODO Auto-generated method stub
}
public void rollbackTransaction()
{
- // TODO Auto-generated method stub
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/ObjectReaderImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/ObjectReaderImpl.java 2011-12-26 15:36:07 UTC (rev 5359)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/ObjectReaderImpl.java 2011-12-27 07:28:24 UTC (rev 5360)
@@ -119,10 +119,8 @@
{
if (true)
throw new IOException("Not implemented");
- // TODO this is not a workable code due to buffered stream reads!!!
boolean recreateBuffer = true;
- // TODO use FileChannel for buffered read???
try
{
if (fileIn != null && stream instanceof FileOutputStream)
@@ -171,11 +169,6 @@
}
}
- // TODO can be useful to flag read
- // public byte readByte() throws IOException {
- // return (byte)in.read();
- // }
-
/**
* {@inheritDoc}
*/
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java 2011-12-26 15:36:07 UTC (rev 5359)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java 2011-12-27 07:28:24 UTC (rev 5360)
@@ -129,7 +129,7 @@
}
else
{
- sf.acquire(this); // TODO workaround for AsyncReplication test
+ sf.acquire(this); // workaround for AsyncReplication test
try
{
AbstractPersistedValueData vd = new StreamPersistedValueData(orderNumber, sf);
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/version/VersionHistoryDataHelper.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/version/VersionHistoryDataHelper.java 2011-12-26 15:36:07 UTC (rev 5359)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/version/VersionHistoryDataHelper.java 2011-12-27 07:28:24 UTC (rev 5360)
@@ -308,11 +308,7 @@
TransientPropertyData.createPropertyData(rootVersionData, Constants.JCR_MIXINTYPES, PropertyType.NAME, true,
new TransientValueData(Constants.MIX_REFERENCEABLE));
- // jcr:created
- // TODO Current time source was
- // rvCreated.setValue(new
- // TransientValueData(dataManager.getTransactManager().getStorageDataManager
- // ().getCurrentTime()));
+ // jcr:created
TransientPropertyData rvCreated =
TransientPropertyData.createPropertyData(rootVersionData, Constants.JCR_CREATED, PropertyType.DATE, false,
new TransientValueData(Calendar.getInstance()));
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java 2011-12-26 15:36:07 UTC (rev 5359)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java 2011-12-27 07:28:24 UTC (rev 5360)
@@ -66,7 +66,6 @@
if ("MySQL".equals(databaseName))
{
- // TODO doesn't detect MySQL_UTF8
return DBConstants.DB_DIALECT_MYSQL;
}
@@ -97,24 +96,16 @@
if (databaseName.startsWith("Adaptive Server Anywhere"))
{
- // TODO not implemented anything special for
return DBConstants.DB_DIALECT_SYBASE;
}
- // TODO Informix not supported now
- //if ( "Informix Dynamic Server".equals( databaseName ) ) {
- // return new InformixDialect();
- //}
-
if (databaseName.startsWith("DB2/"))
{
- // TODO doesn't detect DB2 v8
return DBConstants.DB_DIALECT_DB2;
}
if ("Oracle".equals(databaseName))
{
- // TODO doesn't detect Oracle OCI (experimental support still)
return DBConstants.DB_DIALECT_ORACLE;
// int databaseMajorVersion = metaData.getDatabaseMajorVersion();
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/DeleteValues.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/DeleteValues.java 2011-12-26 15:36:07 UTC (rev 5359)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/DeleteValues.java 2011-12-27 07:28:24 UTC (rev 5360)
@@ -101,7 +101,7 @@
for (File f : files)
{
if (!f.delete())
- // TODO possible place of error: FileNotFoundException when we delete/update existing
+ // Possible place of error: FileNotFoundException when we delete/update existing
// Value and then add/update again.
// After the time the Cleaner will delete the file which is mapped to the Value.
// Don't use cleaner! Care about transaction-style files isolation per-user etc.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/VersionHistoryRemover.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/VersionHistoryRemover.java 2011-12-26 15:36:07 UTC (rev 5359)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/VersionHistoryRemover.java 2011-12-27 07:28:24 UTC (rev 5360)
@@ -153,12 +153,9 @@
vhState = state;
}
if (vhState != null && vhState.isDeleted())
- // [PN] TODO check why we here if VH already isn't exists.
- // usecase: child version remove when child versionable node is located
- // as child
- // of its containing history versionable node.
- // We may check this case in ChildVersionRemoveVisitor.
+ {
return;
+ }
throw new RepositoryException("Version history is not found. UUID: " + vhID
+ ". Context item (ancestor to save) " + ancestorToSave.getAsString());
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/StringNumberParser.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/StringNumberParser.java 2011-12-26 15:36:07 UTC (rev 5359)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/StringNumberParser.java 2011-12-27 07:28:24 UTC (rev 5360)
@@ -224,8 +224,6 @@
* supported: <br/>milliseconds - ms <br/>seconds - without sufix <br/>minutes - m <br/>hours - h
* <br/>days - d <br/>weeks - w
*
- * <br/>TODO handle strings like 2d+4h, 2h+30m+15s+500 etc.
- *
* @param timeText
* - String
* @return time in milliseconds
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java 2011-12-26 15:36:07 UTC (rev 5359)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java 2011-12-27 07:28:24 UTC (rev 5360)
@@ -483,8 +483,6 @@
*/
public void restore() throws IOException
{
- // TODO same code as in BackupWorkspaceInitializer?
-
List<ItemState> listItemState = itemDataChangesLog.getAllStates();
for (int i = 0; i < this.listFixupStream.size(); i++)
{
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavConst.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavConst.java 2011-12-26 15:36:07 UTC (rev 5359)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavConst.java 2011-12-27 07:28:24 UTC (rev 5360)
@@ -18,10 +18,10 @@
*/
package org.exoplatform.services.jcr.webdav;
+import org.exoplatform.common.http.HTTPStatus;
+
import java.util.Hashtable;
-import org.exoplatform.common.http.HTTPStatus;
-
/**
* Constants used for webdav service implemetation.
*
@@ -115,7 +115,7 @@
/**
* Private constructor.
*/
- private DavDocument()
+ private DavDocument() //NOSONAR
{
}
@@ -199,7 +199,7 @@
/**
* Private constructor.
*/
- private DavProperty()
+ private DavProperty() //NOSONAR
{
}
@@ -244,7 +244,7 @@
/**
* Private constructor.
*/
- private ResourceType()
+ private ResourceType() //NOSONAR
{
}
@@ -271,7 +271,7 @@
/**
* Private constructor.
*/
- private CacheConstants()
+ private CacheConstants() //NOSONAR
{
}
@@ -293,7 +293,7 @@
/**
* Private constructor.
*/
- private Lock()
+ private Lock() //NOSONAR
{
}
@@ -329,7 +329,7 @@
/**
* Private constructor.
*/
- private NodeTypes()
+ private NodeTypes() //NOSONAR
{
}
@@ -450,7 +450,7 @@
/**
* Private constructor.
*/
- private DateFormat()
+ private DateFormat() //NOSONAR
{
}
More information about the exo-jcr-commits
mailing list