Skip to content

Commit

Permalink
trivial fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
theshadowco committed May 14, 2024
1 parent 6583e94 commit 66dbfa1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ gen/

# mkdocs
temp/
public/
public/
/.idea/material_theme_project_new.xml
2 changes: 1 addition & 1 deletion src/main/java/com/github/_1c_syntax/utils/Absolute.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public final class Absolute {

public static URI uri(@NonNull String uri) {
try {
URL url = new URL(uri);
var url = new URL(uri);
var decodedPath = URLDecoder.decode(url.getPath(), StandardCharsets.UTF_8);
var decodedUri = new URI(
url.getProtocol(),
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/github/_1c_syntax/utils/Lazy.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public T get() {
}

public T getOrCompute(Supplier<T> supplier) {
final T result = value; // Just one volatile read
final var result = value; // Just one volatile read
if (result == null) {
lock.lock();
T localResult = maybeCompute(supplier);
var localResult = maybeCompute(supplier);
lock.unlock();
return localResult;
}
Expand All @@ -65,7 +65,7 @@ public T getOrCompute() {
}

public boolean isPresent() {
final T result = value;
final var result = value;
return result != null;
}

Expand Down

0 comments on commit 66dbfa1

Please sign in to comment.