You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Hiram Chirino (JIRA)" <ji...@apache.org> on 2008/07/18 18:18:31 UTC

[jira] Created: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

JMX module is using 1 java 6 method that has a java 5 equivalent
----------------------------------------------------------------

                 Key: ZOOKEEPER-81
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
             Project: Zookeeper
          Issue Type: Improvement
          Components: server
            Reporter: Hiram Chirino
         Attachments: ZOOKEEPER-81.patch

It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hiram Chirino updated ZOOKEEPER-81:
-----------------------------------

    Status: Patch Available  (was: Open)

{code}
Index: src/java/jmx/org/apache/zookeeper/jmx/MBeanRegistry.java
===================================================================
--- src/java/jmx/org/apache/zookeeper/jmx/MBeanRegistry.java	(revision 677957)
+++ src/java/jmx/org/apache/zookeeper/jmx/MBeanRegistry.java	(working copy)
@@ -143,7 +143,7 @@
     private int tokenize(StringBuilder sb, String path, int index){
         String[] tokens = path.split("/");
         for (String s: tokens) {
-            if (s.isEmpty())
+            if (s.length()==0)
                 continue;
             sb.append("name").append(index++)
                     .append("=").append(s).append(",");
{code}

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615749#action_12615749 ] 

Hiram Chirino commented on ZOOKEEPER-81:
----------------------------------------

Sure.. could we get this patch committed first?  I really do fail to see what harm could come from it being committed. 

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>            Assignee: Andrew Kornev
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615741#action_12615741 ] 

Andrew Kornev commented on ZOOKEEPER-81:
----------------------------------------

Would you like to verify whether or not there is a Java 6 runtime dependency? Would you be willing to contribute a patch (including this change) to break such a dependency? Would you be interested in implementing additional JMX beans? You can find some ideas here http://sourceforge.net/tracker/index.php?func=detail&aid=1894138&group_id=209147&atid=1008547 .Things like enabling/disabling tracing thru a JMX Console seem to be useful.

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>            Assignee: Andrew Kornev
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615719#action_12615719 ] 

Hiram Chirino commented on ZOOKEEPER-81:
----------------------------------------

Furthermore, I've been looking at your the MXBean interfaces and I don't see them being actual MXBeans.. they are just standard MBeans.  They would only be MXBeans if the methods they defined used complex object types as parameters or return values.

Are you sure that you even have a Java 6 runtime dependency?  

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>            Assignee: Andrew Kornev
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614780#action_12614780 ] 

Mahadev konar commented on ZOOKEEPER-81:
----------------------------------------

i think the build.xml only allows building of jmx with 1.6? doesnt it?

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kornev closed ZOOKEEPER-81.
----------------------------------


> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>            Assignee: Andrew Kornev
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt reassigned ZOOKEEPER-81:
-------------------------------------

    Assignee: Andrew Kornev

Assigning to Andrew for followup/resolution.

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>            Assignee: Andrew Kornev
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615760#action_12615760 ] 

Andrew Kornev commented on ZOOKEEPER-81:
----------------------------------------

Committed! Thanks Hiram!

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>            Assignee: Andrew Kornev
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615704#action_12615704 ] 

Andrew Kornev commented on ZOOKEEPER-81:
----------------------------------------

Long story short -- MXBean is a runtime dependency. Some internal machinery for handling user defined MXBeans is missing in Java 5. For details please refer to http://java.sun.com/javase/6/docs/technotes/guides/jmx/enhancements.html. The second bullet on the top says:

??MXBeans have been added. MXBeans are MBeans that provide a convenient way to bundle related values together without requiring clients to be specially configured to handle the bundles. A defined set of MXBeans already existed in the J2SE 5.0 platform, but Java SE 6 introduces an API to allow you to program your own custom MXBeans.??

Although there is absolutely nothing wrong with your patch, would you be terribly disappointed if I leave the things the way they are and simply close this jira as "won't fix"? :-)

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>            Assignee: Andrew Kornev
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615374#action_12615374 ] 

Andrew Kornev commented on ZOOKEEPER-81:
----------------------------------------

I don't think you actually build the jmx code under 1.5 -- build.xml silently excludes the java\jmx directory from the build. 

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-81:
-----------------------------------

    Assignee: Hiram Chirino  (was: Andrew Kornev)

assigning it to hiram ..

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>            Assignee: Hiram Chirino
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hiram Chirino updated ZOOKEEPER-81:
-----------------------------------

    Attachment: ZOOKEEPER-81.patch

attaching patch for the fix.

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615370#action_12615370 ] 

Hiram Chirino commented on ZOOKEEPER-81:
----------------------------------------

The build lets me build under 1.5 and if I apply that patch it compiles and tests fine.  Perhaps that mxbean feature is only needed at runtime?

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615711#action_12615711 ] 

Hiram Chirino commented on ZOOKEEPER-81:
----------------------------------------

lol.. I don't understand the aversion to the patch. it changes NOTHING significant and lets the module compile under java 1.5

have you seen that it just changes ONE line? it changes "s.isEmpty()" to "s.length()==0"

please commit.

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>            Assignee: Andrew Kornev
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-81:
-----------------------------------

    Hadoop Flags: [Reviewed]

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>            Assignee: Andrew Kornev
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614787#action_12614787 ] 

Andrew Kornev commented on ZOOKEEPER-81:
----------------------------------------

The JMX instrumentation code relies on the MXBean feature that is available only since Java 6. The build.xml conditionally includes the JMX code only when compiled under Java 6.

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kornev updated ZOOKEEPER-81:
-----------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>            Assignee: Andrew Kornev
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-81:
----------------------------------

    Affects Version/s: 3.0.0
        Fix Version/s: 3.0.0

Fixed in 3.0.0

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.0.0
>            Reporter: Hiram Chirino
>            Assignee: Hiram Chirino
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-81) JMX module is using 1 java 6 method that has a java 5 equivalent

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615623#action_12615623 ] 

Hiram Chirino commented on ZOOKEEPER-81:
----------------------------------------

Java 1.5 can compile this for sure with the given patch. 

> JMX module is using 1 java 6 method that has a java 5 equivalent
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-81
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-81
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hiram Chirino
>            Assignee: Andrew Kornev
>         Attachments: ZOOKEEPER-81.patch
>
>
> It would be nice if the jmx module compiled and ran on java 5 too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.