• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Hyshmily / hotkey / 28735434673

05 Jul 2026 08:55AM UTC coverage: 90.421% (+0.02%) from 90.4%
28735434673

push

github

Hyshmily
perf : simplify the code

Signed-off-by: Hyshmily <cxm8607@outlook.com>

1295 of 1498 branches covered (86.45%)

Branch coverage included in aggregate %.

121 of 134 new or added lines in 11 files covered. (90.3%)

2 existing lines in 1 file now uncovered.

3689 of 4014 relevant lines covered (91.9%)

4.19 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/common/src/main/java/io/github/hyshmily/hotkey/cache/annotationsupporter/NullValue.java
1
/*
2
 * Copyright 2026 Hyshmily. All Rights Reserved.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package io.github.hyshmily.hotkey.cache.annotationsupporter;
17

18
import io.github.hyshmily.hotkey.Internal;
19
import java.io.Serial;
20
import java.io.Serializable;
21

22
/**
23
 * Internal sentinel representing an explicitly cached {@code null} value.
24
 *
25
 * <p>Stored inside {@link io.github.hyshmily.hotkey.model.CacheEntry} when the caller caches a null (via
26
 * {@code @NullCaching(true)}). The sentinel is unwrapped back to {@code null}
27
 * when read, allowing the cache to distinguish "entry found but value is null"
28
 * from "no entry found".
29
 */
30
@Internal
31
public final class NullValue implements Serializable {
32

33
  /** Singleton instance. */
34
  public static final NullValue INSTANCE = new NullValue();
5✔
35

36
  private NullValue() {}
37

38
  @Serial
39
  private Object readResolve() {
NEW
40
    return INSTANCE;
×
41
  }
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc