Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorAlexander Kurtakov2013-12-19 17:35:31 +0000
committerAlexander Kurtakov2013-12-20 08:32:01 +0000
commit3c8413deea574c92277fe9d15963bc4912ac8094 (patch)
tree4c9e4bf578e94cac922f6ad7cd43ffdd4d8414c8 /man
parenta9a837d16fc4c4d05cd0511a5fc251cb76b43200 (diff)
downloadorg.eclipse.linuxtools-3c8413deea574c92277fe9d15963bc4912ac8094.tar.gz
org.eclipse.linuxtools-3c8413deea574c92277fe9d15963bc4912ac8094.tar.xz
org.eclipse.linuxtools-3c8413deea574c92277fe9d15963bc4912ac8094.zip
man: Move to Java 1.7.
Enable warnings + fixes. Change-Id: I6dbc69c23666a1ba208664077a613d72d9808571 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com> Reviewed-on: https://git.eclipse.org/r/20064 Tested-by: Hudson CI
Diffstat (limited to 'man')
-rw-r--r--man/org.eclipse.linuxtools.man.core/.classpath2
-rw-r--r--man/org.eclipse.linuxtools.man.core/.settings/org.eclipse.jdt.core.prefs35
-rw-r--r--man/org.eclipse.linuxtools.man.core/META-INF/MANIFEST.MF2
-rw-r--r--man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/parser/ManDocument.java4
-rw-r--r--man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/parser/ManParser.java22
-rw-r--r--man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/preferences/ManPathPage.java2
6 files changed, 40 insertions, 27 deletions
diff --git a/man/org.eclipse.linuxtools.man.core/.classpath b/man/org.eclipse.linuxtools.man.core/.classpath
index 64c5e31b7a..098194ca4b 100644
--- a/man/org.eclipse.linuxtools.man.core/.classpath
+++ b/man/org.eclipse.linuxtools.man.core/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/man/org.eclipse.linuxtools.man.core/.settings/org.eclipse.jdt.core.prefs b/man/org.eclipse.linuxtools.man.core/.settings/org.eclipse.jdt.core.prefs
index 866c7e49b5..1f063a3874 100644
--- a/man/org.eclipse.linuxtools.man.core/.settings/org.eclipse.jdt.core.prefs
+++ b/man/org.eclipse.linuxtools.man.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,3 @@
-#Fri Sep 03 14:58:12 EEST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -10,10 +9,16 @@ org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -29,6 +34,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
@@ -36,6 +42,7 @@ org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
@@ -46,7 +53,9 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
@@ -62,21 +71,33 @@ org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignor
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
@@ -95,9 +116,10 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -169,9 +191,12 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/man/org.eclipse.linuxtools.man.core/META-INF/MANIFEST.MF b/man/org.eclipse.linuxtools.man.core/META-INF/MANIFEST.MF
index 922135891e..178bc2efb4 100644
--- a/man/org.eclipse.linuxtools.man.core/META-INF/MANIFEST.MF
+++ b/man/org.eclipse.linuxtools.man.core/META-INF/MANIFEST.MF
@@ -8,7 +8,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.jface.text
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: org.eclipse.linuxtools.man.parser,
org.eclipse.linuxtools.man.views
Bundle-Vendor: %Bundle-Vendor
diff --git a/man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/parser/ManDocument.java b/man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/parser/ManDocument.java
index fe57d9c15b..98f3102543 100644
--- a/man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/parser/ManDocument.java
+++ b/man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/parser/ManDocument.java
@@ -22,8 +22,8 @@ import org.eclipse.jface.text.Document;
public class ManDocument extends Document {
private static final String BOLD = "\b"; //$NON-NLS-1$
- private List<Integer> boldSymbols = new ArrayList<Integer>();
- private List<Integer> underlineSymbols = new ArrayList<Integer>();
+ private List<Integer> boldSymbols = new ArrayList<>();
+ private List<Integer> underlineSymbols = new ArrayList<>();
/**
* Creates an IDocument for the given man page and taking care for marking
diff --git a/man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/parser/ManParser.java b/man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/parser/ManParser.java
index 7cceaab10a..ff5fde659a 100644
--- a/man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/parser/ManParser.java
+++ b/man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/parser/ManParser.java
@@ -48,29 +48,15 @@ public class ManParser {
process.waitFor();
}
- InputStream manContent = process.getInputStream();
- BufferedReader reader = new BufferedReader(new InputStreamReader(
- manContent));
-
String line = null;
- try {
+ try (InputStream manContent = process.getInputStream();
+ BufferedReader reader = new BufferedReader(
+ new InputStreamReader(manContent))) {
while ((line = reader.readLine()) != null) {
sb.append(line + "\n"); //$NON-NLS-1$
}
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- try {
- manContent.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
}
- } catch (IOException e1) {
- Status status = new Status(IStatus.ERROR, e1.getMessage(),
- Activator.PLUGIN_ID);
- Activator.getDefault().getLog().log(status);
- } catch (InterruptedException e1) {
+ } catch (IOException | InterruptedException e1) {
Status status = new Status(IStatus.ERROR, e1.getMessage(),
Activator.PLUGIN_ID);
Activator.getDefault().getLog().log(status);
diff --git a/man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/preferences/ManPathPage.java b/man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/preferences/ManPathPage.java
index 844511b94f..fecb8c94ed 100644
--- a/man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/preferences/ManPathPage.java
+++ b/man/org.eclipse.linuxtools.man.core/src/org/eclipse/linuxtools/internal/man/preferences/ManPathPage.java
@@ -49,7 +49,9 @@ public class ManPathPage extends FieldEditorPreferencePage implements
* @see
* org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
+ @Override
public void init(IWorkbench workbench) {
+ // nothing to do
}
} \ No newline at end of file

Back to the top