[JBoss JIRA] (JBIDE-22119) Improve treatment of missing/invalid date in timestamp comparator
by Viacheslav Kabanovich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-22119?page=com.atlassian.jira.plugi... ]
Viacheslav Kabanovich commented on JBIDE-22119:
-----------------------------------------------
[~jcantrill], please take a look at the pull request.
> Improve treatment of missing/invalid date in timestamp comparator
> -----------------------------------------------------------------
>
> Key: JBIDE-22119
> URL: https://issues.jboss.org/browse/JBIDE-22119
> Project: Tools (JBoss Tools)
> Issue Type: Enhancement
> Components: openshift
> Affects Versions: 4.3.1.CR1
> Reporter: Viacheslav Kabanovich
> Assignee: Viacheslav Kabanovich
> Fix For: 4.4.0.Alpha1
>
>
> CreationTimestampComparator makes a resource with missing/invalid date equal to any other resource. If in a list of resources one is invalid, it will make result unpredictable. It is better to move an invalid timestamp to the end of the list by assuming that it is less than any valid timestamp, it will ensure correct sorting of resources with valid timestamps.
> Also this comparator may be reused in OpenShiftResourcePropertySection.createCreatedBySorter() - the logic is the same.
> DateTimeUtils.parse(String) is better to prevent NPE or ArrayIndexOutOfBoundsException and throw the declared ParseException for empty value instead.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years
[JBoss JIRA] (JBIDE-22119) Improve treatment of missing/invalid date in timestamp comparator
by Viacheslav Kabanovich (JIRA)
Viacheslav Kabanovich created JBIDE-22119:
---------------------------------------------
Summary: Improve treatment of missing/invalid date in timestamp comparator
Key: JBIDE-22119
URL: https://issues.jboss.org/browse/JBIDE-22119
Project: Tools (JBoss Tools)
Issue Type: Enhancement
Components: openshift
Affects Versions: 4.3.1.CR1
Reporter: Viacheslav Kabanovich
Assignee: Viacheslav Kabanovich
Fix For: 4.4.0.Alpha1
CreationTimestampComparator makes a resource with missing/invalid date equal to any other resource. If in a list of resources one is invalid, it will make result unpredictable. It is better to move an invalid timestamp to the end of the list by assuming that it is less than any valid timestamp, it will ensure correct sorting of resources with valid timestamps.
Also this comparator may be reused in OpenShiftResourcePropertySection.createCreatedBySorter() - the logic is the same.
DateTimeUtils.parse(String) is better to prevent NPE or ArrayIndexOutOfBoundsException and throw the declared ParseException for empty value instead.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years
[JBoss JIRA] (JBIDE-22115) Truncated error message display connecting to server
by Viacheslav Kabanovich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-22115?page=com.atlassian.jira.plugi... ]
Viacheslav Kabanovich edited comment on JBIDE-22115 at 4/5/16 6:40 PM:
-----------------------------------------------------------------------
ConnectionWizardPageModel.connect() catches any Exception and binds its message with "The server type, credentials, or auth scheme might be incorrect. \{0\}". Can we have some simple criteria that the message from exception may be used as is, without binding to this sentence?
was (Author: scabanovich):
ConnectionWizardPageModel.connect() catches any Exception and binds its message with "The server type, credentials, or auth scheme might be incorrect. {0}". Can we have some simple criteria that the message from exception may be used as is, without binding to this sentence?
> Truncated error message display connecting to server
> ----------------------------------------------------
>
> Key: JBIDE-22115
> URL: https://issues.jboss.org/browse/JBIDE-22115
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Environment: Version: 9.1.0.GA
> Build id: GA-v20160403-1700-B477
> Build date: 20160403-1700
> Reporter: Len DiMaggio
> Assignee: Viacheslav Kabanovich
> Priority: Minor
> Attachments: bad_token_1.png, bad_token_2.png
>
>
> See attached screenshot - the error message is truncated until the user expands the width of the dialog.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years
[JBoss JIRA] (JBIDE-22115) Truncated error message display connecting to server
by Viacheslav Kabanovich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-22115?page=com.atlassian.jira.plugi... ]
Viacheslav Kabanovich commented on JBIDE-22115:
-----------------------------------------------
ConnectionWizardPageModel.connect() catches any Exception and binds its message with "The server type, credentials, or auth scheme might be incorrect. {0}". Can we have some simple criteria that the message from exception may be used as is, without binding to this sentence?
> Truncated error message display connecting to server
> ----------------------------------------------------
>
> Key: JBIDE-22115
> URL: https://issues.jboss.org/browse/JBIDE-22115
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Environment: Version: 9.1.0.GA
> Build id: GA-v20160403-1700-B477
> Build date: 20160403-1700
> Reporter: Len DiMaggio
> Assignee: Viacheslav Kabanovich
> Priority: Minor
> Attachments: bad_token_1.png, bad_token_2.png
>
>
> See attached screenshot - the error message is truncated until the user expands the width of the dialog.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years
[JBoss JIRA] (JBIDE-22115) Truncated error message display connecting to server
by Viacheslav Kabanovich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-22115?page=com.atlassian.jira.plugi... ]
Viacheslav Kabanovich edited comment on JBIDE-22115 at 4/5/16 6:25 PM:
-----------------------------------------------------------------------
That message in status is passed through validation invoked by databinding context to get to the message area. We could in validator check the moment when message changes and gets too long and make wizard wider. We should take care not to do it on every validation, then user will be annoyed too often,especially if he wants to make wizard more narrow manually.
The message "You must obtain an API token by visiting ..." seems very common and it is specifically tested in openshift-restclient-java. It looks quite comprehensive and does not need the text "The server type, ..." before it. [~adietish], can we specifically for this case use only the message from openshift server?
was (Author: scabanovich):
That message in status is passed through validation invoked by databinding context to get to the message area. We could in validator check the moment when message changes and gets too long and make wizard wider. We should take care not to do it on every validation, then user will be annoyed too often,especially if he wants to make wizard more narrow manually.
> Truncated error message display connecting to server
> ----------------------------------------------------
>
> Key: JBIDE-22115
> URL: https://issues.jboss.org/browse/JBIDE-22115
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Environment: Version: 9.1.0.GA
> Build id: GA-v20160403-1700-B477
> Build date: 20160403-1700
> Reporter: Len DiMaggio
> Assignee: Viacheslav Kabanovich
> Priority: Minor
> Attachments: bad_token_1.png, bad_token_2.png
>
>
> See attached screenshot - the error message is truncated until the user expands the width of the dialog.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years
[JBoss JIRA] (JBIDE-22115) Truncated error message display connecting to server
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBIDE-22115?page=com.atlassian.jira.plugi... ]
Andre Dietisheim commented on JBIDE-22115:
------------------------------------------
[~akazakov] sure, yes that's another way to "fix" it. The wizard page is displayed as 1st page of most OpenShift wizard and thus will require us to verify all of them. [~ldimaggio] how did you end up in the above page? You created a new connection, right?
> Truncated error message display connecting to server
> ----------------------------------------------------
>
> Key: JBIDE-22115
> URL: https://issues.jboss.org/browse/JBIDE-22115
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Environment: Version: 9.1.0.GA
> Build id: GA-v20160403-1700-B477
> Build date: 20160403-1700
> Reporter: Len DiMaggio
> Assignee: Viacheslav Kabanovich
> Priority: Minor
> Attachments: bad_token_1.png, bad_token_2.png
>
>
> See attached screenshot - the error message is truncated until the user expands the width of the dialog.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years
[JBoss JIRA] (JBIDE-22115) Truncated error message display connecting to server
by Viacheslav Kabanovich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-22115?page=com.atlassian.jira.plugi... ]
Viacheslav Kabanovich commented on JBIDE-22115:
-----------------------------------------------
That message in status is passed through validation invoked by databinding context to get to the message area. We could in validator check the moment when message changes and gets too long and make wizard wider. We should take care not to do it on every validation, then user will be annoyed too often,especially if he wants to make wizard more narrow manually.
> Truncated error message display connecting to server
> ----------------------------------------------------
>
> Key: JBIDE-22115
> URL: https://issues.jboss.org/browse/JBIDE-22115
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Environment: Version: 9.1.0.GA
> Build id: GA-v20160403-1700-B477
> Build date: 20160403-1700
> Reporter: Len DiMaggio
> Assignee: Viacheslav Kabanovich
> Priority: Minor
> Attachments: bad_token_1.png, bad_token_2.png
>
>
> See attached screenshot - the error message is truncated until the user expands the width of the dialog.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years