-
Notifications
You must be signed in to change notification settings - Fork 256
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
Enforce Java 11 in archetypes #1029
Conversation
Signed-off-by: Maimur Hasan <msghasan@gmail.com>
@jnioche Shall I remove the below plugin from parent pom , as it do not support code above jdk 8 |
Let's keep it until we find a replacement for it. |
- Did refactoring of the code. Now the class is more reusable anybody and extend the class and can use it as per their business requirement without having to copy paste everything from the existing store method - Secondly if we can use an utilty class in the core project and copy paste the store() method that would have been nice we could have used htis in both places for elastic search and opensearch StatusUpdaterBolt Signed-off-by: Maimur Hasan <msghasan@gmail.com>
protected void addToTupleListAndSendToES(String url, Tuple tuple, String sha256hex, IndexRequest request) { | ||
waitAckLock.lock(); | ||
try { | ||
final List<Tuple> tupleList = waitAck.get(sha256hex, k -> new LinkedList<>()); |
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.
JdkObsolete: It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not.
final List<Tuple> tupleList = waitAck.get(sha256hex, k -> new LinkedList<>()); | |
final List<Tuple> tupleList = waitAck.get(sha256hex, k -> new ArrayList<>()); |
ℹ️ Learn about @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.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
protected void addToTupleListAndSendToES(String url, Tuple tuple, String sha256hex, IndexRequest request) { | ||
waitAckLock.lock(); | ||
try { | ||
final List<Tuple> tupleList = waitAck.get(sha256hex, k -> new LinkedList<>()); |
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.
JdkObsolete: It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not.
final List<Tuple> tupleList = waitAck.get(sha256hex, k -> new LinkedList<>()); | |
final List<Tuple> tupleList = waitAck.get(sha256hex, k -> new ArrayList<>()); |
ℹ️ Learn about @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.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
|
||
LOG.debug("Sending to ES buffer {} with ID {}", url, sha256hex); | ||
|
||
connection.addToProcessor(request); |
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.
THREAD_SAFETY_VIOLATION: Read/Write race. Non-private method StatusUpdaterBolt.addToTupleListAndSendToES(...)
reads without synchronization from this.connection
. Potentially races with write in method StatusUpdaterBolt.cleanup()
.
Reporting because this access may occur on a background thread.
ℹ️ Learn about @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.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
|
||
LOG.debug("Sending to ES buffer {} with ID {}", url, sha256hex); | ||
|
||
connection.addToProcessor(request); |
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.
THREAD_SAFETY_VIOLATION: Read/Write race. Non-private method StatusUpdaterBolt.addToTupleListAndSendToES(...)
reads without synchronization from this.connection
. Potentially races with write in method StatusUpdaterBolt.cleanup()
.
Reporting because this access may occur on a background thread.
ℹ️ Learn about @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.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
and it works when calling
|
@msghasan can you restore the PR to only include the Java Version changes in the archetype? |
yeah sure |
@jnioche throws error stating this plugin only supports class version till 52 which is java 8 while we try to commit anything.... in to the repository |
@rzo1 Reverted the commit that I mistakenly did in this PR please approve the changes... |
@jnioche don't know if squashing will retain signed commits. Aside from that lgtm. |
A PR is automatically closed if it is merged into master/main. |
This reverts commit 81b85a1. Need to push in different PR Signed-off-by: Maimur Hasan <msghasan@gmail.com>
Fixes #1022 |
Merged, changed the title. Thanks @msghasan |
Signed-off-by: Maimur Hasan msghasan@gmail.com
Thanks for contributing to StormCrawler, your efforts are appreciated!
Developer Certificate of Origin
By contributing to StormCrawler, you accept and agree to the following terms and conditions (the Developer Certificate of Origin) for your present and future contributions submitted to StormCrawler.
Please refer to the Developer Certificate of Origin section in
CONTRIBUTING.md
for details.Before opening a PR, please check that:
Thanks!