Skip to content

Commit 76fadc2

Browse files
committed
🎨 Remove some compiler warnings
1 parent 1b98c55 commit 76fadc2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/java/nginx/clojure/NginxClojureRT.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,11 @@ public static void initStringAddrMapsByNativeAddr(Map<String, Long> map, long ad
560560

561561
private static synchronized void initMemIndex(long idxpt) {
562562
getLog();
563-
initUnsafe();
563+
initUnsafe();
564+
565+
if (log.isDebugEnabled()) {
566+
log.debug("jvm classpath:\n " + System.getProperty("java.class.path"));
567+
}
564568

565569
NGINX_MAIN_THREAD = Thread.currentThread();
566570

src/java/nginx/clojure/util/NginxPubSubTopic.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public void publish(String message) {
138138
NginxClojureRT.broadcastEvent(MiniConstants.POST_EVENT_TYPE_PUB, id);
139139
}
140140

141-
@SuppressWarnings({"rawtypes", "unchecked"})
141+
@SuppressWarnings({"rawtypes"})
142142
public <T> PubSubListenerData<T> subscribe(T data, NginxPubSubListener<T> listener) {
143143
Set<PubSubListenerData> pds = topicSubs.get(topicId);
144144
if (pds == null) {

src/java/nginx/clojure/util/NginxSharedHashMap.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class NginxSharedHashMap<K, V> implements ConcurrentMap<K, V>{
6767

6868
private native static long natomicAddNumber(long ctx, int ktype, Object keyBuf, long offset, long len, int vtype, long delta);
6969

70-
private native static long nvisit(long ctx, SharedMapSimpleVisitor visitor);
70+
private native static long nvisit(long ctx, @SuppressWarnings("rawtypes") SharedMapSimpleVisitor visitor);
7171

7272
private NginxSharedHashMap() {
7373
}
@@ -109,7 +109,6 @@ private final static int visit(int ktype, long kaddr, long ksize, int vtype, lon
109109
return visitor.visit(native2JavaObject(ktype, kaddr, ksize), native2JavaObject(vtype, vaddr, vsize));
110110
}
111111

112-
@SuppressWarnings({"rawtypes", "unchecked"})
113112
public static <KT, VT> NginxSharedHashMap<KT, VT> build(String name) {
114113
return new NginxSharedHashMap<>(name);
115114
}
@@ -327,7 +326,6 @@ public void clear() {
327326
}
328327

329328

330-
@SuppressWarnings({"rawtypes", "unchecked"})
331329
@Override
332330
public Set<K> keySet() {
333331
NginxClojureRT.getLog().warn("NginxSharedHashMap.keySet is quite expensive operation DO NOT use it at non-debug case!!!");
@@ -340,7 +338,6 @@ public Set<K> keySet() {
340338
}
341339

342340

343-
@SuppressWarnings({"rawtypes", "unchecked"})
344341
@Override
345342
public Collection<V> values() {
346343
NginxClojureRT.getLog().warn("NginxSharedHashMap.values is quite expensive operation DO NOT use it at non-debug case!!!");
@@ -353,7 +350,6 @@ public Collection<V> values() {
353350
}
354351

355352

356-
@SuppressWarnings({"rawtypes", "unchecked"})
357353
@Override
358354
public Set<java.util.Map.Entry<K, V>> entrySet() {
359355
NginxClojureRT.getLog().warn("NginxSharedHashMap.entrySet is quite expensive operation DO NOT use it at non-debug case!!!");

0 commit comments

Comments
 (0)