Showing 91 of 111 total issues
Method convertPathToNodeRef
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public final static NodeRef convertPathToNodeRef(final ServiceRegistry serviceRegistry, final String path)
throws FileNotFoundException
{
// PRECONDITIONS
assert serviceRegistry != null : "serviceRegistry must not be null";
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method run
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void run()
{
try
{
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method convertPathToNodeRef
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public final static NodeRef convertPathToNodeRef(final ServiceRegistry serviceRegistry, final String path)
throws FileNotFoundException
{
// PRECONDITIONS
assert serviceRegistry != null : "serviceRegistry must not be null";
Method importVersion
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
private final void importVersion(final NodeRef nodeRef,
final BulkImportItemVersion previousVersion,
final BulkImportItemVersion version,
final boolean dryRun,
final boolean onlyOneVersion)
Method constructImportItems
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private Pair<List<FilesystemBulkImportItem>, List<FilesystemBulkImportItem>> constructImportItems(final String sourceRelativeParentDirectory,
final Map<String, SortedMap<BigDecimal,Pair<File,File>>> categorisedFiles)
throws InterruptedException
{
Pair<List<FilesystemBulkImportItem>, List<FilesystemBulkImportItem>> result = null;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method importItem
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private final void importItem(final NodeRef target,
final BulkImportItem<BulkImportItemVersion> item,
final boolean replaceExisting,
final boolean dryRun)
throws InterruptedException
Method executeImpl
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected Map<String, Object> executeImpl(final WebScriptRequest request, final Status status, final Cache cache)
{
Map<String, Object> result = null;
String targetPath = null;
Method toString
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public String toString()
{
String result = null;
Method importFile
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private final void importFile(final NodeRef nodeRef,
final BulkImportItem<BulkImportItemVersion> item,
final boolean dryRun)
throws InterruptedException
{
Method executeImpl
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected Map<String, Object> executeImpl(final WebScriptRequest request, final Status status, final Cache cache)
{
Map<String, Object> result = null;
Method importDirectory
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private final void importDirectory(final NodeRef nodeRef,
final BulkImportItem<BulkImportItemVersion> item,
final boolean dryRun)
throws InterruptedException
{
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method execute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void execute(final Runnable command)
{
try
{
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method stop
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void stop()
{
if (importStatus.inProgress())
{
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method submitCurrentBatch
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private synchronized void submitCurrentBatch()
throws InterruptedException
{
// Implement pauses at batch boundaries only
pauser.blockIfPaused();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method logStatusInfo
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private final void logStatusInfo()
{
if (info(log))
{
try
Method constructImportItems
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Pair<List<FilesystemBulkImportItem>, List<FilesystemBulkImportItem>> constructImportItems(final String sourceRelativeParentDirectory,
final Map<String, SortedMap<BigDecimal,Pair<File,File>>> categorisedFiles)
throws InterruptedException
{
Pair<List<FilesystemBulkImportItem>, List<FilesystemBulkImportItem>> result = null;
Method buildTextMessage
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public final static String buildTextMessage(final Throwable t)
{
StringBuilder result = new StringBuilder();
String timeOfFailure = (new Date()).toString();
String hostName = null;
Method convertNodeRefToPath
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public final static String convertNodeRefToPath(final ServiceRegistry serviceRegistry, final NodeRef nodeRef)
{
String result = null;
if (nodeRef != null)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method start
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void start(final BulkImportSource source,
final Map<String, List<String>> parameters,
final NodeRef target)
{
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method submitBatch
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private void submitBatch(final Batch batch)
{
if (batch != null &&
batch.size() > 0)
{
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"