-
Notifications
You must be signed in to change notification settings - Fork 13
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-2885 proposal for a start of a more controlled handling of "alien objects"… #1841
base: 2022.06.x
Are you sure you want to change the base?
Conversation
… in data directory – fixes metadata rebuild command while arbitrary files present in data dirs (project/type)
* 2 - dirty | ||
*/ | ||
private int typeDirStatus(Object path) { | ||
File p = new File(path.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PATH_TRAVERSAL_IN: This API (java/io/File.(Ljava/lang/String;)V) reads a file whose location might be specified by user input
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
mycore-base/src/main/java/org/mycore/datamodel/common/MCRDefaultXMLMetadataManager.java
Outdated
Show resolved
Hide resolved
We should discuss this in a video call together and need to improve our contribute documentation a bit. |
just updated the PR |
mycore-base/src/main/java/org/mycore/datamodel/common/MCRDefaultXMLMetadataManager.java
Show resolved
Hide resolved
(updated after @rsteph-de pointed out today, that i should use pure nio here) |
@@ -0,0 +1,7 @@ | |||
package org.mycore.datamodel.common; | |||
|
|||
public enum ProjectDirState { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this enum still needed? Or can it be simplified to a boolean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The enum was proposed by someone else and i think this solution has both advantages included:
- We have a (minimalistic) stable boolean wrapper function
- The Enum can be freely extended without changing any current code dependent on it
(Or at least minimal&obvious changes if the inequality should go in another direction longer term for whatever reason)
=> to advertise it a bit: maximum flexibility with minimalistic (but still guiding) implementation
… in data directory – fixes metadata rebuild command while arbitrary files present in data dirs (project/type)
Link to jira.