diff options
author | Alexander Kurtakov | 2017-06-21 12:43:34 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2017-06-21 13:01:46 +0000 |
commit | 7f22c5b775e1e0ce90bbf3055fd99b974d1e7414 (patch) | |
tree | c720b93e0776396735899f32589feed349dea9d1 /bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src | |
parent | c14ec65184393b6cc1ecd976068b8bdd7938eec1 (diff) | |
download | rt.equinox.p2-7f22c5b775e1e0ce90bbf3055fd99b974d1e7414.tar.gz rt.equinox.p2-7f22c5b775e1e0ce90bbf3055fd99b974d1e7414.tar.xz rt.equinox.p2-7f22c5b775e1e0ce90bbf3055fd99b974d1e7414.zip |
Bug 518574 - Use StandardCharsets
Bump BREE to 1.8 for bundles that were too low to have StandardCharsets.
Change-Id: Iac9e9615c5179b970df893182f5f1c6e3dd4d574
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src')
2 files changed, 5 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java index be55efdb3..317bcde03 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 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 @@ -55,8 +55,6 @@ public class ConfigurationWriter implements ConfigurationConstants { } writer.endTag(ELEMENT_CONFIG); - } catch (UnsupportedEncodingException e) { - throw new ProvisionException(NLS.bind(Messages.error_saving_config, location), e); } catch (FileNotFoundException e) { throw new ProvisionException(NLS.bind(Messages.error_saving_config, location), e); } finally { diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java index 59f1b2c1e..b9d88e083 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 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 @@ -11,6 +11,7 @@ package org.eclipse.equinox.internal.p2.update; import java.io.*; +import java.nio.charset.StandardCharsets; import java.util.Map; /** @@ -24,8 +25,8 @@ public class XMLWriter extends PrintWriter { /* constants */ protected static final String XML_VERSION = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; //$NON-NLS-1$ - public XMLWriter(OutputStream output) throws UnsupportedEncodingException { - super(new OutputStreamWriter(output, "UTF8")); //$NON-NLS-1$ + public XMLWriter(OutputStream output) { + super(new OutputStreamWriter(output, StandardCharsets.UTF_8)); tab = 0; println(XML_VERSION); } |