You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Chris Dolan (JIRA)" <ji...@apache.org> on 2012/05/23 16:40:40 UTC
[jira] [Created] (KARAF-1499) InfoAction shell command should sort
the properties from InfoProvider instances
Chris Dolan created KARAF-1499:
----------------------------------
Summary: InfoAction shell command should sort the properties from InfoProvider instances
Key: KARAF-1499
URL: https://issues.apache.org/jira/browse/KARAF-1499
Project: Karaf
Issue Type: Improvement
Components: karaf-shell
Affects Versions: 2.2.4
Reporter: Chris Dolan
Priority: Trivial
The class org.apache.karaf.shell.commands.InfoAction accepts input from InfoProvider services. The items from those providers are printed via this code:
{code}
for (String section : properties.keySet()) {
System.out.println(section);
for (Object key : properties.get(section).keySet()) {
printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
}
}
{code}
The .keySet() method returns keys in effectively random order, making the output hard to read. I propose instead the following presentation:
{code}
List<String> sections = new ArrayList<String>(properties.keySet());
Collections.sort(sections);
for (String section : sections) {
List<Object> keys = new ArrayList<Object>(properties.get(section).keySet());
if (keys.size() > 0) {
System.out.println(section);
Collections.sort(keys, new Comparator<Object>() {
public int compare(Object o1, Object o2) {
return String.valueOf(o1).compareTo(String.valueOf(o2));
}
});
for (Object key : keys) {
printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
}
}
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (KARAF-1499) InfoAction shell command should sort
the properties from InfoProvider instances
Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Freeman Fang resolved KARAF-1499.
---------------------------------
Resolution: Fixed
Fix Version/s: 3.0.0
2.3.0
2.2.8
> InfoAction shell command should sort the properties from InfoProvider instances
> -------------------------------------------------------------------------------
>
> Key: KARAF-1499
> URL: https://issues.apache.org/jira/browse/KARAF-1499
> Project: Karaf
> Issue Type: Improvement
> Components: karaf-shell
> Affects Versions: 2.2.4
> Reporter: Chris Dolan
> Assignee: Freeman Fang
> Priority: Trivial
> Fix For: 2.2.8, 2.3.0, 3.0.0
>
>
> The class org.apache.karaf.shell.commands.InfoAction accepts input from InfoProvider services. The items from those providers are printed via this code:
> {code}
> for (String section : properties.keySet()) {
> System.out.println(section);
> for (Object key : properties.get(section).keySet()) {
> printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
> }
> }
> {code}
> The .keySet() method returns keys in effectively random order, making the output hard to read. I propose instead the following presentation:
> {code}
> List<String> sections = new ArrayList<String>(properties.keySet());
> Collections.sort(sections);
> for (String section : sections) {
> List<Object> keys = new ArrayList<Object>(properties.get(section).keySet());
> if (keys.size() > 0) {
> System.out.println(section);
> Collections.sort(keys, new Comparator<Object>() {
> public int compare(Object o1, Object o2) {
> return String.valueOf(o1).compareTo(String.valueOf(o2));
> }
> });
> for (Object key : keys) {
> printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (KARAF-1499) InfoAction shell command should
sort the properties from InfoProvider instances
Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13282177#comment-13282177 ]
Freeman Fang commented on KARAF-1499:
-------------------------------------
Hi Chris,
Sounds good.
Wanna attach a real patch with "Grant Apache License"? ;-)
Freeman
> InfoAction shell command should sort the properties from InfoProvider instances
> -------------------------------------------------------------------------------
>
> Key: KARAF-1499
> URL: https://issues.apache.org/jira/browse/KARAF-1499
> Project: Karaf
> Issue Type: Improvement
> Components: karaf-shell
> Affects Versions: 2.2.4
> Reporter: Chris Dolan
> Assignee: Freeman Fang
> Priority: Trivial
>
> The class org.apache.karaf.shell.commands.InfoAction accepts input from InfoProvider services. The items from those providers are printed via this code:
> {code}
> for (String section : properties.keySet()) {
> System.out.println(section);
> for (Object key : properties.get(section).keySet()) {
> printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
> }
> }
> {code}
> The .keySet() method returns keys in effectively random order, making the output hard to read. I propose instead the following presentation:
> {code}
> List<String> sections = new ArrayList<String>(properties.keySet());
> Collections.sort(sections);
> for (String section : sections) {
> List<Object> keys = new ArrayList<Object>(properties.get(section).keySet());
> if (keys.size() > 0) {
> System.out.println(section);
> Collections.sort(keys, new Comparator<Object>() {
> public int compare(Object o1, Object o2) {
> return String.valueOf(o1).compareTo(String.valueOf(o2));
> }
> });
> for (Object key : keys) {
> printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (KARAF-1499) InfoAction shell command should sort
the properties from InfoProvider instances
Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Freeman Fang reassigned KARAF-1499:
-----------------------------------
Assignee: Freeman Fang
> InfoAction shell command should sort the properties from InfoProvider instances
> -------------------------------------------------------------------------------
>
> Key: KARAF-1499
> URL: https://issues.apache.org/jira/browse/KARAF-1499
> Project: Karaf
> Issue Type: Improvement
> Components: karaf-shell
> Affects Versions: 2.2.4
> Reporter: Chris Dolan
> Assignee: Freeman Fang
> Priority: Trivial
>
> The class org.apache.karaf.shell.commands.InfoAction accepts input from InfoProvider services. The items from those providers are printed via this code:
> {code}
> for (String section : properties.keySet()) {
> System.out.println(section);
> for (Object key : properties.get(section).keySet()) {
> printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
> }
> }
> {code}
> The .keySet() method returns keys in effectively random order, making the output hard to read. I propose instead the following presentation:
> {code}
> List<String> sections = new ArrayList<String>(properties.keySet());
> Collections.sort(sections);
> for (String section : sections) {
> List<Object> keys = new ArrayList<Object>(properties.get(section).keySet());
> if (keys.size() > 0) {
> System.out.println(section);
> Collections.sort(keys, new Comparator<Object>() {
> public int compare(Object o1, Object o2) {
> return String.valueOf(o1).compareTo(String.valueOf(o2));
> }
> });
> for (Object key : keys) {
> printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (KARAF-1499) InfoAction shell command should
sort the properties from InfoProvider instances
Posted by "Chris Dolan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287100#comment-13287100 ]
Chris Dolan commented on KARAF-1499:
------------------------------------
Heh, I just updated svn to create a "real patch" but it looks like you've already committed it in rev 1344087. :-) Thanks.
> InfoAction shell command should sort the properties from InfoProvider instances
> -------------------------------------------------------------------------------
>
> Key: KARAF-1499
> URL: https://issues.apache.org/jira/browse/KARAF-1499
> Project: Karaf
> Issue Type: Improvement
> Components: karaf-shell
> Affects Versions: 2.2.4
> Reporter: Chris Dolan
> Assignee: Freeman Fang
> Priority: Trivial
>
> The class org.apache.karaf.shell.commands.InfoAction accepts input from InfoProvider services. The items from those providers are printed via this code:
> {code}
> for (String section : properties.keySet()) {
> System.out.println(section);
> for (Object key : properties.get(section).keySet()) {
> printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
> }
> }
> {code}
> The .keySet() method returns keys in effectively random order, making the output hard to read. I propose instead the following presentation:
> {code}
> List<String> sections = new ArrayList<String>(properties.keySet());
> Collections.sort(sections);
> for (String section : sections) {
> List<Object> keys = new ArrayList<Object>(properties.get(section).keySet());
> if (keys.size() > 0) {
> System.out.println(section);
> Collections.sort(keys, new Comparator<Object>() {
> public int compare(Object o1, Object o2) {
> return String.valueOf(o1).compareTo(String.valueOf(o2));
> }
> });
> for (Object key : keys) {
> printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (KARAF-1499) InfoAction shell command should sort
the properties from InfoProvider instances
Posted by "Jamie goodyear (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jamie goodyear closed KARAF-1499.
---------------------------------
> InfoAction shell command should sort the properties from InfoProvider instances
> -------------------------------------------------------------------------------
>
> Key: KARAF-1499
> URL: https://issues.apache.org/jira/browse/KARAF-1499
> Project: Karaf
> Issue Type: Improvement
> Components: karaf-shell
> Affects Versions: 2.2.4
> Reporter: Chris Dolan
> Assignee: Freeman Fang
> Priority: Trivial
> Fix For: 2.2.8, 2.3.0, 3.0.0
>
>
> The class org.apache.karaf.shell.commands.InfoAction accepts input from InfoProvider services. The items from those providers are printed via this code:
> {code}
> for (String section : properties.keySet()) {
> System.out.println(section);
> for (Object key : properties.get(section).keySet()) {
> printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
> }
> }
> {code}
> The .keySet() method returns keys in effectively random order, making the output hard to read. I propose instead the following presentation:
> {code}
> List<String> sections = new ArrayList<String>(properties.keySet());
> Collections.sort(sections);
> for (String section : sections) {
> List<Object> keys = new ArrayList<Object>(properties.get(section).keySet());
> if (keys.size() > 0) {
> System.out.println(section);
> Collections.sort(keys, new Comparator<Object>() {
> public int compare(Object o1, Object o2) {
> return String.valueOf(o1).compareTo(String.valueOf(o2));
> }
> });
> for (Object key : keys) {
> printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Work started] (KARAF-1499) InfoAction shell command should
sort the properties from InfoProvider instances
Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on KARAF-1499 started by Freeman Fang.
> InfoAction shell command should sort the properties from InfoProvider instances
> -------------------------------------------------------------------------------
>
> Key: KARAF-1499
> URL: https://issues.apache.org/jira/browse/KARAF-1499
> Project: Karaf
> Issue Type: Improvement
> Components: karaf-shell
> Affects Versions: 2.2.4
> Reporter: Chris Dolan
> Assignee: Freeman Fang
> Priority: Trivial
>
> The class org.apache.karaf.shell.commands.InfoAction accepts input from InfoProvider services. The items from those providers are printed via this code:
> {code}
> for (String section : properties.keySet()) {
> System.out.println(section);
> for (Object key : properties.get(section).keySet()) {
> printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
> }
> }
> {code}
> The .keySet() method returns keys in effectively random order, making the output hard to read. I propose instead the following presentation:
> {code}
> List<String> sections = new ArrayList<String>(properties.keySet());
> Collections.sort(sections);
> for (String section : sections) {
> List<Object> keys = new ArrayList<Object>(properties.get(section).keySet());
> if (keys.size() > 0) {
> System.out.println(section);
> Collections.sort(keys, new Comparator<Object>() {
> public int compare(Object o1, Object o2) {
> return String.valueOf(o1).compareTo(String.valueOf(o2));
> }
> });
> for (Object key : keys) {
> printValue(String.valueOf(key), maxNameLen, String.valueOf(properties.get(section).get(key)));
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira