@@ -0,0 +1,1648 @@
+/*%0A * Copyright 2015 JBoss Inc%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * %0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A*/%0A%0Apackage org.drools.compiler.lang;%0A%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport org.junit.Test;%0Aimport org.kie.api.io.ResourceType;%0Aimport org.kie.internal.builder.KnowledgeBuilder;%0Aimport org.kie.internal.builder.KnowledgeBuilderFactory;%0Aimport org.kie.internal.io.ResourceFactory;%0A%0Apublic class DRLParserHelperTest %7B%0A%0A    /**%0A     * this test will throw a %7B@link RuntimeException%7D caused %0A     * by an %7B@link IndexOutOfBoundsException%7D%3Cbr%3E%0A     * %0A     */%0A    @Test%0A    public void test() throws Exception %7B%0A        byte%5B%5D content=new byte%5B%5D%7B0x04,0x44,0x00,0x00,0x60,0x00,0x00,0x00%7D;%0A        //%22content%22 may come from any .DS_Store file of Mac,%0A        //i just use this 8-Byte instead to reproduce the case%0A        %0A        KnowledgeBuilder knowledgeBuilder = KnowledgeBuilderFactory%0A                .newKnowledgeBuilder();%0A        try %7B%0A            knowledgeBuilder.add(ResourceFactory.newByteArrayResource(content), %0A                    ResourceType.DRL);%0A        %7D catch (Exception e) %7B%0A            assertTrue(e instanceof RuntimeException);%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%7D

add a test case to reproduce Drools's [pull-500]