You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by danhyun <gi...@git.apache.org> on 2015/06/03 17:14:37 UTC

[GitHub] incubator-groovy pull request: Fixing typos (an List -> a List)

GitHub user danhyun opened a pull request:

    https://github.com/apache/incubator-groovy/pull/31

    Fixing typos (an List -> a List)

    Hello from GR8Conf EU 2015

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/danhyun/incubator-groovy master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-groovy/pull/31.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #31
    
----
commit 20cea1dc30e04478beb8bb033f46d8d45c863b7b
Author: Danny Hyun <hy...@gmail.com>
Date:   2015-06-03T15:12:03Z

    Fixing typos (an List -> a List)

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-groovy pull request: Fixing typos (an List -> a List)

Posted by danhyun <gi...@git.apache.org>.
Github user danhyun commented on a diff in the pull request:

    https://github.com/apache/incubator-groovy/pull/31#discussion_r31668761
  
    --- Diff: subprojects/groovy-jmx/src/main/groovy/groovy/jmx/builder/JmxListenerFactory.groovy ---
    @@ -22,7 +22,7 @@ import javax.management.InstanceNotFoundException
     import javax.management.NotificationFilterSupport
     
     /**
    - * This factory class is used to create an listener() node for JmxBuilder.  Listener nodes are used
    + * This factory class is used to create a listener() node for JmxBuilder.  Listener nodes are used
    --- End diff --
    
    As intended :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-groovy pull request: Fixing typos (an List -> a List)

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-groovy/pull/31


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-groovy pull request: Fixing typos (an List -> a List)

Posted by danhyun <gi...@git.apache.org>.
Github user danhyun commented on a diff in the pull request:

    https://github.com/apache/incubator-groovy/pull/31#discussion_r31668710
  
    --- Diff: subprojects/groovy-jmx/src/main/groovy/groovy/jmx/builder/JmxListenerFactory.groovy ---
    @@ -1,81 +1,81 @@
    -/*
    - *  Licensed to the Apache Software Foundation (ASF) under one
    - *  or more contributor license agreements.  See the NOTICE file
    - *  distributed with this work for additional information
    - *  regarding copyright ownership.  The ASF licenses this file
    - *  to you under the Apache License, Version 2.0 (the
    - *  "License"); you may not use this file except in compliance
    - *  with the License.  You may obtain a copy of the License at
    - *
    - *    http://www.apache.org/licenses/LICENSE-2.0
    - *
    - *  Unless required by applicable law or agreed to in writing,
    - *  software distributed under the License is distributed on an
    - *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    - *  KIND, either express or implied.  See the License for the
    - *  specific language governing permissions and limitations
    - *  under the License.
    - */
    -package groovy.jmx.builder
    -
    -import javax.management.InstanceNotFoundException
    -import javax.management.NotificationFilterSupport
    -
    -/**
    - * This factory class is used to create an listener() node for JmxBuilder.  Listener nodes are used
    - * to create a generic event listener (that is automatically registered with the MBean) that can handle
    - * any event broadcasted on the MBeanServer's event bus.
    - * <p>
    - * Syntax supported:
    - * <pre>
    - * JmxBuilder.listener(event:"event type", from:"Object Name"|ObjectName(), call:{event->
    - *   // event handling code here.
    - * })
    - * </pre>
    - *
    - * @author Vladimir Vivien
    - * @see groovy.jmx.builder.JmxEventListener
    - */
    -class JmxListenerFactory extends AbstractFactory {
    -    public Object newInstance(FactoryBuilderSupport builder, Object nodeName, Object nodeParam, Map nodeAttribs) {
    -        if (nodeParam) {
    -            throw new JmxBuilderException("Node '${nodeName}' only supports named attributes.")
    -        }
    -        JmxBuilder fsb = (JmxBuilder) builder
    -        def server = fsb.getMBeanServer()
    -        def map = JmxMetaMapBuilder.createListenerMap(nodeAttribs);
    -
    -        def broadcaster = map.get("from");
    -        try {
    -            def eventType = (String) map.get("event");
    -            if (!server.isRegistered(broadcaster)) {
    -                throw new JmxBuilderException("MBean '${broadcaster.toString()}' is not registered in server.")
    -            }
    -            if (eventType) {
    -                NotificationFilterSupport filter = new NotificationFilterSupport();
    -                filter.enableType(eventType);
    -                server.addNotificationListener(broadcaster, JmxEventListener.getListener(), filter, map);
    -            } else {
    -                server.addNotificationListener(broadcaster, JmxEventListener.getListener(), null, map);
    -            }
    -        } catch (InstanceNotFoundException e) {
    -            throw new JmxBuilderException(e);
    -        }
    -
    -        map
    -    }
    -
    -    public boolean onHandleNodeAttributes(FactoryBuilderSupport builder, Object node, Map nodeAttribs) {
    -        return false;
    -    }
    -
    -    public boolean isLeaf() {
    -        return true;
    -    }
    -
    -    public void onNodeCompleted(FactoryBuilderSupport builder, Object parentNode, Object thisNode) {
    -        if (parentNode != null) {
    -            parentNode.add(thisNode)
    -        }
    -    }
    +/*
    + *  Licensed to the Apache Software Foundation (ASF) under one
    + *  or more contributor license agreements.  See the NOTICE file
    + *  distributed with this work for additional information
    + *  regarding copyright ownership.  The ASF licenses this file
    + *  to you under the Apache License, Version 2.0 (the
    + *  "License"); you may not use this file except in compliance
    + *  with the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + *  Unless required by applicable law or agreed to in writing,
    + *  software distributed under the License is distributed on an
    + *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + *  KIND, either express or implied.  See the License for the
    + *  specific language governing permissions and limitations
    + *  under the License.
    + */
    +package groovy.jmx.builder
    +
    +import javax.management.InstanceNotFoundException
    +import javax.management.NotificationFilterSupport
    +
    +/**
    + * This factory class is used to create a listener() node for JmxBuilder.  Listener nodes are used
    + * to create a generic event listener (that is automatically registered with the MBean) that can handle
    + * any event broadcasted on the MBeanServer's event bus.
    + * <p>
    + * Syntax supported:
    + * <pre>
    + * JmxBuilder.listener(event:"event type", from:"Object Name"|ObjectName(), call:{event->
    + *   // event handling code here.
    + * })
    + * </pre>
    + *
    + * @author Vladimir Vivien
    + * @see groovy.jmx.builder.JmxEventListener
    + */
    +class JmxListenerFactory extends AbstractFactory {
    +    public Object newInstance(FactoryBuilderSupport builder, Object nodeName, Object nodeParam, Map nodeAttribs) {
    +        if (nodeParam) {
    +            throw new JmxBuilderException("Node '${nodeName}' only supports named attributes.")
    +        }
    +        JmxBuilder fsb = (JmxBuilder) builder
    +        def server = fsb.getMBeanServer()
    +        def map = JmxMetaMapBuilder.createListenerMap(nodeAttribs);
    +
    +        def broadcaster = map.get("from");
    +        try {
    +            def eventType = (String) map.get("event");
    +            if (!server.isRegistered(broadcaster)) {
    +                throw new JmxBuilderException("MBean '${broadcaster.toString()}' is not registered in server.")
    +            }
    +            if (eventType) {
    +                NotificationFilterSupport filter = new NotificationFilterSupport();
    +                filter.enableType(eventType);
    +                server.addNotificationListener(broadcaster, JmxEventListener.getListener(), filter, map);
    +            } else {
    +                server.addNotificationListener(broadcaster, JmxEventListener.getListener(), null, map);
    +            }
    +        } catch (InstanceNotFoundException e) {
    +            throw new JmxBuilderException(e);
    +        }
    +
    +        map
    +    }
    +
    +    public boolean onHandleNodeAttributes(FactoryBuilderSupport builder, Object node, Map nodeAttribs) {
    +        return false;
    +    }
    +
    +    public boolean isLeaf() {
    +        return true;
    +    }
    +
    +    public void onNodeCompleted(FactoryBuilderSupport builder, Object parentNode, Object thisNode) {
    +        if (parentNode != null) {
    +            parentNode.add(thisNode)
    +        }
    +    }
    --- End diff --
    
    Yes, I was running this from a talk and noted the line endings and thought I would be scolded :P
    
    It also served as a lesson to be polite to project maintainers


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-groovy pull request: Fixing typos (an List -> a List)

Posted by PascalSchumacher <gi...@git.apache.org>.
Github user PascalSchumacher commented on a diff in the pull request:

    https://github.com/apache/incubator-groovy/pull/31#discussion_r31635222
  
    --- Diff: subprojects/groovy-jmx/src/main/groovy/groovy/jmx/builder/JmxListenerFactory.groovy ---
    @@ -1,81 +1,81 @@
    -/*
    - *  Licensed to the Apache Software Foundation (ASF) under one
    - *  or more contributor license agreements.  See the NOTICE file
    - *  distributed with this work for additional information
    - *  regarding copyright ownership.  The ASF licenses this file
    - *  to you under the Apache License, Version 2.0 (the
    - *  "License"); you may not use this file except in compliance
    - *  with the License.  You may obtain a copy of the License at
    - *
    - *    http://www.apache.org/licenses/LICENSE-2.0
    - *
    - *  Unless required by applicable law or agreed to in writing,
    - *  software distributed under the License is distributed on an
    - *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    - *  KIND, either express or implied.  See the License for the
    - *  specific language governing permissions and limitations
    - *  under the License.
    - */
    -package groovy.jmx.builder
    -
    -import javax.management.InstanceNotFoundException
    -import javax.management.NotificationFilterSupport
    -
    -/**
    - * This factory class is used to create an listener() node for JmxBuilder.  Listener nodes are used
    - * to create a generic event listener (that is automatically registered with the MBean) that can handle
    - * any event broadcasted on the MBeanServer's event bus.
    - * <p>
    - * Syntax supported:
    - * <pre>
    - * JmxBuilder.listener(event:"event type", from:"Object Name"|ObjectName(), call:{event->
    - *   // event handling code here.
    - * })
    - * </pre>
    - *
    - * @author Vladimir Vivien
    - * @see groovy.jmx.builder.JmxEventListener
    - */
    -class JmxListenerFactory extends AbstractFactory {
    -    public Object newInstance(FactoryBuilderSupport builder, Object nodeName, Object nodeParam, Map nodeAttribs) {
    -        if (nodeParam) {
    -            throw new JmxBuilderException("Node '${nodeName}' only supports named attributes.")
    -        }
    -        JmxBuilder fsb = (JmxBuilder) builder
    -        def server = fsb.getMBeanServer()
    -        def map = JmxMetaMapBuilder.createListenerMap(nodeAttribs);
    -
    -        def broadcaster = map.get("from");
    -        try {
    -            def eventType = (String) map.get("event");
    -            if (!server.isRegistered(broadcaster)) {
    -                throw new JmxBuilderException("MBean '${broadcaster.toString()}' is not registered in server.")
    -            }
    -            if (eventType) {
    -                NotificationFilterSupport filter = new NotificationFilterSupport();
    -                filter.enableType(eventType);
    -                server.addNotificationListener(broadcaster, JmxEventListener.getListener(), filter, map);
    -            } else {
    -                server.addNotificationListener(broadcaster, JmxEventListener.getListener(), null, map);
    -            }
    -        } catch (InstanceNotFoundException e) {
    -            throw new JmxBuilderException(e);
    -        }
    -
    -        map
    -    }
    -
    -    public boolean onHandleNodeAttributes(FactoryBuilderSupport builder, Object node, Map nodeAttribs) {
    -        return false;
    -    }
    -
    -    public boolean isLeaf() {
    -        return true;
    -    }
    -
    -    public void onNodeCompleted(FactoryBuilderSupport builder, Object parentNode, Object thisNode) {
    -        if (parentNode != null) {
    -            parentNode.add(thisNode)
    -        }
    -    }
    +/*
    + *  Licensed to the Apache Software Foundation (ASF) under one
    + *  or more contributor license agreements.  See the NOTICE file
    + *  distributed with this work for additional information
    + *  regarding copyright ownership.  The ASF licenses this file
    + *  to you under the Apache License, Version 2.0 (the
    + *  "License"); you may not use this file except in compliance
    + *  with the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + *  Unless required by applicable law or agreed to in writing,
    + *  software distributed under the License is distributed on an
    + *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + *  KIND, either express or implied.  See the License for the
    + *  specific language governing permissions and limitations
    + *  under the License.
    + */
    +package groovy.jmx.builder
    +
    +import javax.management.InstanceNotFoundException
    +import javax.management.NotificationFilterSupport
    +
    +/**
    + * This factory class is used to create a listener() node for JmxBuilder.  Listener nodes are used
    + * to create a generic event listener (that is automatically registered with the MBean) that can handle
    + * any event broadcasted on the MBeanServer's event bus.
    + * <p>
    + * Syntax supported:
    + * <pre>
    + * JmxBuilder.listener(event:"event type", from:"Object Name"|ObjectName(), call:{event->
    + *   // event handling code here.
    + * })
    + * </pre>
    + *
    + * @author Vladimir Vivien
    + * @see groovy.jmx.builder.JmxEventListener
    + */
    +class JmxListenerFactory extends AbstractFactory {
    +    public Object newInstance(FactoryBuilderSupport builder, Object nodeName, Object nodeParam, Map nodeAttribs) {
    +        if (nodeParam) {
    +            throw new JmxBuilderException("Node '${nodeName}' only supports named attributes.")
    +        }
    +        JmxBuilder fsb = (JmxBuilder) builder
    +        def server = fsb.getMBeanServer()
    +        def map = JmxMetaMapBuilder.createListenerMap(nodeAttribs);
    +
    +        def broadcaster = map.get("from");
    +        try {
    +            def eventType = (String) map.get("event");
    +            if (!server.isRegistered(broadcaster)) {
    +                throw new JmxBuilderException("MBean '${broadcaster.toString()}' is not registered in server.")
    +            }
    +            if (eventType) {
    +                NotificationFilterSupport filter = new NotificationFilterSupport();
    +                filter.enableType(eventType);
    +                server.addNotificationListener(broadcaster, JmxEventListener.getListener(), filter, map);
    +            } else {
    +                server.addNotificationListener(broadcaster, JmxEventListener.getListener(), null, map);
    +            }
    +        } catch (InstanceNotFoundException e) {
    +            throw new JmxBuilderException(e);
    +        }
    +
    +        map
    +    }
    +
    +    public boolean onHandleNodeAttributes(FactoryBuilderSupport builder, Object node, Map nodeAttribs) {
    +        return false;
    +    }
    +
    +    public boolean isLeaf() {
    +        return true;
    +    }
    +
    +    public void onNodeCompleted(FactoryBuilderSupport builder, Object parentNode, Object thisNode) {
    +        if (parentNode != null) {
    +            parentNode.add(thisNode)
    +        }
    +    }
    --- End diff --
    
    Thanks for the contribution. :+1: 
    
    Could you please revert the change (format/line endings?) above, so it's obvious that you corrected just the "an" typos?
    
    Thanks again.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---