Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-06-17 09:35:49 +0000
committerLars Vogel2019-06-18 13:22:14 +0000
commit59855f91b09ce751c87f3baebcad01936e2c1377 (patch)
treec77df0817a548d985f8c5d372f9d4ac730a00984
parent12f5f97ce82861982000009e75cf4a0c7af8ee8a (diff)
downloadeclipse.platform.ua-59855f91b09ce751c87f3baebcad01936e2c1377.tar.gz
eclipse.platform.ua-59855f91b09ce751c87f3baebcad01936e2c1377.tar.xz
eclipse.platform.ua-59855f91b09ce751c87f3baebcad01936e2c1377.zip
Remove redundant block
Change-Id: Ib0fca9ed315ff118e330199a5f0c8c1037673b3c Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/StyledLineWrapper.java15
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java22
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java3
-rw-r--r--org.eclipse.tips.ui/src/org/eclipse/tips/ui/internal/util/ResourceManager.java38
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java6
5 files changed, 36 insertions, 48 deletions
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/StyledLineWrapper.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/StyledLineWrapper.java
index 16f023d03..a646d604e 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/StyledLineWrapper.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/StyledLineWrapper.java
@@ -181,14 +181,13 @@ public class StyledLineWrapper implements StyledTextContent {
// if we reached the end, stop
if (start >= textChars.length)
break;
- { // see if the next character is an LF
- ch = textChars[start];
- if (ch == SWT.LF) {
- start++;
- i++;
- if (start >= textChars.length)
- break;
- }
+ // see if the next character is an LF
+ ch = textChars[start];
+ if (ch == SWT.LF) {
+ start++;
+ i++;
+ if (start >= textChars.length)
+ break;
}
} else if (ch == SWT.LF) {
lines.add(new String(textChars, start, i - start));
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java
index 51517945c..727b94c39 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java
@@ -705,20 +705,18 @@ public class UrlUtil {
if (BaseHelpSystem.getMode() != BaseHelpSystem.MODE_INFOCENTER) {
return ProductPreferences.isRTL();
}
- {
- if (infocenterDirection == INFOCENTER_DIRECTION_RTL) {
- return true;
- } else if (infocenterDirection == INFOCENTER_DIRECTION_LTR) {
- return false;
- }
- String locale = getLocale(request, response);
- if (locale.startsWith("ar") || locale.startsWith("fa") //$NON-NLS-1$ //$NON-NLS-2$
- || locale.startsWith("he") || locale.startsWith("iw") //$NON-NLS-1$ //$NON-NLS-2$
- | locale.startsWith("ur")) { //$NON-NLS-1$
- return true;
- }
+ if (infocenterDirection == INFOCENTER_DIRECTION_RTL) {
+ return true;
+ } else if (infocenterDirection == INFOCENTER_DIRECTION_LTR) {
return false;
}
+ String locale = getLocale(request, response);
+ if (locale.startsWith("ar") || locale.startsWith("fa") //$NON-NLS-1$ //$NON-NLS-2$
+ || locale.startsWith("he") || locale.startsWith("iw") //$NON-NLS-1$ //$NON-NLS-2$
+ | locale.startsWith("ur")) { //$NON-NLS-1$
+ return true;
+ }
+ return false;
}
// Return true if the URI is of the form /<context>/nav/*
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java
index 49a937a47..d04ec18fe 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java
@@ -119,8 +119,7 @@ public class CookieUtil {
if (isObsoleteCookie(name) || cookiesToKeep.contains(name)) {
cookiesToDelete.add(name);
}
- cookiesToKeep.add(name); {
- }
+ cookiesToKeep.add(name);
}
for (String name : cookiesToDelete) {
diff --git a/org.eclipse.tips.ui/src/org/eclipse/tips/ui/internal/util/ResourceManager.java b/org.eclipse.tips.ui/src/org/eclipse/tips/ui/internal/util/ResourceManager.java
index 209426e4e..97887e050 100644
--- a/org.eclipse.tips.ui/src/org/eclipse/tips/ui/internal/util/ResourceManager.java
+++ b/org.eclipse.tips.ui/src/org/eclipse/tips/ui/internal/util/ResourceManager.java
@@ -208,12 +208,10 @@ public class ResourceManager extends SWTResourceManager {
}
}
// dispose plugin images
- {
- for (Image image : m_URLImageMap.values()) {
- image.dispose();
- }
- m_URLImageMap.clear();
+ for (Image image : m_URLImageMap.values()) {
+ image.dispose();
}
+ m_URLImageMap.clear();
}
////////////////////////////////////////////////////////////////////////////
@@ -359,11 +357,9 @@ public class ResourceManager extends SWTResourceManager {
*/
private static URL getPluginImageURL(String symbolicName, String path) {
// try runtime plugins
- {
- Bundle bundle = Platform.getBundle(symbolicName);
- if (bundle != null) {
- return bundle.getEntry(path);
- }
+ Bundle bundle = Platform.getBundle(symbolicName);
+ if (bundle != null) {
+ return bundle.getEntry(path);
}
// try design time provider
if (m_designTimePluginResourceProvider != null) {
@@ -405,18 +401,16 @@ public class ResourceManager extends SWTResourceManager {
// Ignore any exceptions
}
// else work with 'plugin' as with usual Eclipse plugin
- {
- Class<?> PluginClass = Class.forName("org.eclipse.core.runtime.Plugin"); //$NON-NLS-1$
- if (PluginClass.isAssignableFrom(plugin.getClass())) {
- //
- Class<?> PathClass = Class.forName("org.eclipse.core.runtime.Path"); //$NON-NLS-1$
- Constructor<?> pathConstructor = PathClass.getConstructor(String.class);
- Object path = pathConstructor.newInstance(name);
- //
- Class<?> IPathClass = Class.forName("org.eclipse.core.runtime.IPath"); //$NON-NLS-1$
- Method findMethod = PluginClass.getMethod("find", IPathClass); //$NON-NLS-1$
- return (URL) findMethod.invoke(plugin, path);
- }
+ Class<?> PluginClass = Class.forName("org.eclipse.core.runtime.Plugin"); //$NON-NLS-1$
+ if (PluginClass.isAssignableFrom(plugin.getClass())) {
+ //
+ Class<?> PathClass = Class.forName("org.eclipse.core.runtime.Path"); //$NON-NLS-1$
+ Constructor<?> pathConstructor = PathClass.getConstructor(String.class);
+ Object path = pathConstructor.newInstance(name);
+ //
+ Class<?> IPathClass = Class.forName("org.eclipse.core.runtime.IPath"); //$NON-NLS-1$
+ Method findMethod = PluginClass.getMethod("find", IPathClass); //$NON-NLS-1$
+ return (URL) findMethod.invoke(plugin, path);
}
return null;
}
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
index 4b64762ad..c558e68af 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java
@@ -422,10 +422,8 @@ public class IntroURL implements IIntroURL {
Browser browser = impl.getBrowser();
return browser.setUrl(url);
}
- {
- // SWT presentation.
- return openBrowser(url, pluginId);
- }
+ // SWT presentation.
+ return openBrowser(url, pluginId);
}

Back to the top