Skip to content

Commit

Permalink
Prefix jdk-specific JDKVersionSpecificResourceBuilders so that qualif…
Browse files Browse the repository at this point in the history
…ied naming becomes unnecessary
  • Loading branch information
olpaw committed Jul 13, 2021
1 parent 4287187 commit 2377378
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
import org.graalvm.nativeimage.hosted.Feature;

import com.oracle.svm.core.annotate.AutomaticFeature;
import com.oracle.svm.core.jdk.JDKVersionSpecificResourceBuilder;

public class JDKVersionSpecificResourceBuilder implements com.oracle.svm.core.jdk.JDKVersionSpecificResourceBuilder {
public class JDKVersionSpecificResourceBuilderJDK11OrLater implements JDKVersionSpecificResourceBuilder {

@Override
public Object buildResource(String name, URL url, URLConnection urlConnection) {
Expand Down Expand Up @@ -81,6 +82,6 @@ public boolean isInConfiguration(IsInConfigurationAccess access) {

@Override
public void afterRegistration(AfterRegistrationAccess access) {
ImageSingletons.add(com.oracle.svm.core.jdk.JDKVersionSpecificResourceBuilder.class, new JDKVersionSpecificResourceBuilder());
ImageSingletons.add(JDKVersionSpecificResourceBuilder.class, new JDKVersionSpecificResourceBuilderJDK11OrLater());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
import org.graalvm.nativeimage.hosted.Feature;

import com.oracle.svm.core.annotate.AutomaticFeature;
import com.oracle.svm.core.jdk.JDKVersionSpecificResourceBuilder;

public class JDKVersionSpecificResourceBuilder implements com.oracle.svm.core.jdk.JDKVersionSpecificResourceBuilder {
public class JDKVersionSpecificResourceBuilderJDK8 implements JDKVersionSpecificResourceBuilder {

@Override
public Object buildResource(String name, URL url, URLConnection urlConnection) {
Expand Down Expand Up @@ -79,6 +80,6 @@ public boolean isInConfiguration(IsInConfigurationAccess access) {

@Override
public void afterRegistration(AfterRegistrationAccess access) {
ImageSingletons.add(com.oracle.svm.core.jdk.JDKVersionSpecificResourceBuilder.class, new JDKVersionSpecificResourceBuilder());
ImageSingletons.add(JDKVersionSpecificResourceBuilder.class, new JDKVersionSpecificResourceBuilderJDK8());
}
}

0 comments on commit 2377378

Please sign in to comment.