polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [5/6] zest-qi4j git commit: Issue in JRuby scripting with UTF-8 characters. Ruby comments are not same as C/C++/Java ones. JRuby stack trace doesn't exist.
Date Wed, 10 Jun 2015 04:21:42 GMT
Issue in JRuby scripting with UTF-8 characters.
Ruby comments are not same as C/C++/Java ones.
JRuby stack trace doesn't exist.


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/18b26ffa
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/18b26ffa
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/18b26ffa

Branch: refs/heads/develop
Commit: 18b26ffa60e35ea46dd2f6dffcc5646fb7bfcea8
Parents: 70f2528
Author: Niclas Hedhman <niclas@hedhman.org>
Authored: Wed Jun 10 12:18:27 2015 +0800
Committer: Niclas Hedhman <niclas@hedhman.org>
Committed: Wed Jun 10 12:18:27 2015 +0800

----------------------------------------------------------------------
 .../composite/FragmentInvocationHandler.java    |  2 +-
 .../org/qi4j/lang/jruby/MyDomainType.rb         |  2 +-
 libraries/scripting/dev-status.xml              |  4 ++--
 .../library/scripting/ScriptUtilImplTest.java   | 22 ++++++++++++++++++++
 4 files changed, 26 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/18b26ffa/core/runtime/src/main/java/org/qi4j/runtime/composite/FragmentInvocationHandler.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/qi4j/runtime/composite/FragmentInvocationHandler.java
b/core/runtime/src/main/java/org/qi4j/runtime/composite/FragmentInvocationHandler.java
index 9d47ac0..ffd4a8f 100644
--- a/core/runtime/src/main/java/org/qi4j/runtime/composite/FragmentInvocationHandler.java
+++ b/core/runtime/src/main/java/org/qi4j/runtime/composite/FragmentInvocationHandler.java
@@ -52,7 +52,7 @@ abstract class FragmentInvocationHandler
         StackTraceElement[] trace = throwable.getStackTrace();
 
         // Check if exception originated within Qi4j or JDK - if so then skip compaction
-        if( !isApplicationClass( trace[ 0 ].getClassName() ) )
+        if( trace.length == 0 || !isApplicationClass( trace[ 0 ].getClassName() ) )
         {
             return throwable;
         }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/18b26ffa/libraries/lang-jruby/src/test/resources/org/qi4j/lang/jruby/MyDomainType.rb
----------------------------------------------------------------------
diff --git a/libraries/lang-jruby/src/test/resources/org/qi4j/lang/jruby/MyDomainType.rb b/libraries/lang-jruby/src/test/resources/org/qi4j/lang/jruby/MyDomainType.rb
index b64d1fe..bc75807 100644
--- a/libraries/lang-jruby/src/test/resources/org/qi4j/lang/jruby/MyDomainType.rb
+++ b/libraries/lang-jruby/src/test/resources/org/qi4j/lang/jruby/MyDomainType.rb
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007 Rickard Öberg
+ * Copyright 2007 Rickard Oberg
  * Licensed 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

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/18b26ffa/libraries/scripting/dev-status.xml
----------------------------------------------------------------------
diff --git a/libraries/scripting/dev-status.xml b/libraries/scripting/dev-status.xml
index 654d3aa..766fb0f 100644
--- a/libraries/scripting/dev-status.xml
+++ b/libraries/scripting/dev-status.xml
@@ -5,13 +5,13 @@
         http://www.qi4j.org/schemas/2008/dev-status/1/dev-status.xsd">
   <status>
     <!--none,early,beta,stable,mature-->
-    <codebase>beta</codebase>
+    <codebase>stable</codebase>
 
     <!-- none, brief, good, complete -->
     <documentation>none</documentation>
 
     <!-- none, some, good, complete -->
-    <unittests>some</unittests>
+    <unittests>complete</unittests>
   </status>
   <licenses>
     <license>ALv2</license>

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/18b26ffa/libraries/scripting/src/test/java/org/qi4j/library/scripting/ScriptUtilImplTest.java
----------------------------------------------------------------------
diff --git a/libraries/scripting/src/test/java/org/qi4j/library/scripting/ScriptUtilImplTest.java
b/libraries/scripting/src/test/java/org/qi4j/library/scripting/ScriptUtilImplTest.java
new file mode 100644
index 0000000..50832bc
--- /dev/null
+++ b/libraries/scripting/src/test/java/org/qi4j/library/scripting/ScriptUtilImplTest.java
@@ -0,0 +1,22 @@
+package org.qi4j.library.scripting;
+
+import org.junit.Test;
+
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.junit.Assert.assertThat;
+
+public class ScriptUtilImplTest
+{
+    @Test
+    public void testDefaultStream()
+    {
+        ScriptUtil underTest = new ScriptUtilImpl();
+        assertThat( underTest.getOut(), equalTo(System.out));
+    }
+
+    @Test( expected = ScriptException.class )
+    public void testException()
+    {
+        throw new ScriptException( "This is a test exception." );
+    }
+}


Mime
View raw message