maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rfscholte closed pull request #2: [MCOMPILER-320] Show cases where failures occur
Date Thu, 01 Jan 1970 00:00:00 GMT
rfscholte closed pull request #2: [MCOMPILER-320] Show cases where failures occur
URL: https://github.com/apache/maven-compiler-plugin/pull/2
 
 
   

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/src/it/MCOMPILER-320_mrjar/lib/pom.xml b/src/it/MCOMPILER-320_mrjar/lib/pom.xml
index aa20eec..ac04fcc 100644
--- a/src/it/MCOMPILER-320_mrjar/lib/pom.xml
+++ b/src/it/MCOMPILER-320_mrjar/lib/pom.xml
@@ -76,6 +76,21 @@
               <outputDirectory>${project.build.directory}/classes/META-INF/versions/9</outputDirectory>
             </configuration>
           </execution>
+          <execution>
+            <id>compile-java10</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>compile</goal>
+            </goals>
+            <configuration>
+              <release>10</release>
+              <buildDirectory>${project.build.directory}</buildDirectory>
+              <compileSourceRoots>${project.basedir}/src/main/java10</compileSourceRoots>
+              <!-- we can output directly into the appropriate target directory;
+                this works out nicely -->
+              <outputDirectory>${project.build.directory}/classes/META-INF/versions/10</outputDirectory>
+            </configuration>
+          </execution>
         </executions>
       </plugin>
     </plugins>
diff --git a/src/it/MCOMPILER-320_mrjar/lib/src/main/java/asset/MyClass.java b/src/it/MCOMPILER-320_mrjar/lib/src/main/java/asset/MyClass.java
index 2b3004c..dbea4d3 100644
--- a/src/it/MCOMPILER-320_mrjar/lib/src/main/java/asset/MyClass.java
+++ b/src/it/MCOMPILER-320_mrjar/lib/src/main/java/asset/MyClass.java
@@ -29,6 +29,6 @@ public void decode( String bufferString ) throws IOException
         byte    mydata[];
         BASE64Decoder base64 = new BASE64Decoder();
 
-        mydata = base64.decodeBuffer( bufferString );
+        mydata = base64.decodeBuffer( bufferString + MyClass2.getTheString() );
     }
 }
diff --git a/src/it/MCOMPILER-320_mrjar/lib/src/main/java/asset/MyClass2.java b/src/it/MCOMPILER-320_mrjar/lib/src/main/java/asset/MyClass2.java
new file mode 100644
index 0000000..33493ea
--- /dev/null
+++ b/src/it/MCOMPILER-320_mrjar/lib/src/main/java/asset/MyClass2.java
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2018 Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags.
+ *
+ * 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
+ *
+ * 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 asset;
+
+/**
+ */
+public class MyClass2
+{
+    public static String getTheString() {
+        return "This is the string";
+    }
+}
diff --git a/src/it/MCOMPILER-320_mrjar/lib/src/main/java10/asset/MyClass3.java b/src/it/MCOMPILER-320_mrjar/lib/src/main/java10/asset/MyClass3.java
new file mode 100644
index 0000000..a17d1d4
--- /dev/null
+++ b/src/it/MCOMPILER-320_mrjar/lib/src/main/java10/asset/MyClass3.java
@@ -0,0 +1,33 @@
+package asset;
+
+/*
+ * 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.
+ */
+
+import java.io.IOException;
+import java.util.Base64;
+
+public class MyClass3
+{
+
+    public static void test() {
+        MyClass.exampleMethod();
+        // will fail to compile if the toxic supplement is present
+        Base64.getMimeEncoder();
+    }
+}
diff --git a/src/it/MCOMPILER-320_mrjar/lib/src/main/java9/asset/MyClass.java b/src/it/MCOMPILER-320_mrjar/lib/src/main/java9/asset/MyClass.java
index e0ce482..463aa2c 100644
--- a/src/it/MCOMPILER-320_mrjar/lib/src/main/java9/asset/MyClass.java
+++ b/src/it/MCOMPILER-320_mrjar/lib/src/main/java9/asset/MyClass.java
@@ -26,6 +26,12 @@
 {
     public void decode( String bufferString ) throws IOException
     {
-        byte    mydata[] = Base64.getDecoder().decode( bufferString );
+        byte    mydata[] = Base64.getDecoder().decode( bufferString + MyClass2.getTheString()
);
+        // will fail to compile if the toxic supplement is present
+        Base64.getMimeEncoder();
+    }
+
+    public static void exampleMethod() {
+        System.gc();
     }
 }


 

----------------------------------------------------------------
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

Mime
View raw message