Closed Bug 751925 Opened 12 years ago Closed 12 years ago

Warning "octal literals and octal escape sequences are deprecated" in datetimepickers.xml

Categories

(Calendar :: Dialogs, defect)

Lightning 1.7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ssitter, Assigned: Fallen)

References

Details

Attachments

(1 file)

Shown in console after open the event dialog:

Warning: octal literals and octal escape sequences are deprecated
Source file: chrome://calendar/content/datetimepickers/datetimepickers.xml
Line: 1572, Column: 23
Source code:
                  case 02:    this.twoDigitYear = true; // fall thru 

Warning: octal literals and octal escape sequences are deprecated
Source file: chrome://calendar/content/datetimepickers/datetimepickers.xml
Line: 1594, Column: 25
Source code:
                    case 02:    this.twoDigitYear = true; // fall thru
Attached patch Fix - v1 — — Splinter Review
Fixes mentioned warnings, and a few other obvious ones.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #625849 - Flags: review?(ssitter)
Comment on attachment 625849 [details] [diff] [review]
Fix - v1

>+++ b/calendar/base/content/widgets/calendar-widgets.xml
>@@ -214,6 +214,8 @@
>                 let modeAttributeValues = this.getAttribute(aModeAttribute).split(",");
>                 let modes = this.getAttribute("mode").split(",");
>                 return modeAttributeValues[modes.indexOf(lMode)];
>+            } else {
>+                return "";

Maybe this should return e.g. |null| instead of an string object?
Attachment #625849 - Flags: review?(ssitter) → review+
(In reply to Stefan Sitter from comment #2)
> Comment on attachment 625849 [details] [diff] [review]
> Fix - v1
> 
> >+++ b/calendar/base/content/widgets/calendar-widgets.xml
> >@@ -214,6 +214,8 @@
> >                 let modeAttributeValues = this.getAttribute(aModeAttribute).split(",");
> >                 let modes = this.getAttribute("mode").split(",");
> >                 return modeAttributeValues[modes.indexOf(lMode)];
> >+            } else {
> >+                return "";
> 
> Maybe this should return e.g. |null| instead of an string object?

I have aligned this with the return value of the currentMode getter. The only caller sets the panel's width, which will probably fail both if set to null or "" so I don't think it matters.
Pushed to comm-central changeset ae4c74d92fd1
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.7
OS: Windows 7 → All
Hardware: x86_64 → All
Reopening because it seems to have regressed bug 760806.
Status: RESOLVED → REOPENED
Depends on: 760806
Resolution: FIXED → ---
Fix for the regression was checked in using bug 760806.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: