Skip to content

Commit

Permalink
[Improve][Connector][bin-log] Unified exception of MapMakerHelper (#1395
Browse files Browse the repository at this point in the history
)

(cherry picked from commit 1248cc2)
  • Loading branch information
TyrantLucifer authored and OT-XY committed Mar 3, 2023
1 parent d1363c0 commit e4ae16c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
*/
package com.google.common.collect;

import com.dtstack.chunjun.throwable.ChunJunRuntimeException;

import com.google.common.base.Function;

import java.lang.reflect.Method;
Expand All @@ -31,7 +33,7 @@ public static MapMaker softValues(MapMaker mapMaker) {
method.setAccessible(true);
return (MapMaker) method.invoke(mapMaker);
} catch (Exception e) {
throw new RuntimeException(e);
throw new ChunJunRuntimeException(e);
}
}

Expand All @@ -44,7 +46,7 @@ public static <K, V> ConcurrentMap<K, V> makeComputingMap(
method.setAccessible(true);
return (ConcurrentMap<K, V>) method.invoke(mapMaker, computingFunction);
} catch (Exception e) {
throw new RuntimeException(e);
throw new ChunJunRuntimeException(e);
}
}
}

0 comments on commit e4ae16c

Please sign in to comment.