com.groupbyinc.flux.bootstrap.JarHell.class Maven / Gradle / Ivy
???? 4? %com/groupbyinc/flux/bootstrap/JarHell java/lang/Object JarHell.java 'com/groupbyinc/flux/bootstrap/JarHell$1 %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles
Lookup ()V
this 'Lcom/groupbyinc/flux/bootstrap/JarHell; main ([Ljava/lang/String;)V java/lang/Exception .Lcom/groupbyinc/flux/common/SuppressForbidden; reason command line tool java/lang/System out Ljava/io/PrintStream; checking for jar hell... java/io/PrintStream " println (Ljava/lang/String;)V $ %
# & java/util/Objects ( requireNonNull &(Ljava/lang/Object;)Ljava/lang/Object; * +
) , "java/lang/invoke/LambdaMetafactory . metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; 0 1
/ 2 3 (Ljava/lang/Object;)V 5 ' % accept 4(Ljava/io/PrintStream;)Ljava/util/function/Consumer; 9 : ; checkJarHell (Ljava/util/function/Consumer;)V = >
? no jar hell found A args [Ljava/lang/String; java/io/IOException E java/net/URISyntaxException G java/lang/Class I getClassLoader ()Ljava/lang/ClassLoader; K L
J M java/lang/StringBuilder O
P java.class.path: R append -(Ljava/lang/String;)Ljava/lang/StringBuilder; T U
P V java.class.path X getProperty &(Ljava/lang/String;)Ljava/lang/String; Z [
\ toString ()Ljava/lang/String; ^ _
P ` java/util/function/Consumer b 9 5 c d sun.boot.class.path: f sun.boot.class.path h java/net/URLClassLoader j classloader urls: l getURLs ()[Ljava/net/URL; n o
k p java/util/Arrays r '([Ljava/lang/Object;)Ljava/lang/String; ^ t
s u java/lang/ClassLoader w parseClassPath ()Ljava/util/Set; y z
{ /(Ljava/util/Set;Ljava/util/function/Consumer;)V = }
~ output 1Ljava/util/function/Consumer; Ljava/util/function/Consumer; loader Ljava/lang/ClassLoader; #(Ljava/lang/String;)Ljava/util/Set; y ?
? 8resolves against CWD because that is how classpaths work java/net/MalformedURLException ? path.separator ? file.separator ? java/lang/String ? split '(Ljava/lang/String;)[Ljava/lang/String; ? ?
? ? java/util/LinkedHashSet ?
? D
java/util/Set ? isEmpty ()Z ? ?
? ? java/lang/IllegalStateException ? iClasspath should not contain empty elements! (outdated shell script from a previous version?) classpath=' ? ' ?
%
? ? / ?
startsWith (Ljava/lang/String;)Z ? ?
? ? \ ? equals (Ljava/lang/Object;)Z ? ?
? ? replace D(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; ? ?
? ? length ()I ? ?
? ? charAt (I)C ? ?
? ? substring (I)Ljava/lang/String; ? ?
? ? 'com/groupbyinc/flux/common/io/PathUtils ? get ;(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path; ? ?
? ? java/nio/file/Path ? toUri ()Ljava/net/URI; ? ? ? ? java/net/URI ? toURL ()Ljava/net/URL; ? ?
? ? add ? ? ? ? jar hell! ?
lineSeparator ? _
? duplicate jar [ ? ] on classpath: ? java/lang/RuntimeException ? (Ljava/lang/Throwable;)V
?
? ? java/util/Collections ? unmodifiableSet (Ljava/util/Set;)Ljava/util/Set; ? ?
? ? url Ljava/net/URL; e Ljava/net/MalformedURLException; element Ljava/lang/String; classPath
pathSeparator
fileSeparator elements urlElements Ljava/util/Set; Ljava/util/Set; -needs JarFile for speed, just reading entries java/lang/Throwable ? java.home ? java.home: ? java/util/HashMap ? (I)V
java/util/HashSet
iterator ()Ljava/util/Iterator;
?
java/util/Map
java/util/Iterator hasNext ? next ()Ljava/lang/Object; java/net/URL toURI ?
$(Ljava/net/URI;)Ljava/nio/file/Path; ?
? ? ? excluding system resource: ! -(Ljava/lang/Object;)Ljava/lang/StringBuilder; T#
P$ ? ` .jar' endsWith) ?
?* duplicate jar on classpath: , examining jar: . java/util/jar/JarFile0
1 ? getManifest ()Ljava/util/jar/Manifest;34
15
checkManifest /(Ljava/util/jar/Manifest;Ljava/nio/file/Path;)V78
9 java/util/jar/Manifest; entries ()Ljava/util/Enumeration;=>
1? java/util/EnumerationA hasMoreElementsC ?BD nextElementFBG java/util/jar/JarEntryI getNameK _
JL .classN (CC)Ljava/lang/String; ?P
?Q (II)Ljava/lang/String; ?S
?T
checkClass 8(Ljava/util/Map;Ljava/lang/String;Ljava/nio/file/Path;)VVW
X closeZ
1[
addSuppressed] ?
?^ examining directory: `
getFileSystem ()Ljava/nio/file/FileSystem;bc ?d java/nio/file/FileSystemf getSeparatorh _
gi L(Ljava/nio/file/Path;Ljava/lang/String;Ljava/util/Map;Ljava/nio/file/Path;)V
k
l java/nio/file/Filesn walkFileTree E(Ljava/nio/file/Path;Ljava/nio/file/FileVisitor;)Ljava/nio/file/Path;pq
or entry manifest Ljava/util/jar/Manifest; 1Ljava/util/Enumeration; Ljava/util/Enumeration; file Ljava/util/jar/JarFile; root Ljava/nio/file/Path; sep path urls javaHome clazzes 7Ljava/util/Map; Ljava/util/Map; seenJars %Ljava/util/Set; getMainAttributes ()Ljava/util/jar/Attributes;??
<? X-Compile-Target-JDK? java/util/jar/Attributes? getValue? [
?? checkVersionFormat? %
? checkJavaVersion '(Ljava/lang/String;Ljava/lang/String;)V??
? jar
targetVersion )com/groupbyinc/flux/bootstrap/JavaVersion? isValid? ?
?? java/util/Locale? ROOT Ljava/util/Locale;?? ?? zversion string must be a sequence of nonnegative decimal integers separated by "."'s and may have leading zeros but was %s? format K(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;??
?? parse ?(Ljava/lang/String;)Lcom/groupbyinc/flux/bootstrap/JavaVersion;??
?? current -()Lcom/groupbyinc/flux/bootstrap/JavaVersion;??
?? compareTo .(Lcom/groupbyinc/flux/bootstrap/JavaVersion;)I??
?? %%s requires Java %s:, your system: %s?
? ` resource version +Lcom/groupbyinc/flux/bootstrap/JavaVersion; put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;??? ? ? org.apache.xmlbeans? class: ? exists multiple times in jar: ?
!!!!!!!!!? jar1: ? jar2: ? clazz jarpath previous
access$000 x0 x1 x2 Code LocalVariableTable LineNumberTable
Exceptions RuntimeInvisibleAnnotations LocalVariableTypeTable
StackMapTable Signature 4(Ljava/util/function/Consumer;)V !()Ljava/util/Set; 3(Ljava/lang/String;)Ljava/util/Set; S(Ljava/util/Set;Ljava/util/function/Consumer;)V `(Ljava/util/Map;Ljava/lang/String;Ljava/nio/file/Path;)V BootstrapMethods
SourceFile InnerClasses !
? / *? ? ? ? @ ? W !? !? '? Y? -W? <