You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/04/04 20:14:16 UTC

[GitHub] geertjanw closed pull request #476: [NETBEANS-410] remove compiled source code

geertjanw closed pull request #476: [NETBEANS-410] remove compiled source code
URL: https://github.com/apache/incubator-netbeans/pull/476
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/classfile/test/unit/src/org/netbeans/modules/classfile/JDK8ClassFilesTest.java b/classfile/test/unit/src/org/netbeans/modules/classfile/JDK8ClassFilesTest.java
deleted file mode 100644
index 2daa3db56..000000000
--- a/classfile/test/unit/src/org/netbeans/modules/classfile/JDK8ClassFilesTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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 org.netbeans.modules.classfile;
-
-import java.io.InputStream;
-import java.util.Arrays;
-import junit.framework.TestCase;
-import org.netbeans.modules.classfile.CPMethodHandleInfo.ReferenceKind;
-
-/**
- *
- * @author lahvac
- */
-public class JDK8ClassFilesTest extends TestCase {
-    
-    public JDK8ClassFilesTest(String testName) {
-        super(testName);
-    }
-    
-    public void testDefenderMethods() throws Exception {
-        InputStream classData = 
-            getClass().getResourceAsStream("datafiles/WithLambda.classx");
-        ClassFile classFile = new ClassFile(classData);
-        CPInvokeDynamicInfo invokeDynamic = (CPInvokeDynamicInfo) classFile.getConstantPool().get(2);
-        assertEquals(ConstantPool.CONSTANT_InvokeDynamic, invokeDynamic.getTag());
-        BootstrapMethod bootstrapMethod = classFile.getBootstrapMethods().get(invokeDynamic.getBootstrapMethod());
-        assertEquals("[23, 24, 25]", Arrays.toString(bootstrapMethod.getArguments()));
-        CPMethodHandleInfo bootstrapMH = (CPMethodHandleInfo) classFile.getConstantPool().get(bootstrapMethod.getMethodRef());
-        assertEquals(ConstantPool.CONSTANT_MethodHandle, bootstrapMH.getTag());
-        assertEquals(ReferenceKind.invokeStatic, bootstrapMH.getReferenceKind());
-        CPMethodInfo bootstrapMethodInfo = (CPMethodInfo) classFile.getConstantPool().get(bootstrapMH.getReference());
-        assertEquals("CallSite metaFactory(MethodHandles$Lookup,String,MethodType,MethodHandle,MethodHandle,MethodType)", bootstrapMethodInfo.getFullMethodName());
-        CPNameAndTypeInfo nameAndType = (CPNameAndTypeInfo) classFile.getConstantPool().get(invokeDynamic.getNameAndType());
-        assertEquals("()Ljava/lang/Runnable;", nameAndType.getDescriptor());
-        assertEquals("lambda", nameAndType.getName());
-        CPMethodTypeInfo methodType = (CPMethodTypeInfo) classFile.getConstantPool().get(25);
-        assertEquals(ConstantPool.CONSTANT_MethodType, methodType.getTag());
-        CPUTF8Info descriptor = (CPUTF8Info) classFile.getConstantPool().get(methodType.getDescriptor());
-        assertEquals("()V", descriptor.getName());
-    }
-}
\ No newline at end of file
diff --git a/classfile/test/unit/src/org/netbeans/modules/classfile/datafiles/WithLambda.classx b/classfile/test/unit/src/org/netbeans/modules/classfile/datafiles/WithLambda.classx
deleted file mode 100644
index 0bdc94521..000000000
Binary files a/classfile/test/unit/src/org/netbeans/modules/classfile/datafiles/WithLambda.classx and /dev/null differ
diff --git a/classfile/test/unit/src/regression/Issue219426Test.java b/classfile/test/unit/src/regression/Issue219426Test.java
deleted file mode 100644
index 6cd5b555d..000000000
--- a/classfile/test/unit/src/regression/Issue219426Test.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.
- */
-/*
- * Issue84411Test.java
- * JUnit based test
- *
- * Created on September 9, 2006, 9:01 AM
- */
-
-package regression;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import junit.framework.TestCase;
-import org.netbeans.modules.classfile.*;
-
-/**
- *
- * @author tball
- * @author Tomas Zezula
- */
-public class Issue219426Test extends TestCase {
-
-    public Issue219426Test(String testName) {
-        super(testName);
-    }
-
-    public void test84411() throws Exception {
-        final InputStream classData =
-            getClass().getResourceAsStream("datafiles/left-square.class");  //NOI18N
-        try {
-            final ClassFile c = new ClassFile(classData);
-            fail("Invalid class name [, exception expected.");    //NOI18N
-        } catch (InvalidClassFormatException e) {
-            //OK, expected
-        } finally {
-            classData.close();
-        }
-    }
-
-}
diff --git a/classfile/test/unit/src/regression/Issue84411Test.java b/classfile/test/unit/src/regression/Issue84411Test.java
deleted file mode 100644
index 503e63e0c..000000000
--- a/classfile/test/unit/src/regression/Issue84411Test.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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 regression;
-
-import java.io.InputStream;
-import junit.framework.TestCase;
-import junit.framework.*;
-import org.netbeans.modules.classfile.*;
-
-/**
- *
- * @author tball
- */
-public class Issue84411Test extends TestCase {
-    
-    public Issue84411Test(String testName) {
-        super(testName);
-    }
-    
-    /**
-     * Test whether the SwitchData.class from Java 6 build 71 can be read 
-     * successfully.  Issue 84411 reported that an IndexOutOfBoundsException
-     * was thrown due to an invalid name_attribute_index in one of that 
-     * class's Code attributes.
-     */
-    public void test84411() throws Exception {
-        InputStream classData = 
-            getClass().getResourceAsStream("datafiles/SwitchData.class");
-        ClassFile classFile = new ClassFile(classData);
-        classFile.toString();
-    }
-}
diff --git a/classfile/test/unit/src/regression/Issue91098Test.java b/classfile/test/unit/src/regression/Issue91098Test.java
deleted file mode 100644
index 3c0ba0e21..000000000
--- a/classfile/test/unit/src/regression/Issue91098Test.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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 regression;
-
-import java.io.InputStream;
-import java.util.List;
-import junit.framework.TestCase;
-import junit.framework.*;
-import org.netbeans.modules.classfile.*;
-
-/**
- *
- * @author Jan Lahoda
- */
-public class Issue91098Test extends TestCase {
-    
-    public Issue91098Test(String testName) {
-        super(testName);
-    }
-    
-    public void testAttributeLoading() throws Exception {
-        InputStream classData = 
-            getClass().getResourceAsStream("datafiles/test91098.class");
-        ClassFile classFile = new ClassFile(classData);
-        classFile.toString();
-    }
-    
-    public void testHasDeprecatedAttribute() throws Exception {
-        InputStream classData = 
-            getClass().getResourceAsStream("datafiles/test91098.class");
-        ClassFile classFile = new ClassFile(classData);
-        Method meth = classFile.getMethod("<init>", "(Ljava/lang/String;II)V");
-        List<Parameter> params = meth.getParameters();
-        assertEquals(params.size(), 3);  // declared parameter, plus two for internal enum params
-        Parameter param = params.get(0);
-        Annotation[] annotations = param.getAnnotations().toArray(new Annotation[0]);
-        assertEquals(annotations.length, 1);
-        ClassName type = annotations[0].getType();
-        assertEquals(type.getExternalName(), "java.lang.Deprecated");
-    }
-}
diff --git a/classfile/test/unit/src/regression/datafiles/SwitchData.class b/classfile/test/unit/src/regression/datafiles/SwitchData.class
deleted file mode 100644
index c1aec1bb7..000000000
Binary files a/classfile/test/unit/src/regression/datafiles/SwitchData.class and /dev/null differ
diff --git a/classfile/test/unit/src/regression/datafiles/left-square.class b/classfile/test/unit/src/regression/datafiles/left-square.class
deleted file mode 100644
index d359ac4d5..000000000
Binary files a/classfile/test/unit/src/regression/datafiles/left-square.class and /dev/null differ
diff --git a/classfile/test/unit/src/regression/datafiles/test91098.class b/classfile/test/unit/src/regression/datafiles/test91098.class
deleted file mode 100644
index f2596760a..000000000
Binary files a/classfile/test/unit/src/regression/datafiles/test91098.class and /dev/null differ
diff --git a/classfile/test/unit/src/regression/datafiles/test91098.java b/classfile/test/unit/src/regression/datafiles/test91098.java
deleted file mode 100644
index 1a0c2a244..000000000
--- a/classfile/test/unit/src/regression/datafiles/test91098.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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.
- */
-public enum test91098 {
-    A(1);
-    private test91098(@Deprecated int x) {}
-}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists