From 423e98641ca7fe79a1b1bb897aa8a4b17ba5ee4d Mon Sep 17 00:00:00 2001 From: liamfallon Date: Fri, 28 Jun 2019 10:42:34 +0000 Subject: Replace non-Javadoc comments with inheritDocs Copyright headers not changed as this review only amends comments. Issue-ID: POLICY-1791 Change-Id: Icbeb2c6e591b3b160ae102bb67aef2d407924a4d Signed-off-by: liamfallon --- .../policy/apex/context/impl/ContextAlbumImpl.java | 153 +++++++-------------- .../impl/distribution/AbstractDistributor.java | 85 ++++-------- .../distribution/DistributorFlushTimerTask.java | 6 +- .../distribution/jvmlocal/JvmLocalDistributor.java | 14 +- .../context/impl/locking/AbstractLockManager.java | 37 ++--- .../impl/locking/jvmlocal/JvmLocalLockManager.java | 13 +- .../persistence/ephemeral/EphemeralPersistor.java | 34 ++--- .../context/impl/schema/AbstractSchemaHelper.java | 47 +++---- .../context/impl/schema/java/JavaSchemaHelper.java | 31 ++--- .../schema/java/JavaSchemaHelperParameters.java | 6 +- 10 files changed, 138 insertions(+), 288 deletions(-) (limited to 'context/context-management/src/main/java') diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/ContextAlbumImpl.java b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/ContextAlbumImpl.java index f2a4d5832..9d44cd38b 100644 --- a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/ContextAlbumImpl.java +++ b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/ContextAlbumImpl.java @@ -111,50 +111,40 @@ public final class ContextAlbumImpl implements ContextAlbum, Comparable keySet() { return albumMap.keySet(); } - /* - * (non-Javadoc) - * - * @see java.util.Map#values() + /** + * {@inheritDoc}. */ @Override public Collection values() { @@ -341,10 +302,8 @@ public final class ContextAlbumImpl implements ContextAlbum, Comparable> entrySet() { @@ -361,10 +320,8 @@ public final class ContextAlbumImpl implements ContextAlbum, Comparable incomingContextAlbum) { @@ -451,10 +406,8 @@ public final class ContextAlbumImpl implements ContextAlbum, Comparable getContextAlbumMap(AxArtifactKey contextAlbumKey); - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.Distributor#registerModel(org.onap.policy.apex.model.contextmodel.concepts. - * AxContextModel) + /** + * {@inheritDoc}. */ @Override public void registerModel(final AxContextModel contextModel) throws ContextException { @@ -164,12 +154,8 @@ public abstract class AbstractDistributor implements Distributor { ModelService.registerModel(AxContextAlbums.class, contextModel.getAlbums()); } - /* - * (non-Javadoc) - * - * @see - * org.onap.policy.apex.core.context.ContextDistributor#createContextAlbum(org.onap.policy.apex.core.basicmodel. - * concepts. AxArtifactKey) + /** + * {@inheritDoc}. */ @Override public synchronized ContextAlbum createContextAlbum(final AxArtifactKey axContextAlbumKey) throws ContextException { @@ -220,12 +206,8 @@ public abstract class AbstractDistributor implements Distributor { } } - /* - * (non-Javadoc) - * - * @see - * org.onap.policy.apex.core.context.ContextDistributor#removeContextAlbum(org.onap.policy.apex.core.basicmodel. - * concepts. AxArtifactKey) + /** + * {@inheritDoc}. */ @Override public void removeContextAlbum(final AxContextAlbum contextAlbum) throws ContextException { @@ -241,10 +223,8 @@ public abstract class AbstractDistributor implements Distributor { } } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.ContextDistributor#flush() + /** + * {@inheritDoc}. */ @Override public void flush() throws ContextException { @@ -259,11 +239,8 @@ public abstract class AbstractDistributor implements Distributor { } } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.ContextDistributor#flushContextAlbum(org.onap.policy.apex.core.context. - * ContextAlbum) + /** + * {@inheritDoc}. */ @Override public void flushContextAlbum(final ContextAlbum contextAlbum) throws ContextException { @@ -281,10 +258,8 @@ public abstract class AbstractDistributor implements Distributor { } } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.ContextDistributor#lockForReading(java.lang.String) + /** + * {@inheritDoc}. */ @Override public synchronized void lockForReading(final AxArtifactKey mapKey, final String itemKey) throws ContextException { @@ -292,10 +267,8 @@ public abstract class AbstractDistributor implements Distributor { lockManager.lockForReading(mapKey.getId(), itemKey); } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.ContextDistributor#lockForWriting(java.lang.String) + /** + * {@inheritDoc}. */ @Override public synchronized void lockForWriting(final AxArtifactKey mapKey, final String itemKey) throws ContextException { @@ -303,10 +276,8 @@ public abstract class AbstractDistributor implements Distributor { lockManager.lockForWriting(mapKey.getId(), itemKey); } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.ContextDistributor#unlockForReading(java.lang.String) + /** + * {@inheritDoc}. */ @Override public void unlockForReading(final AxArtifactKey mapKey, final String itemKey) throws ContextException { @@ -314,10 +285,8 @@ public abstract class AbstractDistributor implements Distributor { lockManager.unlockForReading(mapKey.getId(), itemKey); } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.ContextDistributor#unlockForWriting(java.lang.String) + /** + * {@inheritDoc}. */ @Override public void unlockForWriting(final AxArtifactKey mapKey, final String itemKey) throws ContextException { @@ -325,10 +294,8 @@ public abstract class AbstractDistributor implements Distributor { lockManager.unlockForWriting(mapKey.getId(), itemKey); } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.ContextDistributor#clear() + /** + * {@inheritDoc}. */ @Override public void clear() { diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/DistributorFlushTimerTask.java b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/DistributorFlushTimerTask.java index 0dd1d9966..e0de4a348 100644 --- a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/DistributorFlushTimerTask.java +++ b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/DistributorFlushTimerTask.java @@ -106,10 +106,8 @@ public class DistributorFlushTimerTask extends TimerTask { return true; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() + /** + * {@inheritDoc}. */ @Override public String toString() { diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/jvmlocal/JvmLocalDistributor.java b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/jvmlocal/JvmLocalDistributor.java index 701c59342..cafc96c93 100644 --- a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/jvmlocal/JvmLocalDistributor.java +++ b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/distribution/jvmlocal/JvmLocalDistributor.java @@ -45,12 +45,8 @@ public class JvmLocalDistributor extends AbstractDistributor { super(); } - /* - * (non-Javadoc) - * - * @see - * org.onap.policy.apex.context.impl.distribution.AbstractDistributor#getContextAlbumMap(org.onap.policy.apex.model. - * basicmodel.concepts.AxArtifactKey) + /** + * {@inheritDoc}. */ @Override public Map getContextAlbumMap(final AxArtifactKey contextMapKey) { @@ -58,10 +54,8 @@ public class JvmLocalDistributor extends AbstractDistributor { return Collections.synchronizedMap(new HashMap()); } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.impl.distribution.AbstractDistributor#shutdown() + /** + * {@inheritDoc}. */ @Override public void shutdown() { diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/locking/AbstractLockManager.java b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/locking/AbstractLockManager.java index 88908b965..7a7b237d6 100644 --- a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/locking/AbstractLockManager.java +++ b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/locking/AbstractLockManager.java @@ -51,31 +51,24 @@ public abstract class AbstractLockManager implements LockManager { private final Map> lockMaps = Collections .synchronizedMap(new HashMap>()); - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.LockManager#init(org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey) + /** + * {@inheritDoc}. */ @Override public void init(final AxArtifactKey lockManagerKey) throws ContextException { this.key = lockManagerKey; } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.LockManager#getKey() + /** + * {@inheritDoc}. */ @Override public AxArtifactKey getKey() { return key; } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.LockManager#lockForReading(org.onap.policy.apex.core.model.concepts. - * AxArtifactKey, java.lang.String) + /** + * {@inheritDoc}. */ @Override public synchronized void lockForReading(final String lockTypeKey, final String lockKey) throws ContextException { @@ -94,10 +87,8 @@ public abstract class AbstractLockManager implements LockManager { } } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.LockManager#lockForWriting(java.lang.String, java.lang.String) + /** + * {@inheritDoc}. */ @Override public synchronized void lockForWriting(final String lockTypeKey, final String lockKey) throws ContextException { @@ -116,10 +107,8 @@ public abstract class AbstractLockManager implements LockManager { } } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.LockManager#unlockForReading(java.lang.String, java.lang.String) + /** + * {@inheritDoc}. */ @Override public void unlockForReading(final String lockTypeKey, final String lockKey) throws ContextException { @@ -138,10 +127,8 @@ public abstract class AbstractLockManager implements LockManager { } } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.LockManager#unlockForWriting(java.lang.String, java.lang.String) + /** + * {@inheritDoc}. */ @Override public void unlockForWriting(final String lockTypeKey, final String lockKey) throws ContextException { diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/locking/jvmlocal/JvmLocalLockManager.java b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/locking/jvmlocal/JvmLocalLockManager.java index 721aa7f3c..444a0857d 100644 --- a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/locking/jvmlocal/JvmLocalLockManager.java +++ b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/locking/jvmlocal/JvmLocalLockManager.java @@ -33,21 +33,16 @@ import org.onap.policy.apex.context.impl.locking.AbstractLockManager; * @author Liam Fallon (liam.fallon@ericsson.com) */ public class JvmLocalLockManager extends AbstractLockManager { - /* - * (non-Javadoc) - * - * @see - * org.onap.policy.apex.core.context.impl.locking.AbstractLockManager#getReentrantReadWriteLock(java.lang.String) + /** + * {@inheritDoc}. */ @Override public ReadWriteLock getReentrantReadWriteLock(final String lockId) throws ContextException { return new ReentrantReadWriteLock(); } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.LockManager#shutdown() + /** + * {@inheritDoc}. */ @Override public void shutdown() { diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/persistence/ephemeral/EphemeralPersistor.java b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/persistence/ephemeral/EphemeralPersistor.java index b875978be..96567f0e3 100644 --- a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/persistence/ephemeral/EphemeralPersistor.java +++ b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/persistence/ephemeral/EphemeralPersistor.java @@ -40,31 +40,24 @@ public class EphemeralPersistor implements Persistor { // The key of this persistor private AxArtifactKey key; - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.Persistor#init(org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey) + /** + * {@inheritDoc}. */ @Override public void init(final AxArtifactKey persistorKey) throws ContextException { this.key = persistorKey; } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.Persistor#getKey() + /** + * {@inheritDoc}. */ @Override public AxArtifactKey getKey() { return key; } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.Persistor#readContextItem(org.onap.policy.apex.core.basicmodel.concepts. - * AxReferenceKey, java.lang.Class) + /** + * {@inheritDoc}. */ @Override public AxContextSchema readContextItem(final AxReferenceKey itemKey, final Class contextItemClass) { @@ -72,11 +65,8 @@ public class EphemeralPersistor implements Persistor { return null; } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.core.context.Persistor#readContextItems(org.onap.policy.apex.core.basicmodel.concepts. - * AxArtifactKey, java.lang.Class) + /** + * {@inheritDoc}. */ @Override public Set readContextItems(final AxArtifactKey ownerKey, final Class contextItemClass) @@ -85,12 +75,8 @@ public class EphemeralPersistor implements Persistor { return new TreeSet<>(); } - /* - * (non-Javadoc) - * - * @see - * org.onap.policy.apex.core.context.Persistor#writeContextItem(org.onap.policy.apex.core.contextmodel.concepts. - * AxContextItem) + /** + * {@inheritDoc}. */ @Override public Object writeContextItem(final Object contextItem) { diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/AbstractSchemaHelper.java b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/AbstractSchemaHelper.java index aa641ad9b..c4b1a0254 100644 --- a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/AbstractSchemaHelper.java +++ b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/AbstractSchemaHelper.java @@ -61,11 +61,8 @@ public abstract class AbstractSchemaHelper implements SchemaHelper { this.schemaClass = schemaClass; } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.SchemaHelper#init(org.onap.policy.apex.model.basicmodel.concepts .AxKey, - * org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema) + /** + * {@inheritDoc}. */ @Override public void init(final AxKey incomingUserKey, final AxContextSchema incomingSchema) { @@ -78,50 +75,40 @@ public abstract class AbstractSchemaHelper implements SchemaHelper { this.schema = incomingSchema; } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.SchemaHelper#getKey() + /** + * {@inheritDoc}. */ @Override public AxKey getUserKey() { return userKey; } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.SchemaHelper#getSchema() + /** + * {@inheritDoc}. */ @Override public AxContextSchema getSchema() { return schema; } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.SchemaHelper#getSchemaClass() + /** + * {@inheritDoc}. */ @Override public Class getSchemaClass() { return schemaClass; } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.SchemaHelper#getSchemaObject() + /** + * {@inheritDoc}. */ @Override public Object getSchemaObject() { return null; } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.SchemaHelper#createNewInstance() + /** + * {@inheritDoc}. */ @Override public Object createNewInstance() { @@ -143,10 +130,8 @@ public abstract class AbstractSchemaHelper implements SchemaHelper { } } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.SchemaHelper#createNewInstance(java.lang.String) + /** + * {@inheritDoc}. */ @Override public Object createNewInstance(final String stringValue) { @@ -172,8 +157,8 @@ public abstract class AbstractSchemaHelper implements SchemaHelper { } } - /* (non-Javadoc) - * @see org.onap.policy.apex.context.SchemaHelper#createNewSubInstance(java.lang.String) + /** + * {@inheritDoc}. */ @Override public Object createNewSubInstance(String subType) { diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelper.java b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelper.java index 407239ae8..a8fedf24a 100644 --- a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelper.java +++ b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelper.java @@ -67,11 +67,8 @@ public class JavaSchemaHelper extends AbstractSchemaHelper { } // @formatter:on - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.impl.schema.AbstractSchemaHelper#init(org.onap.policy.apex.model .basicmodel. - * concepts. AxKey, org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema) + /** + * {@inheritDoc}. */ @Override public void init(final AxKey userKey, final AxContextSchema schema) { @@ -96,10 +93,8 @@ public class JavaSchemaHelper extends AbstractSchemaHelper { } } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.SchemaHelper#createNewInstance(java.lang.Object) + /** + * {@inheritDoc}. */ @Override public Object createNewInstance(final Object incomingObject) { @@ -131,10 +126,8 @@ public class JavaSchemaHelper extends AbstractSchemaHelper { throw new ContextRuntimeException(returnString); } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.SchemaHelper#object2SchemaObject(java.lang.Object) + /** + * {@inheritDoc}. */ @Override public Object unmarshal(final Object object) { @@ -159,10 +152,8 @@ public class JavaSchemaHelper extends AbstractSchemaHelper { } } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.SchemaHelper#schemaObject2Json(java.lang.Object) + /** + * {@inheritDoc}. */ @Override public String marshal2String(final Object schemaObject) { @@ -183,10 +174,8 @@ public class JavaSchemaHelper extends AbstractSchemaHelper { } } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.context.SchemaHelper#marshal2JsonElement(java.lang.Object) + /** + * {@inheritDoc}. */ @Override public Object marshal2Object(final Object schemaObject) { diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParameters.java b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParameters.java index 7e6df77f3..2c57d4ea9 100644 --- a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParameters.java +++ b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParameters.java @@ -61,10 +61,8 @@ public class JavaSchemaHelperParameters extends SchemaHelperParameters { this.jsonAdapters = jsonAdapters; } - /* - * (non-Javadoc) - * - * @see org.onap.policy.apex.service.parameters.ApexParameterValidator#validate() + /** + * {@inheritDoc}. */ @Override public GroupValidationResult validate() { -- cgit 1.2.3-korg