diff --git a/build.xml b/build.xml index 1138fef3..bd9f67d5 100644 --- a/build.xml +++ b/build.xml @@ -58,6 +58,7 @@ patches/8289.diff patches/7893-draft.diff patches/8442-draft.diff + patches/8460-draft.diff patches/disable-error-notification.diff patches/mvn-sh.diff patches/project-marker-jdk.diff diff --git a/patches/8460-draft.diff b/patches/8460-draft.diff new file mode 100644 index 00000000..171e0b7d --- /dev/null +++ b/patches/8460-draft.diff @@ -0,0 +1,22 @@ +--- a/java/maven.hints/src/org/netbeans/modules/maven/hints/pom/MavenPOMParser.java ++++ b/java/maven.hints/src/org/netbeans/modules/maven/hints/pom/MavenPOMParser.java +@@ -23,6 +23,7 @@ + import java.util.prefs.PreferenceChangeListener; + import java.util.prefs.Preferences; + import javax.swing.event.ChangeListener; ++import javax.swing.text.Document; + import org.netbeans.api.editor.mimelookup.MimeRegistration; + import org.netbeans.editor.BaseDocument; + import org.netbeans.modules.maven.embedder.EmbedderFactory; +@@ -76,9 +77,9 @@ + return; + } + //#236116 passing document protects from looking it up later and causing a deadlock. +- final BaseDocument document = (BaseDocument)snapshot.getSource().getDocument(false); ++ final Document document = snapshot.getSource().getDocument(false); + final DataObject d = sFile.getLookup().lookup(DataObject.class); +- ModelSource ms = Utilities.createModelSource(sFile, d, document); ++ ModelSource ms = Utilities.createModelSource(sFile, d, document instanceof BaseDocument bd ? bd : null); + synchronized (this) { + theModel = POMModelFactory.getDefault().getModel(ms); + lastSnapshot = snapshot;