Return-Path: X-Original-To: apmail-zest-commits-archive@minotaur.apache.org Delivered-To: apmail-zest-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EF20A18209 for ; Wed, 10 Jun 2015 04:21:38 +0000 (UTC) Received: (qmail 4276 invoked by uid 500); 10 Jun 2015 04:21:38 -0000 Delivered-To: apmail-zest-commits-archive@zest.apache.org Received: (qmail 4225 invoked by uid 500); 10 Jun 2015 04:21:38 -0000 Mailing-List: contact commits-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list commits@zest.apache.org Received: (qmail 4133 invoked by uid 99); 10 Jun 2015 04:21:38 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jun 2015 04:21:38 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 97B5BE032D; Wed, 10 Jun 2015 04:21:38 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: niclas@apache.org To: commits@zest.apache.org Date: Wed, 10 Jun 2015 04:21:42 -0000 Message-Id: <7af379c026f641568e465cea5605b188@git.apache.org> In-Reply-To: <532db60551d54f8693751ce9f50295f6@git.apache.org> References: <532db60551d54f8693751ce9f50295f6@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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. 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 Authored: Wed Jun 10 12:18:27 2015 +0800 Committer: Niclas Hedhman 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"> - beta + stable none - some + complete ALv2 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." ); + } +}