Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCR-3084 Refactor and optimize XEditor #2128

Draft
wants to merge 13 commits into
base: 2023.06.x
Choose a base branch
from

MCR-3084 Refactored field mapping and node get/set value code

99271a0
Select commit
Loading
Failed to load commit list.
Draft

MCR-3084 Refactor and optimize XEditor #2128

MCR-3084 Refactored field mapping and node get/set value code
99271a0
Select commit
Loading
Failed to load commit list.
Codacy Production / Codacy Static Code Analysis required action Apr 30, 2024 in 0s

6 new issues (0 max.) of at least minor severity.

Codacy Here is an overview of what got changed by this pull request:

Issues
======
- Added 6
           

Complexity increasing per file
==============================
- mycore-xeditor/src/main/java/org/mycore/frontend/xeditor/mapper/MCRFieldMapping.java  3
- mycore-xeditor/src/main/java/org/mycore/frontend/xeditor/mapper/MCRField.java  1
- mycore-xeditor/src/main/java/org/mycore/frontend/xeditor/mapper/MCRMappingDecoder.java  2
- mycore-xeditor/src/test/java/org/mycore/frontend/xeditor/MCRXEditorTestRunner.java  14
         

Complexity decreasing per file
==============================
+ mycore-xeditor/src/main/java/org/mycore/frontend/xeditor/MCREditorSubmission.java  -5
+ mycore-xeditor/src/main/java/org/mycore/frontend/xeditor/tracker/MCRChangeTracker.java  -1
+ mycore-xeditor/src/test/java/org/mycore/frontend/xeditor/MCRXEditorTransformerTest.java  -2
+ mycore-xeditor/src/main/java/org/mycore/frontend/xeditor/tracker/MCRSetElementText.java  -1
         

Clones removed
==============
+ mycore-xeditor/src/test/java/org/mycore/frontend/xeditor/tracker/MCRChangeTrackerTest.java  -2
+ mycore-xeditor/src/test/java/org/mycore/frontend/xeditor/MCREditorSubmissionTest.java  -2
         

See the complete overview on Codacy

Annotations

Check notice on line 14 in mycore-xeditor/src/main/java/org/mycore/frontend/xeditor/mapper/MCRField.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

mycore-xeditor/src/main/java/org/mycore/frontend/xeditor/mapper/MCRField.java#L14

Avoid unnecessary constructors - the compiler will generate these for you

Check notice on line 36 in mycore-xeditor/src/main/java/org/mycore/frontend/xeditor/tracker/MCRChange.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

mycore-xeditor/src/main/java/org/mycore/frontend/xeditor/tracker/MCRChange.java#L36

Document empty method body

Check notice on line 46 in mycore-xeditor/src/main/java/org/mycore/frontend/xeditor/tracker/MCRChangeTracker.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

mycore-xeditor/src/main/java/org/mycore/frontend/xeditor/tracker/MCRChangeTracker.java#L46

'while' construct must use '{}'s.

Check warning on line 47 in mycore-xeditor/src/test/java/org/mycore/frontend/xeditor/MCRXEditorTestRunner.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

mycore-xeditor/src/test/java/org/mycore/frontend/xeditor/MCRXEditorTestRunner.java#L47

Perhaps 'xEditor' could be replaced by a local variable.

Check warning on line 64 in mycore-xeditor/src/test/java/org/mycore/frontend/xeditor/MCRXEditorTestRunner.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

mycore-xeditor/src/test/java/org/mycore/frontend/xeditor/MCRXEditorTestRunner.java#L64

A switch statement does not contain a break

Check warning on line 155 in mycore-xeditor/src/test/java/org/mycore/frontend/xeditor/MCRXEditorTestRunner.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

mycore-xeditor/src/test/java/org/mycore/frontend/xeditor/MCRXEditorTestRunner.java#L155

Avoid reassigning parameters such as 'html'