JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-6424

Allow java_signature to generate throws clause for methods/constructors

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.7.0.pre1
    • Fix Version/s: JRuby 1.7.0.pre2
    • Component/s: Java Integration
    • Labels:
      None
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      Currently java_signature can contain a throws clause, but despite being parsed properly, the java class generated with jrubyc doesn't contain the corresponding clause.

      This patch implements this feature, along with the relevant specs, and some minor cleanups in the java_integration package.

      1. java-signature.patch
        24 kB
        Sébastien Le Callonnec

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        Thanks for the patch! Sorry it was a bit delayed!

        commit 619661797d71d8b364d233698b881820a742c9cd
        Author: Sébastien Le Callonnec <sebastien@weblogism.com>
        Date:   Sun Feb 5 15:24:15 2012 +0000
        
            Implemented throws clause for java_signature
            
            Signed-off-by: Charles Oliver Nutter <headius@headius.com>
        
        :100644 100644 d5e6366... 403bbbb... M	lib/ruby/shared/jruby/compiler/java_class.rb
        :100644 100644 3c9a475... 8fbe2e3... M	spec/java_integration/jrubyc/java/constructor_spec.rb
        :100644 100644 9591ca1... fa03ad9... M	spec/java_integration/jrubyc/java/method_spec.rb
        
        commit 87ce3f3a91d32274ef042c191b37cd2ee4be92e4
        Author: Sébastien Le Callonnec <sebastien@weblogism.com>
        Date:   Sun Feb 5 15:23:27 2012 +0000
        
            Modified to pass with rspec2
            
            Signed-off-by: Charles Oliver Nutter <headius@headius.com>
        
        :000000 100644 0000000... af93670... A	spec/grammar/java_signature/helpers/.signature_parser_helper.rb.rej.swp
        :000000 100644 0000000... f936037... A	spec/grammar/java_signature/helpers/.signature_parser_helper.rb.swp
        
        commit d703aa4d024cd248866723cb10a9ff1e111c8111
        Author: Sébastien Le Callonnec <sebastien@weblogism.com>
        Date:   Sun Feb 5 15:22:09 2012 +0000
        
            Cleanup, and added license header
            
            Signed-off-by: Charles Oliver Nutter <headius@headius.com>
        
        :100644 100644 d71d1bf... 9240194... M	src/org/jruby/ast/java_signature/ArrayTypeNode.java
        :100644 100644 a706c65... 6612513... M	src/org/jruby/ast/java_signature/ConstructorSignatureNode.java
        :100644 100644 e69429f... e21d878... M	src/org/jruby/ast/java_signature/MethodSignatureNode.java
        :100644 100644 0ecb7b0... 0c6502b... M	src/org/jruby/ast/java_signature/Modifier.java
        :100644 100644 0ec11d7... df5835b... M	src/org/jruby/ast/java_signature/ParameterNode.java
        :100644 100644 306403e... a66c1cb... M	src/org/jruby/ast/java_signature/PrimitiveTypeNode.java
        :100644 100644 5fed03f... be1e8ac... M	src/org/jruby/ast/java_signature/ReferenceTypeNode.java
        :100644 100644 dbfa1be... 39c027f... M	src/org/jruby/ast/java_signature/SignatureNode.java
        :100644 100644 d7ea984... 3c7b82b... M	src/org/jruby/ast/java_signature/TypeNode.java
        
        Show
        Charles Oliver Nutter added a comment - Thanks for the patch! Sorry it was a bit delayed! commit 619661797d71d8b364d233698b881820a742c9cd Author: Sébastien Le Callonnec <sebastien@weblogism.com> Date: Sun Feb 5 15:24:15 2012 +0000 Implemented throws clause for java_signature Signed-off-by: Charles Oliver Nutter <headius@headius.com> :100644 100644 d5e6366... 403bbbb... M lib/ruby/shared/jruby/compiler/java_class.rb :100644 100644 3c9a475... 8fbe2e3... M spec/java_integration/jrubyc/java/constructor_spec.rb :100644 100644 9591ca1... fa03ad9... M spec/java_integration/jrubyc/java/method_spec.rb commit 87ce3f3a91d32274ef042c191b37cd2ee4be92e4 Author: Sébastien Le Callonnec <sebastien@weblogism.com> Date: Sun Feb 5 15:23:27 2012 +0000 Modified to pass with rspec2 Signed-off-by: Charles Oliver Nutter <headius@headius.com> :000000 100644 0000000... af93670... A spec/grammar/java_signature/helpers/.signature_parser_helper.rb.rej.swp :000000 100644 0000000... f936037... A spec/grammar/java_signature/helpers/.signature_parser_helper.rb.swp commit d703aa4d024cd248866723cb10a9ff1e111c8111 Author: Sébastien Le Callonnec <sebastien@weblogism.com> Date: Sun Feb 5 15:22:09 2012 +0000 Cleanup, and added license header Signed-off-by: Charles Oliver Nutter <headius@headius.com> :100644 100644 d71d1bf... 9240194... M src/org/jruby/ast/java_signature/ArrayTypeNode.java :100644 100644 a706c65... 6612513... M src/org/jruby/ast/java_signature/ConstructorSignatureNode.java :100644 100644 e69429f... e21d878... M src/org/jruby/ast/java_signature/MethodSignatureNode.java :100644 100644 0ecb7b0... 0c6502b... M src/org/jruby/ast/java_signature/Modifier.java :100644 100644 0ec11d7... df5835b... M src/org/jruby/ast/java_signature/ParameterNode.java :100644 100644 306403e... a66c1cb... M src/org/jruby/ast/java_signature/PrimitiveTypeNode.java :100644 100644 5fed03f... be1e8ac... M src/org/jruby/ast/java_signature/ReferenceTypeNode.java :100644 100644 dbfa1be... 39c027f... M src/org/jruby/ast/java_signature/SignatureNode.java :100644 100644 d7ea984... 3c7b82b... M src/org/jruby/ast/java_signature/TypeNode.java

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Sébastien Le Callonnec
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: