Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean Code for bundles/org.eclipse.osgi.compatibility.state #825

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PlatformBundleListener implements SynchronousBundleListener, FrameworkList
private final ModuleDatabase database;
private final ModuleContainer container;
private long lastResolveStamp = -1;
private AtomicBoolean gotUnresolved = new AtomicBoolean(false);
private final AtomicBoolean gotUnresolved = new AtomicBoolean(false);

PlatformBundleListener(State systemState, StateConverter converter, ModuleDatabase database, ModuleContainer container) {
this.systemState = systemState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class GroupingChecker {
// a mapping of bundles to their package roots; keyed by
// ResolverBundle -> HashMap of packages; keyed by
// package name -> PackageRoots
private Map<ResolverBundle, Map<String, PackageRoots>> bundles = new HashMap<>();
private final Map<ResolverBundle, Map<String, PackageRoots>> bundles = new HashMap<>();

/*
* This method fully populates a bundles package roots for the purpose of resolving
Expand Down Expand Up @@ -284,7 +284,7 @@ public void clear(ResolverBundle rb) {
}

class PackageRoots {
private String name;
private final String name;
private ResolverExport[] roots;

PackageRoots(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

public class PermissionChecker {
private boolean checkPermissions = false;
private ResolverImpl resolver;
private final ResolverImpl resolver;

public PermissionChecker(boolean checkPermissions, ResolverImpl resolver) {
this.checkPermissions = checkPermissions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* A companion to ExportPackageDescription from the state used while resolving.
*/
public class ResolverExport extends VersionSupplier {
private ResolverBundle resolverBundle;
private final ResolverBundle resolverBundle;

ResolverExport(ResolverBundle resolverBundle, ExportPackageDescription epd) {
super(epd);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public class ResolverImpl implements Resolver {
// Used to check permissions for import/export, provide/require, host/fragment
private final PermissionChecker permissionChecker;
// Set of bundles that are pending removal
private MappedList<Long, BundleDescription> removalPending = new MappedList<>();
private final MappedList<Long, BundleDescription> removalPending = new MappedList<>();
// Indicates whether this resolver has been initialized
private boolean initialized = false;

Expand Down
Loading