You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2022/03/06 20:29:47 UTC

[olingo-odata2] branch master updated (fd5e784 -> 1c89f28)

This is an automated email from the ASF dual-hosted git repository.

mibo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/olingo-odata2.git.


    from fd5e784  [OLINGO-1275] attribute overrides fix (#18)
     new 24ce219  [OLINGO-1398] Improved jar file handling
     new 1c89f28  [OLINGO-1559] Excluded SECURITY.md from RAT check

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../odata2/annotation/processor/core/util/ClassHelper.java   | 12 +++++++-----
 pom.xml                                                      |  1 +
 2 files changed, 8 insertions(+), 5 deletions(-)

[olingo-odata2] 01/02: [OLINGO-1398] Improved jar file handling

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mibo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/olingo-odata2.git

commit 24ce21927e635259479bac1cfd5e806a8eee832d
Author: mibo <mi...@apache.org>
AuthorDate: Sun Mar 6 21:26:53 2022 +0100

    [OLINGO-1398] Improved jar file handling
---
 .../odata2/annotation/processor/core/util/ClassHelper.java   | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/odata2-annotation-processor/annotation-processor-core/src/main/java/org/apache/olingo/odata2/annotation/processor/core/util/ClassHelper.java b/odata2-annotation-processor/annotation-processor-core/src/main/java/org/apache/olingo/odata2/annotation/processor/core/util/ClassHelper.java
index 6a0dc3e..3162dad 100644
--- a/odata2-annotation-processor/annotation-processor-core/src/main/java/org/apache/olingo/odata2/annotation/processor/core/util/ClassHelper.java
+++ b/odata2-annotation-processor/annotation-processor-core/src/main/java/org/apache/olingo/odata2/annotation/processor/core/util/ClassHelper.java
@@ -24,6 +24,7 @@ import java.io.FilenameFilter;
 import java.io.IOException;
 import java.lang.reflect.Field;
 import java.lang.reflect.ParameterizedType;
+import java.net.JarURLConnection;
 import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -146,17 +147,18 @@ public class ClassHelper {
 
   private static Collection<String> getClassFqnFromJar(final URI uri, final String packageToScan) {
     final String jarFilePath;
-    String filepath = uri.getSchemeSpecificPart().substring(5);
+    String filepath = uri.toString();
     String[] split = filepath.split(JAR_RESOURCE_SEPARATOR);
-    if (split.length == 2) {
-      jarFilePath = split[0];
+    if (split.length > 1) {
+  	  jarFilePath = filepath.substring(0, filepath.lastIndexOf("!")+2);
     } else {
       throw new IllegalArgumentException("Illegal jar file path '" + filepath + "'.");
     }
-
     JarFile jarFile = null;
     try {
-      jarFile = new JarFile(jarFilePath);
+      URL url = new URL(jarFilePath);
+      JarURLConnection connection = (JarURLConnection) url.openConnection();
+      jarFile = connection.getJarFile();
       List<String> classFileNames = new ArrayList<String>();
       Enumeration<JarEntry> entries = jarFile.entries();
 

[olingo-odata2] 02/02: [OLINGO-1559] Excluded SECURITY.md from RAT check

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mibo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/olingo-odata2.git

commit 1c89f28007dfe22a9f4d344554640552acf912b0
Author: mibo <mi...@apache.org>
AuthorDate: Sun Mar 6 21:29:38 2022 +0100

    [OLINGO-1559] Excluded SECURITY.md from RAT check
---
 pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pom.xml b/pom.xml
index 9e5b8ad..c7f4b22 100644
--- a/pom.xml
+++ b/pom.xml
@@ -364,6 +364,7 @@
 										<exclude>**/*.batch</exclude>
 										<exclude>**/NOTICE</exclude>
 										<exclude>**/DEPENDENCIES</exclude>
+										<exclude>**/SECURITY.md</exclude>
 										<exclude>**/goal.txt</exclude>
 										<exclude>**/target/**</exclude>
 										<exclude>**/*.iml</exclude>