diff --git a/Foundation/CPDictionary.j b/Foundation/CPDictionary.j index 9c673be0c..d06c4b9fa 100755 --- a/Foundation/CPDictionary.j +++ b/Foundation/CPDictionary.j @@ -26,10 +26,7 @@ @import "CPNull.j" @import "CPObject.j" -//FIXME: After release of 0.9.7 remove below variable -var CPDictionaryShowNilDeprecationMessage = YES, - - CPDictionaryMaxDescriptionRecursion = 10; +var CPDictionaryMaxDescriptionRecursion = 10; /*! @class CPDictionary @@ -238,28 +235,10 @@ var CPDictionaryShowNilDeprecationMessage = YES, key = keyArray[i]; if (value === nil) - { - CPDictionaryShowNilDeprecationMessage = NO; - CPLog.warn([CPString stringWithFormat:@"[%s %s] DEPRECATED: Attempt to insert nil object from objects[%d]", [self className], _cmd, i]); - - if (typeof(objj_backtrace_print) === "function") - objj_backtrace_print(CPLog.warn); - - // FIXME: After release of 0.9.7 change this block to: - // [CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil object from objects[" + i + @"]"]; - } + [CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil object from objects[" + i + @"]"]; if (key === nil) - { - CPDictionaryShowNilDeprecationMessage = NO; - CPLog.warn([CPString stringWithFormat:@"[%s %s] DEPRECATED: Attempt to insert nil key from keys[%d]", [self className], _cmd, i]); - - if (typeof(objj_backtrace_print) === "function") - objj_backtrace_print(CPLog.warn); - - // FIXME: After release of 0.9.7 change this block to: - // [CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil key from keys[" + i + @"]"]; - } + [CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil key from keys[" + i + @"]"]; [self setObject:value forKey:key]; } @@ -302,28 +281,10 @@ var CPDictionaryShowNilDeprecationMessage = YES, key = arguments[index + 1]; if (value === nil) - { - CPDictionaryShowNilDeprecationMessage = NO; - CPLog.warn([CPString stringWithFormat:@"[%s %s] DEPRECATED: Attempt to insert nil object from objects[%d]", [self className], _cmd, (index / 2) - 1]); - - if (typeof(objj_backtrace_print) === "function") - objj_backtrace_print(CPLog.warn); - - // FIXME: After release of 0.9.7 change 3 lines above to this: - // [CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil object from objects[" + ((index / 2) - 1) + @"]"]; - } + [CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil object from objects[" + ((index / 2) - 1) + @"]"]; if (key === nil) - { - CPDictionaryShowNilDeprecationMessage = NO; - CPLog.warn([CPString stringWithFormat:@"[%s %s] DEPRECATED: Attempt to insert nil key from keys[%d]", [self className], _cmd, (index / 2) - 1]); - - if (typeof(objj_backtrace_print) === "function") - objj_backtrace_print(CPLog.warn); - - // FIXME: After release of 0.9.7 change 3 lines above to this: - // [CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil key from keys[" + ((index / 2) - 1) + @"]"]; - } + [CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil key from keys[" + ((index / 2) - 1) + @"]"]; [self setObject:value forKey:key]; } @@ -634,34 +595,11 @@ var CPDictionaryShowNilDeprecationMessage = YES, */ - (void)setObject:(id)anObject forKey:(id)aKey { - // FIXME: After release of 0.9.7, remove this test and leave the contents of its block - if (CPDictionaryShowNilDeprecationMessage) - { - if (aKey === nil) - { - CPLog.warn([CPString stringWithFormat:@"[%s %s] DEPRECATED: key cannot be nil", [self className], _cmd]); + if (aKey === nil) + [CPException raise:CPInvalidArgumentException reason:@"key cannot be nil"]; - if (typeof(objj_backtrace_print) === "function") - objj_backtrace_print(CPLog.warn); - - // FIXME: After release of 0.9.7 change this block to: - // [CPException raise:CPInvalidArgumentException reason:@"key cannot be nil"]; - } - - if (anObject === nil) - { - CPLog.warn([CPString stringWithFormat:@"[%s %s] DEPRECATED: object cannot be nil (key: %s)", [self className], _cmd, aKey]); - - if (typeof(objj_backtrace_print) === "function") - objj_backtrace_print(CPLog.warn); - - // FIXME: After release of 0.9.7 change this block to: - // [CPException raise:CPInvalidArgumentException reason:@"object cannot be nil (key: " + aKey + @")"]; - } - } - // FIXME: After release of 0.9.7 remove 2 lines below. - else - CPDictionaryShowNilDeprecationMessage = YES; + if (anObject === nil) + [CPException raise:CPInvalidArgumentException reason:@"object cannot be nil (key: " + aKey + @")"]; self.setValueForKey(aKey, anObject); } diff --git a/README.markdown b/README.markdown index ed87b834d..6d9fea48c 100644 --- a/README.markdown +++ b/README.markdown @@ -33,7 +33,7 @@ Getting Started --------------- To get started, download and install the current release version of Cappuccino: - $ curl https://raw.githubusercontent.com/cappuccino/cappuccino/v0.9.7-1/bootstrap.sh >/tmp/cappuccino_bootstrap.sh && bash /tmp/cappuccino_bootstrap.sh + $ curl https://raw.githubusercontent.com/cappuccino/cappuccino/v0.9.8/bootstrap.sh >/tmp/cappuccino_bootstrap.sh && bash /tmp/cappuccino_bootstrap.sh If you'd just like to get started using Cappuccino for your web apps, you are done. diff --git a/Tests/Foundation/CPDictionaryTest.j b/Tests/Foundation/CPDictionaryTest.j index f14dce9b0..5cdd75983 100644 --- a/Tests/Foundation/CPDictionaryTest.j +++ b/Tests/Foundation/CPDictionaryTest.j @@ -419,7 +419,7 @@ - (void)testInitWithObjectsAndKeys { - var dict = [[CPDictionary alloc] initWithObjectsAndKeys:@"Value1", @"Key1", nil, @"Key2", @"Value3", @"Key3"]; + var dict = [[CPDictionary alloc] initWithObjectsAndKeys:@"Value1", @"Key1", @"Value3", @"Key3"]; [self assert:2 equals:[dict count]]; [self assert:@"Value1" equals:[dict objectForKey:@"Key1"]]; @@ -427,6 +427,13 @@ [self assert:@"Value3" equals:[dict objectForKey:@"Key3"]]; } +- (void)testInitWithObjectsAndKeysAndNilValueShouldThrowException +{ + [self assertThrows:function () { + [[CPDictionary alloc] initWithObjectsAndKeys:@"Value1", @"Key1", nil, @"Key2", @"Value3", @"Key3"] + }]; +} + - (void)testDictionaryLiteral { var dict = @{ diff --git a/Tools/Documentation/Cappuccino.doxygen b/Tools/Documentation/Cappuccino.doxygen index c2abad4e4..2d57fcd49 100644 --- a/Tools/Documentation/Cappuccino.doxygen +++ b/Tools/Documentation/Cappuccino.doxygen @@ -38,7 +38,7 @@ PROJECT_NAME = " API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.9.7-1 +PROJECT_NUMBER = 0.9.8 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/Tools/XcodeCapp/XcodeCapp/Info.plist b/Tools/XcodeCapp/XcodeCapp/Info.plist index ddb9c5a21..bb698451f 100644 --- a/Tools/XcodeCapp/XcodeCapp/Info.plist +++ b/Tools/XcodeCapp/XcodeCapp/Info.plist @@ -3,7 +3,7 @@ XCCLastCappuccinoReleaseURL - https://github.com/cappuccino/cappuccino/archive/0.9.7.zip + https://github.com/cappuccino/cappuccino/archive/0.9.8.zip XCCLastCappuccinoMasterBranchURL https://github.com/cappuccino/cappuccino/archive/master.zip CFBundleDevelopmentRegion diff --git a/bootstrap.sh b/bootstrap.sh index c66078db7..97bda59e1 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -169,7 +169,7 @@ tmp_zip="/tmp/cappuccino.zip" local_distrib="" github_user="cappuccino" -github_ref="v0.9.7-1" +github_ref="v0.9.8" noprompt="" install_capp="" diff --git a/version.json b/version.json index f0c6f3ceb..719d33fc4 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "0.9.7-1" + "version": "0.9.8" } \ No newline at end of file