mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix test
This commit is contained in:
parent
aaee713fad
commit
cf842ce474
@ -12,6 +12,7 @@
|
||||
### Bug修复
|
||||
* 【core 】 修复PageUtil第一页语义不明确的问题(issue#782@Github)
|
||||
* 【extra 】 修复TemplateFactory引入包导致的问题
|
||||
* 【core 】 修复ServiceLoaderUtil.loadFirstAvailable问题
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
## 5.2.2
|
||||
|
@ -28,7 +28,8 @@ public class ServiceLoaderUtil {
|
||||
*/
|
||||
public static <T> T loadFirstAvailable(Class<T> clazz) {
|
||||
final Iterator<T> iterator = load(clazz).iterator();
|
||||
if(iterator.hasNext()){
|
||||
//noinspection WhileLoopReplaceableByForEach
|
||||
while(iterator.hasNext()){
|
||||
try {
|
||||
return iterator.next();
|
||||
} catch (ServiceConfigurationError e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user