diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m index e351ef0c67..59cd7cdc9c 100644 --- a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m +++ b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m @@ -990,8 +990,6 @@ - (void)executeJsService:(NSString *)script withName:(NSString *)name NSMutableString *errMsg = [NSMutableString stringWithFormat:@"[WX_KEY_EXCEPTION_INVOKE_JSSERVICE_EXECUTE] name:%@,arg:%@,exception :$@",name,exception]; [WXExceptionUtils commitCriticalExceptionRT:@"WX_KEY_EXCEPTION_INVOKE" errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_INVOKE] function:@"executeJsService" exception:errMsg extParams:nil]; WX_MONITOR_FAIL(WXMTJSService, WX_ERR_JSFRAMEWORK_EXECUTE, errMsg); - } else { - // success } }else { [_jsServiceQueue addObject:@{ diff --git a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m index 9ded7247dd..5cfb14f229 100644 --- a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m +++ b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m @@ -190,10 +190,7 @@ - (void)prepareLayout } } @catch (NSException *exception) { WXLog(@"%@", exception); - } @finally { } - - currentHeight = [self _maxHeightForAllColumns]; [self _columnsReachToHeight:currentHeight]; } diff --git a/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm b/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm index 49135a1f46..246b1d26da 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm +++ b/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.mm @@ -674,9 +674,7 @@ - (void)textFiledEditChanged:(NSNotification *)notifi if (cursorPosition == textField.text.length) { adjust = newString.length-oldText.length; } - if (textField.deleteWords &&[textField.editWords isKindOfClass:[NSString class]] && [_recoverRule isEqualToString:textField.editWords]) { - // do nothing - } else { + if (!textField.deleteWords || ![textField.editWords isKindOfClass:[NSString class]] || ![_recoverRule isEqualToString:textField.editWords]) { textField.text = [newString copy]; UITextPosition * newPosition = [textField positionFromPosition:textField.beginningOfDocument offset:cursorPosition+adjust]; textField.selectedTextRange = [textField textRangeFromPosition:newPosition toPosition:newPosition]; diff --git a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.mm b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.mm index 929f289d8f..3bcac0f60b 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.mm +++ b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.mm @@ -400,8 +400,6 @@ - (BOOL)_insertSubcomponent:(WXComponent *)subcomponent atIndex:(NSInteger)index [_tableView endUpdates]; } @catch (NSException *exception) { WXLogError(@"list insert component occurs exception %@", exception); - } @finally { - // nothing } }]; @@ -656,8 +654,6 @@ - (void)cell:(WXCellComponent *)cell didMoveToIndex:(NSUInteger)index [_tableView endUpdates]; }@catch(NSException * exception){ WXLogDebug(@"move cell exception: %@", [exception description]); - }@finally { - // do nothing } }]; } diff --git a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.mm b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.mm index d4b8c5ce5a..ee20118124 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.mm +++ b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.mm @@ -266,8 +266,6 @@ - (void)viewDidLoad if ([scrollView respondsToSelector:@selector(setContentInsetAdjustmentBehavior:)]) { scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; } - } else { - // Fallback on earlier versions } if (self.ancestorScroller) { @@ -935,8 +933,6 @@ - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoi if( offset.y <= _refreshComponent.calculatedFrame.size.height ) { [self loadMoreIfNeed]; } - } else if (velocity.y > 0) { - // drop up } } diff --git a/ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m b/ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m index 0f163d5611..940162b910 100644 --- a/ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m +++ b/ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m @@ -108,9 +108,6 @@ @implementation WXEventManager - (instancetype) init { self = [super init]; - if (self) { - - } return self; } @@ -406,8 +403,6 @@ - (void)removeClickEvent [_tapGesture removeTarget:self action:@selector(onClick:)]; }@catch(NSException *exception) { WXLog(@"%@", exception); - } @finally { - } _tapGesture = nil; } @@ -489,8 +484,6 @@ - (void)removeSwipeEvent } }@catch(NSException *exception) { WXLog(@"%@", exception); - }@finally { - } _swipeGestures = nil; } @@ -552,8 +545,6 @@ - (void)removeLongPressEvent [_longPressGesture removeTarget:self action:@selector(onLongPress:)]; }@catch(NSException * exception) { WXLog(@"%@", exception); - }@finally { - } _longPressGesture = nil; } @@ -712,8 +703,6 @@ - (void)checkRemovePanGesture [_panGesture removeTarget:self action:@selector(onPan:)]; }@catch(NSException * exception) { WXLog(@"%@", exception); - }@finally { - } _panGesture = nil; } diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXServiceFactory.m b/ios/sdk/WeexSDK/Sources/Manager/WXServiceFactory.m index bf061a651d..0ce17b7873 100644 --- a/ios/sdk/WeexSDK/Sources/Manager/WXServiceFactory.m +++ b/ios/sdk/WeexSDK/Sources/Manager/WXServiceFactory.m @@ -41,9 +41,6 @@ + (instancetype)sharedInstance { - (instancetype)init { - if(self = [super init]){ - - } return self; } diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m index 4781615821..e0ac1495ba 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m +++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m @@ -1056,6 +1056,7 @@ - (void)removeObservers [[NSNotificationCenter defaultCenter] removeObserver:self]; } @catch (NSException *exception) { + // avoid empty-catch warning } } diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m index bbc42e00bf..7bcde700d5 100644 --- a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m +++ b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m @@ -834,7 +834,6 @@ + (id)load:(NSString *)service { ret = [NSKeyedUnarchiver unarchiveObjectWithData:(__bridge NSData *)keyData]; } @catch (NSException *e) { NSLog(@"Unarchive of %@ failed: %@", service, e); - } @finally { } } if (keyData) diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXVersion.m b/ios/sdk/WeexSDK/Sources/Utility/WXVersion.m index 2775310498..8d8cfa38ff 100644 --- a/ios/sdk/WeexSDK/Sources/Utility/WXVersion.m +++ b/ios/sdk/WeexSDK/Sources/Utility/WXVersion.m @@ -20,8 +20,8 @@ #import "WXVersion.h" #import "WXDefine.h" -static const char* WeexSDKBuildTime = "2019-07-21 09:08:41 UTC"; -static const unsigned long WeexSDKBuildTimestamp = 1563700121; +static const char* WeexSDKBuildTime = "2019-08-01 12:40:11 UTC"; +static const unsigned long WeexSDKBuildTimestamp = 1564663211; NSString* GetWeexSDKVersion(void) { diff --git a/weex_core/Source/wson/wson_parser.cpp b/weex_core/Source/wson/wson_parser.cpp index 9689647181..21060aa437 100644 --- a/weex_core/Source/wson/wson_parser.cpp +++ b/weex_core/Source/wson/wson_parser.cpp @@ -230,23 +230,19 @@ double wson_parser::nextNumber(uint8_t type) { case WSON_NUMBER_INT_TYPE:{ int32_t num = wson_next_int(wsonBuffer); return num; - } - break; + } case WSON_NUMBER_FLOAT_TYPE:{ float num = wson_next_float(wsonBuffer); return num; - } - break; + } case WSON_NUMBER_DOUBLE_TYPE:{ double num = wson_next_double(wsonBuffer); return num; - } - break; + } case WSON_NUMBER_LONG_TYPE:{ int64_t num = wson_next_long(wsonBuffer); return num; - } - break; + } case WSON_BOOLEAN_TYPE_TRUE: return 1; case WSON_BOOLEAN_TYPE_FALSE: @@ -324,4 +320,4 @@ std::string wson_parser::toStringUTF8() { std::string json = nextStringUTF8(nextType()); this->wsonBuffer->position = position; return json; -} \ No newline at end of file +}