--- old/src/java.desktop/share/classes/java/awt/desktop/OpenFilesEvent.java 2018-05-24 21:37:32.000000000 -0700 +++ new/src/java.desktop/share/classes/java/awt/desktop/OpenFilesEvent.java 2018-05-24 21:37:32.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,10 +25,12 @@ package java.awt.desktop; +import java.awt.Desktop; +import java.awt.GraphicsEnvironment; +import java.awt.HeadlessException; import java.io.File; import java.util.List; - /** * Event sent when the app is asked to open a list of files. * @@ -37,13 +39,21 @@ * @since 9 */ public final class OpenFilesEvent extends FilesEvent { + private static final long serialVersionUID = -3982871005867718956L; final String searchTerm; /** - * Constructs an {@code OpenFilesEvent} - * @param files files - * @param searchTerm searchTerm + * Constructs an {@code OpenFilesEvent}. + * + * @param files the list of files + * @param searchTerm the search term + * @throws HeadlessException if {@link GraphicsEnvironment#isHeadless()} + * returns {@code true} + * @throws UnsupportedOperationException if Desktop API is not supported on + * the current platform + * @see Desktop#isDesktopSupported() + * @see java.awt.GraphicsEnvironment#isHeadless */ public OpenFilesEvent(final List files, final String searchTerm) { super(files); @@ -57,7 +67,7 @@ * term that was used to find the files. This is for example the case * on Mac OS X, when the files were opened using the Spotlight search * menu or a Finder search window. - * + *

* This is useful for highlighting the search term in the documents when * they are opened. * @@ -66,5 +76,4 @@ public String getSearchTerm() { return searchTerm; } - }