-
Notifications
You must be signed in to change notification settings - Fork 25
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
Remove static object #508
Remove static object #508
Conversation
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.
There is still plenty of static object use left.
In particular the ProjectHandler
class is used all over the place in this static manner.
private static final PortfolioVerticle portfolioVerticle = new PortfolioVerticle(); | ||
private static final BoundingBoxVerticle boundingBoxVerticle = new BoundingBoxVerticle(); | ||
private static final SegVerticle segVerticle = new SegVerticle(); | ||
private static final WasabiVerticle wasabiVerticle = new WasabiVerticle(); | ||
private static final EndpointRouter serverVerticle = new EndpointRouter(); |
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.
Do these need to be static at all?
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.
Just a small nitpick.
I also see that you've added a lot more project state transitions, shouldn't that happen within the projectExport object itself?
annotationDict.put(versionUuid, DataInfoProperties.builder() | ||
.annotation(new ArrayList<AnnotationPointProperties>()) | ||
.imgX(newImagePropValue) | ||
.imgY(newImagePropValue) | ||
.imgW(newImagePropValue) | ||
.imgH(newImagePropValue) | ||
.build() | ||
); |
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.
I think it makes sense to push the default values into the object definition and use @Builder.Default
instead of having this disconnect.
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.
Noted
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.
For the project state transitions.
No. It doesn't. When zipping the image, the current process run in separate thread which is the only way to mark as success.
I also followed the original flow. Found out that I forgot to add the starting process status. Realize when testing this with bigger dataset.
log.info("DEVEN: " + annotationDict); | ||
|
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.
I guess you forgot to remove this?
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.
Oh noo. Ok. Thanks
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.
Removed.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
Remove static object and replace with constructor or getter/setter
Type of change
Please delete options that are not relevant.
Tested on?
Checklist: