Skip to content

Commit ee8ddc1

Browse files
committed
Remove code added for jmod support
1 parent af92157 commit ee8ddc1

File tree

10 files changed

+4
-374
lines changed

10 files changed

+4
-374
lines changed

org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/batch/ClasspathJmod.java

-188
This file was deleted.

org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/batch/FileSystem.java

-3
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,7 @@ public static Classpath getClasspath(String classpathName, String encoding,
354354
new ClasspathMultiReleaseJar(file, true, accessRuleSet, destinationPath, release);
355355
}
356356
}
357-
} else if (format == Util.JMOD_FILE) {
358-
return new ClasspathJmod(file, true, accessRuleSet, null);
359357
}
360-
361358
}
362359
return result;
363360
}

org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/batch/ModuleFinder.java

-2
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,6 @@ private static String getModulePathForArchive(File file) {
234234
int format = Util.archiveFormat(file.getAbsolutePath());
235235
if (format == Util.ZIP_FILE) {
236236
return IModule.MODULE_INFO_CLASS;
237-
} else if(format == Util.JMOD_FILE) {
238-
return "classes/" + IModule.MODULE_INFO_CLASS; //$NON-NLS-1$
239237
}
240238
return null;
241239
}

org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/util/SuffixConstants.java

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ public interface SuffixConstants {
1818
public final static String EXTENSION_CLASS = "CLASS"; //$NON-NLS-1$
1919
public final static String EXTENSION_java = "java"; //$NON-NLS-1$
2020
public final static String EXTENSION_JAVA = "JAVA"; //$NON-NLS-1$
21-
public final static String EXTENSION_jmod = "jmod"; //$NON-NLS-1$
22-
public final static String EXTENSION_JMOD = "JMOD"; //$NON-NLS-1$
2321

2422
public final static String SUFFIX_STRING_class = "." + EXTENSION_class; //$NON-NLS-1$
2523
public final static String SUFFIX_STRING_CLASS = "." + EXTENSION_CLASS; //$NON-NLS-1$

org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/util/Util.java

-8
Original file line numberDiff line numberDiff line change
@@ -662,14 +662,6 @@ public final static int archiveFormat(String name) {
662662
}
663663
return -1; // it is a ".class" file, it cannot be a zip archive name
664664
}
665-
if (extensionLength == EXTENSION_jmod.length()) {
666-
for (int i = extensionLength-1; i >=0; i--) {
667-
if (Character.toLowerCase(name.charAt(length - extensionLength + i)) != EXTENSION_jmod.charAt(i)) {
668-
return ZIP_FILE; // not a ".jmod" file, so this is a potential archive name
669-
}
670-
}
671-
return JMOD_FILE;
672-
}
673665
return ZIP_FILE; // it is neither a ".java" file nor a ".class" file, so this is a potential archive name
674666
}
675667

org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JModPackageFragmentRoot.java

-54
This file was deleted.

org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModel.java

-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import org.eclipse.jdt.core.IPackageFragmentRoot;
3636
import org.eclipse.jdt.core.JavaModelException;
3737
import org.eclipse.jdt.core.WorkingCopyOwner;
38-
import org.eclipse.jdt.internal.compiler.util.SuffixConstants;
3938
import org.eclipse.jdt.internal.core.util.MementoTokenizer;
4039
import org.eclipse.jdt.internal.core.util.Messages;
4140

@@ -406,10 +405,6 @@ public static boolean isFile(File target) {
406405
public static boolean isJimage(File file) {
407406
return JavaModelManager.isJrt(file.getPath());
408407
}
409-
public static boolean isJmod(File file) {
410-
IPath path = Path.fromOSString(file.getPath());
411-
return SuffixConstants.EXTENSION_jmod.equalsIgnoreCase(path.getFileExtension());
412-
}
413408

414409
/**
415410
* Returns whether the provided path is an external file, checking and updating the

org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java

-8
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,6 @@ public void computePackageFragmentRoots(
750750
}
751751
}
752752
accumulatedRoots.addAll(imageRoots);
753-
} else if (JavaModel.isJmod(tf)) {
754-
root = new JModPackageFragmentRoot(entryPath, this, resolvedEntry.getExtraAttributes());
755753
}
756754
else {
757755
root = new JarPackageFragmentRoot(null, entryPath, this, resolvedEntry.getExtraAttributes());
@@ -2278,12 +2276,6 @@ public IPackageFragmentRoot getPackageFragmentRoot0(IPath externalLibraryPath, I
22782276
if (JavaModelManager.isJrt(externalLibraryPath)) {
22792277
return this.new JImageModuleFragmentBridge(externalLibraryPath, extraAttributes);
22802278
}
2281-
Object target = JavaModel.getTarget(externalLibraryPath, true/*check existency*/);
2282-
if (target instanceof File tf && JavaModel.isFile(tf)) {
2283-
if (JavaModel.isJmod((File) target)) {
2284-
return new JModPackageFragmentRoot(externalLibraryPath, this, extraAttributes);
2285-
}
2286-
}
22872279
return new JarPackageFragmentRoot(null, externalLibraryPath, this, extraAttributes);
22882280
}
22892281

0 commit comments

Comments
 (0)