Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Removed synchronised
  • Loading branch information
bbakerman committed Feb 14, 2022
commit 66f1dbe44f30c577835f2c610555ab94df11da11
2 changes: 1 addition & 1 deletion src/main/java/org/dataloader/ValueCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ default CompletableFuture<List<V>> setValues(List<K> keys, List<V> values) throw
*/
class ValueCachingNotSupported extends UnsupportedOperationException {
@Override
public synchronized Throwable fillInStackTrace() {
public Throwable fillInStackTrace() {
return this;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is magic - the exception has no stack trace (we don't want one) AND its fast to allocate because of this.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it need it to be synchronized?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No - it is in the base class. I will change this

}
Expand Down