diff options
Diffstat (limited to 'org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/SharedStyleManager.java')
-rw-r--r-- | org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/SharedStyleManager.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/SharedStyleManager.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/SharedStyleManager.java index 9a425518a..2f73a2794 100644 --- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/SharedStyleManager.java +++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/SharedStyleManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 IBM Corporation and others. + * Copyright (c) 2004, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -64,9 +64,9 @@ public class SharedStyleManager { return; try { URL styleURL = new URL(style); - InputStream is = styleURL.openStream(); - properties.load(is); - is.close(); + try (InputStream is = styleURL.openStream()) { + properties.load(is); + } context.path = new Path(style).removeLastSegments(1); String t = (String)properties.get("theme"); //$NON-NLS-1$ if (t!=null && t.trim().equalsIgnoreCase("true")) //$NON-NLS-1$ |