diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.app/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.app/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.app/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.app/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.equinox.app; singleton:=true -Bundle-Version: 1.4.100.qualifier +Bundle-Version: 1.4.200.qualifier Bundle-Vendor: %providerName Bundle-Activator: org.eclipse.equinox.internal.app.Activator Bundle-Localization: plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationAdminPermission.java equinox-bundles-4.12/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationAdminPermission.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationAdminPermission.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationAdminPermission.java 2019-05-28 12:57:39.000000000 +0000 @@ -37,7 +37,7 @@ * permission {@code schedule} implies the permission * {@code lifecycle}. * - * @version $Id: 8c7941578972d6f61ed9aeffac374a0b8c294056 $ + * @version $Id: d3217381d6d6c37fd6e96123337865abcc204bcb $ */ public class ApplicationAdminPermission extends Permission { private static final long serialVersionUID = 1L; @@ -180,6 +180,7 @@ * @param otherPermission the implied permission * @return true if this permission implies the {@code otherPermission}, false otherwise. */ + @Override public boolean implies(Permission otherPermission) { if( otherPermission == null ) return false; @@ -220,6 +221,7 @@ return true; } + @Override public boolean equals(Object with) { if( with == null || !(with instanceof ApplicationAdminPermission) ) return false; @@ -256,6 +258,7 @@ return a.equals(b); } + @Override public int hashCode() { int hc = 0; for( int i=0; i != actionsVector.size(); i++ ) @@ -270,6 +273,7 @@ * Returns the actions of this permission. * @return the actions specified when this permission was created */ + @Override public String getActions() { return actions; } @@ -318,6 +322,7 @@ this.appDesc = appDesc; } + @Override public boolean equals(Object o) { if (!(o instanceof SignerWrapper)) return false; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationDescriptor.java equinox-bundles-4.12/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationDescriptor.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationDescriptor.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationDescriptor.java 2019-05-28 12:57:39.000000000 +0000 @@ -309,12 +309,8 @@ checkArgs(arguments, false); try { return launchSpecific(arguments); - } catch (IllegalStateException ise) { + } catch (IllegalStateException | SecurityException | ApplicationException ise) { throw ise; - } catch (SecurityException se) { - throw se; - } catch (ApplicationException ae) { - throw ae; } catch (Exception t) { throw new ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR, t); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationException.java equinox-bundles-4.12/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationException.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationException.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationException.java 2019-05-28 12:57:39.000000000 +0000 @@ -44,7 +44,7 @@ * startup arguments is invalid, for example its type is not permitted. * * - * @version $Id: be377d8ecd052974b3c5952c95af5c3df7334759 $ + * @version $Id: 170922efd3358e6133e95d2e0a05d91f4f3447a3 $ */ public class ApplicationException extends Exception { private static final long serialVersionUID = -7173190453622508207L; @@ -146,6 +146,7 @@ * @return The cause of this exception or {@code null} if no cause was * set. */ + @Override public Throwable getCause() { return super.getCause(); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.app/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.app/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.app/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.app/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,12 +14,12 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.app - 1.4.100-SNAPSHOT + 1.4.200-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/AppPersistence.java equinox-bundles-4.12/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/AppPersistence.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/AppPersistence.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/AppPersistence.java 2019-05-28 12:57:39.000000000 +0000 @@ -273,9 +273,7 @@ } } catch (InvalidSyntaxException e) { throw new IOException(e.getMessage()); - } catch (NoClassDefFoundError e) { - throw new IOException(e.getMessage()); - } catch (ClassNotFoundException e) { + } catch (NoClassDefFoundError | ClassNotFoundException e) { throw new IOException(e.getMessage()); } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppHandle.java equinox-bundles-4.12/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppHandle.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppHandle.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppHandle.java 2019-05-28 12:57:39.000000000 +0000 @@ -386,9 +386,7 @@ public synchronized Object waitForResult(int timeout) { try { return getExitValue(timeout); - } catch (ApplicationException e) { - // return null - } catch (InterruptedException e) { + } catch (ApplicationException | InterruptedException e) { // return null } return null; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/.classpath equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/.classpath --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/.classpath 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/.classpath 2019-05-28 12:57:39.000000000 +0000 @@ -1,6 +1,6 @@ - + diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -3,9 +3,9 @@ Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.equinox.bidi;singleton:=true -Bundle-Version: 1.1.300.qualifier +Bundle-Version: 1.2.0.qualifier Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.4 +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.equinox.bidi, org.eclipse.equinox.bidi.advanced, diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.bidi - 1.1.300-SNAPSHOT + 1.2.0-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/.settings/org.eclipse.jdt.core.prefs equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/.settings/org.eclipse.jdt.core.prefs --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/.settings/org.eclipse.jdt.core.prefs 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/.settings/org.eclipse.jdt.core.prefs 2019-05-28 12:57:39.000000000 +0000 @@ -8,16 +8,16 @@ org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.4 +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 org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.deprecation=warning @@ -25,7 +25,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled org.eclipse.jdt.core.compiler.problem.fieldHiding=warning @@ -87,23 +87,27 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.3 +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_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 @@ -173,11 +177,12 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert @@ -207,6 +212,8 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -230,12 +237,16 @@ org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -281,6 +292,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -316,8 +329,11 @@ org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -340,6 +356,10 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab org.eclipse.jdt.core.formatter.tabulation.size=4 org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true org.eclipse.jdt.core.incompatibleJDKLevel=ignore org.eclipse.jdt.core.incompleteClasspath=error diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/advanced/StructuredTextEnvironment.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/advanced/StructuredTextEnvironment.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/advanced/StructuredTextEnvironment.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/advanced/StructuredTextEnvironment.java 2019-05-28 12:57:39.000000000 +0000 @@ -211,6 +211,7 @@ * * @return the hash code. */ + @Override public int hashCode() { final int prime = 31; int result = 1; @@ -229,6 +230,7 @@ * * @return true if the 2 instances can be used interchangeably. */ + @Override public boolean equals(Object obj) { if (this == obj) return true; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/advanced/StructuredTextExpertFactory.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/advanced/StructuredTextExpertFactory.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/advanced/StructuredTextExpertFactory.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/advanced/StructuredTextExpertFactory.java 2019-05-28 12:57:39.000000000 +0000 @@ -50,9 +50,9 @@ */ private static final String defaultSeparators = StructuredTextProcessor.getDefaultSeparators(); - static private Map sharedDefaultExperts = new HashMap(); // String type -> expert + static private Map sharedDefaultExperts = new HashMap<>(); // String type -> expert - static private Map sharedExperts = new HashMap(); // String type -> map of { environment -> expert } + static private Map> sharedExperts = new HashMap<>(); // String type -> map of { environment -> expert } static private IStructuredTextExpert defaultExpert; @@ -90,7 +90,7 @@ static public IStructuredTextExpert getExpert(String type) { IStructuredTextExpert expert; synchronized (sharedDefaultExperts) { - expert = (IStructuredTextExpert) sharedDefaultExperts.get(type); + expert = sharedDefaultExperts.get(type); if (expert == null) { StructuredTextTypeHandler handler = StructuredTextTypeHandlerFactory.getHandler(type); if (handler == null) @@ -124,18 +124,18 @@ if (environment == null) environment = StructuredTextEnvironment.DEFAULT; synchronized (sharedExperts) { - Map experts = (Map) sharedExperts.get(type); + Map experts = sharedExperts.get(type); if (experts == null) { - experts = new HashMap(); // environment -> expert + experts = new HashMap(); // environment -> expert sharedExperts.put(type, experts); } - expert = (IStructuredTextExpert) experts.get(environment); + expert = experts.get(environment); if (expert == null) { StructuredTextTypeHandler handler = StructuredTextTypeHandlerFactory.getHandler(type); if (handler == null) throw new IllegalArgumentException("Invalid type argument"); //$NON-NLS-1$ expert = new StructuredTextImpl(handler, environment, false); - experts.put(type, expert); + experts.put(environment, expert); } } return expert; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/custom/StructuredTextTypeHandler.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/custom/StructuredTextTypeHandler.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/custom/StructuredTextTypeHandler.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/custom/StructuredTextTypeHandler.java 2019-05-28 12:57:39.000000000 +0000 @@ -363,6 +363,7 @@ return false; } + @Override public String toString() { return super.toString() + " [" + separators + "]"; //$NON-NLS-1$ //$NON-NLS-2$ } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextEmail.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextEmail.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextEmail.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextEmail.java 2019-05-28 12:57:39.000000000 +0000 @@ -29,6 +29,7 @@ super("<>.:,;@"); //$NON-NLS-1$ } + @Override public int getDirection(IStructuredTextExpert expert, String text) { return getDirection(expert, text, new StructuredTextCharTypes(expert, text)); } @@ -44,6 +45,7 @@ * * Otherwise, returns {@link IStructuredTextExpert#DIR_LTR DIR_LTR}. */ + @Override public int getDirection(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes) { String language = expert.getEnvironment().getLanguage(); if (!language.equals("ar")) //$NON-NLS-1$ @@ -63,6 +65,7 @@ /** * @return 2 as number of special cases handled by this handler. */ + @Override public int getSpecialsCount(IStructuredTextExpert expert) { return 2; } @@ -70,6 +73,7 @@ /** * @return parentheses and quotation marks as delimiters. */ + @Override protected String getDelimiters() { return "()\"\""; //$NON-NLS-1$ } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextJava.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextJava.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextJava.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextJava.java 2019-05-28 12:57:39.000000000 +0000 @@ -45,6 +45,7 @@ /** * @return 4 as the number of special cases handled by this handler. */ + @Override public int getSpecialsCount(IStructuredTextExpert expert) { return 4; } @@ -58,6 +59,7 @@ *
  • comments starting with slash-slash
  • * */ + @Override public int indexOfSpecial(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes, StructuredTextOffsets offsets, int caseNumber, int fromIndex) { switch (caseNumber) { case 1 : /* space */ @@ -82,6 +84,7 @@ *
  • skip until after a line separator
  • * */ + @Override public int processSpecial(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes, StructuredTextOffsets offsets, int caseNumber, int separLocation) { int location, counter, i; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextRegex.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextRegex.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextRegex.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextRegex.java 2019-05-28 12:57:39.000000000 +0000 @@ -71,6 +71,7 @@ * * @return the number of special cases for this handler. */ + @Override public int getSpecialsCount(IStructuredTextExpert expert) { return maxSpecial; } @@ -79,6 +80,7 @@ * Locates occurrences of the syntactic strings and of * R, AL, EN, AN characters. */ + @Override public int indexOfSpecial(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes, StructuredTextOffsets offsets, int caseNumber, int fromIndex) { // In this method, L, R, AL, AN and EN represent bidi categories // as defined in the Unicode Bidirectional Algorithm @@ -147,6 +149,7 @@ /** * Processes the special cases. */ + @Override public int processSpecial(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes, StructuredTextOffsets offsets, int caseNumber, int separLocation) { int location; @@ -221,6 +224,7 @@ return text.length(); } + @Override public int getDirection(IStructuredTextExpert expert, String text) { return getDirection(expert, text, new StructuredTextCharTypes(expert, text)); } @@ -237,6 +241,7 @@ * * Otherwise, returns {@link IStructuredTextExpert#DIR_LTR DIR_LTR}. */ + @Override public int getDirection(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes) { StructuredTextEnvironment environment = expert.getEnvironment(); String language = environment.getLanguage(); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextSql.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextSql.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextSql.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextSql.java 2019-05-28 12:57:39.000000000 +0000 @@ -46,6 +46,7 @@ /** * @return 5 as the number of special cases handled by this handler. */ + @Override public int getSpecialsCount(IStructuredTextExpert expert) { return 5; } @@ -60,6 +61,7 @@ *
  • comments starting with hyphen-hyphen
  • * */ + @Override public int indexOfSpecial(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes, StructuredTextOffsets offsets, int caseNumber, int fromIndex) { switch (caseNumber) { case 1 : /* space */ @@ -87,6 +89,7 @@ *
  • skip until after a line separator
  • * */ + @Override public int processSpecial(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes, StructuredTextOffsets offsets, int caseNumber, int separLocation) { int location; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextXPath.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextXPath.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextXPath.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/consumable/StructuredTextXPath.java 2019-05-28 12:57:39.000000000 +0000 @@ -28,6 +28,7 @@ /** * @return 2 as the number of special cases handled by this handler. */ + @Override public int getSpecialsCount(IStructuredTextExpert expert) { return 2; } @@ -35,6 +36,7 @@ /** * @return apostrophe and quotation mark as delimiters. */ + @Override protected String getDelimiters() { return "''\"\""; //$NON-NLS-1$ } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextActivator.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextActivator.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextActivator.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextActivator.java 2019-05-28 12:57:39.000000000 +0000 @@ -25,7 +25,7 @@ */ public class StructuredTextActivator implements BundleActivator { - private ServiceTracker logTracker = null; + private ServiceTracker logTracker = null; private BundleContext bundleContext; private static StructuredTextActivator instance; @@ -71,7 +71,7 @@ public Locale getDefaultLocale() { // use OSGi service - ServiceReference[] references = null; + ServiceReference[] references = null; try { references = bundleContext.getAllServiceReferences(null, LocaleProvider.class.getName()); } catch (InvalidSyntaxException e) { @@ -92,10 +92,10 @@ private FrameworkLog getFrameworkLog() { if (logTracker == null) { - logTracker = new ServiceTracker(bundleContext, FrameworkLog.class.getName(), null); + logTracker = new ServiceTracker<>(bundleContext, FrameworkLog.class, null); logTracker.open(); } - return (FrameworkLog) logTracker.getService(); + return logTracker.getService(); } static public void logError(String message, Exception e) { diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextDelimsEsc.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextDelimsEsc.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextDelimsEsc.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextDelimsEsc.java 2019-05-28 12:57:39.000000000 +0000 @@ -49,6 +49,7 @@ * and skips until after the matching end delimiter, * ignoring possibly escaped end delimiters. */ + @Override public int processSpecial(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes, StructuredTextOffsets offsets, int caseNumber, int separLocation) { StructuredTextTypeHandler.processSeparator(text, charTypes, offsets, separLocation); int location = separLocation + 1; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextDelims.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextDelims.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextDelims.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextDelims.java 2019-05-28 12:57:39.000000000 +0000 @@ -45,6 +45,7 @@ * * @see #getDelimiters */ + @Override public int indexOfSpecial(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes, StructuredTextOffsets offsets, int caseNumber, int fromIndex) { char delim = getDelimiters().charAt((caseNumber - 1) * 2); return text.indexOf(delim, fromIndex); @@ -59,6 +60,7 @@ * @return the position after the matching end delimiter, or the length * of text if no end delimiter is found. */ + @Override public int processSpecial(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes, StructuredTextOffsets offsets, int caseNumber, int separLocation) { StructuredTextTypeHandler.processSeparator(text, charTypes, offsets, separLocation); int loc = separLocation + 1; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextImpl.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextImpl.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextImpl.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextImpl.java 2019-05-28 12:57:39.000000000 +0000 @@ -81,28 +81,34 @@ sharedExpert = shared; } + @Override public StructuredTextTypeHandler getTypeHandler() { return handler; } + @Override public StructuredTextEnvironment getEnvironment() { return environment; } + @Override public int getTextDirection(String text) { return handler.getDirection(this, text); } + @Override public void clearState() { if (sharedExpert) state = null; } + @Override public void setState(Object newState) { if (sharedExpert) state = newState; } + @Override public Object getState() { return state; } @@ -248,6 +254,7 @@ * formatting characters as either prefix or suffix of the full text. *

    */ + @Override public String leanToFullText(String text) { int len = text.length(); if (len == 0) @@ -259,6 +266,7 @@ return insertMarks(text, offsets.getOffsets(), direction, prefixLength); } + @Override public int[] leanToFullMap(String text) { int len = text.length(); if (len == 0) @@ -279,6 +287,7 @@ return map; } + @Override public int[] leanBidiCharOffsets(String text) { int len = text.length(); if (len == 0) @@ -342,6 +351,7 @@ return offsets; } + @Override public String fullToLeanText(String full) { if (full.length() == 0) return full; @@ -446,6 +456,7 @@ return lean; } + @Override public int[] fullToLeanMap(String full) { int lenFull = full.length(); if (lenFull == 0) @@ -477,6 +488,7 @@ return map; } + @Override public int[] fullBidiCharOffsets(String full) { int lenFull = full.length(); if (lenFull == 0) @@ -497,6 +509,7 @@ return offsets.getOffsets(); } + @Override public String insertMarks(String text, int[] offsets, int direction, int affixLength) { if (direction != DIR_LTR && direction != DIR_RTL) throw new IllegalArgumentException("Invalid direction"); //$NON-NLS-1$ @@ -545,6 +558,7 @@ return new String(fullChars); } + @Override public String toString() { return super.toString() + " [handler=" + handler.toString() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextSingle.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextSingle.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextSingle.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextSingle.java 2019-05-28 12:57:39.000000000 +0000 @@ -41,6 +41,7 @@ * * @see #getSeparators getSeparators */ + @Override public int indexOfSpecial(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes, StructuredTextOffsets offsets, int caseNumber, int fromIndex) { return text.indexOf(this.getSeparators(expert).charAt(0), fromIndex); } @@ -51,6 +52,7 @@ * * @return the length of text. */ + @Override public int processSpecial(IStructuredTextExpert expert, String text, StructuredTextCharTypes charTypes, StructuredTextOffsets offsets, int caseNumber, int separLocation) { StructuredTextTypeHandler.processSeparator(text, charTypes, offsets, separLocation); return text.length(); @@ -61,6 +63,7 @@ * * @return 1. */ + @Override public int getSpecialsCount(IStructuredTextExpert expert) { return 1; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextStringRecord.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextStringRecord.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextStringRecord.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextStringRecord.java 2019-05-28 12:57:39.000000000 +0000 @@ -47,7 +47,8 @@ private static boolean wrapAround; // the pool - private static SoftReference[] recordRefs = new SoftReference[POOLSIZE]; + @SuppressWarnings("unchecked") + private static SoftReference[] recordRefs = new SoftReference[POOLSIZE]; // hash code of the recorded strings private static int[] hashArray = new int[POOLSIZE]; @@ -124,10 +125,10 @@ } StructuredTextStringRecord record = null; if (recordRefs[last] != null) - record = (StructuredTextStringRecord) recordRefs[last].get(); + record = recordRefs[last].get(); if (record == null) { record = new StructuredTextStringRecord(); - recordRefs[last] = new SoftReference(record); + recordRefs[last] = new SoftReference<>(record); } hashArray[last] = string.hashCode(); for (int i = 0; i < record.usedSegmentCount; i++) @@ -208,7 +209,7 @@ for (int i = myLast; i >= 0; i--) { if (hash != hashArray[i]) continue; - record = (StructuredTextStringRecord) recordRefs[i].get(); + record = recordRefs[i].get(); if (record == null) continue; if (string.equals(record.string)) @@ -219,7 +220,7 @@ for (int i = MAXINDEX; i > myLast; i--) { if (hash != hashArray[i]) continue; - record = (StructuredTextStringRecord) recordRefs[i].get(); + record = recordRefs[i].get(); if (record == null) continue; if (string.equals(record.string)) @@ -304,10 +305,10 @@ public static synchronized void clear() { for (int i = 0; i <= MAXINDEX; i++) { hashArray[i] = 0; - SoftReference softRef = recordRefs[i]; + SoftReference softRef = recordRefs[i]; if (softRef == null) continue; - StructuredTextStringRecord record = (StructuredTextStringRecord) softRef.get(); + StructuredTextStringRecord record = softRef.get(); if (record == null) continue; record.boundaries = null; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextTypesCollector.java equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextTypesCollector.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextTypesCollector.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/StructuredTextTypesCollector.java 2019-05-28 12:57:39.000000000 +0000 @@ -30,8 +30,8 @@ private static final String ATTR_TYPE = "type"; //$NON-NLS-1$ private static final String ATTR_HANDLER = "class"; //$NON-NLS-1$ - private Map types; - private Map factories; + private Map types; + private Map factories; static private StructuredTextTypesCollector instance = new StructuredTextTypesCollector(); @@ -76,12 +76,12 @@ private void read() { if (types == null) - types = new HashMap(); + types = new HashMap<>(); else types.clear(); if (factories == null) - factories = new HashMap(); + factories = new HashMap(); else factories.clear(); @@ -107,8 +107,10 @@ StructuredTextActivator.logError("BiDi types: unable to create handler for " + type, e); //$NON-NLS-1$ continue; } - types.put(type, handler); - factories.put(type, confElements[j]); + if (handler instanceof StructuredTextTypeHandler) { + types.put(type, (StructuredTextTypeHandler) handler); + factories.put(type, confElements[j]); + } } } } @@ -140,8 +142,8 @@ * @return a map from structured text type handler identifier (key type: {@link String}) * to structured text type handler (value type: {@link StructuredTextTypeHandler}). */ - public static Map getDefaultTypeHandlers() { - Map types = new LinkedHashMap(); + public static Map getDefaultTypeHandlers() { + Map types = new LinkedHashMap(); types.put(StructuredTextTypeHandlerFactory.COMMA_DELIMITED, new StructuredTextComma()); types.put(StructuredTextTypeHandlerFactory.EMAIL, new StructuredTextEmail()); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi.tests/.classpath equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi.tests/.classpath --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi.tests/.classpath 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi.tests/.classpath 2019-05-28 12:57:39.000000000 +0000 @@ -1,7 +1,11 @@ - + - + + + + + diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi.tests/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi.tests/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi.tests/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi.tests/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,12 +2,12 @@ Bundle-ManifestVersion: 2 Bundle-Name: BiDi tests Bundle-SymbolicName: org.eclipse.equinox.bidi.tests;singleton:=true -Bundle-Version: 1.0.400.qualifier +Bundle-Version: 1.1.0.qualifier Require-Bundle: org.eclipse.equinox.bidi;bundle-version="1.0.0", org.eclipse.equinox.registry;bundle-version="3.5.0", org.junit;bundle-version="4.12.0" Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Export-Package: org.eclipse.equinox.bidi.internal.tests;x-internal:=true, org.eclipse.equinox.bidi.tests Eclipse-BundleShape: dir diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi.tests/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi.tests/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi.tests/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi.tests/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ tests-pom org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../tests-pom/ org.eclipse.equinox org.eclipse.equinox.bidi.tests - 1.0.400-SNAPSHOT + 1.1.0-SNAPSHOT eclipse-test-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi.tests/.settings/org.eclipse.jdt.core.prefs equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi.tests/.settings/org.eclipse.jdt.core.prefs --- equinox-bundles-4.11/bundles/org.eclipse.equinox.bidi.tests/.settings/org.eclipse.jdt.core.prefs 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.bidi.tests/.settings/org.eclipse.jdt.core.prefs 2019-05-28 12:57:39.000000000 +0000 @@ -7,9 +7,9 @@ org.eclipse.jdt.core.classpath.exclusionPatterns=enabled org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +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 @@ -91,23 +91,27 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.8 +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_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 @@ -177,11 +181,12 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert @@ -211,6 +216,8 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -234,12 +241,16 @@ org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -285,6 +296,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -320,8 +333,11 @@ org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -344,6 +360,10 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab org.eclipse.jdt.core.formatter.tabulation.size=4 org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true org.eclipse.jdt.core.incompatibleJDKLevel=ignore org.eclipse.jdt.core.incompleteClasspath=error diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.cm/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.cm/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.cm/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.cm/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.cm.test/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.cm.test/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.cm.test/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.cm.test/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.common/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.common/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.common/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.common/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.equinox.common; singleton:=true -Bundle-Version: 3.10.300.qualifier +Bundle-Version: 3.10.400.qualifier Bundle-Localization: plugin Export-Package: org.eclipse.core.internal.boot;x-friends:="org.eclipse.core.resources,org.eclipse.core.runtime.compatibility,org.eclipse.pde.build", org.eclipse.core.internal.runtime;common=split;mandatory:=common; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.common/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.common/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.common/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.common/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -5,7 +5,7 @@ are made available under the terms of the Eclipse Distribution License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/org/documents/edl-v10.php - + Contributors: Igor Fedorenko - initial implementation --> @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.common - 3.10.300-SNAPSHOT + 3.10.400-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/LocalizationUtils.java equinox-bundles-4.12/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/LocalizationUtils.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/LocalizationUtils.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/LocalizationUtils.java 2019-05-28 12:57:39.000000000 +0000 @@ -42,17 +42,7 @@ Object value = field.get(null); if (value instanceof String) return (String) value; - } catch (ClassNotFoundException e) { - // eat exception and fall through - } catch (NoClassDefFoundError e) { - // eat exception and fall through - } catch (SecurityException e) { - // eat exception and fall through - } catch (NoSuchFieldException e) { - // eat exception and fall through - } catch (IllegalArgumentException e) { - // eat exception and fall through - } catch (IllegalAccessException e) { + } catch (ClassNotFoundException | NoClassDefFoundError | SecurityException | NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) { // eat exception and fall through } return key; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.java equinox-bundles-4.12/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.java 2019-05-28 12:57:39.000000000 +0000 @@ -104,9 +104,7 @@ for (int i = 0; i < listeners.length; i++) { try { listeners[i].logging(status, IRuntimeConstants.PI_RUNTIME); - } catch (Exception e) { - handleException(e); - } catch (LinkageError e) { + } catch (Exception | LinkageError e) { handleException(e); } } @@ -162,9 +160,7 @@ for (int i = 0; i < listeners.length; i++) { try { listeners[i].logging(status, IRuntimeConstants.PI_RUNTIME); - } catch (Exception e) { - handleException(e); - } catch (LinkageError e) { + } catch (Exception | LinkageError e) { handleException(e); } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SafeRunner.java equinox-bundles-4.12/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SafeRunner.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SafeRunner.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SafeRunner.java 2019-05-28 12:57:39.000000000 +0000 @@ -43,11 +43,7 @@ Assert.isNotNull(code); try { code.run(); - } catch (Exception e) { - handleException(code, e); - } catch (LinkageError e) { - handleException(code, e); - } catch (AssertionError e) { + } catch (Exception | LinkageError | AssertionError e) { handleException(code, e); } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SubMonitor.java equinox-bundles-4.12/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SubMonitor.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SubMonitor.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SubMonitor.java 2019-05-28 12:57:39.000000000 +0000 @@ -1041,4 +1041,10 @@ } RuntimeLog.log(new Status(IStatus.WARNING, "org.eclipse.core.runtime", message, new Throwable())); //$NON-NLS-1$ } + + @Override + public String toString() { + return "SubMonitor [totalParent=" + totalParent + ", usedForParent=" + usedForParent + ", usedForChildren=" + usedForChildren + ", totalForChildren=" + totalForChildren + ", beginTaskCalled=" + beginTaskCalled + "]"; + } + } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.common.tests/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.common.tests/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.common.tests/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.common.tests/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ tests-pom org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../tests-pom/ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/tb9/OSGI-INF/metatype/metadata.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/tb9/OSGI-INF/metatype/metadata.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/tb9/OSGI-INF/metatype/metadata.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/tb9/OSGI-INF/metatype/metadata.xml 2019-05-28 12:57:39.000000000 +0000 @@ -5,9 +5,9 @@ xsi:schemaLocation="http://www.org.osgi/xmlns/metatype/v1.2.0/md metatype.xsd"> - - - + + + diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ tests-pom org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../tests-pom/ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/coordinator/tests/CoordinationMaxTimeoutTest.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/coordinator/tests/CoordinationMaxTimeoutTest.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/coordinator/tests/CoordinationMaxTimeoutTest.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/coordinator/tests/CoordinationMaxTimeoutTest.java 2019-05-28 12:57:39.000000000 +0000 @@ -150,6 +150,7 @@ } @Before + @Override public void setUp() throws Exception { System.setProperty(PROPERTY_NAME, String.valueOf(TIMEOUT)); assertSystemProperty(PROPERTY_NAME, String.valueOf(TIMEOUT)); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/AbstractTest.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/AbstractTest.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/AbstractTest.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/AbstractTest.java 2019-05-28 12:57:39.000000000 +0000 @@ -17,8 +17,6 @@ import static org.junit.Assert.fail; import java.io.*; -import javax.swing.Icon; -import javax.swing.ImageIcon; import org.eclipse.equinox.compendium.tests.Activator; import org.eclipse.equinox.metatype.EquinoxMetaTypeService; import org.eclipse.osgi.tests.bundles.BundleInstaller; @@ -72,8 +70,7 @@ } finally { icon.close(); } - Icon i = new ImageIcon(baos.toByteArray()); - Assert.assertEquals("Wrong icon size", size, i.getIconHeight() * i.getIconWidth()); //$NON-NLS-1$ + Assert.assertEquals("Wrong size.", size, baos.size()); //$NON-NLS-1$ } finally { baos.close(); } @@ -146,18 +143,35 @@ @Before public void setUp() throws Exception { + startMetatype(); + bundleInstaller = new BundleInstaller("bundle_tests/metatype", Activator.getBundleContext()); //$NON-NLS-1$ + } + + private void startMetatype() throws Exception { Activator.getBundle(Activator.BUNDLE_METATYPE).start(); metaTypeReference = Activator.getBundleContext().getServiceReference(EquinoxMetaTypeService.class); Assert.assertNotNull("Metatype service reference not found", metaTypeReference); //$NON-NLS-1$ metatype = Activator.getBundleContext().getService(metaTypeReference); Assert.assertNotNull("Metatype service not found", metatype); //$NON-NLS-1$ - bundleInstaller = new BundleInstaller("bundle_tests/metatype", Activator.getBundleContext()); //$NON-NLS-1$ } @After public void tearDown() throws Exception { bundleInstaller.shutdown(); + stopMetatype(); + } + + private void stopMetatype() throws Exception { Activator.getBundleContext().ungetService(metaTypeReference); Activator.getBundle(Activator.BUNDLE_METATYPE).stop(); } + + public void restartMetatype() { + try { + stopMetatype(); + startMetatype(); + } catch (Exception e) { + fail(e.getMessage()); + } + } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/AttributeTypePasswordTest.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/AttributeTypePasswordTest.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/AttributeTypePasswordTest.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/AttributeTypePasswordTest.java 2019-05-28 12:57:39.000000000 +0000 @@ -21,23 +21,24 @@ private Bundle bundle; @Before + @Override public void setUp() throws Exception { super.setUp(); bundle = bundleInstaller.installBundle("tb1"); //$NON-NLS-1$ bundle.start(); } - @After - public void tearDown() throws Exception { - bundle.stop(); - super.tearDown(); - } - /* * Ensures the PASSWORD type is recognized. */ @Test public void testAttributeTypePassword1() { + doTestAttributeTypePassword1(); + restartMetatype(); + doTestAttributeTypePassword1(); + } + + private void doTestAttributeTypePassword1() { MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); ObjectClassDefinition ocd = mti.getObjectClassDefinition("org.eclipse.equinox.metatype.tests.tb1", null); //$NON-NLS-1$ AttributeDefinition[] ads = ocd.getAttributeDefinitions(ObjectClassDefinition.ALL); @@ -53,6 +54,12 @@ */ @Test public void testAttributeTypePassword2() { + doTestAttributeTypePassword2(); + restartMetatype(); + doTestAttributeTypePassword2(); + } + + private void doTestAttributeTypePassword2() { MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); ObjectClassDefinition ocd = mti.getObjectClassDefinition("org.eclipse.equinox.metatype.tests.tb1", null); //$NON-NLS-1$ AttributeDefinition[] ads = ocd.getAttributeDefinitions(ObjectClassDefinition.ALL); @@ -66,6 +73,12 @@ */ @Test public void testAttributeTypePassword3() { + doTestAttributeTypePassword3(); + restartMetatype(); + doTestAttributeTypePassword3(); + } + + private void doTestAttributeTypePassword3() { MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); ObjectClassDefinition ocd = mti.getObjectClassDefinition("org.eclipse.equinox.metatype.tests.tb1", null); //$NON-NLS-1$ AttributeDefinition[] ads = ocd.getAttributeDefinitions(ObjectClassDefinition.ALL); @@ -80,6 +93,12 @@ */ @Test public void testAttributeTypePassword4() { + doTestAttributeTypePassword4(); + restartMetatype(); + doTestAttributeTypePassword4(); + } + + private void doTestAttributeTypePassword4() { MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); ObjectClassDefinition ocd = mti.getObjectClassDefinition("org.eclipse.equinox.metatype.tests.tb1", null); //$NON-NLS-1$ AttributeDefinition[] ads = ocd.getAttributeDefinitions(ObjectClassDefinition.ALL); @@ -95,6 +114,12 @@ */ @Test public void testAttributeTypePassword5() { + doTestAttributeTypePassword5(); + restartMetatype(); + doTestAttributeTypePassword5(); + } + + private void doTestAttributeTypePassword5() { MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); ObjectClassDefinition ocd = mti.getObjectClassDefinition("org.eclipse.equinox.metatype.tests.tb1", null); //$NON-NLS-1$ AttributeDefinition[] ads = ocd.getAttributeDefinitions(ObjectClassDefinition.ALL); @@ -110,6 +135,12 @@ */ @Test public void testAttributeTypePassword6() { + doTestAttributeTypePassword6(); + restartMetatype(); + doTestAttributeTypePassword6(); + } + + private void doTestAttributeTypePassword6() { MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); ObjectClassDefinition ocd = mti.getObjectClassDefinition("org.eclipse.equinox.metatype.tests.tb1", null); //$NON-NLS-1$ AttributeDefinition[] ads = ocd.getAttributeDefinitions(ObjectClassDefinition.ALL); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/Bug332161Test.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/Bug332161Test.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/Bug332161Test.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/Bug332161Test.java 2019-05-28 12:57:39.000000000 +0000 @@ -109,6 +109,12 @@ */ @Test public void test1() { + doTest1(); + restartMetatype(); + doTest1(); + } + + private void doTest1() { AttributeDefinition ad = findAttributeDefinitionById("char1", ads); //$NON-NLS-1$ Assert.assertNotNull("Attribute definition not found", ad); //$NON-NLS-1$ String defaultValue = getFirstDefaultValue(ad.getDefaultValue()); @@ -133,6 +139,12 @@ */ @Test public void test2() { + doTest2(); + restartMetatype(); + doTest2(); + } + + private void doTest2() { AttributeDefinition ad = findAttributeDefinitionById("string1", ads); //$NON-NLS-1$ Assert.assertNotNull("Attribute definition not found", ad); //$NON-NLS-1$ String defaultValue = getFirstDefaultValue(ad.getDefaultValue()); @@ -148,6 +160,12 @@ */ @Test public void test3() { + doTest3(); + restartMetatype(); + doTest3(); + } + + private void doTest3() { AttributeDefinition ad = findAttributeDefinitionById("string2", ads); //$NON-NLS-1$ Assert.assertNotNull("Attribute definition not found", ad); //$NON-NLS-1$ String[] defaultValue = ad.getDefaultValue(); @@ -186,6 +204,12 @@ */ @Test public void test4() { + doTest4(); + restartMetatype(); + doTest4(); + } + + private void doTest4() { AttributeDefinition ad = findAttributeDefinitionById("string3", ads); //$NON-NLS-1$ Assert.assertNotNull("Attribute definition not found", ad); //$NON-NLS-1$ assertNull("Default value was not null", ad.getDefaultValue()); //$NON-NLS-1$ @@ -196,6 +220,12 @@ */ @Test public void test5() { + doTest5(); + restartMetatype(); + doTest5(); + } + + private void doTest5() { AttributeDefinition ad = findAttributeDefinitionById("char2", ads); //$NON-NLS-1$ Assert.assertNotNull("Attribute definition not found", ad); //$NON-NLS-1$ assertNull("Default value was not null", ad.getDefaultValue()); //$NON-NLS-1$ @@ -208,6 +238,12 @@ */ @Test public void test6() { + doTest6(); + restartMetatype(); + doTest6(); + } + + private void doTest6() { AttributeDefinition ad = findAttributeDefinitionById("string3", ads); //$NON-NLS-1$ Assert.assertNotNull("Attribute definition not found", ad); //$NON-NLS-1$ assertValidationFail(null, ad); @@ -222,6 +258,12 @@ */ @Test public void test7() { + doTest7(); + restartMetatype(); + doTest7(); + } + + private void doTest7() { AttributeDefinition ad = findAttributeDefinitionById("char3", ads); //$NON-NLS-1$ Assert.assertNotNull("Attribute definition not found", ad); //$NON-NLS-1$ assertValidationPass("\\\u0009", ad); //$NON-NLS-1$ @@ -242,6 +284,12 @@ */ @Test public void test8() { + doTest8(); + restartMetatype(); + doTest8(); + } + + private void doTest8() { AttributeDefinition ad = findAttributeDefinitionById("string4", ads); //$NON-NLS-1$ Assert.assertNotNull("Attribute definition not found", ad); //$NON-NLS-1$ String[] defaultValue = ad.getDefaultValue(); @@ -262,6 +310,12 @@ */ @Test public void test9() { + doTest9(); + restartMetatype(); + doTest9(); + } + + private void doTest9() { AttributeDefinition ad = findAttributeDefinitionById("integer1", ads); //$NON-NLS-1$ Assert.assertNotNull("Attribute definition not found", ad); //$NON-NLS-1$ String[] defaultValue = ad.getDefaultValue(); @@ -276,6 +330,12 @@ */ @Test public void test10() { + doTest10(); + restartMetatype(); + doTest10(); + } + + private void doTest10() { AttributeDefinition ad = findAttributeDefinitionById("string5", ads); //$NON-NLS-1$ Assert.assertNotNull("Attribute definition not found", ad); //$NON-NLS-1$ String[] defaultValue = ad.getDefaultValue(); @@ -294,10 +354,15 @@ } @Before + @Override public void setUp() throws Exception { super.setUp(); bundle = bundleInstaller.installBundle("tb4"); //$NON-NLS-1$ bundle.start(); + getMetatypeObjects(); + } + + private void getMetatypeObjects() { mti = metatype.getMetaTypeInformation(bundle); Assert.assertNotNull("Metatype information not found", mti); //$NON-NLS-1$ ocd = mti.getObjectClassDefinition("org.eclipse.equinox.metatype.tests.tb4", null); //$NON-NLS-1$ @@ -307,10 +372,10 @@ Assert.assertEquals("Wrong number of attribute definitions", 9, ads.length); //$NON-NLS-1$ } - @After - public void tearDown() throws Exception { - bundle.stop(); - super.tearDown(); + @Override + public void restartMetatype() { + super.restartMetatype(); + getMetatypeObjects(); } private void validateChar1Options(String[] optionLabels, String[] optionValues) { diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/Bug340899Test.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/Bug340899Test.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/Bug340899Test.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/Bug340899Test.java 2019-05-28 12:57:39.000000000 +0000 @@ -31,6 +31,12 @@ */ @Test public void test1() throws Exception { + doTest1(); + restartMetatype(); + doTest1(); + } + + private void doTest1() throws Exception { execute("tb5", "org.eclipse.equinox.metatype.tests.tb5"); //$NON-NLS-1$ //$NON-NLS-2$ } @@ -41,6 +47,12 @@ */ @Test public void test2() throws Exception { + doTest2(); + restartMetatype(); + doTest2(); + } + + private void doTest2() throws Exception { execute("tb6", "org.eclipse.equinox.metatype.tests.tb6"); //$NON-NLS-1$ //$NON-NLS-2$ } @@ -51,6 +63,12 @@ */ @Test public void test3() throws Exception { + doTest3(); + restartMetatype(); + doTest3(); + } + + private void doTest3() throws Exception { execute("tb7", "org.eclipse.equinox.metatype.tests.tb7"); //$NON-NLS-1$ //$NON-NLS-2$ } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/Bug395196Test.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/Bug395196Test.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/Bug395196Test.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/Bug395196Test.java 2019-05-28 12:57:39.000000000 +0000 @@ -34,17 +34,28 @@ private ObjectClassDefinition ocd; @Test - public void testRejectDefaultValueWhenNotAnOption() { + public void testRejectDefaultValueWhenNotAnOption() throws Exception { + doTestRejectDefaultValueWhenNotAnOption(); + restartMetatype(); + doTestRejectDefaultValueWhenNotAnOption(); + } + + private void doTestRejectDefaultValueWhenNotAnOption() { AttributeDefinition ad = findAttributeDefinitionById("ocd3-ad1", ads); //$NON-NLS-1$ Assert.assertNotNull("Attribute definition not found", ad); //$NON-NLS-1$ assertNull("Default value not matching one of the options was not rejected", ad.getDefaultValue()); //$NON-NLS-1$ } @Before + @Override public void setUp() throws Exception { super.setUp(); bundle = bundleInstaller.installBundle("tb1"); //$NON-NLS-1$ bundle.start(); + getMetaTypeObjects(); + } + + private void getMetaTypeObjects() { mti = metatype.getMetaTypeInformation(bundle); Assert.assertNotNull("Metatype information not found", mti); //$NON-NLS-1$ ocd = mti.getObjectClassDefinition("org.eclipse.equinox.metatype.tests.tb1.testRejectDefaultValueWhenNotAnOption", null); //$NON-NLS-1$ @@ -54,9 +65,9 @@ Assert.assertEquals("Wrong number of attribute definitions", 1, ads.length); //$NON-NLS-1$ } - @After - public void tearDown() throws Exception { - bundle.stop(); - super.tearDown(); + @Override + public void restartMetatype() { + super.restartMetatype(); + getMetaTypeObjects(); } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/BugTests.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/BugTests.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/BugTests.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/BugTests.java 2019-05-28 12:57:39.000000000 +0000 @@ -27,7 +27,13 @@ * A cardinality of zero should not require a default value to be specified. */ @Test - public void test334642() { + public void test334642() throws Exception { + doTest334642(); + restartMetatype(); + doTest334642(); + } + + private void doTest334642() { MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); Assert.assertNotNull("Metatype information not found", mti); //$NON-NLS-1$ ObjectClassDefinition ocd = mti.getObjectClassDefinition("org.eclipse.equinox.metatype.tests.tb3", null); //$NON-NLS-1$ @@ -62,7 +68,13 @@ * StringIndexOutOfBoundsException when description or name attributes are an empty string */ @Test - public void test341963() { + public void test341963() throws Exception { + doTest341963(); + restartMetatype(); + doTest341963(); + } + + private void doTest341963() { MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); Assert.assertNotNull("Metatype information not found", mti); //$NON-NLS-1$ ObjectClassDefinition ocd = mti.getObjectClassDefinition("ocd2", null); //$NON-NLS-1$ @@ -80,15 +92,11 @@ } @Before + @Override public void setUp() throws Exception { super.setUp(); bundle = bundleInstaller.installBundle("tb3"); //$NON-NLS-1$ bundle.start(); } - @After - public void tearDown() throws Exception { - bundle.stop(); - super.tearDown(); - } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/ExtendableTest.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/ExtendableTest.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/ExtendableTest.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/ExtendableTest.java 2019-05-28 12:57:39.000000000 +0000 @@ -26,6 +26,7 @@ private Bundle bundle; @Before + @Override public void setUp() throws Exception { super.setUp(); bundle = bundleInstaller.installBundle("extendable.tb1"); //$NON-NLS-1$ @@ -33,7 +34,13 @@ } @Test - public void testExtensions() { + public void testExtensions() throws Exception { + doTestExtensions(); + restartMetatype(); + doTestExtensions(); + } + + private void doTestExtensions() { EquinoxMetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); EquinoxObjectClassDefinition ocd = mti.getObjectClassDefinition("metatype.extendable.tb1.1", null); //$NON-NLS-1$ Set schemas = ocd.getExtensionUris(); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/GetDefaultValueTest.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/GetDefaultValueTest.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/GetDefaultValueTest.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/GetDefaultValueTest.java 2019-05-28 12:57:39.000000000 +0000 @@ -30,7 +30,13 @@ private Bundle bundle; @Test - public void testGetDefaultValue() { + public void testGetDefaultValue() throws Exception { + doTestGetDefaultValue(); + restartMetatype(); + doTestGetDefaultValue(); + } + + private void doTestGetDefaultValue() { MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); Assert.assertNotNull("Metatype information was null", mti); //$NON-NLS-1$ ObjectClassDefinition ocd = mti.getObjectClassDefinition("org.eclipse.equinox.metatype.tests.tb1.getDefaultValues", null); //$NON-NLS-1$ @@ -120,6 +126,7 @@ } @Before + @Override public void setUp() throws Exception { super.setUp(); bundle = bundleInstaller.installBundle("tb1"); //$NON-NLS-1$ diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/GetMinMaxTest.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/GetMinMaxTest.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/GetMinMaxTest.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/GetMinMaxTest.java 2019-05-28 12:57:39.000000000 +0000 @@ -25,6 +25,7 @@ private EquinoxObjectClassDefinition ocd; @Before + @Override public void setUp() throws Exception { super.setUp(); bundle = bundleInstaller.installBundle("getMinMax.tb1"); //$NON-NLS-1$ diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/IconTest.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/IconTest.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/IconTest.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/IconTest.java 2019-05-28 12:57:39.000000000 +0000 @@ -15,7 +15,8 @@ import static org.junit.Assert.assertNull; -import org.junit.*; +import org.junit.Before; +import org.junit.Test; import org.osgi.framework.Bundle; import org.osgi.service.metatype.*; @@ -38,6 +39,12 @@ @Test public void testIcon() throws Exception { + doTestIcon(); + restartMetatype(); + doTestIcon(); + } + + private void doTestIcon() throws Exception { MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); assertNotNull(mti); ObjectClassDefinition ocd = mti.getObjectClassDefinition("org.eclipse.equinox.metatype.tests.tb9", null); //$NON-NLS-1$ @@ -45,19 +52,23 @@ AttributeDefinition[] ads = ocd.getAttributeDefinitions(ObjectClassDefinition.ALL); assertAttributeDefinitions(ads, 1); assertAttributeDefinition(ads[0], 0, null, null, "1", "ad1", null, null, AttributeDefinition.STRING); //$NON-NLS-1$ //$NON-NLS-2$ - assertIcon(ocd.getIcon(10000), 10000); - assertIcon(ocd.getIcon(22500), 22500); - assertIcon(ocd.getIcon(40000), 40000); - assertIcon(ocd.getIcon(5000), 10000); - assertIcon(ocd.getIcon(50000), 40000); - assertIcon(ocd.getIcon(16249), 10000); - assertIcon(ocd.getIcon(16251), 22500); - assertIcon(ocd.getIcon(31249), 22500); - assertIcon(ocd.getIcon(31251), 40000); + assertIcon(ocd.getIcon(4931), 4931); + assertIcon(ocd.getIcon(7933), 7933); + assertIcon(ocd.getIcon(10182), 10182); + assertIcon(ocd.getIcon(5000), 4931); + assertIcon(ocd.getIcon(50000), 10182); + assertIcon(ocd.getIcon(6400), 4931); + assertIcon(ocd.getIcon(6500), 7933); } @Test public void testNullIcon() throws Exception { + doTestNullIcon(); + restartMetatype(); + doTestNullIcon(); + } + + private void doTestNullIcon() throws Exception { MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); assertNotNull(mti); ObjectClassDefinition ocd = mti.getObjectClassDefinition("org.eclipse.equinox.metatype.tests.tb9.2", null); //$NON-NLS-1$ @@ -69,14 +80,9 @@ } @Before + @Override public void setUp() throws Exception { super.setUp(); bundle = bundleInstaller.installBundle("tb9"); //$NON-NLS-1$ } - - @After - public void tearDown() throws Exception { - bundle.uninstall(); - super.tearDown(); - } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/NoADTest.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/NoADTest.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/NoADTest.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/NoADTest.java 2019-05-28 12:57:39.000000000 +0000 @@ -13,38 +13,18 @@ *******************************************************************************/ package org.eclipse.equinox.metatype.tests; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import org.eclipse.equinox.compendium.tests.Activator; -import org.eclipse.osgi.tests.bundles.BundleInstaller; import org.junit.*; import org.osgi.framework.Bundle; -import org.osgi.framework.ServiceReference; import org.osgi.service.metatype.*; -public class NoADTest { +public class NoADTest extends AbstractTest { private Bundle bundle; - private BundleInstaller bundleInstaller; - private MetaTypeService metaType; - private ServiceReference metaTypeReference; @Before + @Override public void setUp() throws Exception { - Activator.getBundle(Activator.BUNDLE_METATYPE).start(); - metaTypeReference = Activator.getBundleContext().getServiceReference(MetaTypeService.class); - metaType = Activator.getBundleContext().getService(metaTypeReference); - bundleInstaller = new BundleInstaller("bundle_tests/metatype", Activator.getBundleContext()); //$NON-NLS-1$ - bundleInstaller.refreshPackages(null); + super.setUp(); bundle = bundleInstaller.installBundle("tb10"); //$NON-NLS-1$ - bundle.start(); - } - - @After - public void tearDown() throws Exception { - bundleInstaller.shutdown(); - Activator.getBundleContext().ungetService(metaTypeReference); - Activator.getBundle(Activator.BUNDLE_METATYPE).stop(); } /* @@ -52,17 +32,23 @@ */ @Test public void testNoADs() { - MetaTypeInformation mti = metaType.getMetaTypeInformation(bundle); + doTestNoADs(); + restartMetatype(); + doTestNoADs(); + } + + private void doTestNoADs() { + MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); String[] pids = mti.getPids(); - assertNotNull("The pid was not present.", pids); //$NON-NLS-1$ - assertEquals("Not the expected number of pids.", 1, pids.length); //$NON-NLS-1$ - assertEquals("Expected pid was not present.", "no.ad.designate", pids[0]); //$NON-NLS-1$ //$NON-NLS-2$ + Assert.assertNotNull("The pid was not present.", pids); //$NON-NLS-1$ + Assert.assertEquals("Not the expected number of pids.", 1, pids.length); //$NON-NLS-1$ + Assert.assertEquals("Expected pid was not present.", "no.ad.designate", pids[0]); //$NON-NLS-1$ //$NON-NLS-2$ ObjectClassDefinition ocd = mti.getObjectClassDefinition(pids[0], null); AttributeDefinition[] ads = ocd.getAttributeDefinitions(ObjectClassDefinition.ALL); // seems we are not really spec compliant here if (ads != null) { // should really be null, but if not then make sure it is an empty array - assertEquals("Found some ads: " + ads, 0, ads.length); //$NON-NLS-1$ + Assert.assertEquals("Found some ads: " + ads, 0, ads.length); //$NON-NLS-1$ } } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/SameOcdPidFactoryPidTest.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/SameOcdPidFactoryPidTest.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/SameOcdPidFactoryPidTest.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/SameOcdPidFactoryPidTest.java 2019-05-28 12:57:39.000000000 +0000 @@ -13,41 +13,21 @@ *******************************************************************************/ package org.eclipse.equinox.metatype.tests; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import org.eclipse.equinox.compendium.tests.Activator; -import org.eclipse.osgi.tests.bundles.BundleInstaller; import org.junit.*; import org.osgi.framework.Bundle; -import org.osgi.framework.ServiceReference; import org.osgi.service.metatype.MetaTypeInformation; -import org.osgi.service.metatype.MetaTypeService; -public class SameOcdPidFactoryPidTest { +public class SameOcdPidFactoryPidTest extends AbstractTest { private Bundle bundle; - private BundleInstaller bundleInstaller; - private MetaTypeService metaType; - private ServiceReference metaTypeReference; @Before + @Override public void setUp() throws Exception { - Activator.getBundle(Activator.BUNDLE_METATYPE).start(); - metaTypeReference = Activator.getBundleContext().getServiceReference(MetaTypeService.class); - metaType = Activator.getBundleContext().getService(metaTypeReference); - bundleInstaller = new BundleInstaller("bundle_tests/metatype", Activator.getBundleContext()); //$NON-NLS-1$ - bundleInstaller.refreshPackages(null); + super.setUp(); bundle = bundleInstaller.installBundle("tb2"); //$NON-NLS-1$ bundle.start(); } - @After - public void tearDown() throws Exception { - bundleInstaller.shutdown(); - Activator.getBundleContext().ungetService(metaTypeReference); - Activator.getBundle(Activator.BUNDLE_METATYPE).stop(); - } - /* * Ensures the same OCD referred to by two Designate elements, one using * the factoryPid attribute and the other only the pid attribute, is @@ -55,14 +35,20 @@ */ @Test public void test1() { - MetaTypeInformation mti = metaType.getMetaTypeInformation(bundle); + doTest1(); + restartMetatype(); + doTest1(); + } + + private void doTest1() { + MetaTypeInformation mti = metatype.getMetaTypeInformation(bundle); String[] pids = mti.getPids(); - assertNotNull("The pid 'singleton' was not present.", pids); //$NON-NLS-1$ - assertEquals("Not the expected number of pids.", 1, pids.length); //$NON-NLS-1$ - assertEquals("Expected pid was not present.", "singleton", pids[0]); //$NON-NLS-1$ //$NON-NLS-2$ + Assert.assertNotNull("The pid 'singleton' was not present.", pids); //$NON-NLS-1$ + Assert.assertEquals("Not the expected number of pids.", 1, pids.length); //$NON-NLS-1$ + Assert.assertEquals("Expected pid was not present.", "singleton", pids[0]); //$NON-NLS-1$ //$NON-NLS-2$ String[] factoryPids = mti.getFactoryPids(); - assertNotNull("The factory pid 'factory' was not present.", factoryPids); //$NON-NLS-1$ - assertEquals("Not the expected number of factory pids.", 1, factoryPids.length); //$NON-NLS-1$ - assertEquals("Expected factory pid was not present.", "factory", factoryPids[0]); //$NON-NLS-1$ //$NON-NLS-2$ + Assert.assertNotNull("The factory pid 'factory' was not present.", factoryPids); //$NON-NLS-1$ + Assert.assertEquals("Not the expected number of factory pids.", 1, factoryPids.length); //$NON-NLS-1$ + Assert.assertEquals("Expected factory pid was not present.", "factory", factoryPids[0]); //$NON-NLS-1$ //$NON-NLS-2$ } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/UnresolvedBundleTest.java equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/UnresolvedBundleTest.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/UnresolvedBundleTest.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/UnresolvedBundleTest.java 2019-05-28 12:57:39.000000000 +0000 @@ -57,6 +57,7 @@ } @Before + @Override public void setUp() throws Exception { super.setUp(); bundle = bundleInstaller.installBundle("tb8"); //$NON-NLS-1$ diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.concurrent/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.concurrent/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.concurrent/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.concurrent/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.equinox.concurrent -Bundle-Version: 1.1.200.qualifier +Bundle-Version: 1.1.300.qualifier Bundle-Vendor: %pluginProvider Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: org.eclipse.core.runtime;version="3.4.0";common=split, diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.concurrent/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.concurrent/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.concurrent/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.concurrent/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -5,7 +5,7 @@ are made available under the terms of the Eclipse Distribution License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/org/documents/edl-v10.php - + Contributors: Igor Fedorenko - initial implementation --> @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.concurrent - 1.1.200-SNAPSHOT + 1.1.300-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/SingleOperationListenableFuture.java equinox-bundles-4.12/bundles/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/SingleOperationListenableFuture.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/SingleOperationListenableFuture.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/SingleOperationListenableFuture.java 2019-05-28 12:57:39.000000000 +0000 @@ -62,6 +62,7 @@ } } + @Override public void runWithProgress(final IProgressRunnable runnable) { Assert.isNotNull(runnable); if (!isCanceled()) { diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.console/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.console/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.console/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.console/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %bundleName Bundle-SymbolicName: org.eclipse.equinox.console -Bundle-Version: 1.3.200.qualifier +Bundle-Version: 1.3.300.qualifier Bundle-Activator: org.eclipse.equinox.console.command.adapter.Activator Bundle-Vendor: %bundleVendor Bundle-Localization: plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.console/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.console/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.console/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.console/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.console - 1.3.200-SNAPSHOT + 1.3.300-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java equinox-bundles-4.12/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java 2019-05-28 12:57:39.000000000 +0000 @@ -121,8 +121,7 @@ out.println("Nested Exception"); printStackTrace(nested); } - } catch (IllegalAccessException e) { - } catch (InvocationTargetException e) { + } catch (IllegalAccessException | InvocationTargetException e) { } } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java equinox-bundles-4.12/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java 2019-05-28 12:57:39.000000000 +0000 @@ -423,10 +423,7 @@ if (stateFilter == -1) stateFilter = 0; stateFilter |= match.getInt(match); - } catch (NoSuchFieldException e) { - System.out.println(ConsoleMsg.CONSOLE_INVALID_INPUT + ": " + desiredState); //$NON-NLS-1$ - throw new IllegalArgumentException(); - } catch (IllegalAccessException e) { + } catch (NoSuchFieldException | IllegalAccessException e) { System.out.println(ConsoleMsg.CONSOLE_INVALID_INPUT + ": " + desiredState); //$NON-NLS-1$ throw new IllegalArgumentException(); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.console.jaas.fragment/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.console.jaas.fragment/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.console.jaas.fragment/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.console.jaas.fragment/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %bundleName Bundle-SymbolicName: org.eclipse.equinox.console.ssh -Bundle-Version: 1.2.100.qualifier +Bundle-Version: 1.2.200.qualifier Bundle-Activator: org.eclipse.equinox.console.ssh.Activator Bundle-Vendor: %bundleVendor Bundle-Localization: plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.console.ssh/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.console.ssh/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.console.ssh/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.console.ssh/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.console.ssh - 1.2.100-SNAPSHOT + 1.2.200-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/jaas/SecureStorageLoginModule.java equinox-bundles-4.12/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/jaas/SecureStorageLoginModule.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/jaas/SecureStorageLoginModule.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/jaas/SecureStorageLoginModule.java 2019-05-28 12:57:39.000000000 +0000 @@ -55,9 +55,7 @@ PasswordCallback passwordCallback = new PasswordCallback("password: ", false); try { callbackHandler.handle(new Callback[]{nameCallback, passwordCallback}); - } catch (IOException e) { - throw new FailedLoginException("Cannot get username and password"); - } catch (UnsupportedCallbackException e) { + } catch (IOException | UnsupportedCallbackException e) { throw new FailedLoginException("Cannot get username and password"); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.console.ssh.tests/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.console.ssh.tests/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.console.ssh.tests/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.console.ssh.tests/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ tests-pom org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../tests-pom/ diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.console.tests/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.console.tests/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.console.tests/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.console.tests/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ tests-pom org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../tests-pom/ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.coordinator/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.coordinator/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.coordinator/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.coordinator/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.device/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.device/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.device/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.device/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.ds/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.ds/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.ds/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.ds/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb1/org/eclipse/equinox/ds/tests/tb1/BindUnbindSuccessor.java equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb1/org/eclipse/equinox/ds/tests/tb1/BindUnbindSuccessor.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb1/org/eclipse/equinox/ds/tests/tb1/BindUnbindSuccessor.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb1/org/eclipse/equinox/ds/tests/tb1/BindUnbindSuccessor.java 2019-05-28 12:57:39.000000000 +0000 @@ -46,6 +46,7 @@ else ctxt.disableComponent(name); } + @Override public Dictionary getProperties() { return ctxt.getProperties(); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/Bc100.java equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/Bc100.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/Bc100.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/Bc100.java 2019-05-28 12:57:39.000000000 +0000 @@ -16,6 +16,7 @@ public class Bc100 extends CallRegistrator { + @Override public String getName() { return "org.eclipse.equinox.ds.tests.tb12.Bc100"; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/Bc110.java equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/Bc110.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/Bc110.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/Bc110.java 2019-05-28 12:57:39.000000000 +0000 @@ -16,6 +16,7 @@ public class Bc110 extends CallRegistrator { + @Override public String getName() { return "org.eclipse.equinox.ds.tests.tb12.Bc110"; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/NoArgs100.java equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/NoArgs100.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/NoArgs100.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/NoArgs100.java 2019-05-28 12:57:39.000000000 +0000 @@ -16,6 +16,7 @@ public class NoArgs100 extends CallRegistrator { + @Override public String getName() { return "org.eclipse.equinox.ds.tests.tb12.NoArgs100"; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/NoArgs110.java equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/NoArgs110.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/NoArgs110.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb12/org/eclipse/equinox/ds/tests/tb12/NoArgs110.java 2019-05-28 12:57:39.000000000 +0000 @@ -16,6 +16,7 @@ public class NoArgs110 extends CallRegistrator { + @Override public String getName() { return "org.eclipse.equinox.ds.tests.tb12.NoArgs110"; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb4/org/eclipse/equinox/ds/tests/tb4/impl/NamedFactory.java equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb4/org/eclipse/equinox/ds/tests/tb4/impl/NamedFactory.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb4/org/eclipse/equinox/ds/tests/tb4/impl/NamedFactory.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/bundles_src/tb4/org/eclipse/equinox/ds/tests/tb4/impl/NamedFactory.java 2019-05-28 12:57:39.000000000 +0000 @@ -39,6 +39,7 @@ return name; } + @Override public String toString() { return name; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -3,7 +3,7 @@ Bundle-Name: Declarative Services Tests Bundle-Category: test Bundle-SymbolicName: org.eclipse.equinox.ds.tests -Bundle-Version: 1.5.300.qualifier +Bundle-Version: 1.5.400.qualifier Bundle-Activator: org.eclipse.equinox.ds.tests.DSTestsActivator Bundle-ActivationPolicy: lazy Require-Bundle: org.junit diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -5,7 +5,7 @@ are made available under the terms of the Eclipse Distribution License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/org/documents/edl-v10.php - + Contributors: Igor Fedorenko - initial implementation --> @@ -14,11 +14,11 @@ tests-pom org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../tests-pom/ org.eclipse.equinox org.eclipse.equinox.ds.tests - 1.5.300-SNAPSHOT + 1.5.400-SNAPSHOT eclipse-test-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/src/org/eclipse/equinox/ds/tests/tbc/DSEvent.java equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/src/org/eclipse/equinox/ds/tests/tbc/DSEvent.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/src/org/eclipse/equinox/ds/tests/tbc/DSEvent.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/src/org/eclipse/equinox/ds/tests/tbc/DSEvent.java 2019-05-28 12:57:39.000000000 +0000 @@ -86,6 +86,7 @@ } } + @Override public String toString() { StringBuffer buf = new StringBuffer("DSEvent["); buf.append("time=" + this.time + ";action="); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/src/org/eclipse/equinox/ds/tests/tbc/DSTest.java equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/src/org/eclipse/equinox/ds/tests/tbc/DSTest.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.ds.tests/src/org/eclipse/equinox/ds/tests/tbc/DSTest.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.ds.tests/src/org/eclipse/equinox/ds/tests/tbc/DSTest.java 2019-05-28 12:57:39.000000000 +0000 @@ -1242,6 +1242,7 @@ final Bundle tb4 = installBundle("tb4"); new Thread() { + @Override public void run() { try { tb2.start(); // start the blocking service @@ -1252,6 +1253,7 @@ sleep0(scr_restart_timeout + timeout * 2); new Thread() { + @Override public void run() { try { tb4.start(); // start the other @@ -1276,6 +1278,7 @@ // start the other blocking bundle new Thread() { + @Override public void run() { try { tb3.start(); @@ -1288,6 +1291,7 @@ // start the non-blocking bundle new Thread() { + @Override public void run() { try { tb4.start(); // start the other @@ -2158,6 +2162,7 @@ this.lastComp = last; } + @Override public void run() { ConfigurationAdmin cm = (ConfigurationAdmin) trackerCM.getService(); assertNotNull("The ConfigurationAdmin should be available", cm); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -1,6 +1,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: %bundleName -Bundle-Version: 1.5.0.qualifier +Bundle-Version: 1.5.100.qualifier Bundle-SymbolicName: org.eclipse.equinox.event Bundle-Activator: org.eclipse.equinox.internal.event.Activator Import-Package: org.eclipse.osgi.framework.eventmgr;version="1.1.0", diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.event/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.event/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.event/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.event/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.event - 1.5.0-SNAPSHOT + 1.5.100-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.jetty/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.http.jetty/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.jetty/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.jetty/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -4,7 +4,7 @@ Bundle-Vendor: %providerName Bundle-Localization: plugin Bundle-SymbolicName: org.eclipse.equinox.http.jetty -Bundle-Version: 3.7.0.qualifier +Bundle-Version: 3.7.100.qualifier Bundle-Activator: org.eclipse.equinox.http.jetty.internal.Activator Import-Package: javax.servlet;version="[3.1.0,5.0.0)", javax.servlet.http;version="[3.1.0,5.0.0)", diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.jetty/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.http.jetty/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.jetty/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.jetty/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -16,11 +16,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.http.jetty - 3.7.0-SNAPSHOT + 3.7.100-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java 2019-05-28 12:57:39.000000000 +0000 @@ -337,9 +337,7 @@ thread.setContextClassLoader(contextLoader); try { sessionDestroyed.invoke(httpServiceServlet, event.getSession().getId()); - } catch (IllegalAccessException e) { - // not likely - } catch (IllegalArgumentException e) { + } catch (IllegalAccessException | IllegalArgumentException e) { // not likely } catch (InvocationTargetException e) { throw new RuntimeException(e.getCause()); @@ -355,9 +353,7 @@ thread.setContextClassLoader(contextLoader); try { sessionIdChanged.invoke(httpServiceServlet, oldSessionId); - } catch (IllegalAccessException e) { - // not likely - } catch (IllegalArgumentException e) { + } catch (IllegalAccessException | IllegalArgumentException e) { // not likely } catch (InvocationTargetException e) { throw new RuntimeException(e.getCause()); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.jetty.starter/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.http.jetty.starter/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.jetty.starter/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.jetty.starter/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -15,7 +15,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.registry/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.http.registry/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.registry/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.registry/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -3,7 +3,7 @@ Bundle-Name: %bundleName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.equinox.http.servlet -Bundle-Version: 1.6.0.qualifier +Bundle-Version: 1.6.100.qualifier Bundle-Activator: org.eclipse.equinox.http.servlet.internal.Activator Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -15,11 +15,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.http.servlet - 1.6.0-SNAPSHOT + 1.6.100-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/ContextController.java 2019-05-28 12:57:39.000000000 +0000 @@ -602,19 +602,27 @@ shutdown = true; } + public void createContextAttributes() { + getProxyContext().createContextAttributes(this); + } + + public void destroyContextAttributes() { + if (shutdown) { + return; + } + + proxyContext.destroyContextAttributes(this); + } + public boolean isLegacyContext() { return serviceReference.getProperty(HTTP_SERVICE_CONTEXT_PROPERTY) != null; } public String getContextName() { - checkShutdown(); - return contextName; } public String getContextPath() { - checkShutdown(); - return contextPath; } @@ -769,26 +777,18 @@ } public Map getActiveSessions() { - checkShutdown(); - return activeSessions; } public Set> getEndpointRegistrations() { - checkShutdown(); - return endpointRegistrations; } public EventListeners getEventListeners() { - checkShutdown(); - return eventListeners; } public Set getFilterRegistrations() { - checkShutdown(); - return filterRegistrations; } @@ -824,8 +824,6 @@ } public HttpServiceRuntimeImpl getHttpServiceRuntime() { - checkShutdown(); - return httpServiceRuntime; } @@ -834,29 +832,21 @@ } public Set getListenerRegistrations() { - checkShutdown(); - return listenerRegistrations; } public ProxyContext getProxyContext() { - checkShutdown(); - return proxyContext; } public long getServiceId() { - checkShutdown(); - return contextServiceId; } public synchronized ServletContextDTO getServletContextDTO(){ - checkShutdown(); - ServletContextDTO servletContextDTO = new ServletContextDTO(); - ServletContext servletContext = getProxyContext().getServletContext(); + ServletContext servletContext = proxyContext.getServletContext(); servletContextDTO.attributes = getDTOAttributes(servletContext); servletContextDTO.contextPath = getContextPath(); @@ -872,13 +862,21 @@ } public boolean matches(ServiceReference whiteBoardService) { - String contextSelector = (String) whiteBoardService.getProperty( - HTTP_WHITEBOARD_CONTEXT_SELECT); // make sure the context helper is either one of the built-in ones registered by this http whiteboard implementation; // or is visible to the whiteboard registering bundle. + if (!visibleContextHelper(whiteBoardService)) { return false; } + + String contextSelector = (String) whiteBoardService.getProperty( + HTTP_WHITEBOARD_CONTEXT_SELECT); + + // custom equinox behaviour + if (contextName.equals(contextSelector)) { + return true; + } + if (contextSelector == null) { contextSelector = httpServiceRuntime.getDefaultContextSelectFilter(whiteBoardService); if (contextSelector == null) { @@ -888,25 +886,31 @@ } } - if (!contextSelector.startsWith(Const.OPEN_PAREN)) { - contextSelector = Const.OPEN_PAREN + - HTTP_WHITEBOARD_CONTEXT_NAME + - Const.EQUAL + contextSelector + Const.CLOSE_PAREN; - } + if (contextSelector.startsWith(Const.OPEN_PAREN)) { + org.osgi.framework.Filter targetFilter; - org.osgi.framework.Filter targetFilter; + try { + targetFilter = FrameworkUtil.createFilter(contextSelector); + } + catch (InvalidSyntaxException ise) { + throw new IllegalArgumentException(ise); + } - try { - targetFilter = FrameworkUtil.createFilter(contextSelector); - } - catch (InvalidSyntaxException ise) { - throw new HttpWhiteboardFailureException(ise.getMessage(), DTOConstants.FAILURE_REASON_VALIDATION_FAILED); + if (matches(targetFilter)) { + return true; + } } - return matches(targetFilter); + return false; } private boolean visibleContextHelper(ServiceReference whiteBoardService) { + if (consumingContext.getBundle().equals(serviceReference.getBundle())) { + Boolean defaultContextHelper = (Boolean) serviceReference.getProperty(Const.EQUINOX_HTTP_WHITEBOARD_CONTEXT_HELPER_DEFAULT); + if (defaultContextHelper == null) { + return true; + } + } try { if (whiteBoardService.getBundle().getBundleContext().getAllServiceReferences(ServletContextHelper.class.getName(), servletContextHelperRefFilter) != null) { return true; @@ -1253,6 +1257,10 @@ } public void fireSessionIdChanged(String oldSessionId) { + if (shutdown) { + return; + } + ServletContext servletContext = proxyContext.getServletContext(); if ((servletContext.getMajorVersion() <= 3) && (servletContext.getMinorVersion() < 1)) { return; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/DispatchTargets.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/DispatchTargets.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/DispatchTargets.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/context/DispatchTargets.java 2019-05-28 12:57:39.000000000 +0000 @@ -246,6 +246,7 @@ servletRequest.setAttribute(name, value); } + @Override public void close() { for (Map.Entry oldValue : oldValues.entrySet()) { if (oldValue.getValue() == null) { diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/customizer/ContextListenerTrackerCustomizer.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/customizer/ContextListenerTrackerCustomizer.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/customizer/ContextListenerTrackerCustomizer.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/customizer/ContextListenerTrackerCustomizer.java 2019-05-28 12:57:39.000000000 +0000 @@ -67,13 +67,23 @@ Object listenerObj = serviceReference.getProperty(HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER); - if (!(listenerObj instanceof Boolean) && !(listenerObj instanceof String)) { + if (!(listenerObj instanceof Boolean) && + !"true".equalsIgnoreCase(String.valueOf(listenerObj)) && //$NON-NLS-1$ + !"false".equalsIgnoreCase(String.valueOf(listenerObj)) && //$NON-NLS-1$ + !"1".equalsIgnoreCase(String.valueOf(listenerObj)) && //$NON-NLS-1$ + !"0".equalsIgnoreCase(String.valueOf(listenerObj)) && //$NON-NLS-1$ + !"yes".equalsIgnoreCase(String.valueOf(listenerObj)) && //$NON-NLS-1$ + !"no".equalsIgnoreCase(String.valueOf(listenerObj)) //$NON-NLS-1$ + ) { throw new HttpWhiteboardFailureException( HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER + "=" + listenerObj + " is not a valid option. Ignoring!", //$NON-NLS-1$ //$NON-NLS-2$ DTOConstants.FAILURE_REASON_VALIDATION_FAILED); } - if (Boolean.FALSE.equals(listenerObj) || !Boolean.valueOf(String.valueOf(listenerObj)).booleanValue()) { + if (Boolean.FALSE.equals(listenerObj) || + "false".equalsIgnoreCase(String.valueOf(listenerObj)) || //$NON-NLS-1$ + "0".equalsIgnoreCase(String.valueOf(listenerObj)) || //$NON-NLS-1$ + "no".equalsIgnoreCase(String.valueOf(listenerObj))) { //$NON-NLS-1$ // Asks to be ignored. return result; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceImpl.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceImpl.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceImpl.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceImpl.java 2019-05-28 12:57:39.000000000 +0000 @@ -54,18 +54,14 @@ public synchronized HttpContext createDefaultHttpContext() { checkShutdown(); - DefaultServletContextHelper defaultServletContextHelper = bundle.getBundleContext().getService(httpServiceRuntime.defaultContextReg.getReference()); - HttpContextHolder httpContextHolder = new HttpContextHolder(defaultServletContextHelper, httpServiceRuntime.defaultContextReg); - httpContextHolder.incrementUseCount(); - httpServiceRuntime.legacyContextMap.putIfAbsent(defaultServletContextHelper, httpContextHolder); - - return defaultServletContextHelper; + return new DefaultServletContextHelper(bundle); } /** * @throws ServletException * @see ExtendedHttpService#registerFilter(String, Filter, Dictionary, HttpContext) */ + @Override public synchronized void registerFilter( final String alias, final Filter filter, final Dictionary initparams, @@ -73,8 +69,8 @@ throws ServletException { checkShutdown(); - httpContext = httpContext == null ? createDefaultHttpContext() : registerContext(httpContext); - final HttpContextHolder httpContextHolder = httpServiceRuntime.legacyContextMap.get(httpContext); + + final HttpContextHolder httpContextHolder = getHttpContextHolder(httpContext); try { AccessController.doPrivileged(new PrivilegedExceptionAction() { @Override @@ -90,6 +86,14 @@ } + private HttpContextHolder getHttpContextHolder(HttpContext httpContext) { + if (httpContext == null) { + httpContext = createDefaultHttpContext(); + } + registerContext(httpContext); + return httpServiceRuntime.legacyContextMap.get(httpContext); + } + /** * @throws NamespaceException * @see HttpService#registerResources(String, String, HttpContext) @@ -99,8 +103,7 @@ throws NamespaceException { checkShutdown(); - httpContext = httpContext == null ? createDefaultHttpContext() : registerContext(httpContext); - final HttpContextHolder httpContextHolder = httpServiceRuntime.legacyContextMap.get(httpContext); + final HttpContextHolder httpContextHolder = getHttpContextHolder(httpContext); try { AccessController.doPrivileged(new PrivilegedExceptionAction() { @Override @@ -126,8 +129,7 @@ throws ServletException, NamespaceException { checkShutdown(); - httpContext = httpContext == null ? createDefaultHttpContext() : registerContext(httpContext); - final HttpContextHolder httpContextHolder = httpServiceRuntime.legacyContextMap.get(httpContext); + final HttpContextHolder httpContextHolder = getHttpContextHolder(httpContext); try { AccessController.doPrivileged(new PrivilegedExceptionAction() { @Override @@ -153,6 +155,7 @@ /** * @see ExtendedHttpService#unregisterFilter(Filter) */ + @Override public synchronized void unregisterFilter(Filter filter) { checkShutdown(); @@ -181,7 +184,7 @@ HttpContextHolder httpContextHolder = httpServiceRuntime.legacyContextMap.get(httpContext); if (httpContextHolder == null) { - String legacyId = httpContext.getClass().getName().replaceAll("[^a-zA-Z_0-9\\-]", "_") + "-" + generateLegacyId(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + String legacyId= httpContext.getClass().getName().replaceAll("[^a-zA-Z_0-9\\-]", "_") + "-" + generateLegacyId(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ Dictionary props = new Hashtable(); props.put(HTTP_WHITEBOARD_CONTEXT_NAME, legacyId); props.put(HTTP_WHITEBOARD_CONTEXT_PATH, "/"); //$NON-NLS-1$ @@ -196,6 +199,8 @@ httpContextHolder.incrementUseCount(); httpServiceRuntime.legacyContextMap.put(httpContext, httpContextHolder); + } else { + httpContextHolder.incrementUseCount(); } return httpContext; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceRuntimeImpl.java 2019-05-28 12:57:39.000000000 +0000 @@ -57,7 +57,6 @@ HttpServiceRuntime, ServiceTrackerCustomizer> { - @SuppressWarnings("unchecked") public HttpServiceRuntimeImpl( BundleContext trackingContext, BundleContext consumingContext, ServletContext parentServletContext, Dictionary attributes) { @@ -69,7 +68,7 @@ this.servletServiceFilter = createServletFilter(consumingContext); this.resourceServiceFilter = createResourceFilter(consumingContext); this.filterServiceFilter = createFilterFilter(consumingContext); - this.listenerServiceFilter = createListenerFilter(consumingContext); + this.listenerServiceFilter = createListenerFilter(consumingContext, parentServletContext); this.parentServletContext = parentServletContext; this.attributes = new UMDictionaryMap(attributes); @@ -110,9 +109,9 @@ defaultContextProps.put(Constants.SERVICE_RANKING, Integer.MIN_VALUE); defaultContextProps.put(HTTP_WHITEBOARD_CONTEXT_PATH, Const.SLASH); defaultContextProps.put(HTTP_WHITEBOARD_TARGET, this.targetFilter); - defaultContextProps.put(HTTP_SERVICE_CONTEXT_PROPERTY, HTTP_WHITEBOARD_DEFAULT_CONTEXT_NAME); - defaultContextReg = (ServiceRegistration) consumingContext.registerService( - new String [] {ServletContextHelper.class.getName(), DefaultServletContextHelper.class.getName()}, new DefaultServletContextHelperFactory(), defaultContextProps); + defaultContextProps.put(Const.EQUINOX_HTTP_WHITEBOARD_CONTEXT_HELPER_DEFAULT, Boolean.TRUE); + defaultContextReg = consumingContext.registerService( + ServletContextHelper.class, new DefaultServletContextHelperFactory(), defaultContextProps); } public synchronized void open() { @@ -689,7 +688,8 @@ props.put(HTTP_WHITEBOARD_TARGET, targetFilter); props.put(HTTP_WHITEBOARD_FILTER_PATTERN, alias); props.put(HTTP_WHITEBOARD_FILTER_NAME, filterName); - props.put(HTTP_WHITEBOARD_CONTEXT_SELECT, getFilter(httpContextHolder.getServiceReference())); + props.put(HTTP_WHITEBOARD_CONTEXT_SELECT, "(" + Const.EQUINOX_LEGACY_CONTEXT_HELPER + "=true)"); //$NON-NLS-1$ //$NON-NLS-2$ + props.put(Const.EQUINOX_LEGACY_CONTEXT_SELECT, getFilter(httpContextHolder.getServiceReference())); props.put(Const.EQUINOX_LEGACY_TCCL_PROP, Thread.currentThread().getContextClassLoader()); props.put(Constants.SERVICE_RANKING, findFilterPriority(initparams)); fillInitParams(props, initparams, HTTP_WHITEBOARD_FILTER_INIT_PARAM_PREFIX); @@ -700,7 +700,6 @@ // check that init got called and did not throw an exception filterFactory.checkForError(); - httpContextHolder.incrementUseCount(); objectRegistration = new HttpServiceObjectRegistration(filter, registration, httpContextHolder, bundle); Set objectRegistrations = bundleRegistrations.get(bundle); @@ -802,7 +801,6 @@ props.put(Constants.SERVICE_RANKING, Integer.MAX_VALUE); props.put(Const.EQUINOX_LEGACY_TCCL_PROP, Thread.currentThread().getContextClassLoader()); registration = bundle.getBundleContext().registerService(String.class, "resource", props); //$NON-NLS-1$ - httpContextHolder.incrementUseCount(); objectRegistration = new HttpServiceObjectRegistration(fullAlias, registration, httpContextHolder, bundle); @@ -891,7 +889,6 @@ // check that init got called and did not throw an exception legacyServlet.checkForError(); - httpContextHolder.incrementUseCount(); objectRegistration = new HttpServiceObjectRegistration(fullAlias, registration, httpContextHolder, bundle); @@ -1082,7 +1079,7 @@ } } - private static org.osgi.framework.Filter createListenerFilter(BundleContext context) { + private static org.osgi.framework.Filter createListenerFilter(BundleContext context, ServletContext servletContext) { StringBuilder sb = new StringBuilder(); sb.append("(&"); //$NON-NLS-1$ @@ -1094,7 +1091,9 @@ sb.append("(objectClass=").append(ServletRequestAttributeListener.class.getName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$ sb.append("(objectClass=").append(HttpSessionListener.class.getName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$ sb.append("(objectClass=").append(HttpSessionAttributeListener.class.getName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$ - sb.append("(objectClass=").append(HttpSessionIdListener.class.getName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$ + if ((servletContext.getMajorVersion() >= 3) && (servletContext.getMinorVersion() > 0)) { + sb.append("(objectClass=").append(HttpSessionIdListener.class.getName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$ + } sb.append(")"); //$NON-NLS-1$ sb.append(")"); //$NON-NLS-1$ @@ -1284,7 +1283,7 @@ private final Map attributes; private final String targetFilter; - final ServiceRegistration defaultContextReg; + final ServiceRegistration defaultContextReg; private final ServletContext parentServletContext; private final BundleContext trackingContext; private final BundleContext consumingContext; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/multipart/MultipartSupportImpl.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/multipart/MultipartSupportImpl.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/multipart/MultipartSupportImpl.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/multipart/MultipartSupportImpl.java 2019-05-28 12:57:39.000000000 +0000 @@ -78,6 +78,7 @@ accessControlContext.checkPermission(new FilePermission(baseStorage.getAbsolutePath(), "read,write")); //$NON-NLS-1$ } + @Override public Map parseRequest(HttpServletRequest request) throws IOException, ServletException { if (upload == null) { throw new IllegalStateException("Servlet was not configured for multipart!"); //$NON-NLS-1$ diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/EndpointRegistration.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/EndpointRegistration.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/EndpointRegistration.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/EndpointRegistration.java 2019-05-28 12:57:39.000000000 +0000 @@ -54,6 +54,7 @@ createContextAttributes(); } + @Override public void destroy() { ClassLoader original = Thread.currentThread().getContextClassLoader(); try { @@ -162,13 +163,11 @@ } private void createContextAttributes() { - contextController.getProxyContext().createContextAttributes( - contextController); + contextController.createContextAttributes(); } private void destroyContextAttributes() { - contextController.getProxyContext().destroyContextAttributes( - contextController); + contextController.destroyContextAttributes(); } @Override diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/FilterRegistration.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/FilterRegistration.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/FilterRegistration.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/FilterRegistration.java 2019-05-28 12:57:39.000000000 +0000 @@ -25,6 +25,8 @@ import org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl; import org.eclipse.equinox.http.servlet.internal.servlet.Match; import org.eclipse.equinox.http.servlet.internal.util.Const; +import org.osgi.framework.FrameworkUtil; +import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.wiring.BundleWiring; import org.osgi.service.http.runtime.dto.FilterDTO; @@ -56,10 +58,26 @@ } else { classLoader = filterHolder.getBundle().adapt(BundleWiring.class).getClassLoader(); } - initDestoyWithContextController = true; + String legacyContextFilter = (String) filterHolder.getServiceReference().getProperty(Const.EQUINOX_LEGACY_CONTEXT_SELECT); + if (legacyContextFilter != null) { + // This is a legacy Filter registration. + // This filter tells us the real context controller, + // backed by an HttpContext that should be used to init/destroy this Filter + org.osgi.framework.Filter f = null; + try { + f = FrameworkUtil.createFilter(legacyContextFilter); + } + catch (InvalidSyntaxException e) { + // nothing + } + initDestoyWithContextController = f == null || contextController.matches(f); + } else { + initDestoyWithContextController = true; + } needDecode = MatchableRegistration.patternsRequireDecode(filterDTO.patterns); } + @Override public int compareTo(FilterRegistration otherFilterRegistration) { int priorityDifference = priority - otherFilterRegistration.priority; if (priorityDifference != 0) @@ -72,6 +90,7 @@ return (thisId < otherId) ? -1 : ((thisId == otherId) ? 0 : 1); } + @Override public void destroy() { if (!initDestoyWithContextController) { return; @@ -188,13 +207,11 @@ } private void createContextAttributes() { - contextController.getProxyContext().createContextAttributes( - contextController); + contextController.createContextAttributes(); } private void destroyContextAttributes() { - contextController.getProxyContext().destroyContextAttributes( - contextController); + contextController.destroyContextAttributes(); } protected boolean isPathWildcardMatch(String pattern, String path) { diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/ListenerRegistration.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/ListenerRegistration.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/ListenerRegistration.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/registration/ListenerRegistration.java 2019-05-28 12:57:39.000000000 +0000 @@ -122,13 +122,11 @@ } private void createContextAttributes() { - contextController.getProxyContext().createContextAttributes( - contextController); + contextController.createContextAttributes(); } private void destroyContextAttributes() { - contextController.getProxyContext().destroyContextAttributes( - contextController); + contextController.destroyContextAttributes(); } ClassLoader getClassLoader() { diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResourceServlet.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResourceServlet.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResourceServlet.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResourceServlet.java 2019-05-28 12:57:39.000000000 +0000 @@ -72,6 +72,7 @@ try { AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override public Boolean run() throws Exception { URLConnection connection = resourceURL.openConnection(); long lastModified = connection.getLastModified(); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java 2019-05-28 12:57:39.000000000 +0000 @@ -156,10 +156,7 @@ try (ServletOutputStream outputStream = response.getOutputStream()) { // just force a close } - catch (IllegalStateException ise2) { - // ignore - } - catch (IOException ioe) { + catch (IllegalStateException | IOException ise2) { // ignore } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ServletContextAdaptor.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ServletContextAdaptor.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ServletContextAdaptor.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ServletContextAdaptor.java 2019-05-28 12:57:39.000000000 +0000 @@ -101,6 +101,7 @@ curClassLoader, interfaces, new AdaptorInvocationHandler()); } + @Override public boolean equals (Object obj) { if (!(obj instanceof ServletContext)) { return false; @@ -159,6 +160,7 @@ try { mimeType = AccessController.doPrivileged( new PrivilegedExceptionAction() { + @Override public String run() throws Exception { return servletContextHelper.getMimeType(name); } @@ -187,6 +189,7 @@ try { return AccessController.doPrivileged( new PrivilegedExceptionAction() { + @Override public String run() throws Exception { return servletContextHelper.getRealPath(path); } @@ -223,6 +226,7 @@ try { return AccessController.doPrivileged( new PrivilegedExceptionAction() { + @Override public URL run() throws Exception { return servletContextHelper.getResource(name); } @@ -261,6 +265,7 @@ try { return AccessController.doPrivileged( new PrivilegedExceptionAction>() { + @Override public Set run() throws Exception { return servletContextHelper.getResourcePaths(name); } @@ -278,6 +283,7 @@ return contextController.getContextName(); } + @Override public int hashCode() { return contextController.hashCode(); } @@ -381,6 +387,7 @@ } } + @Override public String toString() { String value = string; @@ -431,6 +438,7 @@ return contextController; } + @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/util/Const.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/util/Const.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/util/Const.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/util/Const.java 2019-05-28 12:57:39.000000000 +0000 @@ -48,8 +48,10 @@ public static final String EQUINOX_HTTP_MULTIPART_MAXFILESIZE = "equinox.http.whiteboard.servlet.multipart.maxFileSize"; //$NON-NLS-1$ public static final String EQUINOX_HTTP_MULTIPART_MAXREQUESTSIZE = "equinox.http.whiteboard.servlet.multipart.maxRequestSize"; //$NON-NLS-1$ public static final String EQUINOX_LEGACY_TCCL_PROP = "equinox.legacy.tccl"; //$NON-NLS-1$ + public static final String EQUINOX_LEGACY_CONTEXT_SELECT = "equinox.context.select"; //$NON-NLS-1$ public static final String EQUINOX_LEGACY_CONTEXT_HELPER = "equinox.legacy.context.helper"; //$NON-NLS-1$ public static final String EQUINOX_LEGACY_HTTP_CONTEXT_INITIATING_ID = "equinox.legacy.http.context.initiating.id"; //$NON-NLS-1$ + public static final String EQUINOX_HTTP_WHITEBOARD_CONTEXT_HELPER_DEFAULT = "equinox.http.whiteboard.context.helper.default"; //$NON-NLS-1$ public static final String UTF8 = "UTF-8"; //$NON-NLS-1$ } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servletbridge/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servletbridge/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servletbridge/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servletbridge/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestServlet2.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestServlet2.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestServlet2.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestServlet2.java 2019-05-28 12:57:39.000000000 +0000 @@ -35,6 +35,7 @@ } + @Override protected void handleDoGet(HttpServletRequest request, PrintWriter writer) throws ServletException, IOException { int version = getEffectiveMajorVersion(); writer.print(version); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestServlet3.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestServlet3.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestServlet3.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestServlet3.java 2019-05-28 12:57:39.000000000 +0000 @@ -30,6 +30,7 @@ public class TestServlet3 extends AbstractTestServlet { private static final long serialVersionUID = 1L; + @Override protected void handleDoGet(HttpServletRequest request, PrintWriter writer) throws ServletException, IOException { String expected = "Equinox"; //$NON-NLS-1$ try { diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestServlet9.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestServlet9.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestServlet9.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/bundles_src/tb1/org/eclipse/equinox/http/servlet/tests/tb1/TestServlet9.java 2019-05-28 12:57:39.000000000 +0000 @@ -36,6 +36,7 @@ private static final long serialVersionUID = 1L; private final DispatchTo dispatchTo = new DispatchTo(); + @Override public void activate(ComponentContext componentContext) throws ServletException, NamespaceException { HttpService service = getHttpService(); HttpContext context = service.createDefaultHttpContext(); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.equinox.http.servlet.tests Bundle-SymbolicName: org.eclipse.equinox.http.servlet.tests -Bundle-Version: 1.6.0.qualifier +Bundle-Version: 1.6.100.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Eclipse-BundleShape: dir Require-Bundle: org.junit;bundle-version="4.0" diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,12 +14,12 @@ tests-pom org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../tests-pom/ org.eclipse.equinox org.eclipse.equinox.http.servlet.tests - 1.6.0-SNAPSHOT + 1.6.100-SNAPSHOT eclipse-test-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/testbase/AllTests.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/testbase/AllTests.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/testbase/AllTests.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/testbase/AllTests.java 2019-05-28 12:57:39.000000000 +0000 @@ -13,6 +13,7 @@ *******************************************************************************/ package org.eclipse.equinox.http.servlet.testbase; +import org.eclipse.equinox.http.servlet.tests.ContextHelperCustomizerTests; import org.eclipse.equinox.http.servlet.tests.AuthenticationTest; import org.eclipse.equinox.http.servlet.tests.DispatchingTest; import org.eclipse.equinox.http.servlet.tests.PreprocessorTestCase; @@ -35,6 +36,7 @@ import org.eclipse.equinox.http.servlet.tests.Test_140_4_9; import org.eclipse.equinox.http.servlet.tests.Test_140_6_1; import org.eclipse.equinox.http.servlet.tests.Test_140_6_20to21_commonProperties; +import org.eclipse.equinox.http.servlet.tests.Test_140_7_validation; import org.eclipse.equinox.http.servlet.tests.Test_140_9_ServletContextDTO_custom_listener; import org.eclipse.equinox.http.servlet.tests.Test_140_9_ServletContextDTO_default_listener; import org.eclipse.equinox.http.servlet.tests.Test_table_140_1_HTTP_WHITEBOARD_CONTEXT_NAME_bindUsingContextSelect; @@ -74,6 +76,7 @@ Test_140_4_9.class, Test_140_6_1.class, Test_140_6_20to21_commonProperties.class, + Test_140_7_validation.class, Test_140_9_ServletContextDTO_custom_listener.class, Test_140_9_ServletContextDTO_default_listener.class, Test_table_140_1_HTTP_WHITEBOARD_CONTEXT_NAME_bindUsingContextSelect.class, @@ -91,6 +94,7 @@ TestHttpServiceAndErrorPage.class, TestHttpServiceAndNamedServlet.class, TestUpload.class, + ContextHelperCustomizerTests.class }) public class AllTests { // see @SuiteClasses diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/testbase/BaseTest.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/testbase/BaseTest.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/testbase/BaseTest.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/testbase/BaseTest.java 2019-05-28 12:57:39.000000000 +0000 @@ -66,10 +66,12 @@ import org.osgi.service.http.runtime.dto.ErrorPageDTO; import org.osgi.service.http.runtime.dto.FailedErrorPageDTO; import org.osgi.service.http.runtime.dto.FailedFilterDTO; +import org.osgi.service.http.runtime.dto.FailedListenerDTO; import org.osgi.service.http.runtime.dto.FailedResourceDTO; import org.osgi.service.http.runtime.dto.FailedServletContextDTO; import org.osgi.service.http.runtime.dto.FailedServletDTO; import org.osgi.service.http.runtime.dto.FilterDTO; +import org.osgi.service.http.runtime.dto.ListenerDTO; import org.osgi.service.http.runtime.dto.RequestInfoDTO; import org.osgi.service.http.runtime.dto.ResourceDTO; import org.osgi.service.http.runtime.dto.ServletContextDTO; @@ -339,6 +341,22 @@ return getBundleContext().getService(serviceReference); } + protected ListenerDTO getListenerDTOByServiceId(String contextName, long serviceId) { + ServletContextDTO servletContextDTO = getServletContextDTOByName(contextName); + + if (servletContextDTO == null) { + return null; + } + + for (ListenerDTO listenerDTO : servletContextDTO.listenerDTOs) { + if (serviceId == listenerDTO.serviceId) { + return listenerDTO; + } + } + + return null; + } + protected long getServiceId(ServiceRegistration sr) { return (Long) sr.getReference().getProperty(Constants.SERVICE_ID); } @@ -441,6 +459,20 @@ return getHttpServiceRuntime().getRuntimeDTO().failedFilterDTOs; } + protected FailedListenerDTO getFailedListenerDTOByServiceId(long serviceId) { + for (FailedListenerDTO failedListenerDTO : getFailedListenerDTOs()) { + if (serviceId == failedListenerDTO.serviceId) { + return failedListenerDTO; + } + } + + return null; + } + + protected FailedListenerDTO[] getFailedListenerDTOs() { + return getHttpServiceRuntime().getRuntimeDTO().failedListenerDTOs; + } + protected FailedServletContextDTO getFailedServletContextDTOByName(String name) { for (FailedServletContextDTO failedServletContextDTO : getFailedServletContextDTOs()) { if (name.equals(failedServletContextDTO.name)) { @@ -662,10 +694,10 @@ } - protected static class TestContextPathAdaptor extends ContextPathCustomizer { - private final String defaultFilter; - private final String contextPrefix; - private final String testName; + protected class TestContextPathAdaptor extends ContextPathCustomizer { + protected final String defaultFilter; + protected final String contextPrefix; + protected final String testName; /** * @param defaultFilter diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ContextHelperCustomizerTests.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ContextHelperCustomizerTests.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ContextHelperCustomizerTests.java 1970-01-01 00:00:00.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ContextHelperCustomizerTests.java 2019-05-28 12:57:39.000000000 +0000 @@ -0,0 +1,322 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + *******************************************************************************/ +package org.eclipse.equinox.http.servlet.tests; + +import static org.junit.Assert.assertNotNull; + +import java.util.Collection; +import java.util.Dictionary; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.concurrent.atomic.AtomicReference; + +import javax.servlet.Servlet; +import javax.servlet.ServletContext; +import javax.servlet.ServletContextListener; + +import org.eclipse.equinox.http.servlet.context.ContextPathCustomizer; +import org.eclipse.equinox.http.servlet.testbase.BaseTest; +import org.eclipse.equinox.http.servlet.tests.util.BaseServlet; +import org.eclipse.equinox.http.servlet.tests.util.MockSCL; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TestName; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; +import org.osgi.framework.ServiceRegistration; +import org.osgi.framework.hooks.service.FindHook; +import org.osgi.service.http.HttpContext; +import org.osgi.service.http.HttpService; +import org.osgi.service.http.context.ServletContextHelper; +import org.osgi.service.http.whiteboard.HttpWhiteboardConstants; + +public class ContextHelperCustomizerTests extends BaseTest { + @Rule + public TestName testName = new TestName(); + private ServiceReference httpServiceReference; + private HttpService httpService; + private BundleContext context; + + @Before + public void begin() throws Exception { + httpServiceReference = getBundleContext().getServiceReference(HttpService.class); + context = httpServiceReference.getBundle().getBundleContext(); + httpService = context.getService(httpServiceReference); + } + + @After + public void end() throws Exception { + context.ungetService(httpServiceReference); + } + + @Test + public void testCreateDefaultHttpContextCreatesNewServletContextHelper() throws Exception { + HttpContext context1 = httpService.createDefaultHttpContext(); + HttpContext context2 = httpService.createDefaultHttpContext(); + Assert.assertNotEquals(context1, context2); + } + + @Test + public void testServletContextHelpersNotHiddenWhenRegisteredUsingConsumingContext() throws Exception { + ServiceRegistration helperReg = null; + ServiceRegistration findHookReg = null; + + try { + Dictionary properties = new Hashtable(); + properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME, "context1"); + properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH, "/context1"); + //register a ServletContextHelper using the consuming bundle context "org.eclipse.equinox.http.servlet" + helperReg = context.registerService(ServletContextHelper.class, new ServletContextHelper() {}, properties); + + FindHook findHook = new FindHook() { + + @Override + public void find( + BundleContext bundleContext, String name, String filter, + boolean allServices, Collection> references) { + + if (bundleContext != context) { + return; + } + + // don't show ServletContextHelper + for (Iterator> iterator = references.iterator(); iterator.hasNext();) { + ServiceReference sr = iterator.next(); + + if ("context1".equals(sr.getProperty("osgi.http.whiteboard.context.name"))) { + iterator.remove(); + } + } + } + + }; + + findHookReg = context.registerService(FindHook.class, findHook, null); + AtomicReference sc1 = new AtomicReference(); + + properties = new Hashtable(); + properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER, "true"); + properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT, "(osgi.http.whiteboard.context.name=context1)"); + context.registerService(ServletContextListener.class, new MockSCL(sc1), properties); + + //ServletContextHelpers registered using the consuming context should not be hidden + assertNotNull(sc1.get()); + } finally { + if (helperReg != null) { + helperReg.unregister(); + } + if (findHookReg != null) { + findHookReg.unregister(); + } + } + + } + + @Test + public void testWBServletContextPathCustomizerContextPrefix() throws Exception { + ServiceRegistration pathAdaptorReg = null; + ServiceRegistration helperReg = null; + ServiceRegistration servlet = null; + ServiceRegistration findHookReg = null; + + try { + Dictionary helperProps = new Hashtable(); + helperProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME, "testContext" + testName.getMethodName()); + helperProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH, "/helperContext"); + helperProps.put(TEST_PATH_CUSTOMIZER_NAME, testName.getMethodName()); + helperReg = context.registerService(ServletContextHelper.class, new TestServletContextHelperFactory(), helperProps); + + //Pass the context path prefix paramater + ContextPathCustomizer pathAdaptor = new TestContextPathAdaptor(null, "testPrefix", testName.getMethodName()); + pathAdaptorReg = context.registerService(ContextPathCustomizer.class, pathAdaptor, null); + + FindHook findHook = new FindHook() { + + @Override + public void find( + BundleContext bundleContext, String name, String filter, + boolean allServices, Collection> references) { + + if (bundleContext != context) { + return; + } + + // don't show ServletContextHelper + for (Iterator> iterator = references.iterator(); iterator.hasNext();) { + ServiceReference sr = iterator.next(); + if (("testContext" + testName.getMethodName()).equals(sr.getProperty(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME))) { + iterator.remove(); + } + } + } + + }; + + findHookReg = context.registerService(FindHook.class, findHook, null); + + //Register a servlet service with a matching context helper + BaseServlet baseServlet = new BaseServlet("content"); + Dictionary serviceProps = new Hashtable(); + serviceProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN, "/servlet"); + serviceProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT, "(" + HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=" + "testContext" + testName.getMethodName() + ")"); + servlet = context.registerService(Servlet.class, baseServlet, serviceProps); + + String actual = requestAdvisor.request("testPrefix/helperContext/servlet"); + Assert.assertEquals("content", actual); + } finally { + if (helperReg != null) { + helperReg.unregister(); + } + if (pathAdaptorReg != null) { + pathAdaptorReg.unregister(); + } + if (servlet != null) { + servlet.unregister(); + } + if (findHookReg != null) { + findHookReg.unregister(); + } + } + } + + @Test + public void testWBServletContextPathCustomizerDefaultFilter() throws Exception { + ServiceRegistration pathAdaptorReg = null; + ServiceRegistration helperReg = null; + ServiceRegistration servlet = null; + ServiceRegistration findHookReg = null; + + try { + Dictionary helperProps = new Hashtable(); + helperProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME, "testContext" + testName.getMethodName()); + helperProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH, "/helperContext"); + helperProps.put(TEST_PATH_CUSTOMIZER_NAME, testName.getMethodName()); + helperReg = context.registerService(ServletContextHelper.class, new TestServletContextHelperFactory(), helperProps); + + //Pass the filter parameter + ContextPathCustomizer pathAdaptor = new TestContextPathAdaptor("(" + HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=" + "testContext" + testName.getMethodName() + ")", null, testName.getMethodName()); + pathAdaptorReg = context.registerService(ContextPathCustomizer.class, pathAdaptor, null); + + FindHook findHook = new FindHook() { + + @Override + public void find( + BundleContext bundleContext, String name, String filter, + boolean allServices, Collection> references) { + + if (bundleContext != context) { + return; + } + + // don't show ServletContextHelper + for (Iterator> iterator = references.iterator(); iterator.hasNext();) { + ServiceReference sr = iterator.next(); + if (("testContext" + testName.getMethodName()).equals(sr.getProperty(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME))) { + iterator.remove(); + } + } + } + + }; + + findHookReg = context.registerService(FindHook.class, findHook, null); + + //Register a servlet service with a matching context helper + BaseServlet baseServlet = new BaseServlet("content"); + Dictionary serviceProps = new Hashtable(); + serviceProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN, "/servlet"); + //Filter property + serviceProps.put("servlet.init." + TEST_PATH_CUSTOMIZER_NAME, testName.getMethodName()); + servlet = context.registerService(Servlet.class, baseServlet, serviceProps); + + String actual = requestAdvisor.request("helperContext/servlet"); + Assert.assertEquals("content", actual); + } finally { + if (helperReg != null) { + helperReg.unregister(); + } + if (pathAdaptorReg != null) { + pathAdaptorReg.unregister(); + } + if (servlet != null) { + servlet.unregister(); + } + if (findHookReg != null) { + findHookReg.unregister(); + } + } + } + + @Test + public void testLegacyServletContextPathCustomizerContextPrefix() throws Exception { + ServiceRegistration pathAdaptorReg = null; + ServiceRegistration findHookReg = null; + + try { + //Pass the context path prefix paramater + ContextPathCustomizer pathAdaptor = new TestContextPathAdaptor(null, "testPrefix", testName.getMethodName()) { + + @Override + public String getContextPathPrefix(ServiceReference helper) { + if (Boolean.TRUE.equals(helper.getProperty("equinox.legacy.context.helper"))) { + return contextPrefix; + } + return null; + } + }; + pathAdaptorReg = context.registerService(ContextPathCustomizer.class, pathAdaptor, null); + + FindHook findHook = new FindHook() { + + @Override + public void find( + BundleContext bundleContext, String name, String filter, + boolean allServices, Collection> references) { + + if (bundleContext != context) { + return; + } + + // don't show ServletContextHelper + for (Iterator> iterator = references.iterator(); iterator.hasNext();) { + ServiceReference sr = iterator.next(); + if (Boolean.TRUE.equals(sr.getProperty("equinox.legacy.context.helper"))) { + iterator.remove(); + } + iterator.remove(); + } + } + }; + + findHookReg = context.registerService(FindHook.class, findHook, null); + //Register a servlet service using HttpService + BaseServlet baseServlet = new BaseServlet("content"); + httpService.registerServlet("/servlet", baseServlet, null, null); + + String actual = requestAdvisor.request("testPrefix/servlet"); + Assert.assertEquals("content", actual); + } finally { + if (pathAdaptorReg != null) { + pathAdaptorReg.unregister(); + } + if (findHookReg != null) { + findHookReg.unregister(); + } + httpService.unregister("/servlet"); + } + } +} + + diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_7_validation.java equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_7_validation.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_7_validation.java 1970-01-01 00:00:00.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/Test_140_7_validation.java 2019-05-28 12:57:39.000000000 +0000 @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright (c) Mar. 28, 2019 Liferay, Inc. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Liferay, Inc. - tests + ******************************************************************************/ + +package org.eclipse.equinox.http.servlet.tests; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + +import java.util.Dictionary; +import java.util.Hashtable; +import java.util.concurrent.atomic.AtomicReference; + +import javax.servlet.ServletContext; +import javax.servlet.ServletContextListener; + +import org.eclipse.equinox.http.servlet.testbase.BaseTest; +import org.eclipse.equinox.http.servlet.tests.util.MockSCL; +import org.junit.Test; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceRegistration; +import org.osgi.service.http.runtime.dto.DTOConstants; +import org.osgi.service.http.runtime.dto.FailedListenerDTO; +import org.osgi.service.http.runtime.dto.ListenerDTO; +import org.osgi.service.http.whiteboard.HttpWhiteboardConstants; + +public class Test_140_7_validation extends BaseTest { + + @Test + public void test_140_7_validation() throws Exception { + BundleContext context = getBundleContext(); + + Dictionary properties = new Hashtable(); + properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER, "true"); + ServiceRegistration sr = context.registerService( + ServletContextListener.class, new MockSCL(new AtomicReference()), properties); + registrations.add(sr); + + ListenerDTO listenerDTO = getListenerDTOByServiceId(DEFAULT, getServiceId(sr)); + assertNotNull(listenerDTO); + + properties.remove(HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER); + sr.setProperties(properties); + + listenerDTO = getListenerDTOByServiceId(DEFAULT, getServiceId(sr)); + assertNull(listenerDTO); + + properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER, "blah"); + sr.setProperties(properties); + + FailedListenerDTO failedListenerDTO = getFailedListenerDTOByServiceId(getServiceId(sr)); + assertNotNull(failedListenerDTO); + assertEquals(DTOConstants.FAILURE_REASON_VALIDATION_FAILED, failedListenerDTO.failureReason); + + listenerDTO = getListenerDTOByServiceId(DEFAULT, getServiceId(sr)); + assertNull(listenerDTO); + } + +} diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.io/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.io/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.io/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.io/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.ip/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.ip/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.ip/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.ip/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.jsp.jasper/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.jsp.jasper/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.jsp.jasper/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.jsp.jasper/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.jsp.jasper.registry/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.jsp.jasper.registry/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.jsp.jasper.registry/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.jsp.jasper.registry/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.log.stream/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.log.stream/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.log.stream/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.log.stream/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/.classpath equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/.classpath --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/.classpath 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/.classpath 2019-05-28 12:57:39.000000000 +0000 @@ -1,6 +1,6 @@ - + diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -1,6 +1,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: %bundleName -Bundle-Version: 1.4.600.qualifier +Bundle-Version: 1.5.0.qualifier Bundle-SymbolicName: org.eclipse.equinox.metatype Bundle-Activator: org.eclipse.equinox.metatype.impl.Activator Import-Package: javax.xml.parsers, @@ -17,7 +17,7 @@ org.eclipse.equinox.metatype.impl;version="1.3.0";x-friends:=org.eclipse.equinox.compendium.tests Bundle-Vendor: %bundleVendor Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Provide-Capability: osgi.implementation; osgi.implementation="osgi.metatype"; version:Version="1.4"; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,12 +14,12 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.metatype - 1.4.600-SNAPSHOT + 1.5.0-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/.settings/org.eclipse.jdt.core.prefs equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/.settings/org.eclipse.jdt.core.prefs --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/.settings/org.eclipse.jdt.core.prefs 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/.settings/org.eclipse.jdt.core.prefs 2019-05-28 12:57:39.000000000 +0000 @@ -13,9 +13,9 @@ 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 @@ -113,23 +113,27 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore 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_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 @@ -199,11 +203,12 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert @@ -233,6 +238,8 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -256,12 +263,16 @@ org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -307,6 +318,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -342,8 +355,11 @@ org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -366,6 +382,10 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab org.eclipse.jdt.core.formatter.tabulation.size=4 org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true org.eclipse.jdt.core.incompatibleJDKLevel=ignore org.eclipse.jdt.core.incompleteClasspath=error diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Activator.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Activator.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Activator.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Activator.java 2019-05-28 12:57:39.000000000 +0000 @@ -13,13 +13,13 @@ *******************************************************************************/ package org.eclipse.equinox.metatype.impl; +import java.io.IOException; import java.util.Dictionary; import java.util.Hashtable; import javax.xml.parsers.SAXParserFactory; import org.eclipse.equinox.metatype.EquinoxMetaTypeService; import org.osgi.framework.*; import org.osgi.service.cm.ManagedService; -import org.osgi.service.log.LogService; import org.osgi.service.metatype.MetaTypeProvider; import org.osgi.service.metatype.MetaTypeService; import org.osgi.util.tracker.ServiceTracker; @@ -64,7 +64,7 @@ } // Do this first to make logging available as early as possible. lsTracker.open(); - lsTracker.log(LogService.LOG_DEBUG, "====== Meta Type Service starting ! ====="); //$NON-NLS-1$ + lsTracker.log(LogTracker.LOG_DEBUG, "====== Meta Type Service starting ! ====="); //$NON-NLS-1$ // Do this next to make MetaTypeProviders available as early as possible. mtpTracker.open(); // Do this last because it may result in the MetaTypeService being registered. @@ -84,7 +84,7 @@ mtpTracker = metaTypeProviderTracker; lsTracker = logServiceTracker; } - lsTracker.log(LogService.LOG_DEBUG, "====== Meta Type Service stopping ! ====="); //$NON-NLS-1$ + lsTracker.log(LogTracker.LOG_DEBUG, "====== Meta Type Service stopping ! ====="); //$NON-NLS-1$ spfTracker.close(); mtpTracker.close(); // Do this last to leave logging available as long as possible. @@ -228,6 +228,11 @@ service = metaTypeService = new MetaTypeServiceImpl(saxParserFactory, logService, mtpTracker); } bundleCtx.addBundleListener(service); + try { + service.load(bundleCtx, logService, mtpTracker); + } catch (IOException e) { + logService.log(LogTracker.LOG_WARNING, "Error loading cached metatype info.", e); //$NON-NLS-1$ + } ServiceRegistration registration = bundleCtx.registerService(new String[] {MetaTypeService.class.getName(), EquinoxMetaTypeService.class.getName()}, service, properties); synchronized (this) { metaTypeServiceRegistration = registration; @@ -252,6 +257,11 @@ private void unregisterMetaTypeService(ServiceRegistration registration, MetaTypeServiceImpl service) { registration.unregister(); bundleCtx.removeBundleListener(service); + try { + service.save(bundleCtx); + } catch (IOException e) { + logService.log(LogTracker.LOG_WARNING, "Error saving metatype cache.", e); //$NON-NLS-1$ + } } } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/AttributeDefinitionImpl.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/AttributeDefinitionImpl.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/AttributeDefinitionImpl.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/AttributeDefinitionImpl.java 2019-05-28 12:57:39.000000000 +0000 @@ -13,32 +13,37 @@ *******************************************************************************/ package org.eclipse.equinox.metatype.impl; +import java.io.IOException; +import java.math.BigDecimal; +import java.math.BigInteger; import java.util.*; import org.eclipse.equinox.metatype.EquinoxAttributeDefinition; +import org.eclipse.equinox.metatype.impl.Persistence.Reader; +import org.eclipse.equinox.metatype.impl.Persistence.Writer; import org.eclipse.osgi.util.NLS; -import org.osgi.service.log.LogService; +import org.osgi.service.metatype.AttributeDefinition; /** * Implementation of AttributeDefintion */ public class AttributeDefinitionImpl extends LocalizationElement implements EquinoxAttributeDefinition, Cloneable { - String _name; - String _id; - String _description; - int _cardinality = 0; - int _dataType; - Object _minValue = null; - Object _maxValue = null; - boolean _isRequired = true; - - String[] _defaults = null; - Vector _values = new Vector(7); - Vector _labels = new Vector(7); + private final String _name; + private final String _id; + private final String _description; + private final int _cardinality; + private final int _dataType; + private final Object _minValue; + private final Object _maxValue; + private final boolean _isRequired; private final LogTracker logger; private final ExtendableHelper helper; + private volatile String[] _defaults = null; + private volatile ArrayList _values = new ArrayList(7); + private volatile ArrayList _labels = new ArrayList(7); + /** * Constructor of class AttributeDefinitionImpl. */ @@ -63,21 +68,22 @@ /* * */ - public synchronized Object clone() { + @Override + public Object clone() { AttributeDefinitionImpl ad = new AttributeDefinitionImpl(_id, _name, _description, _dataType, _cardinality, _minValue, _maxValue, _isRequired, getLocalization(), logger, helper); - if (_defaults != null) { - ad.setDefaultValue(_defaults.clone()); - } - if ((_labels != null) && (_values != null)) { - @SuppressWarnings("unchecked") - Vector labels = (Vector) _labels.clone(); - @SuppressWarnings("unchecked") - Vector values = (Vector) _values.clone(); - ad.setOption(labels, values, false); + String[] curDefaults = _defaults; + if (curDefaults != null) { + ad.setDefaultValue(curDefaults.clone()); } + @SuppressWarnings("unchecked") + ArrayList labels = (ArrayList) _labels.clone(); + @SuppressWarnings("unchecked") + ArrayList values = (ArrayList) _values.clone(); + ad.setOption(labels, values, false); + return ad; } @@ -90,13 +96,6 @@ return getLocalized(_name); } - /** - * Method to set the name of AttributeDefinition. - */ - void setName(String name) { - this._name = name; - } - /* * (non-Javadoc) * @@ -106,13 +105,6 @@ return _id; } - /** - * Method to set the ID of AttributeDefinition. - */ - void setID(String id) { - this._id = id; - } - /* * (non-Javadoc) * @@ -122,13 +114,6 @@ return getLocalized(_description); } - /** - * Method to set the description of AttributeDefinition. - */ - void setDescription(String description) { - this._description = description; - } - /* * (non-Javadoc) * @@ -138,13 +123,6 @@ return _cardinality; } - /** - * Method to set the cardinality of AttributeDefinition. - */ - void setCardinality(int cardinality) { - this._cardinality = cardinality; - } - /* * (non-Javadoc) * @@ -155,26 +133,12 @@ } /** - * Method to set the data type of AttributeDefinition. - */ - void setType(int type) { - this._dataType = type; - } - - /** * Method to get the required flag of AttributeDefinition. */ boolean isRequired() { return _isRequired; } - /** - * Method to set the required flag of AttributeDefinition. - */ - void setRequired(boolean isRequired) { - this._isRequired = isRequired; - } - /* * (non-Javadoc) * @@ -182,15 +146,14 @@ */ public String[] getOptionLabels() { - if ((_labels == null) || (_labels.size() == 0)) { + List curLabels = _labels; + if (curLabels.isEmpty()) { return null; } - String[] returnedLabels = new String[_labels.size()]; - Enumeration labelKeys = _labels.elements(); + String[] returnedLabels = new String[curLabels.size()]; int i = 0; - while (labelKeys.hasMoreElements()) { - String labelKey = labelKeys.nextElement(); + for (String labelKey : curLabels) { returnedLabels[i] = getLocalized(labelKey); i++; } @@ -203,41 +166,47 @@ * @see org.osgi.service.metatype.AttributeDefinition#getOptionValues() */ public String[] getOptionValues() { + List curValues = _values; - if ((_values == null) || (_values.size() == 0)) { + if (curValues.isEmpty()) { return null; } - return _values.toArray(new String[_values.size()]); + return curValues.toArray(MetaTypeInformationImpl.emptyStringArray); } /** * Method to set the Option values of AttributeDefinition. */ - void setOption(Vector labels, Vector values, boolean needValidation) { + void setOption(ArrayList labels, ArrayList values, boolean needValidation) { if ((labels == null) || (values == null)) { - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.NULL_OPTIONS, getID())); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.NULL_OPTIONS, getID())); return; } if (labels.size() != values.size()) { - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.INCONSISTENT_OPTIONS, getID())); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.INCONSISTENT_OPTIONS, getID())); return; } - _labels = labels; - _values = values; if (needValidation) { - for (int index = 0; index < _values.size(); index++) { - ValueTokenizer vt = new ValueTokenizer(_values.get(index), logger); - _values.set(index, vt.getValuesAsString()); + for (int index = 0; index < values.size(); index++) { + ValueTokenizer vt = new ValueTokenizer(values.get(index), logger); + values.set(index, vt.getValuesAsString()); String reason = vt.validate(this); if ((reason != null) && reason.length() > 0) { - logger.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.INVALID_OPTIONS, new Object[] {_values.get(index), getID(), reason})); - _labels.remove(index); - _values.remove(index); + logger.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.INVALID_OPTIONS, new Object[] {values.get(index), getID(), reason})); + labels.remove(index); + values.remove(index); index--; // Because this one has been removed. } } } + _labels = labels; + _values = values; + } + + boolean containsInvalidValue(String value) { + List curValues = _values; + return !curValues.isEmpty() && !curValues.contains(value); } /* @@ -257,7 +226,7 @@ ValueTokenizer vt = new ValueTokenizer(defaults_str, logger); String reason = vt.validate(this); if ((reason != null) && reason.length() > 0) { - logger.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.INVALID_DEFAULTS, new Object[] {vt.getValuesAsString(), getID(), reason})); + logger.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.INVALID_DEFAULTS, new Object[] {vt.getValuesAsString(), getID(), reason})); return; } String[] defaults = vt.getValuesAsArray(); @@ -277,20 +246,6 @@ _defaults = defaults; } - /** - * Method to set the validation value - min of AttributeDefinition. - */ - void setMinValue(Object minValue) { - this._minValue = minValue; - } - - /** - * Method to set the validation value - max of AttributeDefinition. - */ - void setMaxValue(Object maxValue) { - this._maxValue = maxValue; - } - /* * (non-Javadoc) * In order to be valid, a value must pass all of the following tests. @@ -309,19 +264,217 @@ return vt.validate(this); } + @Override public Map getExtensionAttributes(String schema) { return helper.getExtensionAttributes(schema); } + @Override public Set getExtensionUris() { return helper.getExtensionUris(); } + @Override public String getMax() { return _maxValue == null ? null : String.valueOf(_maxValue); } + @Override public String getMin() { return _minValue == null ? null : String.valueOf(_minValue); } + + Object getMaxValue() { + return _maxValue; + } + + Object getMinValue() { + return _minValue; + } + + void getStrings(Set strings) { + String[] curDefaults = _defaults; + if (curDefaults != null) { + for (String string : curDefaults) { + strings.add(string); + } + } + strings.add(_description); + strings.add(_id); + strings.add(_name); + strings.add(getLocalization()); + for (String string : _values) { + strings.add(string); + } + + for (String string : _labels) { + strings.add(string); + } + helper.getStrings(strings); + if (getType() == AttributeDefinition.STRING || getType() == AttributeDefinition.PASSWORD) { + if (_maxValue != null) { + strings.add(getMax()); + } + if (_minValue != null) { + strings.add(getMin()); + } + } + } + + public static AttributeDefinitionImpl load(Reader reader, LogTracker logger) throws IOException { + String id = reader.readString(); + String description = reader.readString(); + String name = reader.readString(); + int type = reader.readInt(); + int cardinality = reader.readInt(); + boolean isRequired = reader.readBoolean(); + String localization = reader.readString(); + + String[] defaults = null; + if (reader.readBoolean()) { + int numDefaults = reader.readInt(); + defaults = new String[numDefaults]; + for (int i = 0; i < numDefaults; i++) { + defaults[i] = reader.readString(); + } + } + int numLabels = reader.readInt(); + ArrayList labels = new ArrayList<>(numLabels); + for (int i = 0; i < numLabels; i++) { + labels.add(reader.readString()); + } + int numValues = reader.readInt(); + ArrayList values = new ArrayList<>(); + for (int i = 0; i < numValues; i++) { + values.add(reader.readString()); + } + ExtendableHelper helper = ExtendableHelper.load(reader); + Object min = readMinMax(type, reader); + Object max = readMinMax(type, reader); + + AttributeDefinitionImpl result = new AttributeDefinitionImpl(id, name, description, type, cardinality, min, max, isRequired, localization, logger, helper); + result.setDefaultValue(defaults); + result.setOption(labels, values, false); + return result; + } + + public void write(Writer writer) throws IOException { + writer.writeString(_id); + writer.writeString(_description); + writer.writeString(_name); + writer.writeInt(_dataType); + writer.writeInt(_cardinality); + writer.writeBoolean(_isRequired); + writer.writeString(getLocalization()); + String[] curDefaults = _defaults; + if (curDefaults == null) { + writer.writeBoolean(false); + } else { + writer.writeBoolean(true); + writer.writeInt(curDefaults.length); + for (String defaultValue : curDefaults) { + writer.writeString(defaultValue); + } + } + List curLabels = _labels; + writer.writeInt(curLabels.size()); + for (String label : curLabels) { + writer.writeString(label); + } + List curValues = _values; + writer.writeInt(curValues.size()); + for (String value : curValues) { + writer.writeString(value); + } + helper.write(writer); + writeMinMax(_minValue, writer); + writeMinMax(_maxValue, writer); + } + + @SuppressWarnings("deprecation") + private static Object readMinMax(int dataType, Reader reader) throws IOException { + boolean isNull = reader.readBoolean(); + if (isNull) { + return null; + } + switch (dataType) { + // PASSWORD should be treated like STRING. + case AttributeDefinition.PASSWORD : + case AttributeDefinition.STRING : + return reader.readString(); + case AttributeDefinition.LONG : + return reader.readLong(); + case AttributeDefinition.INTEGER : + return reader.readInt(); + case AttributeDefinition.SHORT : + return reader.readShort(); + case AttributeDefinition.CHARACTER : + return reader.readCharacter(); + case AttributeDefinition.BYTE : + return reader.readByte(); + case AttributeDefinition.DOUBLE : + return reader.readDouble(); + case AttributeDefinition.FLOAT : + return reader.readFloat(); + case AttributeDefinition.BIGINTEGER : + return new BigInteger(reader.readString()); + case AttributeDefinition.BIGDECIMAL : + return new BigDecimal(reader.readString()); + case AttributeDefinition.BOOLEAN : + return reader.readBoolean(); + default : + return reader.readString(); + } + } + + @SuppressWarnings("deprecation") + private void writeMinMax(Object v, Writer writer) throws IOException { + if (v == null) { + writer.writeBoolean(true); + return; + } + writer.writeBoolean(false); + switch (_dataType) { + // PASSWORD should be treated like STRING. + case AttributeDefinition.PASSWORD : + case AttributeDefinition.STRING : + writer.writeString((String) v); + return; + case AttributeDefinition.LONG : + writer.writeLong((Long) v); + return; + case AttributeDefinition.INTEGER : + writer.writeInt((Integer) v); + return; + case AttributeDefinition.SHORT : + writer.writeShort((Short) v); + return; + case AttributeDefinition.CHARACTER : + writer.writeCharacter((Character) v); + return; + case AttributeDefinition.BYTE : + writer.writeByte((Byte) v); + return; + case AttributeDefinition.DOUBLE : + writer.writeDouble((Double) v); + return; + case AttributeDefinition.FLOAT : + writer.writeFloat((Float) v); + return; + case AttributeDefinition.BIGINTEGER : + writer.writeString(v.toString()); + return; + case AttributeDefinition.BIGDECIMAL : + writer.writeString(v.toString()); + return; + case AttributeDefinition.BOOLEAN : + writer.writeBoolean((Boolean) v); + return; + default : + // Unknown data type + writer.writeString(String.valueOf(v)); + return; + } + } + } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/DataParser.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/DataParser.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/DataParser.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/DataParser.java 2019-05-28 12:57:39.000000000 +0000 @@ -21,7 +21,6 @@ import javax.xml.parsers.SAXParser; import org.eclipse.osgi.util.NLS; import org.osgi.framework.Bundle; -import org.osgi.service.log.LogService; import org.osgi.service.metatype.AttributeDefinition; import org.xml.sax.*; import org.xml.sax.helpers.DefaultHandler; @@ -79,15 +78,15 @@ protected XMLReader _dp_xmlReader; // DesignateHanders in DataParser class - Vector _dp_designateHandlers = new Vector(7); + List _dp_designateHandlers = new ArrayList<>(7); // ObjectClassDefinitions in DataParser class w/ corresponding reference keys - Hashtable _dp_OCDs = new Hashtable(7); + Map _dp_OCDs = new HashMap<>(7); // Localization in DataParser class String _dp_localization; // Default visibility to avoid a plethora of synthetic accessor method warnings. final LogTracker logger; - final Collection designates = new ArrayList(7); + final Collection designates = new ArrayList<>(7); /* * Constructor of class DataParser. @@ -109,7 +108,7 @@ _dp_xmlReader.setErrorHandler(new MyErrorHandler(System.err)); InputStream is = _dp_url.openStream(); InputSource isource = new InputSource(is); - logger.log(LogService.LOG_DEBUG, "Starting to parse " + _dp_url); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Starting to parse " + _dp_url); //$NON-NLS-1$ _dp_xmlReader.parse(isource); return designates; } @@ -117,6 +116,7 @@ /* * Convert String for expected data type. */ + @SuppressWarnings("deprecation") static Object convert(String value, int type) { if (value == null) { @@ -174,16 +174,19 @@ elementName = name; } + @Override public void endElement(String namespaceURI, String localName, String qName) { finished(); // Let parent resume handling SAX events _dp_xmlReader.setContentHandler(_doc_handler); } + @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { throw new SAXException(NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {qName, attributes.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); } + @Override public void characters(char[] buf, int start, int end) throws SAXException { String s = new String(buf, start, end).trim(); if (s.length() > 0) { @@ -223,18 +226,20 @@ super(); } + @Override public void startElement(String uri, String localName, String qName, Attributes attributes) { - logger.log(LogService.LOG_DEBUG, "Here is AbstractHandler:startElement():" //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is AbstractHandler:startElement():" //$NON-NLS-1$ + qName); String name = getName(localName, qName); if (name.equalsIgnoreCase(METADATA)) { new MetaDataHandler(this).init(name, attributes); } else { - logger.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {name, attributes.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {name, attributes.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); } } + @Override public void setDocumentLocator(Locator locator) { // do nothing } @@ -249,9 +254,10 @@ super(handler); } + @Override public void init(String name, Attributes attributes) { - logger.log(LogService.LOG_DEBUG, "Here is MetaDataHandler():init()"); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is MetaDataHandler():init()"); //$NON-NLS-1$ super.init(name, attributes); _dp_localization = attributes.getValue(LOCALIZATION); if (_dp_localization == null) { @@ -261,44 +267,43 @@ // OcdHandler and AttributeDefinitionHandler later. } + @Override public void startElement(String uri, String localName, String qName, Attributes atts) { - logger.log(LogService.LOG_DEBUG, "Here is MetaDataHandler:startElement():" //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is MetaDataHandler:startElement():" //$NON-NLS-1$ + qName); String name = getName(localName, qName); if (name.equalsIgnoreCase(DESIGNATE)) { DesignateHandler designateHandler = new DesignateHandler(this); designateHandler.init(name, atts); if (designateHandler._isParsedDataValid) { - _dp_designateHandlers.addElement(designateHandler); + _dp_designateHandlers.add(designateHandler); } } else if (name.equalsIgnoreCase(OCD)) { OcdHandler ocdHandler = new OcdHandler(this); ocdHandler.init(name, atts, _dp_OCDs); } else { - logger.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); } } + @Override protected void finished() { - logger.log(LogService.LOG_DEBUG, "Here is MetaDataHandler():finished()"); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is MetaDataHandler():finished()"); //$NON-NLS-1$ if (_dp_designateHandlers.size() == 0) { // Schema defines at least one DESIGNATE is required. _isParsedDataValid = false; - logger.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.MISSING_ELEMENT, new Object[] {DESIGNATE, METADATA, elementId, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.MISSING_ELEMENT, new Object[] {DESIGNATE, METADATA, elementId, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } - Enumeration designateHandlerKeys = _dp_designateHandlers.elements(); - while (designateHandlerKeys.hasMoreElements()) { - DesignateHandler dh = designateHandlerKeys.nextElement(); + for (DesignateHandler dh : _dp_designateHandlers) { ObjectClassDefinitionImpl ocd = _dp_OCDs.get(dh._ocdref); if (ocd != null) { designates.add(new Designate.Builder(ocd).bundle(dh._bundle_val).factoryPid(dh._factory_val).merge(dh._merge_val).pid(dh._pid_val).optional(dh._optional_val).build()); } else { - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.OCD_REF_NOT_FOUND, new Object[] {dh._pid_val, dh._factory_val, dh._ocdref, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); - + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.OCD_REF_NOT_FOUND, new Object[] {dh._pid_val, dh._factory_val, dh._ocdref, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); } } } @@ -309,28 +314,28 @@ */ private class OcdHandler extends AbstractHandler { - Hashtable _parent_OCDs_hashtable; + Map _parent_OCDs; // This ID "_refID" is only used for reference by Designate element, // not the PID or FPID of this OCD. String _refID; ObjectClassDefinitionImpl _ocd; - Vector _ad_vector = new Vector(7); + List _ads = new ArrayList(7); List icons = new ArrayList(5); public OcdHandler(ContentHandler handler) { super(handler); } - public void init(String name, Attributes atts, Hashtable ocds_hashtable) { + public void init(String name, Attributes atts, Map ocds_hashtable) { - logger.log(LogService.LOG_DEBUG, "Here is OcdHandler():init()"); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is OcdHandler():init()"); //$NON-NLS-1$ super.init(name, atts); - _parent_OCDs_hashtable = ocds_hashtable; + _parent_OCDs = ocds_hashtable; collectExtensionAttributes(atts); String ocd_name_val = atts.getValue(NAME); if (ocd_name_val == null) { _isParsedDataValid = false; - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {NAME, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {NAME, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } @@ -342,16 +347,17 @@ _refID = atts.getValue(ID); if (_refID == null) { _isParsedDataValid = false; - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {ID, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {ID, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } _ocd = new ObjectClassDefinitionImpl(ocd_name_val, ocd_description_val, _refID, _dp_localization, extensionAttributes); } + @Override public void startElement(String uri, String localName, String qName, Attributes atts) { - logger.log(LogService.LOG_DEBUG, "Here is OcdHandler:startElement():" //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is OcdHandler:startElement():" //$NON-NLS-1$ + qName); if (!_isParsedDataValid) return; @@ -359,29 +365,28 @@ String name = getName(localName, qName); if (name.equalsIgnoreCase(AD)) { AttributeDefinitionHandler attributeDefHandler = new AttributeDefinitionHandler(this); - attributeDefHandler.init(name, atts, _ad_vector); + attributeDefHandler.init(name, atts, _ads); } else if (name.equalsIgnoreCase(ICON)) { IconHandler iconHandler = new IconHandler(this); iconHandler.init(name, atts); if (iconHandler._isParsedDataValid) icons.add(iconHandler._icon); } else { - logger.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); } } + @Override protected void finished() { - logger.log(LogService.LOG_DEBUG, "Here is OcdHandler():finished()"); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is OcdHandler():finished()"); //$NON-NLS-1$ if (!_isParsedDataValid) return; // OCD gets all parsed ADs. - Enumeration adKey = _ad_vector.elements(); - while (adKey.hasMoreElements()) { - AttributeDefinitionImpl ad = adKey.nextElement(); - _ocd.addAttributeDefinition(ad, ad._isRequired); + for (AttributeDefinitionImpl ad : _ads) { + _ocd.addAttributeDefinition(ad, ad.isRequired()); } _ocd.setIcons(icons); - _parent_OCDs_hashtable.put(_refID, _ocd); + _parent_OCDs.put(_refID, _ocd); } } @@ -396,14 +401,15 @@ super(handler); } + @Override public void init(String name, Attributes atts) { - logger.log(LogService.LOG_DEBUG, "Here is IconHandler:init()"); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is IconHandler:init()"); //$NON-NLS-1$ super.init(name, atts); String icon_resource_val = atts.getValue(RESOURCE); if (icon_resource_val == null) { _isParsedDataValid = false; - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {RESOURCE, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {RESOURCE, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } @@ -427,9 +433,9 @@ AttributeDefinitionImpl _ad; int _dataType; - Vector _parent_ADs_vector; - Vector _optionLabel_vector = new Vector(7); - Vector _optionValue_vector = new Vector(7); + List _parent_ADs; + ArrayList _optionLabels = new ArrayList<>(7); + ArrayList _optionValues = new ArrayList<>(7); private String ad_defaults_str; @@ -437,11 +443,11 @@ super(handler); } - public void init(String name, Attributes atts, Vector ad_vector) { + public void init(String name, Attributes atts, List ads) { - logger.log(LogService.LOG_DEBUG, "Here is AttributeDefinitionHandler():init()"); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is AttributeDefinitionHandler():init()"); //$NON-NLS-1$ super.init(name, atts); - _parent_ADs_vector = ad_vector; + _parent_ADs = ads; collectExtensionAttributes(atts); String ad_name_val = atts.getValue(NAME); if (ad_name_val == null) { @@ -456,14 +462,14 @@ String ad_id_val = atts.getValue(ID); if (ad_id_val == null) { _isParsedDataValid = false; - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {ID, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {ID, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } String ad_type_val = atts.getValue(TYPE); if (ad_type_val == null) { _isParsedDataValid = false; - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {TYPE, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {TYPE, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } if (ad_type_val.equalsIgnoreCase(STRING)) { @@ -488,7 +494,7 @@ _dataType = AttributeDefinition.PASSWORD; } else { _isParsedDataValid = false; - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.INVALID_TYPE, new Object[] {ad_type_val, ad_id_val, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.INVALID_TYPE, new Object[] {ad_type_val, ad_id_val, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } @@ -526,9 +532,10 @@ _ad = new AttributeDefinitionImpl(ad_id_val, ad_name_val, ad_description_val, _dataType, ad_cardinality_val, convert(ad_min_val, _dataType), convert(ad_max_val, _dataType), Boolean.valueOf(ad_required_val).booleanValue(), _dp_localization, logger, extensionAttributes); } + @Override public void startElement(String uri, String localName, String qName, Attributes atts) { - logger.log(LogService.LOG_DEBUG, "Here is AttributeDefinitionHandler:startElement():" //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is AttributeDefinitionHandler:startElement():" //$NON-NLS-1$ + qName); if (!_isParsedDataValid) return; @@ -539,34 +546,35 @@ optionHandler.init(name, atts); if (optionHandler._isParsedDataValid) { // Only add valid Option - _optionLabel_vector.addElement(optionHandler._label_val); - _optionValue_vector.addElement(optionHandler._value_val); + _optionLabels.add(optionHandler._label_val); + _optionValues.add(optionHandler._value_val); } } else { - logger.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); } } + @Override protected void finished() { - logger.log(LogService.LOG_DEBUG, "Here is AttributeDefinitionHandler():finished()"); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is AttributeDefinitionHandler():finished()"); //$NON-NLS-1$ if (!_isParsedDataValid) return; - int numOfValues = _optionValue_vector.size(); - _ad.setOption(_optionLabel_vector, _optionValue_vector, true); + int numOfValues = _optionValues.size(); + _ad.setOption(_optionLabels, _optionValues, true); String[] values = _ad.getOptionValues(); if (values == null) values = new String[0]; if (numOfValues != values.length) - logger.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.INVALID_OPTIONS_XML, new Object[] {elementId, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.INVALID_OPTIONS_XML, new Object[] {elementId, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); if (ad_defaults_str != null) { _ad.setDefaultValue(ad_defaults_str, true); if (_ad.getDefaultValue() == null) - logger.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.INVALID_DEFAULTS_XML, new Object[] {ad_defaults_str, elementId, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.INVALID_DEFAULTS_XML, new Object[] {ad_defaults_str, elementId, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); } - _parent_ADs_vector.addElement(_ad); + _parent_ADs.add(_ad); } } @@ -582,70 +590,27 @@ super(handler); } + @Override public void init(String name, Attributes atts) { - logger.log(LogService.LOG_DEBUG, "Here is OptionHandler:init()"); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is OptionHandler:init()"); //$NON-NLS-1$ super.init(name, atts); _label_val = atts.getValue(LABEL); if (_label_val == null) { _isParsedDataValid = false; - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {LABEL, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {LABEL, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } _value_val = atts.getValue(VALUE); if (_value_val == null) { _isParsedDataValid = false; - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {VALUE, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {VALUE, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } } } - // /** - // * Handler for the Simple Value element. - // */ - // private class SimpleValueHandler extends AbstractHandler { - // - // StringBuffer _buffer = new StringBuffer(); - // Vector _parent_value_vector; - // String _elementName; - // - // public SimpleValueHandler(ContentHandler handler) { - // super(handler); - // } - // - // public void init(String name, Attributes atts, Vector value_vector) - // throws SAXException { - // - // Logging.log(LogService.LOG_DEBUG, - // "Here is SimpleValueHandler():init()"); //$NON-NLS-1$ - // _elementName = name; - // _parent_value_vector = value_vector; - // } - // - // protected void finished() throws SAXException { - // - // Logging.log(LogService.LOG_DEBUG, - // "Here is SimpleValueHandler():finished()"); //$NON-NLS-1$ - // if (_parent_value_vector != null) { - // _parent_value_vector.addElement(_buffer.toString()); - // } - // } - // - // public void characters(char buf[], int offset, int len) - // throws SAXException { - // - // Logging.log(LogService.LOG_DEBUG, - // "Here is SimpleValueHandler(" //$NON-NLS-1$ - // + _elementName - // + "):characters():[" //$NON-NLS-1$ - // + new String(buf, offset, len) - // + "]"); //$NON-NLS-1$ - // _buffer.append(new String(buf, offset, len)); - // } - // } - /** * Handler for the Designate element. */ @@ -664,14 +629,15 @@ super(handler); } + @Override public void init(String name, Attributes atts) { - logger.log(LogService.LOG_DEBUG, "Here is DesignateHandler():init()"); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is DesignateHandler():init()"); //$NON-NLS-1$ super.init(name, atts); _pid_val = atts.getValue(PID); _factory_val = atts.getValue(FACTORY); if (_pid_val == null && _factory_val == null) { _isParsedDataValid = false; - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_DESIGNATE_PID_AND_FACTORYPID, new Object[] {elementId, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_DESIGNATE_PID_AND_FACTORYPID, new Object[] {elementId, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } @@ -699,9 +665,10 @@ } } + @Override public void startElement(String uri, String localName, String qName, Attributes atts) { - logger.log(LogService.LOG_DEBUG, "Here is DesignateHandler:startElement():" //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is DesignateHandler:startElement():" //$NON-NLS-1$ + qName); if (!_isParsedDataValid) return; @@ -714,20 +681,21 @@ _ocdref = objectHandler._ocdref; } } else { - logger.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); } } + @Override protected void finished() { - logger.log(LogService.LOG_DEBUG, "Here is DesignateHandler():finished()"); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is DesignateHandler():finished()"); //$NON-NLS-1$ if (!_isParsedDataValid) return; if (_ocdref == null) { _isParsedDataValid = false; // Schema defines at least one OBJECT is required. - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ELEMENT, new Object[] {OBJECT, DESIGNATE, elementId, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ELEMENT, new Object[] {OBJECT, DESIGNATE, elementId, _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } @@ -745,21 +713,23 @@ super(handler); } + @Override public void init(String name, Attributes atts) { - logger.log(LogService.LOG_DEBUG, "Here is ObjectHandler():init()"); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is ObjectHandler():init()"); //$NON-NLS-1$ super.init(name, atts); _ocdref = atts.getValue(OCDREF); if (_ocdref == null) { _isParsedDataValid = false; - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {OCDREF, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {OCDREF, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } } + @Override public void startElement(String uri, String localName, String qName, Attributes atts) { - logger.log(LogService.LOG_DEBUG, "Here is ObjectHandler:startElement():" //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is ObjectHandler:startElement():" //$NON-NLS-1$ + qName); if (!_isParsedDataValid) return; @@ -770,7 +740,7 @@ attributeHandler.init(name, atts); // The ATTRIBUTE element is only used by RFC94, do nothing for it here. } else { - logger.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.UNEXPECTED_ELEMENT, new Object[] {name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); } } } @@ -789,21 +759,22 @@ super(handler); } + @Override public void init(String name, Attributes atts) { - logger.log(LogService.LOG_DEBUG, "Here is AttributeHandler():init()"); //$NON-NLS-1$ + logger.log(LogTracker.LOG_DEBUG, "Here is AttributeHandler():init()"); //$NON-NLS-1$ super.init(name, atts); _adref_val = atts.getValue(ADREF); if (_adref_val == null) { _isParsedDataValid = false; - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {ADREF, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {ADREF, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } _content_val = atts.getValue(CONTENT); if (_content_val == null) { _isParsedDataValid = false; - logger.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {CONTENT, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); + logger.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.MISSING_ATTRIBUTE, new Object[] {CONTENT, name, atts.getValue(ID), _dp_url, _dp_bundle.getBundleId(), _dp_bundle.getSymbolicName()})); return; } } @@ -839,15 +810,18 @@ // The following methods are standard SAX ErrorHandler methods. // See SAX documentation for more info. + @Override public void warning(SAXParseException spe) { _out.println("Warning: " + getParseExceptionInfo(spe)); //$NON-NLS-1$ } + @Override public void error(SAXParseException spe) throws SAXException { String message = "Error: " + getParseExceptionInfo(spe); //$NON-NLS-1$ throw new SAXException(message); } + @Override public void fatalError(SAXParseException spe) throws SAXException { String message = "Fatal Error: " + getParseExceptionInfo(spe); //$NON-NLS-1$ throw new SAXException(message); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ExtendableHelper.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ExtendableHelper.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ExtendableHelper.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ExtendableHelper.java 2019-05-28 12:57:39.000000000 +0000 @@ -13,28 +13,74 @@ *******************************************************************************/ package org.eclipse.equinox.metatype.impl; +import java.io.IOException; import java.util.*; +import java.util.Map.Entry; import org.eclipse.equinox.metatype.Extendable; +import org.eclipse.equinox.metatype.impl.Persistence.Reader; +import org.eclipse.equinox.metatype.impl.Persistence.Writer; public class ExtendableHelper implements Extendable { - private final Map> attributes; + private final Map> extensions; public ExtendableHelper() { this(Collections.> emptyMap()); } - public ExtendableHelper(Map> attributes) { - if (attributes == null) + public ExtendableHelper(Map> extensions) { + if (extensions == null) throw new NullPointerException(); - this.attributes = attributes; + this.extensions = extensions; } + @Override public Map getExtensionAttributes(String schema) { - return Collections.unmodifiableMap(attributes.get(schema)); + return Collections.unmodifiableMap(extensions.get(schema)); } + @Override public Set getExtensionUris() { - return Collections.unmodifiableSet(attributes.keySet()); + return Collections.unmodifiableSet(extensions.keySet()); + } + + void getStrings(Set strings) { + for (Entry> e1 : extensions.entrySet()) { + strings.add(e1.getKey()); + for (Entry e2 : e1.getValue().entrySet()) { + strings.add(e2.getKey()); + strings.add(e2.getValue()); + } + } + } + + public static ExtendableHelper load(Reader reader) throws IOException { + Map> extensions = new HashMap<>(); + int numExtensions = reader.readInt(); + for (int i = 0; i < numExtensions; i++) { + String extKey = reader.readString(); + int numAttrs = reader.readInt(); + Map extensionAttrs = new HashMap<>(); + for (int j = 0; j < numAttrs; j++) { + String attrKey = reader.readString(); + String attrValue = reader.readString(); + extensionAttrs.put(attrKey, attrValue); + } + extensions.put(extKey, extensionAttrs); + } + return new ExtendableHelper(extensions); + } + + public void write(Writer writer) throws IOException { + writer.writeInt(extensions.size()); + for (Entry> extensionEntry : extensions.entrySet()) { + writer.writeString(extensionEntry.getKey()); + Map extensionAttrs = extensionEntry.getValue(); + writer.writeInt(extensionAttrs.size()); + for (Entry attrs : extensionAttrs.entrySet()) { + writer.writeString(attrs.getKey()); + writer.writeString(attrs.getValue()); + } + } } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Icon.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Icon.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Icon.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Icon.java 2019-05-28 12:57:39.000000000 +0000 @@ -13,6 +13,10 @@ *******************************************************************************/ package org.eclipse.equinox.metatype.impl; +import java.io.IOException; +import java.util.Set; +import org.eclipse.equinox.metatype.impl.Persistence.Reader; +import org.eclipse.equinox.metatype.impl.Persistence.Writer; import org.osgi.framework.Bundle; /** @@ -21,19 +25,20 @@ class Icon implements Cloneable { private final String _fileName; - private final Integer _size; + private final int _size; private final Bundle _bundle; /** * Constructor of class Icon. */ - public Icon(String fileName, Integer size, Bundle bundle) { + public Icon(String fileName, int size, Bundle bundle) { this._fileName = fileName; this._size = size; this._bundle = bundle; } + @Override public Object clone() { return new Icon(this._fileName, this._size, this._bundle); } @@ -60,4 +65,19 @@ Bundle getIconBundle() { return _bundle; } + + void getStrings(Set strings) { + strings.add(_fileName); + } + + public static Icon load(Reader reader, Bundle b) throws IOException { + int size = reader.readInt(); + String fileName = reader.readString(); + return new Icon(fileName, size, b); + } + + public void write(Writer writer) throws IOException { + writer.writeInt(_size); + writer.writeString(_fileName); + } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java 2019-05-28 12:57:39.000000000 +0000 @@ -27,6 +27,19 @@ */ public class LogTracker extends ServiceTracker { + + @SuppressWarnings("deprecation") + final static int LOG_ERROR = LogService.LOG_ERROR; + + @SuppressWarnings("deprecation") + final static int LOG_WARNING = LogService.LOG_WARNING; + + @SuppressWarnings("deprecation") + final static int LOG_INFO = LogService.LOG_INFO; + + @SuppressWarnings("deprecation") + final static int LOG_DEBUG = LogService.LOG_DEBUG; + /** LogService interface class name */ protected final static String clazz = "org.osgi.service.log.LogService"; //$NON-NLS-1$ @@ -63,7 +76,7 @@ } @SuppressWarnings("deprecation") - public synchronized void log(ServiceReference reference, int level, String message, Throwable exception) { + public void log(ServiceReference reference, int level, String message, Throwable exception) { ServiceReference[] references = getServiceReferences(); if (references != null) { @@ -94,7 +107,6 @@ * @param throwable Log exception or null if none. * @param reference ServiceReference associated with message or null if none. */ - @SuppressWarnings("deprecation") protected void noLogService(int level, String message, Throwable throwable, ServiceReference reference) { if (out != null) { synchronized (out) { @@ -104,22 +116,22 @@ out.print(timestamp + " "); //$NON-NLS-1$ switch (level) { - case LogService.LOG_DEBUG : { + case LOG_DEBUG : { out.print(LogTrackerMsg.Debug); break; } - case LogService.LOG_INFO : { + case LOG_INFO : { out.print(LogTrackerMsg.Info); break; } - case LogService.LOG_WARNING : { + case LOG_WARNING : { out.print(LogTrackerMsg.Warning); break; } - case LogService.LOG_ERROR : { + case LOG_ERROR : { out.print(LogTrackerMsg.Error); break; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeInformationImpl.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeInformationImpl.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeInformationImpl.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeInformationImpl.java 2019-05-28 12:57:39.000000000 +0000 @@ -13,11 +13,14 @@ *******************************************************************************/ package org.eclipse.equinox.metatype.impl; -import java.util.Enumeration; -import java.util.Vector; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; import javax.xml.parsers.SAXParser; import org.eclipse.equinox.metatype.EquinoxMetaTypeInformation; -import org.osgi.framework.Bundle; +import org.eclipse.equinox.metatype.impl.Persistence.Writer; +import org.osgi.framework.*; /** * Implementation of MetaTypeProvider @@ -30,6 +33,7 @@ *

    */ public class MetaTypeInformationImpl extends MetaTypeProviderImpl implements EquinoxMetaTypeInformation { + static final String[] emptyStringArray = new String[0]; /** * Constructor of class MetaTypeInformationImpl. @@ -38,6 +42,10 @@ super(bundle, parser, logger); } + public MetaTypeInformationImpl(Bundle bundle, LogTracker logger, Map pidOCDs, Map fPidOCDs) { + super(bundle, logger, pidOCDs, fPidOCDs); + } + /* * (non-Javadoc) * @@ -45,19 +53,10 @@ */ public String[] getPids() { - if (_allPidOCDs.size() == 0) { - return new String[0]; + if (_allPidOCDs.isEmpty()) { + return emptyStringArray; } - - Vector pids = new Vector(7); - Enumeration e = _allPidOCDs.keys(); - while (e.hasMoreElements()) { - pids.addElement(e.nextElement()); - } - - String[] retvalue = new String[pids.size()]; - pids.toArray(retvalue); - return retvalue; + return _allPidOCDs.keySet().toArray(emptyStringArray); } /* @@ -66,17 +65,10 @@ * @see org.osgi.service.metatype.MetaTypeInformation#getFactoryPids() */ public String[] getFactoryPids() { - if (_allFPidOCDs.size() == 0) { - return new String[0]; + if (_allFPidOCDs.isEmpty()) { + return emptyStringArray; } - Vector fpids = new Vector(7); - Enumeration e = _allFPidOCDs.keys(); - while (e.hasMoreElements()) { - fpids.addElement(e.nextElement()); - } - String[] retvalue = new String[fpids.size()]; - fpids.toArray(retvalue); - return retvalue; + return _allFPidOCDs.keySet().toArray(emptyStringArray); } /* @@ -87,4 +79,54 @@ public Bundle getBundle() { return this._bundle; } + + static MetaTypeInformationImpl load(BundleContext systemContext, LogTracker log, Persistence.Reader reader) throws IOException { + long id = reader.readLong(); + Bundle b = systemContext.getBundle(id); + boolean valid = true; + if (b == null) { + valid = false; + // just use the system bundle for load purposes + b = systemContext.getBundle(Constants.SYSTEM_BUNDLE_LOCATION); + } + + long lastModified = reader.readLong(); + if (lastModified != b.getLastModified()) { + valid = false; + } + Map allPidOCDs = new HashMap<>(); + int numPidOCDs = reader.readInt(); + for (int i = 0; i < numPidOCDs; i++) { + String key = reader.readString(); + ObjectClassDefinitionImpl ocd = ObjectClassDefinitionImpl.load(b, log, reader); + allPidOCDs.put(key, ocd); + } + Map allFPidOCDs = new HashMap<>(); + int numFPidOCDs = reader.readInt(); + for (int i = 0; i < numFPidOCDs; i++) { + String key = reader.readString(); + ObjectClassDefinitionImpl ocd = ObjectClassDefinitionImpl.load(b, log, reader); + allFPidOCDs.put(key, ocd); + } + + return !valid ? null : new MetaTypeInformationImpl(b, log, allPidOCDs, allFPidOCDs); + } + + void write(Writer writer) throws IOException { + writer.writeLong(getBundle().getBundleId()); + writer.writeLong(getBundle().getLastModified()); + + writer.writeInt(_allPidOCDs.size()); + for (Entry entry : _allPidOCDs.entrySet()) { + writer.writeString(entry.getKey()); + entry.getValue().write(writer); + } + + writer.writeInt(_allFPidOCDs.size()); + for (Entry entry : _allFPidOCDs.entrySet()) { + writer.writeString(entry.getKey()); + entry.getValue().write(writer); + } + } + } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java 2019-05-28 12:57:39.000000000 +0000 @@ -15,12 +15,12 @@ import java.net.URL; import java.util.*; +import java.util.Map.Entry; import javax.xml.parsers.SAXParser; import org.eclipse.equinox.metatype.EquinoxObjectClassDefinition; import org.eclipse.osgi.util.NLS; import org.osgi.framework.Bundle; import org.osgi.framework.Constants; -import org.osgi.service.log.LogService; import org.osgi.service.metatype.MetaTypeProvider; import org.osgi.service.metatype.MetaTypeService; @@ -38,13 +38,13 @@ public static final String RESOURCE_FILE_EXT = ".properties"; //$NON-NLS-1$ public static final char DIRECTORY_SEP = '/'; - Bundle _bundle; + final Bundle _bundle; - Hashtable _allPidOCDs = new Hashtable(7); - Hashtable _allFPidOCDs = new Hashtable(7); + final Map _allPidOCDs; + final Map _allFPidOCDs; String[] _locales; - boolean _isThereMeta = false; + final boolean _isThereMeta; // Give access to subclasses. protected final LogTracker logger; @@ -56,15 +56,24 @@ this._bundle = bundle; this.logger = logger; - + this._allPidOCDs = new HashMap<>(); + this._allFPidOCDs = new HashMap<>(); // read all bundle's metadata files and build internal data structures _isThereMeta = readMetaFiles(bundle, parser); if (!_isThereMeta) { - logger.log(LogService.LOG_DEBUG, NLS.bind(MetaTypeMsg.METADATA_NOT_FOUND, bundle.getSymbolicName(), bundle.getBundleId())); + logger.log(LogTracker.LOG_DEBUG, NLS.bind(MetaTypeMsg.METADATA_NOT_FOUND, bundle.getSymbolicName(), bundle.getBundleId())); } } + public MetaTypeProviderImpl(Bundle bundle, LogTracker logger, Map pidOCDs, Map fPidOCDs) { + this._bundle = bundle; + this.logger = logger; + this._isThereMeta = true; + this._allPidOCDs = pidOCDs; + this._allFPidOCDs = fPidOCDs; + } + /** * This method should do the following: *

    - Obtain a SAX parser from the XML Parser Service: @@ -107,7 +116,7 @@ } } } catch (Exception e) { - logger.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.METADATA_FILE_PARSE_ERROR, new Object[] {entry, bundle.getBundleId(), bundle.getSymbolicName()}), e); + logger.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.METADATA_FILE_PARSE_ERROR, new Object[] {entry, bundle.getBundleId(), bundle.getSymbolicName()}), e); } } return result; @@ -167,19 +176,15 @@ public synchronized String[] getLocales() { if (_locales != null) return checkForDefault(_locales); - Vector localizationFiles = new Vector(7); + List localizationFiles = new ArrayList(7); // get all the localization resources for PIDS - Enumeration ocds = _allPidOCDs.elements(); - while (ocds.hasMoreElements()) { - ObjectClassDefinitionImpl ocd = ocds.nextElement(); + for (ObjectClassDefinitionImpl ocd : _allPidOCDs.values()) { String localization = ocd.getLocalization(); if (localization != null && !localizationFiles.contains(localization)) localizationFiles.add(localization); } // get all the localization resources for FPIDS - ocds = _allFPidOCDs.elements(); - while (ocds.hasMoreElements()) { - ObjectClassDefinitionImpl ocd = ocds.nextElement(); + for (ObjectClassDefinitionImpl ocd : _allFPidOCDs.values()) { String localization = ocd.getLocalization(); if (localization != null && !localizationFiles.contains(localization)) localizationFiles.add(localization); @@ -187,9 +192,7 @@ if (localizationFiles.size() == 0) localizationFiles.add(getBundleLocalization(_bundle)); Vector locales = new Vector(7); - Enumeration eLocalizationFiles = localizationFiles.elements(); - while (eLocalizationFiles.hasMoreElements()) { - String localizationFile = eLocalizationFiles.nextElement(); + for (String localizationFile : localizationFiles) { int iSlash = localizationFile.lastIndexOf(DIRECTORY_SEP); String baseDir; String baseFileName; @@ -230,4 +233,15 @@ return null; return locales; } + + void getStrings(Set strings) { + for (Entry entry : _allPidOCDs.entrySet()) { + strings.add(entry.getKey()); + entry.getValue().getStrings(strings); + } + for (Entry entry : _allFPidOCDs.entrySet()) { + strings.add(entry.getKey()); + entry.getValue().getStrings(strings); + } + } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java 2019-05-28 12:57:39.000000000 +0000 @@ -22,7 +22,6 @@ import org.osgi.framework.*; import org.osgi.service.cm.ManagedService; import org.osgi.service.cm.ManagedServiceFactory; -import org.osgi.service.log.LogService; import org.osgi.service.metatype.*; import org.osgi.util.tracker.ServiceTracker; @@ -69,6 +68,7 @@ return _bundle; } + @Override public EquinoxObjectClassDefinition getObjectClassDefinition(String id, String locale) { if (_bundle.getState() != Bundle.ACTIVE) return null; // return none if not active @@ -158,7 +158,7 @@ e = ase; } } - log.log(LogService.LOG_WARNING, NLS.bind(MetaTypeMsg.INVALID_PID_METATYPE_PROVIDER_IGNORED, new Object[] {_bundle.getSymbolicName(), _bundle.getBundleId(), name, value}), e); + log.log(LogTracker.LOG_WARNING, NLS.bind(MetaTypeMsg.INVALID_PID_METATYPE_PROVIDER_IGNORED, new Object[] {_bundle.getSymbolicName(), _bundle.getBundleId(), name, value}), e); return new String[0]; } @@ -214,14 +214,17 @@ return ocd.getIcon(size); } + @Override public Map getExtensionAttributes(String schema) { return Collections. emptyMap(); } + @Override public Set getExtensionUris() { return Collections. emptySet(); } + @Override public EquinoxAttributeDefinition[] getAttributeDefinitions(int filter) { AttributeDefinition[] ads = ocd.getAttributeDefinitions(filter); if (ads == null || ads.length == 0) @@ -265,18 +268,22 @@ return ad.getDefaultValue(); } + @Override public Map getExtensionAttributes(String schema) { return Collections. emptyMap(); } + @Override public Set getExtensionUris() { return Collections. emptySet(); } + @Override public String getMax() { return null; } + @Override public String getMin() { return null; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java 2019-05-28 12:57:39.000000000 +0000 @@ -13,15 +13,18 @@ *******************************************************************************/ package org.eclipse.equinox.metatype.impl; +import java.io.*; import java.security.AccessController; import java.security.PrivilegedAction; -import java.util.Hashtable; +import java.util.*; import javax.xml.parsers.*; import org.eclipse.equinox.metatype.EquinoxMetaTypeInformation; import org.eclipse.equinox.metatype.EquinoxMetaTypeService; +import org.eclipse.equinox.metatype.impl.Persistence.Reader; +import org.eclipse.equinox.metatype.impl.Persistence.Writer; import org.eclipse.osgi.util.NLS; import org.osgi.framework.*; -import org.osgi.service.log.LogService; +import org.osgi.service.metatype.MetaTypeInformation; import org.osgi.util.tracker.ServiceTracker; import org.xml.sax.SAXException; @@ -29,7 +32,7 @@ * Implementation of MetaTypeService */ public class MetaTypeServiceImpl implements EquinoxMetaTypeService, SynchronousBundleListener { - + private static String CACHE_FILE = "metaTypeCache"; //$NON-NLS-1$ SAXParserFactory _parserFactory; private Hashtable _mtps = new Hashtable(7); @@ -50,6 +53,7 @@ * * @see org.osgi.service.metatype.MetaTypeService#getMetaTypeInformation(org.osgi.framework.Bundle) */ + @Override public EquinoxMetaTypeInformation getMetaTypeInformation(Bundle bundle) { return getMetaTypeProvider(bundle); } @@ -66,12 +70,13 @@ if (_mtps.containsKey(bID)) return _mtps.get(bID); EquinoxMetaTypeInformation mti = AccessController.doPrivileged(new PrivilegedAction() { + @Override public EquinoxMetaTypeInformation run() { MetaTypeInformationImpl impl = null; try { impl = new MetaTypeInformationImpl(b, newParser(), loggerTemp); } catch (Exception e) { - loggerTemp.log(LogService.LOG_ERROR, NLS.bind(MetaTypeMsg.METADATA_PARSE_ERROR, b.getBundleId(), b.getSymbolicName()), e); + loggerTemp.log(LogTracker.LOG_ERROR, NLS.bind(MetaTypeMsg.METADATA_PARSE_ERROR, b.getBundleId(), b.getSymbolicName()), e); } if (impl == null || !impl._isThereMeta) return new MetaTypeProviderTracker(b, loggerTemp, tracker); @@ -135,4 +140,70 @@ break; } } + + void load(BundleContext context, LogTracker log, ServiceTracker tracker) throws IOException { + File cache = context.getDataFile(CACHE_FILE); + // using system context to see all bundles by the ID + BundleContext systemContext = context.getBundle(Constants.SYSTEM_BUNDLE_LOCATION).getBundleContext(); + if (cache.isFile()) { + try (Reader reader = new Reader(new DataInputStream(new BufferedInputStream(new FileInputStream(cache))))) { + if (!reader.isValidPersistenceVersion()) { + logger.log(LogTracker.LOG_INFO, "Metatype cache version is not supported. Ignoring cache."); //$NON-NLS-1$ + return; + } + int numService = reader.readInt(); + for (int i = 0; i < numService; i++) { + long id = reader.readLong(); + Bundle b = systemContext.getBundle(id); + if (b != null) { + _mtps.put(b.getBundleId(), new MetaTypeProviderTracker(b, log, tracker)); + } + } + + reader.readIndexedStrings(); + + int numXML = reader.readInt(); + for (int i = 0; i < numXML; i++) { + MetaTypeInformationImpl info = MetaTypeInformationImpl.load(systemContext, log, reader); + if (info != null) { + _mtps.put(info.getBundle().getBundleId(), info); + } + } + } + } + } + + void save(BundleContext context) throws IOException { + File cache = context.getDataFile(CACHE_FILE); + try (Writer writer = new Writer(new DataOutputStream(new BufferedOutputStream(new FileOutputStream(cache))))) { + writer.writePersistenceVersion(); + List serviceInfos = new ArrayList<>(); + List xmlInfos = new ArrayList<>(); + synchronized (_mtps) { + for (MetaTypeInformation info : _mtps.values()) { + if (info instanceof MetaTypeInformationImpl) { + xmlInfos.add((MetaTypeInformationImpl) info); + } else { + serviceInfos.add(info); + } + } + } + + writer.writeInt(serviceInfos.size()); + for (MetaTypeInformation info : serviceInfos) { + writer.writeLong(info.getBundle().getBundleId()); + } + + Set strings = new HashSet<>(); + for (MetaTypeInformationImpl info : xmlInfos) { + info.getStrings(strings); + } + writer.writeIndexedStrings(strings); + + writer.writeInt(xmlInfos.size()); + for (MetaTypeInformationImpl info : xmlInfos) { + info.write(writer); + } + } + } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ObjectClassDefinitionImpl.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ObjectClassDefinitionImpl.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ObjectClassDefinitionImpl.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ObjectClassDefinitionImpl.java 2019-05-28 12:57:39.000000000 +0000 @@ -19,6 +19,7 @@ import java.util.*; import org.eclipse.equinox.metatype.EquinoxAttributeDefinition; import org.eclipse.equinox.metatype.EquinoxObjectClassDefinition; +import org.eclipse.equinox.metatype.impl.Persistence.Writer; import org.osgi.framework.Bundle; /** @@ -26,6 +27,7 @@ */ public class ObjectClassDefinitionImpl extends LocalizationElement implements EquinoxObjectClassDefinition, Cloneable { private static final Comparator iconComparator = new Comparator() { + @Override public int compare(Icon icon1, Icon icon2) { return icon1.getIconSize().compareTo(icon2.getIconSize()); } @@ -35,12 +37,11 @@ private final String _id; private final String _description; private final int _type; - private final Vector _required = new Vector(7); - private final Vector _optional = new Vector(7); + private final List _required = new ArrayList<>(7); + private final List _optional = new ArrayList<>(7); private final ExtendableHelper helper; - // @GuardedBy("this") - private List icons; + private volatile List icons = null; /* * Constructor of class ObjectClassDefinitionImpl. @@ -64,19 +65,19 @@ /* * */ - public synchronized Object clone() { + @Override + public Object clone() { ObjectClassDefinitionImpl ocd = new ObjectClassDefinitionImpl(_name, _description, _id, _type, getLocalization(), helper); - for (int i = 0; i < _required.size(); i++) { - AttributeDefinitionImpl ad = _required.elementAt(i); + for (AttributeDefinitionImpl ad : _required) { ocd.addAttributeDefinition((AttributeDefinitionImpl) ad.clone(), true); } - for (int i = 0; i < _optional.size(); i++) { - AttributeDefinitionImpl ad = _optional.elementAt(i); + for (AttributeDefinitionImpl ad : _optional) { ocd.addAttributeDefinition((AttributeDefinitionImpl) ad.clone(), false); } - if (icons != null) + if (icons != null) { ocd.setIcons(new ArrayList(icons)); + } return ocd; } @@ -112,6 +113,7 @@ * * @see org.osgi.service.metatype.ObjectClassDefinition#getAttributeDefinitions(int) */ + @Override public EquinoxAttributeDefinition[] getAttributeDefinitions(int filter) { EquinoxAttributeDefinition[] atts; @@ -127,15 +129,13 @@ case ALL : default : atts = new EquinoxAttributeDefinition[_required.size() + _optional.size()]; - Enumeration e = _required.elements(); int i = 0; - while (e.hasMoreElements()) { - atts[i] = e.nextElement(); + for (AttributeDefinitionImpl attr : _required) { + atts[i] = attr; i++; } - e = _optional.elements(); - while (e.hasMoreElements()) { - atts[i] = e.nextElement(); + for (AttributeDefinitionImpl attr : _optional) { + atts[i] = attr; i++; } return atts; @@ -148,9 +148,9 @@ void addAttributeDefinition(AttributeDefinitionImpl ad, boolean isRequired) { if (isRequired) { - _required.addElement(ad); + _required.add(ad); } else { - _optional.addElement(ad); + _optional.add(ad); } } @@ -159,7 +159,7 @@ * * @see org.osgi.service.metatype.ObjectClassDefinition#getIcon(int) */ - public synchronized InputStream getIcon(int sizeHint) throws IOException { + public InputStream getIcon(int sizeHint) throws IOException { // The parameter simply represents a requested size. This method should never return null if an // icon exists. // Temporary icon to hold the requested size for use in binary search comparator. @@ -206,7 +206,7 @@ return null; } - synchronized void setIcons(List icons) { + void setIcons(List icons) { // Do nothing if icons is null or empty. if (icons == null || icons.isEmpty()) return; @@ -222,24 +222,91 @@ */ void setResourceBundle(String assignedLocale, Bundle bundle) { setLocaleAndBundle(assignedLocale, bundle); - Enumeration allADReqs = _required.elements(); - while (allADReqs.hasMoreElements()) { - AttributeDefinitionImpl ad = allADReqs.nextElement(); + for (AttributeDefinitionImpl ad : _required) { ad.setLocaleAndBundle(assignedLocale, bundle); } - - Enumeration allADOpts = _optional.elements(); - while (allADOpts.hasMoreElements()) { - AttributeDefinitionImpl ad = allADOpts.nextElement(); + for (AttributeDefinitionImpl ad : _optional) { ad.setLocaleAndBundle(assignedLocale, bundle); } } + @Override public Map getExtensionAttributes(String schema) { return helper.getExtensionAttributes(schema); } + @Override public Set getExtensionUris() { return helper.getExtensionUris(); } + + void getStrings(Set strings) { + helper.getStrings(strings); + strings.add(_description); + strings.add(_id); + strings.add(_name); + strings.add(getLocalization()); + @SuppressWarnings("hiding") + List icons = this.icons; + if (icons != null) { + for (Icon icon : icons) { + icon.getStrings(strings); + } + } + } + + static ObjectClassDefinitionImpl load(Bundle b, LogTracker logger, Persistence.Reader reader) throws IOException { + String description = reader.readString(); + String id = reader.readString(); + String name = reader.readString(); + int type = reader.readInt(); + String localization = reader.readString(); + ExtendableHelper helper = ExtendableHelper.load(reader); + ObjectClassDefinitionImpl result = new ObjectClassDefinitionImpl(name, description, id, type, localization, helper); + + int numIcons = reader.readInt(); + List icons = null; + if (numIcons > 0) { + icons = new ArrayList<>(numIcons); + for (int i = 0; i < numIcons; i++) { + icons.add(Icon.load(reader, b)); + } + } + result.setIcons(icons); + + int numRequired = reader.readInt(); + for (int i = 0; i < numRequired; i++) { + result.addAttributeDefinition(AttributeDefinitionImpl.load(reader, logger), true); + } + int numOptional = reader.readInt(); + for (int i = 0; i < numOptional; i++) { + result.addAttributeDefinition(AttributeDefinitionImpl.load(reader, logger), false); + } + + return result; + } + + void write(Writer writer) throws IOException { + writer.writeString(_description); + writer.writeString(_id); + writer.writeString(_name); + writer.writeInt(_type); + writer.writeString(getLocalization()); + helper.write(writer); + List curIcons = this.icons; + writer.writeInt(curIcons == null ? 0 : curIcons.size()); + if (curIcons != null) { + for (Icon icon : curIcons) { + icon.write(writer); + } + } + writer.writeInt(_required.size()); + for (AttributeDefinitionImpl ad : _required) { + ad.write(writer); + } + writer.writeInt(_optional.size()); + for (AttributeDefinitionImpl ad : _optional) { + ad.write(writer); + } + } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Persistence.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Persistence.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Persistence.java 1970-01-01 00:00:00.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Persistence.java 2019-05-28 12:57:39.000000000 +0000 @@ -0,0 +1,214 @@ +package org.eclipse.equinox.metatype.impl; + +import java.io.*; +import java.util.*; + +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +public class Persistence { + private static final int PERSISTENCE_VERSION = 0; + private static final String UTF_8 = "UTF-8"; //$NON-NLS-1$ + private static final byte NULL = 0; + private static final byte OBJECT = 1; + private static final byte INDEX = 2; + private static final byte LONG_STRING = 3; + + private Persistence() { + } + + public static class Reader implements Closeable { + private final Map readStringCache = new HashMap<>(); + private final DataInputStream in; + + public Reader(DataInputStream in) { + this.in = in; + } + + public boolean isValidPersistenceVersion() throws IOException { + return in.readInt() == PERSISTENCE_VERSION; + } + + public void readIndexedStrings() throws IOException { + int num = in.readInt(); + for (int i = 0; i < num; i++) { + readIndexedString(); + } + } + + private String readIndexedString() throws IOException { + String string = readString(); + readStringCache.put(Integer.valueOf(in.readInt()), string); + return string; + } + + public String readString() throws IOException { + byte type = in.readByte(); + if (type == INDEX) { + int index = in.readInt(); + return readStringCache.get(index); + } + if (type == NULL) { + return null; + } + String string; + if (type == LONG_STRING) { + int length = in.readInt(); + byte[] data = new byte[length]; + in.readFully(data); + string = new String(data, UTF_8); + } else { + string = in.readUTF(); + } + + return string; + } + + public long readLong() throws IOException { + return in.readLong(); + } + + public int readInt() throws IOException { + return in.readInt(); + } + + @Override + public void close() throws IOException { + in.close(); + } + + public boolean readBoolean() throws IOException { + return in.readBoolean(); + } + + public short readShort() throws IOException { + return in.readShort(); + } + + public char readCharacter() throws IOException { + return in.readChar(); + } + + public byte readByte() throws IOException { + return in.readByte(); + } + + public double readDouble() throws IOException { + return readDouble(); + } + + public float readFloat() throws IOException { + return in.readFloat(); + } + } + + public static class Writer implements Closeable { + private final Map writeStringCache = new HashMap<>(); + private final DataOutputStream out; + + public Writer(DataOutputStream out) { + this.out = out; + } + + public void writePersistenceVersion() throws IOException { + out.writeInt(PERSISTENCE_VERSION); + } + + public void writeIndexedStrings(Set strings) throws IOException { + strings.remove(null); // do not index null + out.writeInt(strings.size()); + for (String string : strings) { + writeIndexedString(string); + } + } + + private void writeIndexedString(String string) throws IOException { + writeString(string); + addToIndex(string); + } + + public void writeString(String string) throws IOException { + Integer index = string != null ? writeStringCache.get(string) : null; + if (index != null) { + out.writeByte(INDEX); + out.writeInt(index); + return; + } + + if (string == null) + out.writeByte(NULL); + else { + byte[] data = string.getBytes(UTF_8); + + if (data.length > 65535) { + out.writeByte(LONG_STRING); + out.writeInt(data.length); + out.write(data); + } else { + out.writeByte(OBJECT); + out.writeUTF(string); + } + } + } + + private void addToIndex(String string) throws IOException { + if (string == null) { + throw new NullPointerException(); + } + Integer cur = writeStringCache.get(string); + if (cur != null) + throw new IllegalStateException("String is already in the write table: " + string); //$NON-NLS-1$ + Integer index = writeStringCache.size(); + writeStringCache.put(string, index); + out.writeInt(index.intValue()); + } + + @Override + public void close() throws IOException { + out.close(); + } + + public void writeInt(int v) throws IOException { + out.writeInt(v); + } + + public void writeLong(long v) throws IOException { + out.writeLong(v); + } + + public void writeBoolean(boolean v) throws IOException { + out.writeBoolean(v); + } + + public void writeShort(Short v) throws IOException { + out.writeShort(v); + } + + public void writeCharacter(Character v) throws IOException { + out.writeChar(v); + } + + public void writeByte(Byte v) throws IOException { + out.writeByte(v); + } + + public void writeDouble(Double v) throws IOException { + out.writeDouble(v); + } + + public void writeFloat(Float v) throws IOException { + out.writeFloat(v); + } + } +} diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ValueTokenizer.java equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ValueTokenizer.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ValueTokenizer.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ValueTokenizer.java 2019-05-28 12:57:39.000000000 +0000 @@ -17,7 +17,6 @@ import java.math.BigInteger; import java.util.*; import org.eclipse.osgi.util.NLS; -import org.osgi.service.log.LogService; import org.osgi.service.metatype.AttributeDefinition; public class ValueTokenizer { @@ -114,7 +113,7 @@ } /* - * Method to return values as Vector. + * Method to return values as collection. */ public Collection getValues() { return Collections.unmodifiableList(values); @@ -150,20 +149,21 @@ try { // All or nothing. If either min or max is not null and cannot be // parsed as an integer, do the string comparison instead. - Integer min = ad._minValue == null ? null : Integer.valueOf((String) ad._minValue); - Integer max = ad._maxValue == null ? null : Integer.valueOf((String) ad._maxValue); + Integer min = ad.getMinValue() == null ? null : Integer.valueOf((String) ad.getMinValue()); + Integer max = ad.getMaxValue() == null ? null : Integer.valueOf((String) ad.getMaxValue()); if (min != null && value.length() < min) return true; if (max != null && value.length() > max) return true; } catch (NumberFormatException e) { // Either min or max was not an integer. Do a string comparison. - if ((ad._minValue != null && value.compareTo((String) ad._minValue) < 0) || (ad._maxValue != null && value.compareTo((String) ad._maxValue) > 0)) + if ((ad.getMinValue() != null && value.compareTo((String) ad.getMinValue()) < 0) || (ad.getMaxValue() != null && value.compareTo((String) ad.getMaxValue()) > 0)) return true; } return false; } + @SuppressWarnings("deprecation") public String validate(AttributeDefinitionImpl ad) { // An empty list means the original value was null. Null is never valid. if (values.isEmpty()) { @@ -187,37 +187,37 @@ for (Iterator i = values.iterator(); i.hasNext();) { s = i.next(); // If options were declared and the value does not match one of them, the value is not valid. - if (!ad._values.isEmpty() && !ad._values.contains(s)) { + if (ad.containsInvalidValue(s)) { return NLS.bind(MetaTypeMsg.VALUE_OUT_OF_OPTION, s); } // Check the type. Also check the range if min or max were declared. boolean rangeError = false; - switch (ad._dataType) { + switch (ad.getType()) { case AttributeDefinition.PASSWORD : case AttributeDefinition.STRING : rangeError = validateString(ad, s); break; case AttributeDefinition.INTEGER : Integer intVal = Integer.valueOf(s); - if (ad._minValue != null && intVal.compareTo((Integer) ad._minValue) < 0) { + if (ad.getMinValue() != null && intVal.compareTo((Integer) ad.getMinValue()) < 0) { rangeError = true; - } else if (ad._maxValue != null && intVal.compareTo((Integer) ad._maxValue) > 0) { + } else if (ad.getMaxValue() != null && intVal.compareTo((Integer) ad.getMaxValue()) > 0) { rangeError = true; } break; case AttributeDefinition.LONG : Long longVal = Long.valueOf(s); - if (ad._minValue != null && longVal.compareTo((Long) ad._minValue) < 0) { + if (ad.getMinValue() != null && longVal.compareTo((Long) ad.getMinValue()) < 0) { rangeError = true; - } else if (ad._maxValue != null && longVal.compareTo((Long) ad._maxValue) > 0) { + } else if (ad.getMaxValue() != null && longVal.compareTo((Long) ad.getMaxValue()) > 0) { rangeError = true; } break; case AttributeDefinition.DOUBLE : Double doubleVal = Double.valueOf(s); - if (ad._minValue != null && doubleVal.compareTo((Double) ad._minValue) < 0) { + if (ad.getMinValue() != null && doubleVal.compareTo((Double) ad.getMinValue()) < 0) { rangeError = true; - } else if (ad._maxValue != null && doubleVal.compareTo((Double) ad._maxValue) > 0) { + } else if (ad.getMaxValue() != null && doubleVal.compareTo((Double) ad.getMaxValue()) > 0) { rangeError = true; } break; @@ -227,49 +227,49 @@ break; case AttributeDefinition.CHARACTER : Character charVal = Character.valueOf(s.charAt(0)); - if (ad._minValue != null && charVal.compareTo((Character) ad._minValue) < 0) { + if (ad.getMinValue() != null && charVal.compareTo((Character) ad.getMinValue()) < 0) { rangeError = true; - } else if (ad._maxValue != null && charVal.compareTo((Character) ad._maxValue) > 0) { + } else if (ad.getMaxValue() != null && charVal.compareTo((Character) ad.getMaxValue()) > 0) { rangeError = true; } break; case AttributeDefinition.FLOAT : Float floatVal = Float.valueOf(s); - if (ad._minValue != null && floatVal.compareTo((Float) ad._minValue) < 0) { + if (ad.getMinValue() != null && floatVal.compareTo((Float) ad.getMinValue()) < 0) { rangeError = true; - } else if (ad._maxValue != null && floatVal.compareTo((Float) ad._maxValue) > 0) { + } else if (ad.getMaxValue() != null && floatVal.compareTo((Float) ad.getMaxValue()) > 0) { rangeError = true; } break; case AttributeDefinition.SHORT : Short shortVal = Short.valueOf(s); - if (ad._minValue != null && shortVal.compareTo((Short) ad._minValue) < 0) { + if (ad.getMinValue() != null && shortVal.compareTo((Short) ad.getMinValue()) < 0) { rangeError = true; - } else if (ad._maxValue != null && shortVal.compareTo((Short) ad._maxValue) > 0) { + } else if (ad.getMaxValue() != null && shortVal.compareTo((Short) ad.getMaxValue()) > 0) { rangeError = true; } break; case AttributeDefinition.BYTE : Byte byteVal = Byte.valueOf(s); - if (ad._minValue != null && byteVal.compareTo((Byte) ad._minValue) < 0) { + if (ad.getMinValue() != null && byteVal.compareTo((Byte) ad.getMinValue()) < 0) { rangeError = true; - } else if (ad._maxValue != null && byteVal.compareTo((Byte) ad._maxValue) > 0) { + } else if (ad.getMaxValue() != null && byteVal.compareTo((Byte) ad.getMaxValue()) > 0) { rangeError = true; } break; case AttributeDefinition.BIGDECIMAL : BigDecimal bigDecVal = new BigDecimal(s); - if (ad._minValue != null && bigDecVal.compareTo((BigDecimal) ad._minValue) < 0) { + if (ad.getMinValue() != null && bigDecVal.compareTo((BigDecimal) ad.getMinValue()) < 0) { rangeError = true; - } else if (ad._maxValue != null && bigDecVal.compareTo((BigDecimal) ad._maxValue) > 0) { + } else if (ad.getMaxValue() != null && bigDecVal.compareTo((BigDecimal) ad.getMaxValue()) > 0) { rangeError = true; } break; case AttributeDefinition.BIGINTEGER : BigInteger bigIntVal = new BigInteger(s); - if (ad._minValue != null && bigIntVal.compareTo((BigInteger) ad._minValue) < 0) { + if (ad.getMinValue() != null && bigIntVal.compareTo((BigInteger) ad.getMinValue()) < 0) { rangeError = true; - } else if (ad._maxValue != null && bigIntVal.compareTo((BigInteger) ad._maxValue) > 0) { + } else if (ad.getMaxValue() != null && bigIntVal.compareTo((BigInteger) ad.getMaxValue()) > 0) { rangeError = true; } break; @@ -286,7 +286,7 @@ return NLS.bind(MetaTypeMsg.VALUE_NOT_A_NUMBER, s); } catch (Exception e) { String message = NLS.bind(MetaTypeMsg.EXCEPTION_MESSAGE, e.getClass().getName(), e.getMessage()); - logger.log(LogService.LOG_DEBUG, message, e); + logger.log(LogTracker.LOG_DEBUG, message, e); return message; } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.equinox.preferences; singleton:=true -Bundle-Version: 3.7.300.qualifier +Bundle-Version: 3.7.400.qualifier Bundle-Activator: org.eclipse.core.internal.preferences.Activator Bundle-Vendor: %providerName Bundle-Localization: plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.preferences - 3.7.300-SNAPSHOT + 3.7.400-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java 2019-05-28 12:57:39.000000000 +0000 @@ -366,17 +366,13 @@ try { input = url.openStream(); result.load(input); - } catch (IOException e) { + } catch (IOException | IllegalArgumentException e) { if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL) { PrefsMessages.message("Problem opening stream to preference customization file: " + url); //$NON-NLS-1$ e.printStackTrace(); } - } catch (IllegalArgumentException e) { - if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL) { - PrefsMessages.message("Problem opening stream to preference customization file: " + url); //$NON-NLS-1$ - e.printStackTrace(); - } - } finally { + } + finally { if (input != null) try { input.close(); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/AbstractPreferenceStorage.java equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/AbstractPreferenceStorage.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/AbstractPreferenceStorage.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/AbstractPreferenceStorage.java 2019-05-28 12:57:39.000000000 +0000 @@ -76,9 +76,7 @@ try { input = new BufferedInputStream(input); result.load(input); - } catch (IOException e) { - throw new BackingStoreException(PrefsMessages.preferences_loadProblems, e); - } catch (IllegalArgumentException e) { + } catch (IOException | IllegalArgumentException e) { throw new BackingStoreException(PrefsMessages.preferences_loadProblems, e); } finally { if (input != null) diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IEclipsePreferences.java equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IEclipsePreferences.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IEclipsePreferences.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IEclipsePreferences.java 2019-05-28 12:57:39.000000000 +0000 @@ -315,7 +315,9 @@ * * @param visitor the visitor * @see IPreferenceNodeVisitor#visit(IEclipsePreferences) - * @throws BackingStoreException + * @throws BackingStoreException if this operation cannot be completed due + * to a failure in the backing store, or inability to communicate + * with it. */ public void accept(IPreferenceNodeVisitor visitor) throws BackingStoreException; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IPreferenceNodeVisitor.java equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IPreferenceNodeVisitor.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IPreferenceNodeVisitor.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IPreferenceNodeVisitor.java 2019-05-28 12:57:39.000000000 +0000 @@ -45,7 +45,9 @@ * @param node the node to visit * @return true if the node's children should * be visited; false if they should be skipped - * @throws BackingStoreException + * @throws BackingStoreException if this operation cannot be completed due + * to a failure in the backing store, or inability to communicate + * with it. */ public boolean visit(IEclipsePreferences node) throws BackingStoreException; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IPreferencesService.java equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IPreferencesService.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IPreferencesService.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IPreferencesService.java 2019-05-28 12:57:39.000000000 +0000 @@ -611,7 +611,7 @@ * @param node the tree to export * @param filters the list of filters to export * @param output the stream to export to - * @throws CoreException + * @throws CoreException if there was a problem exporting the preferences * @see #exportPreferences(IEclipsePreferences, OutputStream, String[]) * @see #readPreferences(InputStream) * @see #applyPreferences(IEclipsePreferences, IPreferenceFilter[]) @@ -629,7 +629,7 @@ * @param node the tree to match against * @param filters the list of filters to match against * @return the array of matching transfers - * @throws CoreException + * @throws CoreException if there are problems during matching * @see IPreferenceFilter * @since 3.1 */ @@ -650,7 +650,7 @@ * * @param node the tree to consider applying * @param filters the filters to use - * @throws CoreException + * @throws CoreException if there are problems applying the preferences * @see #applyPreferences(IExportedPreferences) * @see #readPreferences(InputStream) * @see IPreferenceFilter diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences.tests/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences.tests/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.preferences.tests/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.preferences.tests/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -16,7 +16,7 @@ tests-pom org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../tests-pom/ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.region/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.region/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.region/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.region/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: org.eclipse.equinox.region -Bundle-Version: 1.4.300.qualifier +Bundle-Version: 1.4.400.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Fragment-Host: system.bundle ExtensionBundle-Activator: org.eclipse.equinox.internal.region.RegionManager diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.region/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.region/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.region/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.region/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -5,7 +5,7 @@ are made available under the terms of the Eclipse Distribution License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/org/documents/edl-v10.php - + Contributors: Igor Fedorenko - initial implementation --> @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.region - 1.4.300-SNAPSHOT + 1.4.400-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/management/StandardManageableRegionDigraph.java equinox-bundles-4.12/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/management/StandardManageableRegionDigraph.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/management/StandardManageableRegionDigraph.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/management/StandardManageableRegionDigraph.java 2019-05-28 12:57:39.000000000 +0000 @@ -57,10 +57,12 @@ private final RegionLifecycleListener regionLifecycleListener = new RegionLifecycleListener() { + @Override public void regionAdded(Region region) { addRegion(region); } + @Override public void regionRemoving(Region region) { removeRegion(region); } @@ -148,6 +150,7 @@ /** * {@inheritDoc} */ + @Override public ManageableRegion[] getRegions() { List regions = new ArrayList(); synchronized (this.monitor) { @@ -161,6 +164,7 @@ /** * {@inheritDoc} */ + @Override public ManageableRegion getRegion(String regionName) { return this.manageableRegions.get(regionName); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/management/StandardManageableRegion.java equinox-bundles-4.12/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/management/StandardManageableRegion.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/management/StandardManageableRegion.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/management/StandardManageableRegion.java 2019-05-28 12:57:39.000000000 +0000 @@ -48,6 +48,7 @@ /** * {@inheritDoc} */ + @Override public String getName() { return region.getName(); } @@ -55,6 +56,7 @@ /** * {@inheritDoc} */ + @Override public ManageableRegion[] getDependencies() { Set edges = this.regionDigraph.getEdges(this.region); List dependencies = new ArrayList(); @@ -70,6 +72,7 @@ /** * {@inheritDoc} */ + @Override public long[] getBundleIds() { Set bundleIds = this.region.getBundleIds(); long[] result = new long[bundleIds.size()]; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionDigraph.java equinox-bundles-4.12/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionDigraph.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionDigraph.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionDigraph.java 2019-05-28 12:57:39.000000000 +0000 @@ -110,6 +110,7 @@ /** * {@inheritDoc} */ + @Override public Region createRegion(String regionName) throws BundleException { return createRegion(regionName, true); } @@ -133,6 +134,7 @@ /** * {@inheritDoc} */ + @Override public void connect(Region tailRegion, RegionFilter filter, Region headRegion) throws BundleException { createConnection(tailRegion, filter, headRegion, false); } @@ -140,6 +142,7 @@ /** * {@inheritDoc} */ + @Override public RegionFilter replaceConnection(Region tailRegion, RegionFilter filter, Region headRegion) throws BundleException { return createConnection(tailRegion, filter, headRegion, true); } @@ -211,6 +214,7 @@ /** * {@inheritDoc} */ + @Override public Iterator iterator() { synchronized (this.monitor) { Set snapshot = new HashSet(this.regions.size()); @@ -222,6 +226,7 @@ /** * {@inheritDoc} */ + @Override public Set getEdges(Region tailRegion) { synchronized (this.monitor) { // Cope with the case where tailRegion is not in the digraph @@ -241,10 +246,12 @@ this.regionFilter = regionFilter; } + @Override public Region getRegion() { return this.region; } + @Override public RegionFilter getFilter() { return this.regionFilter; } @@ -254,6 +261,7 @@ /** * {@inheritDoc} */ + @Override public Region getRegion(String regionName) { synchronized (this.monitor) { return regions.get(regionName); @@ -263,6 +271,7 @@ /** * {@inheritDoc} */ + @Override public Region getRegion(Bundle bundle) { return getRegion(bundle.getBundleId()); } @@ -270,6 +279,7 @@ /** * {@inheritDoc} */ + @Override public Region getRegion(long bundleId) { synchronized (this.monitor) { return this.bundleIdToRegionMapping.getRegion(bundleId); @@ -279,6 +289,7 @@ /** * {@inheritDoc} */ + @Override public void removeRegion(Region region) { if (region == null) throw new IllegalArgumentException("The region cannot be null."); //$NON-NLS-1$ @@ -309,6 +320,7 @@ /** * {@inheritDoc} */ + @Override public String toString() { synchronized (this.monitor) { StringBuffer s = new StringBuffer(); @@ -342,6 +354,7 @@ } } + @Override public Set getRegions() { Set result = new HashSet(); synchronized (this.monitor) { @@ -350,6 +363,7 @@ return result; } + @Override public RegionFilterBuilder createRegionFilterBuilder() { return new StandardRegionFilterBuilder(); } @@ -389,6 +403,7 @@ /** * {@inheritDoc} */ + @Override public void visitSubgraph(Region startingRegion, RegionDigraphVisitor visitor) { this.subgraphTraverser.visitSubgraph(startingRegion, visitor); } @@ -407,6 +422,7 @@ /** * {@inheritDoc} */ + @Override public RegionDigraphPersistence getRegionDigraphPersistence() { return new StandardRegionDigraphPersistence(); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionDigraphPersistence.java equinox-bundles-4.12/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionDigraphPersistence.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionDigraphPersistence.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionDigraphPersistence.java 2019-05-28 12:57:39.000000000 +0000 @@ -179,6 +179,7 @@ /** * {@inheritDoc} */ + @Override public RegionDigraph load(InputStream input) throws IOException { try { return readRegionDigraph(new DataInputStream(input), null, null); @@ -196,6 +197,7 @@ /** * {@inheritDoc} */ + @Override public void save(RegionDigraph digraph, OutputStream output) throws IOException { writeRegionDigraph(new DataOutputStream(output), digraph); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionFilterBuilder.java equinox-bundles-4.12/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionFilterBuilder.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionFilterBuilder.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionFilterBuilder.java 2019-05-28 12:57:39.000000000 +0000 @@ -29,6 +29,7 @@ private final Map> policy = new HashMap>(); @SuppressWarnings("deprecation") + @Override public RegionFilterBuilder allow(String namespace, String filter) throws InvalidSyntaxException { if (namespace == null) throw new IllegalArgumentException("The namespace must not be null."); //$NON-NLS-1$ @@ -58,6 +59,7 @@ } @SuppressWarnings("deprecation") + @Override public RegionFilterBuilder allowAll(String namespace) { if (namespace == null) throw new IllegalArgumentException("The namespace must not be null."); //$NON-NLS-1$ @@ -79,6 +81,7 @@ return this; } + @Override public RegionFilter build() { synchronized (this.monitor) { return new StandardRegionFilter(policy); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionFilter.java equinox-bundles-4.12/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionFilter.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionFilter.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/StandardRegionFilter.java 2019-05-28 12:57:39.000000000 +0000 @@ -49,6 +49,7 @@ } } + @Override public boolean isAllowed(Bundle bundle) { if (bundle == null) { return false; @@ -64,6 +65,7 @@ return isBundleAllowed(attrs); } + @Override public boolean isAllowed(BundleRevision bundle) { HashMap attrs = new HashMap(4); String bsn = bundle.getSymbolicName(); @@ -112,6 +114,7 @@ return matchAll(VISIBLE_OSGI_SERVICE_NAMESPACE, service); } + @Override public boolean isAllowed(BundleCapability capability) { return isAllowed(capability.getNamespace(), capability.getAttributes()); } @@ -179,6 +182,7 @@ }); } + @Override public Map> getSharingPolicy() { Map> result = new HashMap>((int) ((filters.size() / 0.75) + 1)); for (Map.Entry> namespace : filters.entrySet()) { @@ -195,6 +199,7 @@ return result; } + @Override public String toString() { return getSharingPolicy().toString(); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.region.tests/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.region.tests/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.region.tests/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.region.tests/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/BundleInstaller.java equinox-bundles-4.12/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/BundleInstaller.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/BundleInstaller.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/BundleInstaller.java 2019-05-28 12:57:39.000000000 +0000 @@ -68,6 +68,7 @@ return getBundleLocation0(name); try { return AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override public String run() throws Exception { return getBundleLocation0(name); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/system/Bug346127Test.java equinox-bundles-4.12/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/system/Bug346127Test.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/system/Bug346127Test.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/system/Bug346127Test.java 2019-05-28 12:57:39.000000000 +0000 @@ -52,6 +52,7 @@ } @Before + @Override public void setUp() throws Exception { super.setUp(); Hashtable properties = new Hashtable(); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.registry/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.registry/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.registry/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.registry/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.equinox.registry;singleton:=true -Bundle-Version: 3.8.300.qualifier +Bundle-Version: 3.8.400.qualifier Bundle-Localization: plugin Export-Package: org.eclipse.core.internal.adapter;x-internal:=true, org.eclipse.core.internal.registry;x-friends:="org.eclipse.core.runtime", diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.registry/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.registry/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.registry/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.registry/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.registry - 3.8.300-SNAPSHOT + 3.8.400-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java equinox-bundles-4.12/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java 2019-05-28 12:57:39.000000000 +0000 @@ -1099,13 +1099,7 @@ if (status == IStatus.ERROR || status == IStatus.CANCEL) return false; } - } catch (ParserConfigurationException e) { - logError(ownerName, contributionName, e); - return false; - } catch (SAXException e) { - logError(ownerName, contributionName, e); - return false; - } catch (IOException e) { + } catch (ParserConfigurationException | SAXException | IOException e) { logError(ownerName, contributionName, e); return false; } finally { diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EquinoxRegistryStrategy.java equinox-bundles-4.12/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EquinoxRegistryStrategy.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EquinoxRegistryStrategy.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EquinoxRegistryStrategy.java 2019-05-28 12:57:39.000000000 +0000 @@ -93,10 +93,10 @@ try { new ExtensionEventDispatcherJob(listeners, deltas, registry).schedule(); return; // all done - most typical use case - } catch (NoClassDefFoundError e) { - useJobs = false; // Jobs are missing - } catch (IllegalStateException e) { - useJobs = false; // Jobs bundles was stopped + } catch (NoClassDefFoundError | IllegalStateException e) { + useJobs = false; + // Jobs are missing or + // Jobs bundles was stopped } } super.scheduleChangeEvent(listeners, deltas, registry); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryStrategyOSGI.java equinox-bundles-4.12/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryStrategyOSGI.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryStrategyOSGI.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryStrategyOSGI.java 2019-05-28 12:57:39.000000000 +0000 @@ -194,20 +194,16 @@ Class classInstance = null; try { classInstance = contributingBundle.loadClass(className); - } catch (Exception e1) { + } catch (Exception | LinkageError e1) { throwException(NLS.bind(RegistryMessages.plugin_loadClassError, contributingBundle.getSymbolicName(), className), e1); - } catch (LinkageError e) { - throwException(NLS.bind(RegistryMessages.plugin_loadClassError, contributingBundle.getSymbolicName(), className), e); } // create a new instance Object result = null; try { result = classInstance.getDeclaredConstructor().newInstance(); - } catch (Exception e) { + } catch (Exception | LinkageError e) { throwException(NLS.bind(RegistryMessages.plugin_instantiateClassError, contributingBundle.getSymbolicName(), className), e); - } catch (LinkageError e1) { - throwException(NLS.bind(RegistryMessages.plugin_instantiateClassError, contributingBundle.getSymbolicName(), className), e1); } return result; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.security/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.equinox.security;singleton:=true -Bundle-Version: 1.3.100.qualifier +Bundle-Version: 1.3.200.qualifier Bundle-Vendor: %providerName Bundle-Localization: plugin Bundle-Activator: org.eclipse.equinox.internal.security.auth.AuthPlugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.security/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,12 +14,12 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.security - 1.3.100-SNAPSHOT + 1.3.200-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/JavaEncryption.java equinox-bundles-4.12/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/JavaEncryption.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/JavaEncryption.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/JavaEncryption.java 2019-05-28 12:57:39.000000000 +0000 @@ -149,25 +149,10 @@ byte[] result = c.doFinal(clearText); return new CryptoData(passwordExt.getModuleID(), salt, result, iv); - } catch (InvalidKeyException e) { + } catch (InvalidKeyException | InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException e) { handle(e, StorageException.ENCRYPTION_ERROR); return null; - } catch (InvalidAlgorithmParameterException e) { - handle(e, StorageException.ENCRYPTION_ERROR); - return null; - } catch (IllegalBlockSizeException e) { - handle(e, StorageException.ENCRYPTION_ERROR); - return null; - } catch (BadPaddingException e) { - handle(e, StorageException.ENCRYPTION_ERROR); - return null; - } catch (InvalidKeySpecException e) { - handle(e, StorageException.INTERNAL_ERROR); - return null; - } catch (NoSuchPaddingException e) { - handle(e, StorageException.INTERNAL_ERROR); - return null; - } catch (NoSuchAlgorithmException e) { + } catch (InvalidKeySpecException | NoSuchPaddingException | NoSuchAlgorithmException e) { handle(e, StorageException.INTERNAL_ERROR); return null; } @@ -200,19 +185,7 @@ byte[] result = c.doFinal(encryptedData.getData()); return result; - } catch (InvalidAlgorithmParameterException e) { - handle(e, StorageException.INTERNAL_ERROR); - return null; - } catch (InvalidKeyException e) { - handle(e, StorageException.INTERNAL_ERROR); - return null; - } catch (InvalidKeySpecException e) { - handle(e, StorageException.INTERNAL_ERROR); - return null; - } catch (NoSuchPaddingException e) { - handle(e, StorageException.INTERNAL_ERROR); - return null; - } catch (NoSuchAlgorithmException e) { + } catch (InvalidAlgorithmParameterException | InvalidKeyException | InvalidKeySpecException | NoSuchPaddingException | NoSuchAlgorithmException e) { handle(e, StorageException.INTERNAL_ERROR); return null; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/PasswordManagement.java equinox-bundles-4.12/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/PasswordManagement.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/PasswordManagement.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/PasswordManagement.java 2019-05-28 12:57:39.000000000 +0000 @@ -131,13 +131,7 @@ CryptoData encryptedData = new CryptoData(node.internalGet(PASSWORD_RECOVERY_KEY)); byte[] data = root.getCipher().decrypt(internalPasswordExt, encryptedData); return StorageUtils.getString(data); - } catch (IllegalStateException e) { - return null; - } catch (IllegalBlockSizeException e) { - return null; - } catch (BadPaddingException e) { - return null; - } catch (StorageException e) { + } catch (IllegalStateException | IllegalBlockSizeException | BadPaddingException | StorageException e) { return null; } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferences.java equinox-bundles-4.12/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferences.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferences.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferences.java 2019-05-28 12:57:39.000000000 +0000 @@ -271,9 +271,7 @@ try { byte[] clearText = getRoot().getCipher().decrypt(passwordExt, data); return StorageUtils.getString(clearText); - } catch (IllegalBlockSizeException e) { // invalid password? - throw new StorageException(StorageException.DECRYPTION_ERROR, e); - } catch (BadPaddingException e) { // invalid password? + } catch (IllegalBlockSizeException | BadPaddingException e) { // invalid password? throw new StorageException(StorageException.DECRYPTION_ERROR, e); } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java equinox-bundles-4.12/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java 2019-05-28 12:57:39.000000000 +0000 @@ -286,10 +286,7 @@ validPassword = true; break; } - } catch (IllegalBlockSizeException e) { - if (!moduleExt.changePassword(e, container)) - break; - } catch (BadPaddingException e) { + } catch (IllegalBlockSizeException | BadPaddingException e) { if (!moduleExt.changePassword(e, container)) break; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/security/auth/ILoginContext.java equinox-bundles-4.12/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/security/auth/ILoginContext.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/security/auth/ILoginContext.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/security/auth/ILoginContext.java 2019-05-28 12:57:39.000000000 +0000 @@ -31,14 +31,14 @@ /** * Call this method to perform a login. * @see LoginContext#login() - * @throws LoginException + * @throws LoginException if the authentication fails. */ public void login() throws LoginException; /** * Call this method to perform a logout. * @see LoginContext#logout() - * @throws LoginException + * @throws LoginException if the logout fails. */ public void logout() throws LoginException; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security.linux.x86_64/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.security.linux.x86_64/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security.linux.x86_64/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security.linux.x86_64/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security.macosx/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.security.macosx/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security.macosx/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security.macosx/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security.tests/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.security.tests/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security.tests/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security.tests/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ tests-pom org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../tests-pom/ org.eclipse.equinox Binary files /tmp/tmpwFWqLe/9aC8SRElzZ/equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/icons/titleAreaCert.gif and /tmp/tmpwFWqLe/vGOTSnratB/equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/icons/titleAreaCert.gif differ diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.equinox.security.ui;singleton:=true -Bundle-Version: 1.2.200.qualifier +Bundle-Version: 1.2.300.qualifier Bundle-Vendor: %providerName Bundle-Localization: plugin Import-Package: javax.crypto.spec, diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -15,13 +15,13 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.security.ui - 1.2.200-SNAPSHOT + 1.2.300-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/provisional/security/ui/X509CertificateViewDialog.java equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/provisional/security/ui/X509CertificateViewDialog.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/provisional/security/ui/X509CertificateViewDialog.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/provisional/security/ui/X509CertificateViewDialog.java 2019-05-28 12:57:39.000000000 +0000 @@ -17,7 +17,6 @@ import java.security.cert.X509Certificate; import java.text.DateFormat; -import org.eclipse.equinox.internal.security.ui.Activator; import org.eclipse.equinox.internal.security.ui.SecurityUIMsg; import org.eclipse.equinox.internal.security.ui.wizard.CertificateViewer; import org.eclipse.jface.dialogs.IDialogConstants; @@ -25,19 +24,16 @@ import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class X509CertificateViewDialog extends TitleAreaDialog { - private final static String titleImageName = "/titleAreaCert.gif"; //$NON-NLS-1$ private X509Certificate theCert; private static final DateFormat _df = DateFormat.getDateInstance(DateFormat.LONG); private X500PrincipalHelper nameHelper = new X500PrincipalHelper(); // We use the "bannerFont" for our bold font private static Font boldFont = JFaceResources.getBannerFont(); - private Image titleImage; public X509CertificateViewDialog(Shell parentShell, X509Certificate cert) { super(parentShell); @@ -59,11 +55,6 @@ setTitle((nameHelper.getCN() != null ? nameHelper.getCN() : nameHelper.getOU())); - titleImage = Activator.getImageDescriptor(titleImageName).createImage(); - - if (titleImage != null) - setTitleImage(titleImage); - Composite composite = (Composite) super.createDialogArea(parent); TabFolder tabFolder = new TabFolder(composite, SWT.BORDER); @@ -218,11 +209,4 @@ } - public boolean close() { - if (titleImage != null) { - titleImage.dispose(); - } - return super.close(); - } - } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/DefaultAuthorizationManager.java equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/DefaultAuthorizationManager.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/DefaultAuthorizationManager.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/DefaultAuthorizationManager.java 2019-05-28 12:57:39.000000000 +0000 @@ -33,19 +33,23 @@ currentStatus = enabled ? Activator.getAuthorizationEngine().getStatus() : IStatus.OK; } + @Override public boolean isEnabled() { return true; } + @Override public boolean needsAttention() { return needsAttention; //TODO: make it happen } + @Override public IStatus getStatus() { currentStatus = enabled ? Activator.getAuthorizationEngine().getStatus() : IStatus.OK; return transformStatus(currentStatus); } + @Override public void displayManager(IWorkbenchWindow workbenchWindow) { //TODO: manager UI } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/SecurityStatusControl.java equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/SecurityStatusControl.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/SecurityStatusControl.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/SecurityStatusControl.java 2019-05-28 12:57:39.000000000 +0000 @@ -182,6 +182,7 @@ return status; } + @Override public boolean equals(Object another) { boolean returnValue = false; if (another instanceof IconState) { @@ -196,6 +197,7 @@ return returnValue; } + @Override public int hashCode() { return Boolean.valueOf(enabled).hashCode() + status.hashCode() + Boolean.valueOf(needsAttention).hashCode(); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/TabContents.java equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/TabContents.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/TabContents.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/TabContents.java 2019-05-28 12:57:39.000000000 +0000 @@ -39,6 +39,7 @@ protected ValuesView valuesView = null; protected Button buttonSave = null; + @Override public void setSelection(ISecurePreferences selectedNode) { valuesView.setInput(selectedNode); } @@ -125,6 +126,7 @@ validateSave(); } + @Override public void modified() { validateSave(); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security.win32.x86/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.security.win32.x86/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security.win32.x86/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security.win32.x86/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.security.win32.x86_64/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.security.win32.x86_64/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.security.win32.x86_64/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.security.win32.x86_64/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.servletbridge/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.servletbridge/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.servletbridge/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.servletbridge/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -3,7 +3,7 @@ Bundle-Name: %bundleName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.equinox.servletbridge;singleton:=true -Bundle-Version: 1.4.200.qualifier +Bundle-Version: 1.5.0.qualifier Bundle-Localization: plugin Import-Package: javax.servlet;version="2.3.0", javax.servlet.http;version="2.3.0" diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.servletbridge/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.servletbridge/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.servletbridge/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.servletbridge/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.servletbridge - 1.4.200-SNAPSHOT + 1.5.0-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java equinox-bundles-4.12/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java 2019-05-28 12:57:39.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2018 Cognos Incorporated, IBM Corporation and others. + * Copyright (c) 2005, 2019 Cognos Incorporated, IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -7,7 +7,7 @@ * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 - * + * * Contributors: * Cognos Incorporated - initial API and implementation * IBM Corporation - bug fixes and enhancements @@ -34,10 +34,10 @@ * 4) stop * 5) undeploy * 6) destroy - * an instance of the OSGi framework. + * an instance of the OSGi framework. * These 6 methods are provided to help manage the life-cycle and are called from outside this * class by the BridgeServlet. To create an extended FrameworkLauncher over-ride these methods to allow - * custom behavior. + * custom behavior. */ public class FrameworkLauncher { @@ -112,7 +112,7 @@ }; static { - // We do this to ensure the anonymous Enumeration class in allPermissions is pre-loaded + // We do this to ensure the anonymous Enumeration class in allPermissions is pre-loaded if (allPermissions.elements() == null) throw new IllegalStateException(); } @@ -273,12 +273,18 @@ // We know spec version 3.0 corresponds to package version 2.6 // we are guessing future 3.x spec versions will increment package versions minor, so ... String servletVersion = (context.getMajorVersion() - 1) + "." + (context.getMinorVersion() + 6); //$NON-NLS-1$ + String specVersion = context.getMajorVersion() + "." + context.getMinorVersion(); //$NON-NLS-1$ packageExports = "org.eclipse.equinox.servletbridge; version=1.1" + //$NON-NLS-1$ ", javax.servlet; version=" + servletVersion + //$NON-NLS-1$ + ", javax.servlet; version=" + specVersion + //$NON-NLS-1$ ", javax.servlet.annotation; version=" + servletVersion + //$NON-NLS-1$ + ", javax.servlet.annotation; version=" + specVersion + //$NON-NLS-1$ ", javax.servlet.descriptor; version=" + servletVersion + //$NON-NLS-1$ + ", javax.servlet.descriptor; version=" + specVersion + //$NON-NLS-1$ ", javax.servlet.http; version=" + servletVersion + //$NON-NLS-1$ - ", javax.servlet.resources; version=" + servletVersion; //$NON-NLS-1$ + ", javax.servlet.http; version=" + specVersion + //$NON-NLS-1$ + ", javax.servlet.resources; version=" + servletVersion + //$NON-NLS-1$ + ", javax.servlet.resources; version=" + specVersion; //$NON-NLS-1$ } else { // We know spec version 2.x directly correspond to package versions String servletVersion = context.getMajorVersion() + "." + context.getMinorVersion(); //$NON-NLS-1$ @@ -343,7 +349,7 @@ } /** undeploy is the reverse operation of deploy and removes the OSGi framework libraries from their - * execution location. Typically this method will only be called if a manual undeploy is requested in the + * execution location. Typically this method will only be called if a manual undeploy is requested in the * ServletBridge. * By default, this method removes the OSGi install and also removes the workspace. */ @@ -370,7 +376,7 @@ /** start is used to "start" a previously deployed OSGi framework * The default behavior will read launcher.ini to create a set of initial properties and * use the "commandline" configuration parameter to create the equivalent command line arguments - * available when starting Eclipse. + * available when starting Eclipse. */ public synchronized void start() { if (platformDirectory == null) @@ -684,7 +690,7 @@ } /** - * buildCommandLineArguments parses the commandline config parameter into a set of arguments + * buildCommandLineArguments parses the commandline config parameter into a set of arguments * @return an array of String containing the commandline arguments */ protected String[] buildCommandLineArguments() { @@ -696,9 +702,9 @@ while (tokenizer.hasMoreTokens()) { String arg = tokenizer.nextToken(); if (arg.startsWith("\"")) { //$NON-NLS-1$ - if (arg.endsWith("\"")) { //$NON-NLS-1$ + if (arg.endsWith("\"")) { //$NON-NLS-1$ if (arg.length() >= 2) { - // strip the beginning and ending quotes + // strip the beginning and ending quotes arg = arg.substring(1, arg.length() - 1); } } else { @@ -708,9 +714,9 @@ tokenizer.nextToken(WS_DELIM); } } else if (arg.startsWith("'")) { //$NON-NLS-1$ - if (arg.endsWith("'")) { //$NON-NLS-1$ + if (arg.endsWith("'")) { //$NON-NLS-1$ if (arg.length() >= 2) { - // strip the beginning and ending quotes + // strip the beginning and ending quotes arg = arg.substring(1, arg.length() - 1); } } else { @@ -758,7 +764,7 @@ Thread.currentThread().setContextClassLoader(frameworkContextClassLoader); method.invoke(clazz); - // ACL keys its loggers off of the ContextClassLoader which prevents GC without calling release. + // ACL keys its loggers off of the ContextClassLoader which prevents GC without calling release. // This section explicitly calls release if ACL is used. try { clazz = this.getClass().getClassLoader().loadClass("org.apache.commons.logging.LogFactory"); //$NON-NLS-1$ @@ -901,10 +907,10 @@ /** * Searches for the given target directory starting in the "plugins" subdirectory - * of the given location. If one is found then this location is returned; + * of the given location. If one is found then this location is returned; * otherwise an exception is thrown. - * @param target - * + * @param target + * * @return the location where target directory was found * @param start the location to begin searching */ @@ -952,9 +958,9 @@ } /** - * Compares version strings. - * @param left - * @param right + * Compares version strings. + * @param left + * @param right * @return result of comparison, as integer; * <0 if left < right; * 0 if left == right; @@ -981,7 +987,7 @@ * Do a quick parse of version identifier so its elements can be correctly compared. * If we are unable to parse the full version, remaining elements are initialized * with suitable defaults. - * @param version + * @param version * @return an array of size 4; first three elements are of type Integer (representing * major, minor and service) and the fourth element is of type String (representing * qualifier). Note, that returning anything else will cause exceptions in the caller. diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.servletbridge.extensionbundle/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.servletbridge.extensionbundle/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.servletbridge.extensionbundle/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.servletbridge.extensionbundle/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.servletbridge.template/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.servletbridge.template/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.servletbridge.template/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.servletbridge.template/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.slf4j.stub/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.slf4j.stub/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.slf4j.stub/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.slf4j.stub/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.hook/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.hook/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.hook/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.hook/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -3,7 +3,7 @@ Bundle-Name: %bundleName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.equinox.transforms.hook -Bundle-Version: 1.2.300.qualifier +Bundle-Version: 1.2.400.qualifier Fragment-Host: org.eclipse.osgi;bundle-version="[3.10.0,4.0.0)" Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-Localization: transformsHook diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.hook/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.hook/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.hook/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.hook/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.transforms.hook - 1.2.300-SNAPSHOT + 1.2.400-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/LazyInputStream.java equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/LazyInputStream.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/LazyInputStream.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/LazyInputStream.java 2019-05-28 12:57:39.000000000 +0000 @@ -42,16 +42,19 @@ original = provider.getInputStream(); } + @Override public int available() throws IOException { initOriginal(); return original.available(); } + @Override public void close() throws IOException { initOriginal(); original.close(); } + @Override public boolean equals(Object obj) { try { initOriginal(); @@ -61,6 +64,7 @@ } } + @Override public int hashCode() { try { initOriginal(); @@ -70,6 +74,7 @@ } } + @Override public void mark(int readlimit) { try { initOriginal(); @@ -79,6 +84,7 @@ } } + @Override public boolean markSupported() { try { initOriginal(); @@ -88,31 +94,37 @@ } } + @Override public int read() throws IOException { initOriginal(); return original.read(); } + @Override public int read(byte[] b, int off, int len) throws IOException { initOriginal(); return original.read(b, off, len); } + @Override public int read(byte[] b) throws IOException { initOriginal(); return original.read(b); } + @Override public void reset() throws IOException { initOriginal(); original.reset(); } + @Override public long skip(long n) throws IOException { initOriginal(); return original.skip(n); } + @Override public String toString() { try { initOriginal(); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/ProxyStreamTransformer.java equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/ProxyStreamTransformer.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/ProxyStreamTransformer.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/ProxyStreamTransformer.java 2019-05-28 12:57:39.000000000 +0000 @@ -44,12 +44,11 @@ } + @Override public InputStream getInputStream(InputStream inputStream, URL transformerUrl) throws IOException { try { return (InputStream) method.invoke(object, new Object[] {inputStream, transformerUrl}); - } catch (IllegalArgumentException e) { - throw new IOException(e.getMessage()); - } catch (IllegalAccessException e) { + } catch (IllegalArgumentException | IllegalAccessException e) { throw new IOException(e.getMessage()); } catch (InvocationTargetException e) { if (e.getCause() instanceof IOException) diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformedBundleFile.java equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformedBundleFile.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformedBundleFile.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformedBundleFile.java 2019-05-28 12:57:39.000000000 +0000 @@ -69,6 +69,7 @@ LazyInputStream stream = new LazyInputStream(new InputStreamProvider() { + @Override public InputStream getInputStream() throws IOException { return original.getInputStream(); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformerList.java equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformerList.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformerList.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformerList.java 2019-05-28 12:57:39.000000000 +0000 @@ -93,9 +93,7 @@ try { transformer = new ProxyStreamTransformer(object); transformers.put(type, transformer); - } catch (SecurityException e) { - logServices.log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, "Problem creating transformer", e); //$NON-NLS-1$ - } catch (NoSuchMethodException e) { + } catch (SecurityException | NoSuchMethodException e) { logServices.log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, "Problem creating transformer", e); //$NON-NLS-1$ } } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/.classpath equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/.classpath --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/.classpath 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/.classpath 2019-05-28 12:57:39.000000000 +0000 @@ -1,7 +1,7 @@ - - + + diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -3,8 +3,8 @@ Bundle-Name: %bundleName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.equinox.transforms.xslt -Bundle-Version: 1.0.500.qualifier -Bundle-RequiredExecutionEnvironment: J2SE-1.4 +Bundle-Version: 1.1.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Import-Package: org.eclipse.osgi.framework.log;version="1.0.0", org.osgi.framework;version="1.3.0", org.osgi.util.tracker;version="1.0" diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.transforms.xslt - 1.0.500-SNAPSHOT + 1.1.0-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/.settings/org.eclipse.jdt.core.prefs equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/.settings/org.eclipse.jdt.core.prefs --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/.settings/org.eclipse.jdt.core.prefs 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/.settings/org.eclipse.jdt.core.prefs 2019-05-28 12:57:39.000000000 +0000 @@ -1,347 +1,371 @@ -#Tue Oct 21 14:30:52 EDT 2008 -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +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 +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000 +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled org.eclipse.jdt.core.compiler.problem.fieldHiding=warning -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +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.nullReference=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.classpath.exclusionPatterns=enabled -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.formatter.comment.format_header=false -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.comment.line_length=80 -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedImport=error +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +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_additive_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.incompleteClasspath=error -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false org.eclipse.jdt.core.formatter.comment.format_block_comments=false -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert +org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=error -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +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=true +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_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=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 +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.circularClasspath=error -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning -org.eclipse.jdt.core.formatter.tabulation.char=tab -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.compiler.problem.discouragedReference=error -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.comment.format_line_comments=false -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.comment.indent_root_tags=false -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.compiler.problem.unusedImport=error -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.builder.invalidClasspath=abort -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.incompatibleJDKLevel=ignore -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false org.eclipse.jdt.core.formatter.lineSplit=800 -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled -org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000 -org.eclipse.jdt.core.compiler.source=1.3 -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.tabulation.char=tab org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.builder.duplicateResourceTask=warning -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.compiler.doc.comment.support=enabled -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.compiler.compliance=1.4 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/Pipe.java equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/Pipe.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/Pipe.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/Pipe.java 2019-05-28 12:57:39.000000000 +0000 @@ -55,6 +55,7 @@ if (!started) { started = true; Thread pipeThread = new Thread(new Runnable() { + @Override public void run() { try { pipeInput(input, pipedOutputStream); @@ -71,27 +72,32 @@ } } + @Override public synchronized int available() throws IOException { start(); return super.available(); } + @Override public synchronized int read() throws IOException { start(); int c = super.read(); return c; } + @Override public int read(byte[] b) throws IOException { start(); return super.read(b); } + @Override public synchronized int read(byte[] b, int off, int len) throws IOException { start(); return super.read(b, off, len); } + @Override public synchronized void reset() throws IOException { started = false; failure = null; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/xslt/Activator.java equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/xslt/Activator.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/xslt/Activator.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/xslt/Activator.java 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,8 @@ package org.eclipse.equinox.internal.transforms.xslt; -import java.util.Properties; +import java.util.Dictionary; +import java.util.Hashtable; import org.eclipse.osgi.framework.log.FrameworkLog; import org.osgi.framework.*; import org.osgi.util.tracker.ServiceTracker; @@ -24,18 +25,18 @@ */ public class Activator implements BundleActivator { - private ServiceRegistration registration; - private ServiceTracker logTracker; + private ServiceRegistration registration; + private ServiceTracker logTracker; public void start(BundleContext context) throws Exception { - logTracker = new ServiceTracker(context, FrameworkLog.class.getName(), null); + logTracker = new ServiceTracker<>(context, FrameworkLog.class, null); logTracker.open(); - Properties properties = new Properties(); + Dictionary properties = new Hashtable<>(); properties.put("equinox.transformerType", "xslt"); //$NON-NLS-1$ //$NON-NLS-2$ Object transformer = new XSLTStreamTransformer(logTracker); - registration = context.registerService(Object.class.getName(), transformer, properties); + registration = context.registerService(Object.class, transformer, properties); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/xslt/XSLTStreamTransformer.java equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/xslt/XSLTStreamTransformer.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/xslt/XSLTStreamTransformer.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/xslt/XSLTStreamTransformer.java 2019-05-28 12:57:39.000000000 +0000 @@ -48,6 +48,7 @@ this.transformer = transformer; } + @Override protected void pipeInput(InputStream original, OutputStream result) throws IOException { try { InputSource streamSource = new InputSource(original); @@ -74,6 +75,7 @@ * The dummy entity resolver which returns empty content for all external entity requests. */ protected EntityResolver resolver = new EntityResolver() { + @Override public InputSource resolveEntity(String publicId, String systemId) { // don't validate external entities - too expensive return new InputSource(new StringReader("")); //$NON-NLS-1$ @@ -83,21 +85,21 @@ /** * Tracks the logging service. */ - private ServiceTracker logTracker; + private ServiceTracker logTracker; /** * A map containing compiled XSLT transformations. * These transforms are held by soft references so that we don't bloat memory for this purpose. * After startup these transforms are of little use. */ - private static final Map templateMap = new HashMap(); + private static final Map> templateMap = new HashMap<>(); /** * Create a new instance of this transformer. * * @param logTracker the log service */ - public XSLTStreamTransformer(ServiceTracker logTracker) { + public XSLTStreamTransformer(ServiceTracker logTracker) { this.logTracker = logTracker; } @@ -134,9 +136,9 @@ private synchronized Templates getTemplate(URL transformerURL) { Templates templates = null; - SoftReference templatesRef = (SoftReference) templateMap.get(transformerURL); + SoftReference templatesRef = templateMap.get(transformerURL); if (templatesRef != null) { - templates = (Templates) templatesRef.get(); + templates = templatesRef.get(); } if (templates != null) @@ -158,7 +160,7 @@ SAXSource xsltSource = new SAXSource(reader, inputSource); try { - templatesRef = new SoftReference(templates = tFactory.newTemplates(xsltSource)); + templatesRef = new SoftReference<>(templates = tFactory.newTemplates(xsltSource)); templateMap.put(transformerURL, templatesRef); } catch (Exception e) { // can't create the template. May be an IO @@ -184,7 +186,7 @@ } void log(int severity, String msg, Throwable t) { - FrameworkLog log = (FrameworkLog) logTracker.getService(); + FrameworkLog log = logTracker.getService(); if (log == null) { if (msg != null) System.err.println(msg); diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.useradmin/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.useradmin/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.useradmin/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.useradmin/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.util/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.util/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.util/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.util/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.caching/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.caching/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.caching/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.caching/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.equinox.weaving.caching -Bundle-Version: 1.1.200.qualifier +Bundle-Version: 1.1.300.qualifier Bundle-Name: Standard Caching Service for Equinox Aspects Bundle-Vendor: Eclipse.org - Equinox Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.caching/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.caching/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.caching/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.caching/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,12 +14,12 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.weaving.caching - 1.1.200-SNAPSHOT + 1.1.300-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Activator.java equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Activator.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Activator.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Activator.java 2019-05-28 12:57:39.000000000 +0000 @@ -117,12 +117,7 @@ enabled = false; } } - } catch (final ClassNotFoundException ex) { - } catch (final SecurityException e) { - } catch (final NoSuchMethodException e) { - } catch (final IllegalArgumentException e) { - } catch (final IllegalAccessException e) { - } catch (final InvocationTargetException e) { + } catch (final ClassNotFoundException | SecurityException | NoSuchMethodException | IllegalArgumentException | IllegalAccessException | InvocationTargetException ex) { } return enabled; diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CacheWriter.java equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CacheWriter.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CacheWriter.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CacheWriter.java 2019-05-28 12:57:39.000000000 +0000 @@ -44,6 +44,7 @@ public CacheWriter(final BlockingQueue cacheQueue) { this.writerThread = new Thread(new Runnable() { + @Override public void run() { try { while (true) { diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.caching.j9/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.caching.j9/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.caching.j9/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.caching.j9/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.hook/META-INF/MANIFEST.MF equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.hook/META-INF/MANIFEST.MF --- equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.hook/META-INF/MANIFEST.MF 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.hook/META-INF/MANIFEST.MF 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Aspect Weaving Hooks Plug-in Bundle-SymbolicName: org.eclipse.equinox.weaving.hook -Bundle-Version: 1.2.200.qualifier +Bundle-Version: 1.2.300.qualifier Fragment-Host: org.eclipse.osgi;bundle-version="[3.10.0,4.0.0)" Bundle-Vendor: Eclipse.org - Equinox Export-Package: org.eclipse.equinox.service.weaving, diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.hook/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.hook/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.hook/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.hook/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -5,7 +5,7 @@ are made available under the terms of the Eclipse Distribution License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/org/documents/edl-v10.php - + Contributors: Igor Fedorenko - initial implementation --> @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox org.eclipse.equinox.weaving.hook - 1.2.200-SNAPSHOT + 1.2.300-SNAPSHOT eclipse-plugin diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementerRegistry.java equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementerRegistry.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementerRegistry.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementerRegistry.java 2019-05-28 12:57:39.000000000 +0000 @@ -119,6 +119,7 @@ /** * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#addBundle(org.osgi.framework.Bundle) */ + @Override public void addBundle(final Bundle bundle) { // First analyze which supplementers already exists for this bundle addSupplementedBundle(bundle); @@ -130,6 +131,7 @@ /** * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#addSupplementedBundle(org.osgi.framework.Bundle) */ + @Override public void addSupplementedBundle(final Bundle bundle) { try { final Dictionary manifest = bundle.getHeaders(""); //$NON-NLS-1$ @@ -164,6 +166,7 @@ * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#addSupplementer(org.osgi.framework.Bundle, * boolean) */ + @Override public void addSupplementer(final Bundle bundle, final boolean updateBundles) { try { final Dictionary manifest = bundle.getHeaders(""); //$NON-NLS-1$ @@ -203,6 +206,7 @@ * org.eclipse.osgi.util.ManifestElement[], * org.eclipse.osgi.util.ManifestElement[]) */ + @Override public List getMatchingSupplementers( final String symbolicName, final ManifestElement[] imports, final ManifestElement[] exports) { @@ -227,6 +231,7 @@ /** * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#getPackageAdmin() */ + @Override public PackageAdmin getPackageAdmin() { return packageAdmin; } @@ -234,6 +239,7 @@ /** * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#getSupplementers(org.osgi.framework.Bundle) */ + @Override public Supplementer[] getSupplementers(final Bundle bundle) { return getSupplementers(bundle.getBundleId()); } @@ -241,6 +247,7 @@ /** * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#getSupplementers(long) */ + @Override public Supplementer[] getSupplementers(final long bundleID) { if (supplementersByBundle.containsKey(bundleID)) { return supplementersByBundle.get(bundleID); @@ -270,6 +277,7 @@ * * @param bundles The bundles to refresh */ + @Override public void refreshBundles(final Bundle[] bundles) { // if (this.packageAdmin != null) { // if (AbstractWeavingHook.verbose) { @@ -286,6 +294,7 @@ /** * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#removeBundle(org.osgi.framework.Bundle) */ + @Override public void removeBundle(final Bundle bundle) { // if this bundle is itself supplemented by others, remove the bundle from those lists removeSupplementedBundle(bundle); @@ -416,6 +425,7 @@ /** * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#setBundleContext(org.osgi.framework.BundleContext) */ + @Override public void setBundleContext(final BundleContext context) { this.context = context; } @@ -423,6 +433,7 @@ /** * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#setPackageAdmin(org.osgi.service.packageadmin.PackageAdmin) */ + @Override public void setPackageAdmin(final PackageAdmin packageAdmin) { this.packageAdmin = packageAdmin; } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java --- equinox-bundles-4.11/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java 2019-05-28 12:57:39.000000000 +0000 @@ -96,10 +96,12 @@ return adaptor; } + @Override public IWeavingAdaptor getAdaptor(final long bundleID) { return this.adaptors.get(bundleID); } + @Override public IWeavingAdaptor getHostBundleAdaptor(final long bundleID) { final Bundle bundle = this.bundleContext.getBundle(bundleID); if (bundle != null) { @@ -197,6 +199,7 @@ } } + @Override public void resetAdaptor(final long bundleID) { this.adaptors.remove(bundleID); } diff -Nru equinox-bundles-4.11/bundles/org.eclipse.equinox.wireadmin/pom.xml equinox-bundles-4.12/bundles/org.eclipse.equinox.wireadmin/pom.xml --- equinox-bundles-4.11/bundles/org.eclipse.equinox.wireadmin/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/bundles/org.eclipse.equinox.wireadmin/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox diff -Nru equinox-bundles-4.11/debian/changelog equinox-bundles-4.12/debian/changelog --- equinox-bundles-4.11/debian/changelog 2019-07-11 11:46:59.000000000 +0000 +++ equinox-bundles-4.12/debian/changelog 2019-07-17 09:37:15.000000000 +0000 @@ -1,3 +1,10 @@ +equinox-bundles (4.12-1) unstable; urgency=medium + + * New upstream release + - Refreshed the patch + + -- Emmanuel Bourg Wed, 17 Jul 2019 11:37:15 +0200 + equinox-bundles (4.11-1) unstable; urgency=medium * New upstream release diff -Nru equinox-bundles-4.11/debian/patches/osgi-compatibility.patch equinox-bundles-4.12/debian/patches/osgi-compatibility.patch --- equinox-bundles-4.11/debian/patches/osgi-compatibility.patch 2019-07-10 08:00:55.000000000 +0000 +++ equinox-bundles-4.12/debian/patches/osgi-compatibility.patch 2019-07-17 09:34:20.000000000 +0000 @@ -1,17 +1,6 @@ Description: Fixes the compatibility with the version of the OSGi specification in Debian Author: Emmanuel Bourg Forwarded: not-needed ---- a/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/xslt/Activator.java -+++ b/bundles/org.eclipse.equinox.transforms.xslt/src/org/eclipse/equinox/internal/transforms/xslt/Activator.java -@@ -31,7 +31,7 @@ - logTracker = new ServiceTracker(context, FrameworkLog.class.getName(), null); - logTracker.open(); - -- Properties properties = new Properties(); -+ java.util.Dictionary properties = new java.util.Hashtable(); - properties.put("equinox.transformerType", "xslt"); //$NON-NLS-1$ //$NON-NLS-2$ - - Object transformer = new XSLTStreamTransformer(logTracker); --- a/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/UtilActivator.java +++ b/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/UtilActivator.java @@ -122,7 +122,7 @@ diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.compendium.sdk/feature.xml equinox-bundles-4.12/features/org.eclipse.equinox.compendium.sdk/feature.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.compendium.sdk/feature.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.compendium.sdk/feature.xml 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.compendium.sdk/pom.xml equinox-bundles-4.12/features/org.eclipse.equinox.compendium.sdk/pom.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.compendium.sdk/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.compendium.sdk/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox.feature org.eclipse.equinox.compendium.sdk - 3.17.0-SNAPSHOT + 3.18.0-SNAPSHOT eclipse-feature diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.core.feature/feature.xml equinox-bundles-4.12/features/org.eclipse.equinox.core.feature/feature.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.core.feature/feature.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.core.feature/feature.xml 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.core.feature/pom.xml equinox-bundles-4.12/features/org.eclipse.equinox.core.feature/pom.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.core.feature/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.core.feature/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,12 +14,12 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox.feature org.eclipse.equinox.core.feature - 1.8.0-SNAPSHOT + 1.9.0-SNAPSHOT eclipse-feature diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.core.sdk/feature.xml equinox-bundles-4.12/features/org.eclipse.equinox.core.sdk/feature.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.core.sdk/feature.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.core.sdk/feature.xml 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.core.sdk/pom.xml equinox-bundles-4.12/features/org.eclipse.equinox.core.sdk/pom.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.core.sdk/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.core.sdk/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox.feature org.eclipse.equinox.core.sdk - 3.17.0-SNAPSHOT + 3.18.0-SNAPSHOT eclipse-feature diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.sdk/feature.xml equinox-bundles-4.12/features/org.eclipse.equinox.sdk/feature.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.sdk/feature.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.sdk/feature.xml 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.sdk/pom.xml equinox-bundles-4.12/features/org.eclipse.equinox.sdk/pom.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.sdk/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.sdk/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox.feature org.eclipse.equinox.sdk - 3.17.0-SNAPSHOT + 3.18.0-SNAPSHOT eclipse-feature diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.server.core/feature.xml equinox-bundles-4.12/features/org.eclipse.equinox.server.core/feature.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.server.core/feature.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.server.core/feature.xml 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.server.core/forceQualifierUpdate.txt equinox-bundles-4.12/features/org.eclipse.equinox.server.core/forceQualifierUpdate.txt --- equinox-bundles-4.11/features/org.eclipse.equinox.server.core/forceQualifierUpdate.txt 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.server.core/forceQualifierUpdate.txt 2019-05-28 12:57:39.000000000 +0000 @@ -5,3 +5,4 @@ Bug 506953 - Update prereqs for Oxygen Milestones: Orbit URL Bug 529719 - Update felix SCR to 2.0.14 Needs a touch for felix.scr qualifier update +Bug 547066 - IBuild I20190507-1800 failed due to unresolved project dependencies. \ No newline at end of file diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.server.core/pom.xml equinox-bundles-4.12/features/org.eclipse.equinox.server.core/pom.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.server.core/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.server.core/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox.feature org.eclipse.equinox.server.core - 1.9.0-SNAPSHOT + 1.10.0-SNAPSHOT eclipse-feature diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.server.jetty/feature.xml equinox-bundles-4.12/features/org.eclipse.equinox.server.jetty/feature.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.server.jetty/feature.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.server.jetty/feature.xml 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.server.jetty/forceQualifierUpdate.txt equinox-bundles-4.12/features/org.eclipse.equinox.server.jetty/forceQualifierUpdate.txt --- equinox-bundles-4.11/features/org.eclipse.equinox.server.jetty/forceQualifierUpdate.txt 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.server.jetty/forceQualifierUpdate.txt 2019-05-28 12:57:39.000000000 +0000 @@ -21,4 +21,6 @@ Build I20180920-0430 failed Bug 541072 - Update platform to Jetty 9.4.14 Bug 534964 - [http servlet] invalidation of container sessions is too aggressive -Bug 544635 - Update platform to Jetty 9.4.15 \ No newline at end of file +Bug 544635 - Update platform to Jetty 9.4.15 +Bug 546665 - Update platform to Jetty 9.4.17 to pick up security fixes +Bug 546888 - Update platform to Jetty 9.4.18 \ No newline at end of file diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.server.jetty/pom.xml equinox-bundles-4.12/features/org.eclipse.equinox.server.jetty/pom.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.server.jetty/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.server.jetty/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox.feature org.eclipse.equinox.server.jetty - 1.8.0-SNAPSHOT + 1.9.0-SNAPSHOT eclipse-feature diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.server.p2/feature.xml equinox-bundles-4.12/features/org.eclipse.equinox.server.p2/feature.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.server.p2/feature.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.server.p2/feature.xml 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ @@ -19,8 +19,7 @@ - - + diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.server.p2/pom.xml equinox-bundles-4.12/features/org.eclipse.equinox.server.p2/pom.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.server.p2/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.server.p2/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox.feature org.eclipse.equinox.server.p2 - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT eclipse-feature diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.server.servletbridge/feature.xml equinox-bundles-4.12/features/org.eclipse.equinox.server.servletbridge/feature.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.server.servletbridge/feature.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.server.servletbridge/feature.xml 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.server.servletbridge/pom.xml equinox-bundles-4.12/features/org.eclipse.equinox.server.servletbridge/pom.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.server.servletbridge/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.server.servletbridge/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox.feature org.eclipse.equinox.server.servletbridge - 1.5.0-SNAPSHOT + 1.6.0-SNAPSHOT eclipse-feature diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.serverside.sdk/feature.xml equinox-bundles-4.12/features/org.eclipse.equinox.serverside.sdk/feature.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.serverside.sdk/feature.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.serverside.sdk/feature.xml 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.serverside.sdk/pom.xml equinox-bundles-4.12/features/org.eclipse.equinox.serverside.sdk/pom.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.serverside.sdk/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.serverside.sdk/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox.feature org.eclipse.equinox.serverside.sdk - 3.17.0-SNAPSHOT + 3.18.0-SNAPSHOT eclipse-feature diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.server.simple/feature.xml equinox-bundles-4.12/features/org.eclipse.equinox.server.simple/feature.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.server.simple/feature.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.server.simple/feature.xml 2019-05-28 12:57:39.000000000 +0000 @@ -2,7 +2,7 @@ diff -Nru equinox-bundles-4.11/features/org.eclipse.equinox.server.simple/pom.xml equinox-bundles-4.12/features/org.eclipse.equinox.server.simple/pom.xml --- equinox-bundles-4.11/features/org.eclipse.equinox.server.simple/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/features/org.eclipse.equinox.server.simple/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,11 +14,11 @@ rt.equinox.bundles org.eclipse.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../../ org.eclipse.equinox.feature org.eclipse.equinox.server.simple - 1.5.0-SNAPSHOT + 1.6.0-SNAPSHOT eclipse-feature diff -Nru equinox-bundles-4.11/pom.xml equinox-bundles-4.12/pom.xml --- equinox-bundles-4.11/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -15,7 +15,7 @@ org.eclipse eclipse-platform-parent - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT ../eclipse-platform-parent diff -Nru equinox-bundles-4.11/tests-pom/pom.xml equinox-bundles-4.12/tests-pom/pom.xml --- equinox-bundles-4.11/tests-pom/pom.xml 2019-03-05 22:25:38.000000000 +0000 +++ equinox-bundles-4.12/tests-pom/pom.xml 2019-05-28 12:57:39.000000000 +0000 @@ -14,7 +14,7 @@ org.eclipse.equinox.bundles rt.equinox.bundles - 4.11.0-SNAPSHOT + 4.12.0-SNAPSHOT tests-pom pom