Revert unintentional code formatting
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@566108 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/DispatchTask.java b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/DispatchTask.java
index 8585c84..f740200 100644
--- a/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/DispatchTask.java
+++ b/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/tasks/DispatchTask.java
@@ -92,11 +92,11 @@
public DispatchTask(final TaskProducer producer, final Scheduler scheduler,
final HandoverTask handover)
{
- this.m_producer = producer;
+ m_producer = producer;
- this.m_scheduler = scheduler;
+ m_scheduler = scheduler;
- this.m_handover = handover;
+ m_handover = handover;
}
/*
@@ -115,24 +115,24 @@
*/
public void run()
{
- for (HandlerTask manager = this.m_producer.next(); null != manager; manager = this.m_producer
+ for (HandlerTask manager = m_producer.next(); null != manager; manager = m_producer
.next())
{
- synchronized (this.m_lock)
+ synchronized (m_lock)
{
// Set-up the timeout
- this.m_blackListTask = new BlackListTask(manager);
+ m_blackListTask = new BlackListTask(manager);
- this.m_scheduler.schedule(this.m_blackListTask);
+ m_scheduler.schedule(m_blackListTask);
}
// HandlerTask does catch exceptions hence, we don't need to do it.
manager.execute();
- synchronized (this.m_lock)
+ synchronized (m_lock)
{
// release the timeout
- this.m_blackListTask.cancel();
+ m_blackListTask.cancel();
}
}
}
@@ -143,13 +143,13 @@
*/
public void handover()
{
- synchronized (this.m_lock)
+ synchronized (m_lock)
{
// release the timeout
- this.m_blackListTask.cancel();
+ m_blackListTask.cancel();
// spin-off a new thread
- this.m_handover.execute(new DispatchTask(this));
+ m_handover.execute(new DispatchTask(this));
this.stop();
}
@@ -160,16 +160,16 @@
*/
public void stop()
{
- synchronized (this.m_lock)
+ synchronized (m_lock)
{
// release the timeout
- this.m_blackListTask.cancel();
+ m_blackListTask.cancel();
- this.m_handover = NULL_HANDOVER;
+ m_handover = NULL_HANDOVER;
- this.m_producer = NULL_PRODUCER;
+ m_producer = NULL_PRODUCER;
- this.m_scheduler = Scheduler.NULL_SCHEDULER;
+ m_scheduler = Scheduler.NULL_SCHEDULER;
}
}
@@ -179,36 +179,36 @@
*/
public void hold()
{
- synchronized (this.m_lock)
+ synchronized (m_lock)
{
// release the timeout
- this.m_blackListTask.cancel();
+ m_blackListTask.cancel();
// record the time that we already used
- int pastTime = (int) (System.currentTimeMillis() - this.m_blackListTask
+ int pastTime = (int) (System.currentTimeMillis() - m_blackListTask
.getTime());
// spin-off a new thread
- this.m_handover.execute(new DispatchTask(this));
+ m_handover.execute(new DispatchTask(this));
// block until a call to resume()
- this.m_isHolding = true;
+ m_isHolding = true;
- while (this.m_isHolding)
+ while (m_isHolding)
{
try
{
- this.m_lock.wait();
+ m_lock.wait();
} catch (InterruptedException e)
{
}
}
// restore the timeout
- this.m_blackListTask = new BlackListTask(this.m_blackListTask,
+ m_blackListTask = new BlackListTask(m_blackListTask,
System.currentTimeMillis() - pastTime);
- this.m_scheduler.schedule(this.m_blackListTask, pastTime);
+ m_scheduler.schedule(m_blackListTask, pastTime);
}
}
@@ -217,11 +217,11 @@
*/
public void resume()
{
- synchronized (this.m_lock)
+ synchronized (m_lock)
{
- this.m_isHolding = false;
+ m_isHolding = false;
- this.m_lock.notifyAll();
+ m_lock.notifyAll();
}
}
@@ -246,9 +246,9 @@
BlackListTask(final HandlerTask manager, final long time)
{
- this.m_manager = manager;
+ m_manager = manager;
- this.m_time = time;
+ m_time = time;
}
BlackListTask(final BlackListTask old, final long time)
@@ -261,7 +261,7 @@
*/
public long getTime()
{
- return this.m_time;
+ return m_time;
}
/**
@@ -274,9 +274,9 @@
{
synchronized (DispatchTask.this.m_lock)
{
- if (!this.m_canceled)
+ if (!m_canceled)
{
- this.m_manager.blackListHandler();
+ m_manager.blackListHandler();
DispatchTask.this.handover();
}
@@ -288,9 +288,9 @@
*/
public void cancel()
{
- synchronized (DispatchTask.this.m_lock)
+ synchronized (DispatchTask.m_lock)
{
- this.m_canceled = true;
+ m_canceled = true;
}
}
}
diff --git a/framework/src/main/java/org/apache/felix/framework/cache/BundleArchive.java b/framework/src/main/java/org/apache/felix/framework/cache/BundleArchive.java
index c3320df..090938e 100644
--- a/framework/src/main/java/org/apache/felix/framework/cache/BundleArchive.java
+++ b/framework/src/main/java/org/apache/felix/framework/cache/BundleArchive.java
@@ -136,21 +136,21 @@
public BundleArchive(Logger logger, File archiveRootDir, long id,
String location, InputStream is) throws Exception
{
- this.m_logger = logger;
- this.m_archiveRootDir = archiveRootDir;
- this.m_id = id;
- if (this.m_id <= 0)
+ m_logger = logger;
+ m_archiveRootDir = archiveRootDir;
+ m_id = id;
+ if (m_id <= 0)
{
throw new IllegalArgumentException(
"Bundle ID cannot be less than or equal to zero.");
}
- this.m_originalLocation = location;
+ m_originalLocation = location;
// Save state.
this.initialize();
// Add a revision for the content.
- this.revise(this.m_originalLocation, is);
+ this.revise(m_originalLocation, is);
}
/**
@@ -168,8 +168,8 @@
public BundleArchive(Logger logger, File archiveRootDir)
throws Exception
{
- this.m_logger = logger;
- this.m_archiveRootDir = archiveRootDir;
+ m_logger = logger;
+ m_archiveRootDir = archiveRootDir;
// Add a revision for each one that already exists in the file
// system. The file system might contain more than one revision
@@ -183,7 +183,7 @@
// Count the number of existing revision directories, which
// will be in a directory named like:
// "${REVISION_DIRECTORY)${refresh-count}.${revision-count}"
- File revisionRootDir = new File(this.m_archiveRootDir,
+ File revisionRootDir = new File(m_archiveRootDir,
REVISION_DIRECTORY + this.getRefreshCount() + "." + revisionCount);
if (!BundleCache.getSecureAction().fileExists(revisionRootDir))
{
@@ -201,7 +201,7 @@
// revisions since they will be purged immediately on framework startup.
if (revisionCount > 1)
{
- this.m_revisions = new BundleRevision[revisionCount - 1];
+ m_revisions = new BundleRevision[revisionCount - 1];
}
// Add the revision object for the most recent revision. We first try
@@ -220,9 +220,9 @@
**/
public synchronized long getId() throws Exception
{
- if (this.m_id > 0)
+ if (m_id > 0)
{
- return this.m_id;
+ return m_id;
}
// Read bundle location.
@@ -231,9 +231,9 @@
try
{
is = BundleCache.getSecureAction()
- .getFileInputStream(new File(this.m_archiveRootDir, BUNDLE_ID_FILE));
+ .getFileInputStream(new File(m_archiveRootDir, BUNDLE_ID_FILE));
br = new BufferedReader(new InputStreamReader(is));
- this.m_id = Long.parseLong(br.readLine());
+ m_id = Long.parseLong(br.readLine());
}
catch (FileNotFoundException ex)
{
@@ -242,8 +242,8 @@
// identifier numbers. This is a hack to deal with old archives that
// did not save their bundle identifier, but instead had it passed
// into them. Eventually, this can be removed.
- this.m_id = Long.parseLong(
- this.m_archiveRootDir.getName().substring(
+ m_id = Long.parseLong(
+ m_archiveRootDir.getName().substring(
BundleCache.BUNDLE_DIR_PREFIX.length()));
}
finally
@@ -252,7 +252,7 @@
if (is != null) is.close();
}
- return this.m_id;
+ return m_id;
}
/**
@@ -264,9 +264,9 @@
**/
public synchronized String getLocation() throws Exception
{
- if (this.m_originalLocation != null)
+ if (m_originalLocation != null)
{
- return this.m_originalLocation;
+ return m_originalLocation;
}
// Read bundle location.
@@ -275,10 +275,10 @@
try
{
is = BundleCache.getSecureAction()
- .getFileInputStream(new File(this.m_archiveRootDir, BUNDLE_LOCATION_FILE));
+ .getFileInputStream(new File(m_archiveRootDir, BUNDLE_LOCATION_FILE));
br = new BufferedReader(new InputStreamReader(is));
- this.m_originalLocation = br.readLine();
- return this.m_originalLocation;
+ m_originalLocation = br.readLine();
+ return m_originalLocation;
}
finally
{
@@ -298,13 +298,13 @@
**/
public synchronized int getPersistentState() throws Exception
{
- if (this.m_persistentState >= 0)
+ if (m_persistentState >= 0)
{
- return this.m_persistentState;
+ return m_persistentState;
}
// Get bundle state file.
- File stateFile = new File(this.m_archiveRootDir, BUNDLE_STATE_FILE);
+ File stateFile = new File(m_archiveRootDir, BUNDLE_STATE_FILE);
// If the state file doesn't exist, then
// assume the bundle was installed.
@@ -324,17 +324,17 @@
String s = br.readLine();
if (s.equals(ACTIVE_STATE))
{
- this.m_persistentState = Bundle.ACTIVE;
+ m_persistentState = Bundle.ACTIVE;
}
else if (s.equals(UNINSTALLED_STATE))
{
- this.m_persistentState = Bundle.UNINSTALLED;
+ m_persistentState = Bundle.UNINSTALLED;
}
else
{
- this.m_persistentState = Bundle.INSTALLED;
+ m_persistentState = Bundle.INSTALLED;
}
- return this.m_persistentState;
+ return m_persistentState;
}
finally
{
@@ -360,7 +360,7 @@
try
{
os = BundleCache.getSecureAction()
- .getFileOutputStream(new File(this.m_archiveRootDir, BUNDLE_STATE_FILE));
+ .getFileOutputStream(new File(m_archiveRootDir, BUNDLE_STATE_FILE));
bw = new BufferedWriter(new OutputStreamWriter(os));
String s = null;
switch (state)
@@ -376,11 +376,11 @@
break;
}
bw.write(s, 0, s.length());
- this.m_persistentState = state;
+ m_persistentState = state;
}
catch (IOException ex)
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_ERROR,
this.getClass().getName() + ": Unable to record state - " + ex);
throw ex;
@@ -401,13 +401,13 @@
**/
public synchronized int getStartLevel() throws Exception
{
- if (this.m_startLevel >= 0)
+ if (m_startLevel >= 0)
{
- return this.m_startLevel;
+ return m_startLevel;
}
// Get bundle start level file.
- File levelFile = new File(this.m_archiveRootDir, BUNDLE_START_LEVEL_FILE);
+ File levelFile = new File(m_archiveRootDir, BUNDLE_START_LEVEL_FILE);
// If the start level file doesn't exist, then
// return an error.
@@ -424,8 +424,8 @@
is = BundleCache.getSecureAction()
.getFileInputStream(levelFile);
br = new BufferedReader(new InputStreamReader(is));
- this.m_startLevel = Integer.parseInt(br.readLine());
- return this.m_startLevel;
+ m_startLevel = Integer.parseInt(br.readLine());
+ return m_startLevel;
}
finally
{
@@ -449,15 +449,15 @@
try
{
os = BundleCache.getSecureAction()
- .getFileOutputStream(new File(this.m_archiveRootDir, BUNDLE_START_LEVEL_FILE));
+ .getFileOutputStream(new File(m_archiveRootDir, BUNDLE_START_LEVEL_FILE));
bw = new BufferedWriter(new OutputStreamWriter(os));
String s = Integer.toString(level);
bw.write(s, 0, s.length());
- this.m_startLevel = level;
+ m_startLevel = level;
}
catch (IOException ex)
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_ERROR,
this.getClass().getName() + ": Unable to record start level - " + ex);
throw ex;
@@ -478,13 +478,13 @@
**/
public synchronized long getLastModified() throws Exception
{
- if (this.m_lastModified >= 0)
+ if (m_lastModified >= 0)
{
- return this.m_lastModified;
+ return m_lastModified;
}
// Get bundle last modification time file.
- File lastModFile = new File(this.m_archiveRootDir, BUNDLE_LASTMODIFIED_FILE);
+ File lastModFile = new File(m_archiveRootDir, BUNDLE_LASTMODIFIED_FILE);
// If the last modification file doesn't exist, then
// return an error.
@@ -500,8 +500,8 @@
{
is = BundleCache.getSecureAction().getFileInputStream(lastModFile);
br = new BufferedReader(new InputStreamReader(is));
- this.m_lastModified = Long.parseLong(br.readLine());
- return this.m_lastModified;
+ m_lastModified = Long.parseLong(br.readLine());
+ return m_lastModified;
}
finally
{
@@ -528,15 +528,15 @@
try
{
os = BundleCache.getSecureAction()
- .getFileOutputStream(new File(this.m_archiveRootDir, BUNDLE_LASTMODIFIED_FILE));
+ .getFileOutputStream(new File(m_archiveRootDir, BUNDLE_LASTMODIFIED_FILE));
bw = new BufferedWriter(new OutputStreamWriter(os));
String s = Long.toString(lastModified);
bw.write(s, 0, s.length());
- this.m_lastModified = lastModified;
+ m_lastModified = lastModified;
}
catch (IOException ex)
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_ERROR,
this.getClass().getName() + ": Unable to record last modification time - " + ex);
throw ex;
@@ -565,7 +565,7 @@
throw new IllegalArgumentException("The data file path cannot contain a reference to the \"..\" directory.");
// Get bundle data directory.
- File dataDir = new File(this.m_archiveRootDir, DATA_DIRECTORY);
+ File dataDir = new File(m_archiveRootDir, DATA_DIRECTORY);
// Create the data directory if necessary.
if (!BundleCache.getSecureAction().fileExists(dataDir))
{
@@ -591,7 +591,7 @@
throws Exception
{
// Get bundle activator file.
- File activatorFile = new File(this.m_archiveRootDir, BUNDLE_ACTIVATOR_FILE);
+ File activatorFile = new File(m_archiveRootDir, BUNDLE_ACTIVATOR_FILE);
// If the activator file doesn't exist, then
// assume there isn't one.
if (!BundleCache.getSecureAction().fileExists(activatorFile))
@@ -612,7 +612,7 @@
}
catch (Exception ex)
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_ERROR,
this.getClass().getName() + ": Trying to deserialize - " + ex);
}
@@ -645,13 +645,13 @@
try
{
os = BundleCache.getSecureAction()
- .getFileOutputStream(new File(this.m_archiveRootDir, BUNDLE_ACTIVATOR_FILE));
+ .getFileOutputStream(new File(m_archiveRootDir, BUNDLE_ACTIVATOR_FILE));
oos = new ObjectOutputStream(os);
oos.writeObject(obj);
}
catch (IOException ex)
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_ERROR,
this.getClass().getName() + ": Unable to serialize activator - " + ex);
throw ex;
@@ -671,7 +671,7 @@
**/
public synchronized int getRevisionCount()
{
- return (this.m_revisions == null) ? 0 : this.m_revisions.length;
+ return (m_revisions == null) ? 0 : m_revisions.length;
}
/**
@@ -682,9 +682,9 @@
**/
public synchronized BundleRevision getRevision(int i)
{
- if ((i >= 0) && (i < this.getRevisionCount()))
+ if ((i >= 0) && (i < getRevisionCount()))
{
- return this.m_revisions[i];
+ return m_revisions[i];
}
return null;
}
@@ -714,19 +714,19 @@
throw new Exception("Unable to revise archive.");
}
- this.setRevisionLocation(location, (this.m_revisions == null) ? 0 : this.m_revisions.length);
+ this.setRevisionLocation(location, (m_revisions == null) ? 0 : m_revisions.length);
// Add new revision to revision array.
- if (this.m_revisions == null)
+ if (m_revisions == null)
{
- this.m_revisions = new BundleRevision[] { revision };
+ m_revisions = new BundleRevision[] { revision };
}
else
{
- BundleRevision[] tmp = new BundleRevision[this.m_revisions.length + 1];
- System.arraycopy(this.m_revisions, 0, tmp, 0, this.m_revisions.length);
- tmp[this.m_revisions.length] = revision;
- this.m_revisions = tmp;
+ BundleRevision[] tmp = new BundleRevision[m_revisions.length + 1];
+ System.arraycopy(m_revisions, 0, tmp, 0, m_revisions.length);
+ tmp[m_revisions.length] = revision;
+ m_revisions = tmp;
}
}
@@ -750,28 +750,28 @@
return false;
}
- String location = this.getRevisionLocation(this.m_revisions.length - 2);
+ String location = this.getRevisionLocation(m_revisions.length - 2);
try
{
- this.m_revisions[this.m_revisions.length - 1].dispose();
+ m_revisions[m_revisions.length - 1].dispose();
}
catch(Exception ex)
{
- this.m_logger.log(Logger.LOG_ERROR, this.getClass().getName() +
+ m_logger.log(Logger.LOG_ERROR, this.getClass().getName() +
": Unable to dispose latest revision", ex);
}
- File revisionDir = new File(this.m_archiveRootDir, REVISION_DIRECTORY +
- this.getRefreshCount() + "." + (this.m_revisions.length - 1));
+ File revisionDir = new File(m_archiveRootDir, REVISION_DIRECTORY +
+ this.getRefreshCount() + "." + (m_revisions.length - 1));
if (BundleCache.getSecureAction().fileExists(revisionDir))
{
BundleCache.deleteDirectoryTree(revisionDir);
}
- BundleRevision[] tmp = new BundleRevision[this.m_revisions.length - 1];
- System.arraycopy(this.m_revisions, 0, tmp, 0, this.m_revisions.length - 1);
+ BundleRevision[] tmp = new BundleRevision[m_revisions.length - 1];
+ System.arraycopy(m_revisions, 0, tmp, 0, m_revisions.length - 1);
return true;
}
@@ -783,7 +783,7 @@
try
{
is = BundleCache.getSecureAction().getFileInputStream(new File(
- new File(this.m_archiveRootDir, REVISION_DIRECTORY +
+ new File(m_archiveRootDir, REVISION_DIRECTORY +
this.getRefreshCount() + "." + revision), REVISION_LOCATION_FILE));
br = new BufferedReader(new InputStreamReader(is));
@@ -805,7 +805,7 @@
{
os = BundleCache.getSecureAction()
.getFileOutputStream(new File(
- new File(this.m_archiveRootDir, REVISION_DIRECTORY +
+ new File(m_archiveRootDir, REVISION_DIRECTORY +
this.getRefreshCount() + "." + revision), REVISION_LOCATION_FILE));
bw = new BufferedWriter(new OutputStreamWriter(os));
bw.write(location, 0, location.length());
@@ -839,11 +839,11 @@
// circumstances, such as if this bundle archive was created
// for an existing bundle that was updated, but not refreshed
// due to a system crash; see the constructor code for details.
- if (this.m_revisions[i] != null)
+ if (m_revisions[i] != null)
{
- this.m_revisions[i].dispose();
+ m_revisions[i].dispose();
}
- revisionDir = new File(this.m_archiveRootDir, REVISION_DIRECTORY + refreshCount + "." + i);
+ revisionDir = new File(m_archiveRootDir, REVISION_DIRECTORY + refreshCount + "." + i);
if (BundleCache.getSecureAction().fileExists(revisionDir))
{
BundleCache.deleteDirectoryTree(revisionDir);
@@ -853,7 +853,7 @@
// We still need to dispose the current revision, but we
// don't want to delete it, because we want to rename it
// to the new refresh level.
- this.m_revisions[count - 1].dispose();
+ m_revisions[count - 1].dispose();
// Save the current revision location for use later when
// we recreate the revision.
@@ -864,16 +864,16 @@
// Rename the current revision directory to be the zero revision
// of the new refresh level.
- File currentDir = new File(this.m_archiveRootDir, REVISION_DIRECTORY + (refreshCount + 1) + ".0");
- revisionDir = new File(this.m_archiveRootDir, REVISION_DIRECTORY + refreshCount + "." + (count - 1));
+ File currentDir = new File(m_archiveRootDir, REVISION_DIRECTORY + (refreshCount + 1) + ".0");
+ revisionDir = new File(m_archiveRootDir, REVISION_DIRECTORY + refreshCount + "." + (count - 1));
BundleCache.getSecureAction().renameFile(revisionDir, currentDir);
// Null the revision array since they are all invalid now.
- this.m_revisions = null;
+ m_revisions = null;
// Finally, recreate the revision for the current location.
BundleRevision revision = this.createRevisionFromLocation(location, null);
// Create new revision array.
- this.m_revisions = new BundleRevision[] { revision };
+ m_revisions = new BundleRevision[] { revision };
}
/**
@@ -884,13 +884,13 @@
**/
/* package */ void dispose() throws Exception
{
- if (!BundleCache.deleteDirectoryTree(this.m_archiveRootDir))
+ if (!BundleCache.deleteDirectoryTree(m_archiveRootDir))
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_ERROR,
this.getClass().getName()
+ ": Unable to delete archive directory - "
- + this.m_archiveRootDir);
+ + m_archiveRootDir);
}
}
@@ -910,15 +910,15 @@
{
// If the archive directory exists, then we don't
// need to initialize since it has already been done.
- if (BundleCache.getSecureAction().fileExists(this.m_archiveRootDir))
+ if (BundleCache.getSecureAction().fileExists(m_archiveRootDir))
{
return;
}
// Create archive directory, if it does not exist.
- if (!BundleCache.getSecureAction().mkdir(this.m_archiveRootDir))
+ if (!BundleCache.getSecureAction().mkdir(m_archiveRootDir))
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_ERROR,
this.getClass().getName() + ": Unable to create archive directory.");
throw new IOException("Unable to create archive directory.");
@@ -926,17 +926,17 @@
// Save id.
os = BundleCache.getSecureAction()
- .getFileOutputStream(new File(this.m_archiveRootDir, BUNDLE_ID_FILE));
+ .getFileOutputStream(new File(m_archiveRootDir, BUNDLE_ID_FILE));
bw = new BufferedWriter(new OutputStreamWriter(os));
- bw.write(Long.toString(this.m_id), 0, Long.toString(this.m_id).length());
+ bw.write(Long.toString(m_id), 0, Long.toString(m_id).length());
bw.close();
os.close();
// Save location string.
os = BundleCache.getSecureAction()
- .getFileOutputStream(new File(this.m_archiveRootDir, BUNDLE_LOCATION_FILE));
+ .getFileOutputStream(new File(m_archiveRootDir, BUNDLE_LOCATION_FILE));
bw = new BufferedWriter(new OutputStreamWriter(os));
- bw.write(this.m_originalLocation, 0, this.m_originalLocation.length());
+ bw.write(m_originalLocation, 0, m_originalLocation.length());
}
finally
{
@@ -958,9 +958,9 @@
**/
private String getCurrentLocation() throws Exception
{
- if (this.m_currentLocation != null)
+ if (m_currentLocation != null)
{
- return this.m_currentLocation;
+ return m_currentLocation;
}
// Read current location.
@@ -969,10 +969,10 @@
try
{
is = BundleCache.getSecureAction()
- .getFileInputStream(new File(this.m_archiveRootDir, CURRENT_LOCATION_FILE));
+ .getFileInputStream(new File(m_archiveRootDir, CURRENT_LOCATION_FILE));
br = new BufferedReader(new InputStreamReader(is));
- this.m_currentLocation = br.readLine();
- return this.m_currentLocation;
+ m_currentLocation = br.readLine();
+ return m_currentLocation;
}
catch (FileNotFoundException ex)
{
@@ -1003,10 +1003,10 @@
try
{
os = BundleCache.getSecureAction()
- .getFileOutputStream(new File(this.m_archiveRootDir, CURRENT_LOCATION_FILE));
+ .getFileOutputStream(new File(m_archiveRootDir, CURRENT_LOCATION_FILE));
bw = new BufferedWriter(new OutputStreamWriter(os));
bw.write(location, 0, location.length());
- this.m_currentLocation = location;
+ m_currentLocation = location;
}
finally
{
@@ -1032,7 +1032,7 @@
// native libraries so that we can reload them. Thus, we use the
// refresh counter as a way to change the name of the revision
// directory to give native libraries new absolute names.
- File revisionRootDir = new File(this.m_archiveRootDir,
+ File revisionRootDir = new File(m_archiveRootDir,
REVISION_DIRECTORY + this.getRefreshCount() + "." + this.getRevisionCount());
BundleRevision result = null;
@@ -1061,22 +1061,22 @@
// flag set to true.
if (BundleCache.getSecureAction().isFileDirectory(file))
{
- result = new DirectoryRevision(this.m_logger, revisionRootDir, location);
+ result = new DirectoryRevision(m_logger, revisionRootDir, location);
}
else
{
- result = new JarRevision(this.m_logger, revisionRootDir, location, true);
+ result = new JarRevision(m_logger, revisionRootDir, location, true);
}
}
else if (location.startsWith(INPUTSTREAM_PROTOCOL))
{
// Assume all input streams point to JAR files.
- result = new JarRevision(this.m_logger, revisionRootDir, location, false, is);
+ result = new JarRevision(m_logger, revisionRootDir, location, false, is);
}
else
{
// Anything else is assumed to be a URL to a JAR file.
- result = new JarRevision(this.m_logger, revisionRootDir, location, false);
+ result = new JarRevision(m_logger, revisionRootDir, location, false);
}
}
catch (Exception ex)
@@ -1085,7 +1085,7 @@
{
if (!BundleCache.deleteDirectoryTree(revisionRootDir))
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_ERROR,
this.getClass().getName()
+ ": Unable to delete revision directory - "
@@ -1116,13 +1116,13 @@
{
// If we have already read the refresh counter file,
// then just return the result.
- if (this.m_refreshCount >= 0)
+ if (m_refreshCount >= 0)
{
- return this.m_refreshCount;
+ return m_refreshCount;
}
// Get refresh counter file.
- File counterFile = new File(this.m_archiveRootDir, REFRESH_COUNTER_FILE);
+ File counterFile = new File(m_archiveRootDir, REFRESH_COUNTER_FILE);
// If the refresh counter file doesn't exist, then
// assume the counter is at zero.
@@ -1167,7 +1167,7 @@
throws Exception
{
// Get refresh counter file.
- File counterFile = new File(this.m_archiveRootDir, REFRESH_COUNTER_FILE);
+ File counterFile = new File(m_archiveRootDir, REFRESH_COUNTER_FILE);
// Write the refresh counter.
OutputStream os = null;
@@ -1179,11 +1179,11 @@
bw = new BufferedWriter(new OutputStreamWriter(os));
String s = Long.toString(counter);
bw.write(s, 0, s.length());
- this.m_refreshCount = counter;
+ m_refreshCount = counter;
}
catch (IOException ex)
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_ERROR,
this.getClass().getName() + ": Unable to write refresh counter: " + ex);
throw ex;
diff --git a/framework/src/main/java/org/apache/felix/framework/cache/BundleRevision.java b/framework/src/main/java/org/apache/felix/framework/cache/BundleRevision.java
index 9a81987..3089788 100644
--- a/framework/src/main/java/org/apache/felix/framework/cache/BundleRevision.java
+++ b/framework/src/main/java/org/apache/felix/framework/cache/BundleRevision.java
@@ -67,9 +67,9 @@
public BundleRevision(Logger logger, File revisionRootDir, String location)
throws Exception
{
- this.m_logger = logger;
- this.m_revisionRootDir = revisionRootDir;
- this.m_location = location;
+ m_logger = logger;
+ m_revisionRootDir = revisionRootDir;
+ m_location = location;
}
@@ -81,7 +81,7 @@
**/
public Logger getLogger()
{
- return this.m_logger;
+ return m_logger;
}
/**
@@ -92,7 +92,7 @@
**/
public File getRevisionRootDir()
{
- return this.m_revisionRootDir;
+ return m_revisionRootDir;
}
/**
@@ -103,7 +103,7 @@
**/
public String getLocation()
{
- return this.m_location;
+ return m_location;
}
/**
diff --git a/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java b/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java
index 3347e83..7a1772c 100644
--- a/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java
+++ b/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java
@@ -52,7 +52,7 @@
Logger logger, File revisionRootDir, String location) throws Exception
{
super(logger, revisionRootDir, location);
- this.m_refDir = new File(location.substring(
+ m_refDir = new File(location.substring(
location.indexOf(BundleArchive.FILE_PROTOCOL)
+ BundleArchive.FILE_PROTOCOL.length()));
@@ -78,9 +78,9 @@
public synchronized Map getManifestHeader()
throws Exception
{
- if (this.m_header != null)
+ if (m_header != null)
{
- return this.m_header;
+ return m_header;
}
// Read the header file from the reference directory.
@@ -90,7 +90,7 @@
{
// Open manifest file.
is = BundleCache.getSecureAction()
- .getFileInputStream(new File(this.m_refDir, "META-INF/MANIFEST.MF"));
+ .getFileInputStream(new File(m_refDir, "META-INF/MANIFEST.MF"));
// Error if no jar file.
if (is == null)
{
@@ -100,8 +100,8 @@
// Get manifest.
Manifest mf = new Manifest(is);
// Create a case insensitive map of manifest attributes.
- this.m_header = new StringMap(mf.getMainAttributes(), false);
- return this.m_header;
+ m_header = new StringMap(mf.getMainAttributes(), false);
+ return m_header;
}
finally
{
@@ -111,7 +111,7 @@
public IContent getContent() throws Exception
{
- return new DirectoryContent(this.m_refDir);
+ return new DirectoryContent(m_refDir);
}
public synchronized IContent[] getContentPath() throws Exception
@@ -138,7 +138,7 @@
}
// Create the bundles class path.
- IContent self = new DirectoryContent(this.m_refDir);
+ IContent self = new DirectoryContent(m_refDir);
List contentList = new ArrayList();
for (int i = 0; i < classPathStrings.length; i++)
{
@@ -149,7 +149,7 @@
else
{
// Determine if the class path entry is a file or directory.
- File file = new File(this.m_refDir, classPathStrings[i]);
+ File file = new File(m_refDir, classPathStrings[i]);
if (BundleCache.getSecureAction().isFileDirectory(file))
{
contentList.add(new DirectoryContent(file));
diff --git a/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java b/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
index 2ef27dc..79490d4 100644
--- a/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
+++ b/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
@@ -77,13 +77,13 @@
if (byReference)
{
- this.m_bundleFile = new File(location.substring(
+ m_bundleFile = new File(location.substring(
location.indexOf(BundleArchive.FILE_PROTOCOL)
+ BundleArchive.FILE_PROTOCOL.length()));
}
else
{
- this.m_bundleFile = new File(this.getRevisionRootDir(), BUNDLE_JAR_FILE);
+ m_bundleFile = new File(this.getRevisionRootDir(), BUNDLE_JAR_FILE);
}
// Save and process the bundle JAR.
@@ -92,9 +92,9 @@
public synchronized Map getManifestHeader() throws Exception
{
- if (this.m_header != null)
+ if (m_header != null)
{
- return this.m_header;
+ return m_header;
}
// Get the embedded resource.
@@ -103,7 +103,7 @@
try
{
// Open bundle JAR file.
- jarFile = BundleCache.getSecureAction().openJAR(this.m_bundleFile);
+ jarFile = BundleCache.getSecureAction().openJAR(m_bundleFile);
// Error if no jar file.
if (jarFile == null)
{
@@ -112,8 +112,8 @@
// Get manifest.
Manifest mf = jarFile.getManifest();
// Create a case insensitive map of manifest attributes.
- this.m_header = new StringMap(mf.getMainAttributes(), false);
- return this.m_header;
+ m_header = new StringMap(mf.getMainAttributes(), false);
+ return m_header;
}
finally
@@ -124,7 +124,7 @@
public IContent getContent() throws Exception
{
- return new JarContent(this.m_bundleFile);
+ return new JarContent(m_bundleFile);
}
public synchronized IContent[] getContentPath() throws Exception
@@ -156,8 +156,8 @@
JarFile bundleJar = null;
try
{
- bundleJar = BundleCache.getSecureAction().openJAR(this.m_bundleFile);
- IContent self = new JarContent(this.m_bundleFile);
+ bundleJar = BundleCache.getSecureAction().openJAR(m_bundleFile);
+ IContent self = new JarContent(m_bundleFile);
List contentList = new ArrayList();
for (int i = 0; i < classPathStrings.length; i++)
{
@@ -227,7 +227,7 @@
try
{
- bundleJar = BundleCache.getSecureAction().openJAR(this.m_bundleFile);
+ bundleJar = BundleCache.getSecureAction().openJAR(m_bundleFile);
ZipEntry ze = bundleJar.getEntry(libName);
if (ze == null)
{
@@ -311,7 +311,7 @@
}
// Save the bundle jar file.
- BundleCache.copyStreamToFile(is, this.m_bundleFile);
+ BundleCache.copyStreamToFile(is, m_bundleFile);
}
this.preprocessBundleJar();
@@ -414,7 +414,7 @@
try
{
// Make sure class path entry is a JAR file.
- bundleJar = BundleCache.getSecureAction().openJAR(this.m_bundleFile);
+ bundleJar = BundleCache.getSecureAction().openJAR(m_bundleFile);
ZipEntry ze = bundleJar.getEntry(jarPath);
if (ze == null)
{
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java b/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
index 3e3beb7..2c7ee40 100755
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
+++ b/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
@@ -84,39 +84,39 @@
public R4SearchPolicyCore(Logger logger, Map configMap)
{
- this.m_logger = logger;
- this.m_configMap = configMap;
+ m_logger = logger;
+ m_configMap = configMap;
// Read the boot delegation property and parse it.
- String s = (String) this.m_configMap.get(Constants.FRAMEWORK_BOOTDELEGATION);
+ String s = (String) m_configMap.get(Constants.FRAMEWORK_BOOTDELEGATION);
s = (s == null) ? "java.*" : s + ",java.*";
StringTokenizer st = new StringTokenizer(s, " ,");
- this.m_bootPkgs = new String[st.countTokens()];
- this.m_bootPkgWildcards = new boolean[this.m_bootPkgs.length];
- for (int i = 0; i < this.m_bootPkgs.length; i++)
+ m_bootPkgs = new String[st.countTokens()];
+ m_bootPkgWildcards = new boolean[m_bootPkgs.length];
+ for (int i = 0; i < m_bootPkgs.length; i++)
{
s = st.nextToken();
if (s.endsWith("*"))
{
- this.m_bootPkgWildcards[i] = true;
+ m_bootPkgWildcards[i] = true;
s = s.substring(0, s.length() - 1);
}
- this.m_bootPkgs[i] = s;
+ m_bootPkgs[i] = s;
}
}
public IModuleFactory getModuleFactory()
{
- return this.m_factory;
+ return m_factory;
}
public void setModuleFactory(IModuleFactory factory)
throws IllegalStateException
{
- if (this.m_factory == null)
+ if (m_factory == null)
{
- this.m_factory = factory;
- this.m_factory.addModuleListener(this);
+ m_factory = factory;
+ m_factory.addModuleListener(this);
}
else
{
@@ -127,17 +127,17 @@
protected synchronized boolean isResolved(IModule module)
{
- ModuleData data = (ModuleData) this.m_moduleDataMap.get(module);
+ ModuleData data = (ModuleData) m_moduleDataMap.get(module);
return (data == null) ? false : data.m_resolved;
}
protected synchronized void setResolved(IModule module, boolean resolved)
{
- ModuleData data = (ModuleData) this.m_moduleDataMap.get(module);
+ ModuleData data = (ModuleData) m_moduleDataMap.get(module);
if (data == null)
{
data = new ModuleData(module);
- this.m_moduleDataMap.put(module, data);
+ m_moduleDataMap.put(module, data);
}
data.m_resolved = resolved;
}
@@ -245,7 +245,7 @@
// not take a stand on this issue.
if (pkgName.length() > 0)
{
- for (int i = 0; i < this.m_bootPkgs.length; i++)
+ for (int i = 0; i < m_bootPkgs.length; i++)
{
// A wildcarded boot delegation package will be in the form of
// "foo.", so if the package is wildcarded do a startsWith() or a
@@ -253,10 +253,10 @@
// request should be delegated to the parent class loader. If the
// package is not wildcarded, then simply do an equals() test to
// see if the request should be delegated to the parent class loader.
- if ((this.m_bootPkgWildcards[i] &&
- (pkgName.startsWith(this.m_bootPkgs[i]) ||
- this.m_bootPkgs[i].regionMatches(0, pkgName, 0, pkgName.length())))
- || (!this.m_bootPkgWildcards[i] && this.m_bootPkgs[i].equals(pkgName)))
+ if ((m_bootPkgWildcards[i] &&
+ (pkgName.startsWith(m_bootPkgs[i]) ||
+ m_bootPkgs[i].regionMatches(0, pkgName, 0, pkgName.length())))
+ || (!m_bootPkgWildcards[i] && m_bootPkgs[i].equals(pkgName)))
{
try
{
@@ -361,7 +361,7 @@
// Delegate any packages listed in the boot delegation
// property to the parent class loader.
- for (int i = 0; i < this.m_bootPkgs.length; i++)
+ for (int i = 0; i < m_bootPkgs.length; i++)
{
// A wildcarded boot delegation package will be in the form of "foo.",
// so if the package is wildcarded do a startsWith() or a regionMatches()
@@ -374,10 +374,10 @@
// Only consider delegation if we have a package name, since
// we don't want to promote the default package. The spec does
// not take a stand on this issue.
- if ((this.m_bootPkgWildcards[i] &&
- (pkgName.startsWith(this.m_bootPkgs[i]) ||
- this.m_bootPkgs[i].regionMatches(0, pkgName, 0, pkgName.length())))
- || (!this.m_bootPkgWildcards[i] && this.m_bootPkgs[i].equals(pkgName)))
+ if ((m_bootPkgWildcards[i] &&
+ (pkgName.startsWith(m_bootPkgs[i]) ||
+ m_bootPkgs[i].regionMatches(0, pkgName, 0, pkgName.length())))
+ || (!m_bootPkgWildcards[i] && m_bootPkgs[i].equals(pkgName)))
{
return (isClass)
? (Object) this.getClass().getClassLoader().loadClass(name)
@@ -585,7 +585,7 @@
try
{
// Lock module manager instance to ensure that nothing changes.
- synchronized (this.m_factory)
+ synchronized (m_factory)
{
// Get "in use" and "available" candidates and put
// the "in use" candidates first.
@@ -633,14 +633,14 @@
importer, dynamics[i], candidate.m_module, candidate.m_capability);
newWires[newWires.length - 1] = wire;
((ModuleImpl) importer).setWires(newWires);
-this.m_logger.log(Logger.LOG_DEBUG, "WIRE: " + newWires[newWires.length - 1]);
+m_logger.log(Logger.LOG_DEBUG, "WIRE: " + newWires[newWires.length - 1]);
return wire;
}
}
}
catch (Exception ex)
{
- this.m_logger.log(Logger.LOG_ERROR, "Unable to dynamically import package.", ex);
+ m_logger.log(Logger.LOG_ERROR, "Unable to dynamically import package.", ex);
}
}
}
@@ -719,7 +719,7 @@
}
else
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_DEBUG,
"Constraint violation for " + importer
+ " detected; module can see "
@@ -772,14 +772,14 @@
{
// Synchronized on the module manager to make sure that no
// modules are added, removed, or resolved.
- synchronized (this.m_factory)
+ synchronized (m_factory)
{
PackageSource[] candidates = m_emptySources;
if (req.getNamespace().equals(ICapability.PACKAGE_NAMESPACE) &&
(((Requirement) req).getPackageName() != null))
{
String pkgName = ((Requirement) req).getPackageName();
- IModule[] modules = (IModule[]) this.m_inUsePkgIndexMap.get(pkgName);
+ IModule[] modules = (IModule[]) m_inUsePkgIndexMap.get(pkgName);
for (int modIdx = 0; (modules != null) && (modIdx < modules.length); modIdx++)
{
ICapability inUseCap = Util.getSatisfyingCapability(modules[modIdx], req);
@@ -791,7 +791,7 @@
new PackagePermission(pkgName,
PackagePermission.EXPORT)))
{
- this.m_logger.log(Logger.LOG_DEBUG,
+ m_logger.log(Logger.LOG_DEBUG,
"PackagePermission.EXPORT denied for "
+ pkgName
+ "from " + modules[modIdx].getId());
@@ -809,7 +809,7 @@
}
else
{
- Iterator i = this.m_inUseCapMap.entrySet().iterator();
+ Iterator i = m_inUseCapMap.entrySet().iterator();
while (i.hasNext())
{
Map.Entry entry = (Map.Entry) i.next();
@@ -827,7 +827,7 @@
(String) inUseCaps[capIdx].getProperties().get(ICapability.PACKAGE_PROPERTY),
PackagePermission.EXPORT)))
{
- this.m_logger.log(Logger.LOG_DEBUG,
+ m_logger.log(Logger.LOG_DEBUG,
"PackagePermission.EXPORT denied for "
+ inUseCaps[capIdx].getProperties().get(ICapability.PACKAGE_PROPERTY)
+ "from " + module.getId());
@@ -850,7 +850,7 @@
private boolean isCapabilityInUse(IModule module, ICapability cap)
{
- ICapability[] caps = (ICapability[]) this.m_inUseCapMap.get(module);
+ ICapability[] caps = (ICapability[]) m_inUseCapMap.get(module);
for (int i = 0; (caps != null) && (i < caps.length); i++)
{
if (caps[i].equals(cap))
@@ -865,18 +865,18 @@
{
// Synchronized on the module manager to make sure that no
// modules are added, removed, or resolved.
- synchronized (this.m_factory)
+ synchronized (m_factory)
{
// Get all modules.
IModule[] modules = null;
if (req.getNamespace().equals(ICapability.PACKAGE_NAMESPACE) &&
(((Requirement) req).getPackageName() != null))
{
- modules = (IModule[]) this.m_availPkgIndexMap.get(((Requirement) req).getPackageName());
+ modules = (IModule[]) m_availPkgIndexMap.get(((Requirement) req).getPackageName());
}
else
{
- modules = this.m_factory.getModules();
+ modules = m_factory.getModules();
}
// Create list of compatible providers.
@@ -924,7 +924,7 @@
// Synchronize on the module manager, because we don't want
// any modules being added or removed while we are in the
// middle of this operation.
- synchronized (this.m_factory)
+ synchronized (m_factory)
{
// The first step is to populate the candidates map. This
// will use the target module to populate the candidates map
@@ -1075,7 +1075,7 @@
synchronized (this)
{
System.out.println("PACKAGES IN USE MAP:");
- for (Iterator i = this.m_inUseCapMap.entrySet().iterator(); i.hasNext(); )
+ for (Iterator i = m_inUseCapMap.entrySet().iterator(); i.hasNext(); )
{
Map.Entry entry = (Map.Entry) i.next();
ICapability[] caps = (ICapability[]) entry.getValue();
@@ -1168,7 +1168,7 @@
}
catch (ResolveException ex)
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_DEBUG,
"Constraint violation for " + targetModule + " detected.",
ex);
@@ -1203,7 +1203,7 @@
}
catch (ResolveException ex)
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_DEBUG,
"Constraint violation for " + targetModule + " detected.",
ex);
@@ -1254,7 +1254,7 @@
}
else
{
- this.m_logger.log(
+ m_logger.log(
Logger.LOG_DEBUG,
"Constraint violation for " + targetModule
+ " detected; module can see "
@@ -2079,11 +2079,11 @@
(wires != null) && (wireIdx < wires.length);
wireIdx++)
{
-this.m_logger.log(Logger.LOG_DEBUG, "WIRE: " + wires[wireIdx]);
+ m_logger.log(Logger.LOG_DEBUG, "WIRE: " + wires[wireIdx]);
// Add the exporter module of the wire to the "in use" capability map.
- ICapability[] inUseCaps = (ICapability[]) this.m_inUseCapMap.get(wires[wireIdx].getExporter());
+ ICapability[] inUseCaps = (ICapability[]) m_inUseCapMap.get(wires[wireIdx].getExporter());
inUseCaps = addCapabilityToArray(inUseCaps, wires[wireIdx].getCapability());
- this.m_inUseCapMap.put(wires[wireIdx].getExporter(), inUseCaps);
+ m_inUseCapMap.put(wires[wireIdx].getExporter(), inUseCaps);
// If the capability is a package, then add the exporter module
// of the wire to the "in use" package index and remove it
@@ -2095,14 +2095,14 @@
wires[wireIdx].getCapability().getProperties().get(ICapability.PACKAGE_PROPERTY);
// Add to "in use" package index.
this.indexPackageCapability(
- this.m_inUsePkgIndexMap,
+ m_inUsePkgIndexMap,
wires[wireIdx].getExporter(),
wires[wireIdx].getCapability());
// Remove from "available" package index.
- this.m_availPkgIndexMap.put(
+ m_availPkgIndexMap.put(
pkgName,
removeModuleFromArray(
- (IModule[]) this.m_availPkgIndexMap.get(pkgName),
+ (IModule[]) m_availPkgIndexMap.get(pkgName),
wires[wireIdx].getExporter()));
}
}
@@ -2130,9 +2130,9 @@
}
if (!matched)
{
- ICapability[] inUseCaps = (ICapability[]) this.m_inUseCapMap.get(module);
+ ICapability[] inUseCaps = (ICapability[]) m_inUseCapMap.get(module);
inUseCaps = addCapabilityToArray(inUseCaps, caps[capIdx]);
- this.m_inUseCapMap.put(module, inUseCaps);
+ m_inUseCapMap.put(module, inUseCaps);
// If the capability is a package, then add the exporter module
// of the wire to the "in use" package index and remove it
@@ -2144,14 +2144,14 @@
caps[capIdx].getProperties().get(ICapability.PACKAGE_PROPERTY);
// Add to "in use" package index.
this.indexPackageCapability(
- this.m_inUsePkgIndexMap,
+ m_inUsePkgIndexMap,
module,
caps[capIdx]);
// Remove from "available" package index.
- this.m_availPkgIndexMap.put(
+ m_availPkgIndexMap.put(
pkgName,
removeModuleFromArray(
- (IModule[]) this.m_availPkgIndexMap.get(pkgName),
+ (IModule[]) m_availPkgIndexMap.get(pkgName),
module));
}
}
@@ -2260,9 +2260,9 @@
synchronized (m_emptyListeners)
{
// If we have no listeners, then just add the new listener.
- if (this.m_listeners == m_emptyListeners)
+ if (m_listeners == m_emptyListeners)
{
- this.m_listeners = new ResolveListener[] { l };
+ m_listeners = new ResolveListener[] { l };
}
// Otherwise, we need to do some array copying.
// Notice, the old array is always valid, so if
@@ -2271,10 +2271,10 @@
// and is not affected by the new value.
else
{
- ResolveListener[] newList = new ResolveListener[this.m_listeners.length + 1];
- System.arraycopy(this.m_listeners, 0, newList, 0, this.m_listeners.length);
- newList[this.m_listeners.length] = l;
- this.m_listeners = newList;
+ ResolveListener[] newList = new ResolveListener[m_listeners.length + 1];
+ System.arraycopy(m_listeners, 0, newList, 0, m_listeners.length);
+ newList[m_listeners.length] = l;
+ m_listeners = newList;
}
}
}
@@ -2296,9 +2296,9 @@
{
// Try to find the instance in our list.
int idx = -1;
- for (int i = 0; i < this.m_listeners.length; i++)
+ for (int i = 0; i < m_listeners.length; i++)
{
- if (this.m_listeners[i].equals(l))
+ if (m_listeners[i].equals(l))
{
idx = i;
break;
@@ -2309,9 +2309,9 @@
if (idx >= 0)
{
// If this is the last listener, then point to empty list.
- if (this.m_listeners.length == 1)
+ if (m_listeners.length == 1)
{
- this.m_listeners = m_emptyListeners;
+ m_listeners = m_emptyListeners;
}
// Otherwise, we need to do some array copying.
// Notice, the old array is always valid, so if
@@ -2320,14 +2320,14 @@
// and is not affected by the new value.
else
{
- ResolveListener[] newList = new ResolveListener[this.m_listeners.length - 1];
- System.arraycopy(this.m_listeners, 0, newList, 0, idx);
+ ResolveListener[] newList = new ResolveListener[m_listeners.length - 1];
+ System.arraycopy(m_listeners, 0, newList, 0, idx);
if (idx < newList.length)
{
- System.arraycopy(this.m_listeners, idx + 1, newList, idx,
+ System.arraycopy(m_listeners, idx + 1, newList, idx,
newList.length - idx);
}
- this.m_listeners = newList;
+ m_listeners = newList;
}
}
}
@@ -2344,7 +2344,7 @@
// Get a copy of the listener array, which is guaranteed
// to not be null.
- ResolveListener[] listeners = this.m_listeners;
+ ResolveListener[] listeners = m_listeners;
// Loop through listeners and fire events.
for (int i = 0; i < listeners.length; i++)
@@ -2352,7 +2352,7 @@
// Lazily create event.
if (event == null)
{
- event = new ModuleEvent(this.m_factory, module);
+ event = new ModuleEvent(m_factory, module);
}
listeners[i].moduleResolved(event);
}
@@ -2370,7 +2370,7 @@
// Get a copy of the listener array, which is guaranteed
// to not be null.
- ResolveListener[] listeners = this.m_listeners;
+ ResolveListener[] listeners = m_listeners;
// Loop through listeners and fire events.
for (int i = 0; i < listeners.length; i++)
@@ -2378,7 +2378,7 @@
// Lazily create event.
if (event == null)
{
- event = new ModuleEvent(this.m_factory, module);
+ event = new ModuleEvent(m_factory, module);
}
listeners[i].moduleUnresolved(event);
}
@@ -2390,7 +2390,7 @@
public void moduleAdded(ModuleEvent event)
{
- synchronized (this.m_factory)
+ synchronized (m_factory)
{
// When a module is added, create an aggregated list of available
// exports to simplify later processing when resolving bundles.
@@ -2402,7 +2402,7 @@
{
if (caps[i].getNamespace().equals(ICapability.PACKAGE_NAMESPACE))
{
- this.indexPackageCapability(this.m_availPkgIndexMap, module, caps[i]);
+ this.indexPackageCapability(m_availPkgIndexMap, module, caps[i]);
}
}
}
@@ -2416,7 +2416,7 @@
// Synchronize on the module manager, since we don't want any
// bundles to be installed or removed.
- synchronized (this.m_factory)
+ synchronized (m_factory)
{
// Remove exports from package maps.
ICapability[] caps = event.getModule().getDefinition().getCapabilities();
@@ -2428,19 +2428,19 @@
String pkgName = (String)
caps[i].getProperties().get(ICapability.PACKAGE_PROPERTY);
// Remove from "available" package map.
- IModule[] modules = (IModule[]) this.m_availPkgIndexMap.get(pkgName);
+ IModule[] modules = (IModule[]) m_availPkgIndexMap.get(pkgName);
if (modules != null)
{
modules = removeModuleFromArray(modules, event.getModule());
- this.m_availPkgIndexMap.put(pkgName, modules);
+ m_availPkgIndexMap.put(pkgName, modules);
}
// Remove from "in use" package map.
- modules = (IModule[]) this.m_inUsePkgIndexMap.get(pkgName);
+ modules = (IModule[]) m_inUsePkgIndexMap.get(pkgName);
if (modules != null)
{
modules = removeModuleFromArray(modules, event.getModule());
- this.m_inUsePkgIndexMap.put(pkgName, modules);
+ m_inUsePkgIndexMap.put(pkgName, modules);
}
}
}
@@ -2450,9 +2450,9 @@
((ModuleImpl) event.getModule()).setWires(null);
// Remove the module from the "in use" map.
// TODO: RB - Maybe this can be merged with ModuleData.
- this.m_inUseCapMap.remove(event.getModule());
+ m_inUseCapMap.remove(event.getModule());
// Finally, remove module data.
- this.m_moduleDataMap.remove(event.getModule());
+ m_moduleDataMap.remove(event.getModule());
}
}
@@ -2675,7 +2675,7 @@
public boolean m_resolved = false;
public ModuleData(IModule module)
{
- this.m_module = module;
+ m_module = module;
}
}
@@ -2688,12 +2688,12 @@
public boolean m_visited = false;
public CandidateSet(IModule module, IRequirement requirement, PackageSource[] candidates)
{
- this.m_module = module;
- this.m_requirement = requirement;
- this.m_candidates = candidates;
- if (R4SearchPolicyCore.this.isResolved(this.m_module))
+ m_module = module;
+ m_requirement = requirement;
+ m_candidates = candidates;
+ if (R4SearchPolicyCore.this.isResolved(m_module))
{
- this.m_visited = true;
+ m_visited = true;
}
}
}
@@ -2712,17 +2712,17 @@
public PackageSource(IModule module, ICapability capability)
{
- this.m_module = module;
- this.m_capability = capability;
+ m_module = module;
+ m_capability = capability;
}
public int compareTo(Object o)
{
PackageSource ps = (PackageSource) o;
- if (this.m_capability.getNamespace().equals(ICapability.PACKAGE_NAMESPACE))
+ if (m_capability.getNamespace().equals(ICapability.PACKAGE_NAMESPACE))
{
- Version thisVersion = ((Capability) this.m_capability).getPackageVersion();
+ Version thisVersion = ((Capability) m_capability).getPackageVersion();
Version version = ((Capability) ps.m_capability).getPackageVersion();
// Sort in reverse version order.
@@ -2738,7 +2738,7 @@
else
{
// Sort further by ascending bundle ID.
- long thisId = Util.getBundleIdFromModuleId(this.m_module.getId());
+ long thisId = Util.getBundleIdFromModuleId(m_module.getId());
long id = Util.getBundleIdFromModuleId(ps.m_module.getId());
if (thisId < id)
{
@@ -2761,8 +2761,8 @@
{
final int PRIME = 31;
int result = 1;
- result = PRIME * result + ((this.m_capability == null) ? 0 : this.m_capability.hashCode());
- result = PRIME * result + ((this.m_module == null) ? 0 : this.m_module.hashCode());
+ result = PRIME * result + ((m_capability == null) ? 0 : m_capability.hashCode());
+ result = PRIME * result + ((m_module == null) ? 0 : m_module.hashCode());
return result;
}
@@ -2781,7 +2781,7 @@
return false;
}
PackageSource ps = (PackageSource) o;
- return (this.m_module.equals(ps.m_module) && (this.m_capability == ps.m_capability));
+ return (m_module.equals(ps.m_module) && (m_capability == ps.m_capability));
}
}
@@ -2799,28 +2799,28 @@
public ResolvedPackage(String name)
{
- this.m_name = name;
+ m_name = name;
}
public boolean isSubset(ResolvedPackage rp)
{
- if (this.m_sourceList.size() > rp.m_sourceList.size())
+ if (m_sourceList.size() > rp.m_sourceList.size())
{
return false;
}
- else if (!this.m_name.equals(rp.m_name))
+ else if (!m_name.equals(rp.m_name))
{
return false;
}
// Determine if the target set of source modules is a subset.
- return rp.m_sourceList.containsAll(this.m_sourceList);
+ return rp.m_sourceList.containsAll(m_sourceList);
}
public Object clone()
{
- ResolvedPackage rp = new ResolvedPackage(this.m_name);
- rp.m_sourceList.addAll(this.m_sourceList);
+ ResolvedPackage rp = new ResolvedPackage(m_name);
+ rp.m_sourceList.addAll(m_sourceList);
return rp;
}
@@ -2830,9 +2830,9 @@
// package sources and maintaining ordering.
for (int srcIdx = 0; srcIdx < rp.m_sourceList.size(); srcIdx++)
{
- if (!this.m_sourceList.contains(rp.m_sourceList.get(srcIdx)))
+ if (!m_sourceList.contains(rp.m_sourceList.get(srcIdx)))
{
- this.m_sourceList.add(rp.m_sourceList.get(srcIdx));
+ m_sourceList.add(rp.m_sourceList.get(srcIdx));
}
}
}
@@ -2845,13 +2845,13 @@
public StringBuffer toString(String padding, StringBuffer sb)
{
sb.append(padding);
- sb.append(this.m_name);
+ sb.append(m_name);
sb.append(" from [");
- for (int i = 0; i < this.m_sourceList.size(); i++)
+ for (int i = 0; i < m_sourceList.size(); i++)
{
- PackageSource ps = (PackageSource) this.m_sourceList.get(i);
+ PackageSource ps = (PackageSource) m_sourceList.get(i);
sb.append(ps.m_module);
- if ((i + 1) < this.m_sourceList.size())
+ if ((i + 1) < m_sourceList.size())
{
sb.append(", ");
}
diff --git a/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java b/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java
index 9a7fa9c..24e9776 100644
--- a/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java
@@ -72,7 +72,7 @@
private EventDispatcher(Logger logger)
{
- this.m_logger = logger;
+ m_logger = logger;
}
public static EventDispatcher start(Logger logger)
@@ -171,17 +171,17 @@
if (clazz == FrameworkListener.class)
{
- listeners = this.m_frameworkListeners;
+ listeners = m_frameworkListeners;
}
else if (clazz == BundleListener.class)
{
if (SynchronousBundleListener.class.isInstance(l))
{
- listeners = this.m_syncBundleListeners;
+ listeners = m_syncBundleListeners;
}
else
{
- listeners = this.m_bundleListeners;
+ listeners = m_bundleListeners;
}
}
else if (clazz == ServiceListener.class)
@@ -193,7 +193,7 @@
acc = ((SecurityManager) sm).getSecurityContext();
}
- listeners = this.m_serviceListeners;
+ listeners = m_serviceListeners;
}
else
{
@@ -229,22 +229,22 @@
if (clazz == FrameworkListener.class)
{
- this.m_frameworkListeners = listeners;
+ m_frameworkListeners = listeners;
}
else if (clazz == BundleListener.class)
{
if (SynchronousBundleListener.class.isInstance(l))
{
- this.m_syncBundleListeners = listeners;
+ m_syncBundleListeners = listeners;
}
else
{
- this.m_bundleListeners = listeners;
+ m_bundleListeners = listeners;
}
}
else if (clazz == ServiceListener.class)
{
- this.m_serviceListeners = listeners;
+ m_serviceListeners = listeners;
}
}
}
@@ -269,22 +269,22 @@
if (clazz == FrameworkListener.class)
{
- listeners = this.m_frameworkListeners;
+ listeners = m_frameworkListeners;
}
else if (clazz == BundleListener.class)
{
if (SynchronousBundleListener.class.isInstance(l))
{
- listeners = this.m_syncBundleListeners;
+ listeners = m_syncBundleListeners;
}
else
{
- listeners = this.m_bundleListeners;
+ listeners = m_bundleListeners;
}
}
else if (clazz == ServiceListener.class)
{
- listeners = this.m_serviceListeners;
+ listeners = m_serviceListeners;
}
else
{
@@ -333,22 +333,22 @@
if (clazz == FrameworkListener.class)
{
- this.m_frameworkListeners = listeners;
+ m_frameworkListeners = listeners;
}
else if (clazz == BundleListener.class)
{
if (SynchronousBundleListener.class.isInstance(l))
{
- this.m_syncBundleListeners = listeners;
+ m_syncBundleListeners = listeners;
}
else
{
- this.m_bundleListeners = listeners;
+ m_bundleListeners = listeners;
}
}
else if (clazz == ServiceListener.class)
{
- this.m_serviceListeners = listeners;
+ m_serviceListeners = listeners;
}
}
}
@@ -363,7 +363,7 @@
synchronized (this)
{
// Remove all framework listeners associated with the specified bundle.
- Object[] listeners = this.m_frameworkListeners;
+ Object[] listeners = m_frameworkListeners;
for (int i = listeners.length - LISTENER_ARRAY_INCREMENT;
i >= 0;
i -= LISTENER_ARRAY_INCREMENT)
@@ -380,7 +380,7 @@
}
// Remove all bundle listeners associated with the specified bundle.
- listeners = this.m_bundleListeners;
+ listeners = m_bundleListeners;
for (int i = listeners.length - LISTENER_ARRAY_INCREMENT;
i >= 0;
i -= LISTENER_ARRAY_INCREMENT)
@@ -398,7 +398,7 @@
// Remove all synchronous bundle listeners associated with
// the specified bundle.
- listeners = this.m_syncBundleListeners;
+ listeners = m_syncBundleListeners;
for (int i = listeners.length - LISTENER_ARRAY_INCREMENT;
i >= 0;
i -= LISTENER_ARRAY_INCREMENT)
@@ -415,7 +415,7 @@
}
// Remove all service listeners associated with the specified bundle.
- listeners = this.m_serviceListeners;
+ listeners = m_serviceListeners;
for (int i = listeners.length - LISTENER_ARRAY_INCREMENT;
i >= 0;
i -= LISTENER_ARRAY_INCREMENT)
@@ -441,22 +441,22 @@
if (clazz == FrameworkListener.class)
{
- listeners = this.m_frameworkListeners;
+ listeners = m_frameworkListeners;
}
else if (clazz == BundleListener.class)
{
if (SynchronousBundleListener.class.isInstance(l))
{
- listeners = this.m_syncBundleListeners;
+ listeners = m_syncBundleListeners;
}
else
{
- listeners = this.m_bundleListeners;
+ listeners = m_bundleListeners;
}
}
else if (clazz == ServiceListener.class)
{
- listeners = this.m_serviceListeners;
+ listeners = m_serviceListeners;
}
// See if the listener is already registered, if so then
@@ -494,11 +494,11 @@
Object[] listeners = null;
synchronized (this)
{
- listeners = this.m_frameworkListeners;
+ listeners = m_frameworkListeners;
}
// Fire all framework listeners on a separate thread.
- this.fireEventAsynchronously(this.m_logger, Request.FRAMEWORK_EVENT, listeners, event);
+ this.fireEventAsynchronously(m_logger, Request.FRAMEWORK_EVENT, listeners, event);
}
public void fireBundleEvent(BundleEvent event)
@@ -508,12 +508,12 @@
Object[] syncListeners = null;
synchronized (this)
{
- listeners = this.m_bundleListeners;
- syncListeners = this.m_syncBundleListeners;
+ listeners = m_bundleListeners;
+ syncListeners = m_syncBundleListeners;
}
// Fire synchronous bundle listeners immediately on the calling thread.
- fireEventImmediately(this.m_logger, Request.BUNDLE_EVENT, syncListeners, event);
+ fireEventImmediately(m_logger, Request.BUNDLE_EVENT, syncListeners, event);
// The spec says that asynchronous bundle listeners do not get events
// of types STARTING or STOPPING.
@@ -521,7 +521,7 @@
(event.getType() != BundleEvent.STOPPING))
{
// Fire asynchronous bundle listeners on a separate thread.
- this.fireEventAsynchronously(this.m_logger, Request.BUNDLE_EVENT, listeners, event);
+ this.fireEventAsynchronously(m_logger, Request.BUNDLE_EVENT, listeners, event);
}
}
@@ -531,11 +531,11 @@
Object[] listeners = null;
synchronized (this)
{
- listeners = this.m_serviceListeners;
+ listeners = m_serviceListeners;
}
// Fire all service events immediately on the calling thread.
- fireEventImmediately(this.m_logger, Request.SERVICE_EVENT, listeners, event);
+ fireEventImmediately(m_logger, Request.SERVICE_EVENT, listeners, event);
}
private void fireEventAsynchronously(
diff --git a/framework/src/main/java/org/osgi/framework/AdminPermission.java b/framework/src/main/java/org/osgi/framework/AdminPermission.java
index 6cd7b10..dc3fff5 100644
--- a/framework/src/main/java/org/osgi/framework/AdminPermission.java
+++ b/framework/src/main/java/org/osgi/framework/AdminPermission.java
@@ -92,14 +92,14 @@
public AdminPermission(Bundle bundle, String actions)
{
this(createName(bundle), actions);
- this.m_bundle = bundle;
+ m_bundle = bundle;
}
// This constructor is only used when granting an admin permission.
public AdminPermission(String filter, String actions)
{
super((filter == null) || (filter.equals("*")) ? "(id=*)" : filter);
- this.m_actionMask = parseActions(actions);
+ m_actionMask = parseActions(actions);
}
// This constructor is only used by the admin permission collection
@@ -108,7 +108,7 @@
AdminPermission(String filter, int actionMask)
{
super((filter == null) || (filter.equals("*")) ? "(id=*)" : filter);
- this.m_actionMask = actionMask;
+ m_actionMask = actionMask;
}
public boolean equals(Object obj)
@@ -125,7 +125,7 @@
AdminPermission p = (AdminPermission) obj;
- return this.getName().equals(p.getName()) && (this.m_actionMask == p.m_actionMask);
+ return this.getName().equals(p.getName()) && (m_actionMask == p.m_actionMask);
}
public int hashCode()
@@ -135,11 +135,11 @@
public String getActions()
{
- if (this.m_actions == null)
+ if (m_actions == null)
{
- this.m_actions = createActionString(this.m_actionMask);
+ m_actions = createActionString(m_actionMask);
}
- return this.m_actions;
+ return m_actions;
}
public boolean implies(Permission p)
@@ -160,7 +160,7 @@
}
// Make sure the action mask is a subset.
- if ((this.m_actionMask & admin.m_actionMask) != admin.m_actionMask)
+ if ((m_actionMask & admin.m_actionMask) != admin.m_actionMask)
{
return false;
}
@@ -182,11 +182,11 @@
// Otherwise, see if this permission's filter matches the
// dictionary of the passed in permission.
- if (this.m_filterImpl == null)
+ if (m_filterImpl == null)
{
try
{
- this.m_filterImpl = new FilterImpl(this.getName());
+ m_filterImpl = new FilterImpl(this.getName());
}
catch (InvalidSyntaxException ex)
{
@@ -194,7 +194,7 @@
}
}
- return this.m_filterImpl.match(admin.getBundleDictionary());
+ return m_filterImpl.match(admin.getBundleDictionary());
}
public PermissionCollection newPermissionCollection()
@@ -204,16 +204,16 @@
private Dictionary getBundleDictionary()
{
- if (this.m_bundleDict == null)
+ if (m_bundleDict == null)
{
// Add bundle properties to dictionary.
- this.m_bundleDict = new Hashtable();
- this.m_bundleDict.put("id", new Long(this.m_bundle.getBundleId()));
+ m_bundleDict = new Hashtable();
+ m_bundleDict.put("id", new Long(m_bundle.getBundleId()));
- String symbolicName = this.m_bundle.getSymbolicName();
+ String symbolicName = m_bundle.getSymbolicName();
if (symbolicName != null)
{
- this.m_bundleDict.put("name", symbolicName);
+ m_bundleDict.put("name", symbolicName);
}
// Add location in privileged block since it performs a security check.
if (System.getSecurityManager() != null)
@@ -231,11 +231,11 @@
}
else
{
- this.m_bundleDict.put("location", this.m_bundle.getLocation());
- createSigner(this.m_bundle, this.m_bundleDict);
+ m_bundleDict.put("location", m_bundle.getLocation());
+ createSigner(m_bundle, m_bundleDict);
}
}
- return this.m_bundleDict;
+ return m_bundleDict;
}
private static void createSigner(Bundle bundle, Dictionary dict)
@@ -414,19 +414,19 @@
}
AdminPermission admin = (AdminPermission) permission;
- AdminPermission current = (AdminPermission) this.m_map.get(admin.getName());
+ AdminPermission current = (AdminPermission) m_map.get(admin.getName());
if (current != null)
{
if (admin.m_actionMask != current.m_actionMask)
{
- this.m_map.put(admin.getName(),
+ m_map.put(admin.getName(),
new AdminPermission(admin.getName(),
admin.m_actionMask | current.m_actionMask));
}
}
else
{
- this.m_map.put(admin.getName(), admin);
+ m_map.put(admin.getName(), admin);
}
}
@@ -437,7 +437,7 @@
return false;
}
- for (Iterator iter = this.m_map.values().iterator(); iter.hasNext(); )
+ for (Iterator iter = m_map.values().iterator(); iter.hasNext(); )
{
if (((AdminPermission) iter.next()).implies(permission))
{
@@ -450,6 +450,6 @@
public Enumeration elements()
{
- return Collections.enumeration(this.m_map.values());
+ return Collections.enumeration(m_map.values());
}
}
diff --git a/scr/src/main/java/org/apache/felix/scr/AbstractComponentManager.java b/scr/src/main/java/org/apache/felix/scr/AbstractComponentManager.java
index 9590d69..91aa1d5 100644
--- a/scr/src/main/java/org/apache/felix/scr/AbstractComponentManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/AbstractComponentManager.java
@@ -90,13 +90,13 @@
*/
protected AbstractComponentManager(BundleComponentActivator activator, ComponentMetadata metadata)
{
- this.m_activator = activator;
- this.m_componentMetadata = metadata;
+ m_activator = activator;
+ m_componentMetadata = metadata;
- this.m_state = STATE_DISABLED;
- this.m_dependencyManagers = new ArrayList();
+ m_state = STATE_DISABLED;
+ m_dependencyManagers = new ArrayList();
- Activator.trace("Component created", this.m_componentMetadata);
+ Activator.trace("Component created", m_componentMetadata);
}
//---------- Asynchronous frontend to state change methods ----------------
@@ -144,7 +144,7 @@
*/
public final void reconfigure()
{
- Activator.trace( "Deactivating and Activating to reconfigure", this.m_componentMetadata );
+ Activator.trace( "Deactivating and Activating to reconfigure", m_componentMetadata );
this.reactivate();
}
@@ -223,23 +223,23 @@
if (this.getState() == STATE_DESTROYED)
{
- Activator.error( "Destroyed Component cannot be enabled", this.m_componentMetadata );
+ Activator.error( "Destroyed Component cannot be enabled", m_componentMetadata );
return;
}
else if (this.getState() != STATE_DISABLED)
{
- Activator.trace( "Component is already enabled", this.m_componentMetadata );
+ Activator.trace( "Component is already enabled", m_componentMetadata );
return;
}
- Activator.trace("Enabling component", this.m_componentMetadata);
+ Activator.trace("Enabling component", m_componentMetadata);
try
{
// If this component has got dependencies, create dependency managers for each one of them.
- if (this.m_componentMetadata.getDependencies().size() != 0)
+ if (m_componentMetadata.getDependencies().size() != 0)
{
- Iterator dependencyit = this.m_componentMetadata.getDependencies().iterator();
+ Iterator dependencyit = m_componentMetadata.getDependencies().iterator();
while(dependencyit.hasNext())
{
@@ -247,21 +247,21 @@
DependencyManager depmanager = new DependencyManager(this, currentdependency);
- this.m_dependencyManagers.add(depmanager);
+ m_dependencyManagers.add(depmanager);
}
}
// enter enabled state before trying to activate
this.setState( STATE_ENABLED );
- Activator.trace("Component enabled", this.m_componentMetadata);
+ Activator.trace("Component enabled", m_componentMetadata);
// immediately activate the compopnent, no need to schedule again
this.activateInternal();
}
catch(Exception ex)
{
- Activator.exception( "Failed enabling Component", this.m_componentMetadata, ex );
+ Activator.exception( "Failed enabling Component", m_componentMetadata, ex );
// ensure we get back to DISABLED state
// immediately disable, no need to schedule again
@@ -293,18 +293,18 @@
// go to the activating state
this.setState(STATE_ACTIVATING);
- Activator.trace("Activating component", this.m_componentMetadata);
+ Activator.trace("Activating component", m_componentMetadata);
// Before creating the implementation object, we are going to
// test if all the mandatory dependencies are satisfied
- Iterator it = this.m_dependencyManagers.iterator();
+ Iterator it = m_dependencyManagers.iterator();
while (it.hasNext())
{
DependencyManager dm = (DependencyManager)it.next();
if (!dm.isValid())
{
// at least one dependency is not satisfied
- Activator.trace( "Dependency not satisfied: " + dm.getName(), this.m_componentMetadata );
+ Activator.trace( "Dependency not satisfied: " + dm.getName(), m_componentMetadata );
this.setState(STATE_UNSATISFIED);
return;
}
@@ -322,9 +322,9 @@
this.setState(this.getSatisfiedState());
// 5. Register provided services
- this.m_serviceRegistration = this.registerComponentService();
+ m_serviceRegistration = this.registerComponentService();
- Activator.trace("Component activated", this.m_componentMetadata);
+ Activator.trace("Component activated", m_componentMetadata);
}
/**
@@ -349,7 +349,7 @@
// start deactivation by resetting the state
this.setState( STATE_DEACTIVATING );
- Activator.trace("Deactivating component", this.m_componentMetadata);
+ Activator.trace("Deactivating component", m_componentMetadata);
// 0.- Remove published services from the registry
this.unregisterComponentService();
@@ -364,7 +364,7 @@
// reset to state UNSATISFIED
this.setState( STATE_UNSATISFIED );
- Activator.trace("Component deactivated", this.m_componentMetadata);
+ Activator.trace("Component deactivated", m_componentMetadata);
}
private void disableInternal()
@@ -375,22 +375,22 @@
// deactivate first, this does nothing if not active/registered/factory
this.deactivateInternal();
- Activator.trace("Disabling component", this.m_componentMetadata);
+ Activator.trace("Disabling component", m_componentMetadata);
// close all service listeners now, they are recreated on enable
// Stop the dependency managers to listen to events...
- Iterator it = this.m_dependencyManagers.iterator();
+ Iterator it = m_dependencyManagers.iterator();
while (it.hasNext())
{
DependencyManager dm = (DependencyManager)it.next();
dm.close();
}
- this.m_dependencyManagers.clear();
+ m_dependencyManagers.clear();
// we are now disabled, ready for re-enablement or complete destroyal
this.setState( STATE_DISABLED );
- Activator.trace("Component disabled", this.m_componentMetadata);
+ Activator.trace("Component disabled", m_componentMetadata);
}
/**
@@ -408,10 +408,10 @@
this.setState( STATE_DESTROYED );
// release references (except component metadata for logging purposes)
- this.m_activator = null;
- this.m_dependencyManagers = null;
+ m_activator = null;
+ m_dependencyManagers = null;
- Activator.trace("Component disposed", this.m_componentMetadata);
+ Activator.trace("Component disposed", m_componentMetadata);
}
//---------- Component handling methods ----------------------------------
@@ -451,11 +451,11 @@
* @return
*/
private int getSatisfiedState() {
- if (this.m_componentMetadata.isFactory())
+ if (m_componentMetadata.isFactory())
{
return STATE_FACTORY;
}
- else if (this.m_componentMetadata.isImmediate())
+ else if (m_componentMetadata.isImmediate())
{
return STATE_ACTIVE;
}
@@ -484,10 +484,10 @@
protected void unregisterComponentService()
{
- if ( this.m_serviceRegistration != null )
+ if ( m_serviceRegistration != null )
{
- this.m_serviceRegistration.unregister();
- this.m_serviceRegistration = null;
+ m_serviceRegistration.unregister();
+ m_serviceRegistration = null;
Activator.trace( "unregistering the services", this.getComponentMetadata() );
}
@@ -496,11 +496,11 @@
//**********************************************************************************************************
BundleComponentActivator getActivator() {
- return this.m_activator;
+ return m_activator;
}
Iterator getDependencyManagers() {
- return this.m_dependencyManagers.iterator();
+ return m_dependencyManagers.iterator();
}
DependencyManager getDependencyManager( String name )
@@ -562,28 +562,28 @@
}
ServiceReference getServiceReference() {
- return ( this.m_serviceRegistration != null ) ? this.m_serviceRegistration.getReference() : null;
+ return ( m_serviceRegistration != null ) ? m_serviceRegistration.getReference() : null;
}
/**
*
*/
public ComponentMetadata getComponentMetadata() {
- return this.m_componentMetadata;
+ return m_componentMetadata;
}
int getState() {
- return this.m_state;
+ return m_state;
}
/**
* sets the state of the manager
**/
protected synchronized void setState(int newState) {
- Activator.trace( "State transition : " + this.stateToString( this.m_state ) + " -> " + this.stateToString( newState ),
- this.m_componentMetadata );
+ Activator.trace( "State transition : " + this.stateToString( m_state ) + " -> " + this.stateToString( newState ),
+ m_componentMetadata );
- this.m_state = newState;
+ m_state = newState;
}
public String stateToString(int state) {
diff --git a/scr/src/main/java/org/apache/felix/scr/ComponentFactoryImpl.java b/scr/src/main/java/org/apache/felix/scr/ComponentFactoryImpl.java
index 4858c3b..63afd4c 100644
--- a/scr/src/main/java/org/apache/felix/scr/ComponentFactoryImpl.java
+++ b/scr/src/main/java/org/apache/felix/scr/ComponentFactoryImpl.java
@@ -57,8 +57,8 @@
ComponentRegistry componentRegistry )
{
super( activator, metadata );
- this.m_componentRegistry = componentRegistry;
- this.m_createdComponents = new IdentityHashMap();
+ m_componentRegistry = componentRegistry;
+ m_createdComponents = new IdentityHashMap();
}
@@ -126,13 +126,13 @@
public void updated( String pid, Dictionary configuration )
{
ComponentManager cm;
- if ( this.m_configuredServices != null )
+ if ( m_configuredServices != null )
{
- cm = ( ComponentManager ) this.m_configuredServices.get( pid );
+ cm = ( ComponentManager ) m_configuredServices.get( pid );
}
else
{
- this.m_configuredServices = new HashMap();
+ m_configuredServices = new HashMap();
cm = null;
}
@@ -142,7 +142,7 @@
cm = this.createComponentManager( configuration );
// keep a reference for future updates
- this.m_configuredServices.put( pid, cm );
+ m_configuredServices.put( pid, cm );
}
else
{
@@ -160,9 +160,9 @@
public void deleted( String pid )
{
- if ( this.m_configuredServices != null )
+ if ( m_configuredServices != null )
{
- ComponentManager cm = ( ComponentManager ) this.m_configuredServices.remove( pid );
+ ComponentManager cm = ( ComponentManager ) m_configuredServices.remove( pid );
if ( cm != null )
{
this.disposeComponentManager( cm );
@@ -187,14 +187,14 @@
*/
private ComponentManager createComponentManager( Dictionary configuration )
{
- long componentId = this.m_componentRegistry.createComponentId();
+ long componentId = m_componentRegistry.createComponentId();
ComponentManager cm = ManagerFactory.createManager( this.getActivator(), this.getComponentMetadata(), componentId );
// add the new component to the activators instances
this.getActivator().getInstanceReferences().add( cm );
// register with the internal set of created components
- this.m_createdComponents.put(cm, cm);
+ m_createdComponents.put(cm, cm);
// inject configuration if possible
if ( cm instanceof ImmediateComponentManager )
@@ -210,7 +210,7 @@
private void disposeComponentManager(ComponentManager cm) {
// remove from created components
- this.m_createdComponents.remove( cm );
+ m_createdComponents.remove( cm );
// remove from activators list
this.getActivator().getInstanceReferences().remove( cm );
diff --git a/scr/src/main/java/org/apache/felix/scr/ComponentRegistry.java b/scr/src/main/java/org/apache/felix/scr/ComponentRegistry.java
index 7e775ab..2f53bee 100644
--- a/scr/src/main/java/org/apache/felix/scr/ComponentRegistry.java
+++ b/scr/src/main/java/org/apache/felix/scr/ComponentRegistry.java
@@ -52,22 +52,22 @@
ComponentRegistry( BundleContext context )
{
- this.m_componentNames = new HashMap();
- this.m_componentCounter = -1;
+ m_componentNames = new HashMap();
+ m_componentCounter = -1;
Dictionary props = new Hashtable();
props.put( Constants.SERVICE_DESCRIPTION, "Service Component Configuration Support" );
props.put( Constants.SERVICE_VENDOR, "Apache Software Foundation" );
- this.registration = context.registerService( ConfigurationListener.class.getName(), this, props );
+ registration = context.registerService( ConfigurationListener.class.getName(), this, props );
}
void dispose()
{
- if ( this.registration != null )
+ if ( registration != null )
{
- this.registration.unregister();
- this.registration = null;
+ registration.unregister();
+ registration = null;
}
}
@@ -89,39 +89,39 @@
long createComponentId()
{
- this.m_componentCounter++;
- return this.m_componentCounter;
+ m_componentCounter++;
+ return m_componentCounter;
}
void checkComponentName( String name )
{
- if ( this.m_componentNames.containsKey( name ) )
+ if ( m_componentNames.containsKey( name ) )
{
throw new ComponentException( "The component name '" + name + "' has already been registered." );
}
// reserve the name
- this.m_componentNames.put( name, name );
+ m_componentNames.put( name, name );
}
void registerComponent( String name, ComponentManager component )
{
// only register the component if there is a registration for it !
- if ( !name.equals( this.m_componentNames.get( name ) ) )
+ if ( !name.equals( m_componentNames.get( name ) ) )
{
// this is not expected if all works ok
throw new ComponentException( "The component name '" + name + "' has already been registered." );
}
- this.m_componentNames.put( name, component );
+ m_componentNames.put( name, component );
}
ComponentManager getComponent( String name )
{
- Object entry = this.m_componentNames.get( name );
+ Object entry = m_componentNames.get( name );
// only return the entry if non-null and not a reservation
if ( entry instanceof ComponentManager )
@@ -135,6 +135,6 @@
void unregisterComponent( String name )
{
- this.m_componentNames.remove( name );
+ m_componentNames.remove( name );
}
}
diff --git a/scr/src/main/java/org/apache/felix/scr/DependencyManager.java b/scr/src/main/java/org/apache/felix/scr/DependencyManager.java
index 128b7ac..31cb787 100644
--- a/scr/src/main/java/org/apache/felix/scr/DependencyManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/DependencyManager.java
@@ -67,10 +67,10 @@
DependencyManager( AbstractComponentManager componentManager, ReferenceMetadata dependency )
throws InvalidSyntaxException
{
- this.m_componentManager = componentManager;
- this.m_dependencyMetadata = dependency;
- this.m_bindUsesServiceReference = false;
- this.m_tracked = new HashMap();
+ m_componentManager = componentManager;
+ m_dependencyMetadata = dependency;
+ m_bindUsesServiceReference = false;
+ m_tracked = new HashMap();
// register the service listener
String filterString = "(" + Constants.OBJECTCLASS + "=" + dependency.getInterface() + ")";
@@ -117,12 +117,12 @@
*/
void close()
{
- BundleContext context = this.m_componentManager.getActivator().getBundleContext();
+ BundleContext context = m_componentManager.getActivator().getBundleContext();
context.removeServiceListener( this );
- synchronized ( this.m_tracked )
+ synchronized ( m_tracked )
{
- for ( Iterator ri = this.m_tracked.keySet().iterator(); ri.hasNext(); )
+ for ( Iterator ri = m_tracked.keySet().iterator(); ri.hasNext(); )
{
ServiceReference sr = ( ServiceReference ) ri.next();
context.ungetService( sr );
@@ -137,9 +137,9 @@
*/
int size()
{
- synchronized ( this.m_tracked )
+ synchronized ( m_tracked )
{
- return this.m_tracked.size();
+ return m_tracked.size();
}
}
@@ -149,11 +149,11 @@
*/
ServiceReference getServiceReference()
{
- synchronized ( this.m_tracked )
+ synchronized ( m_tracked )
{
- if ( this.m_tracked.size() > 0 )
+ if ( m_tracked.size() > 0 )
{
- return ( ServiceReference ) this.m_tracked.keySet().iterator().next();
+ return ( ServiceReference ) m_tracked.keySet().iterator().next();
}
return null;
@@ -167,11 +167,11 @@
*/
ServiceReference[] getServiceReferences()
{
- synchronized ( this.m_tracked )
+ synchronized ( m_tracked )
{
- if ( this.m_tracked.size() > 0 )
+ if ( m_tracked.size() > 0 )
{
- return ( ServiceReference[] ) this.m_tracked.keySet().toArray( new ServiceReference[this.m_tracked.size()] );
+ return ( ServiceReference[] ) m_tracked.keySet().toArray( new ServiceReference[m_tracked.size()] );
}
return null;
@@ -184,9 +184,9 @@
*/
Object getService( ServiceReference serviceReference )
{
- synchronized ( this.m_tracked )
+ synchronized ( m_tracked )
{
- return this.m_tracked.get( serviceReference );
+ return m_tracked.get( serviceReference );
}
}
@@ -196,11 +196,11 @@
*/
Object getService()
{
- synchronized ( this.m_tracked )
+ synchronized ( m_tracked )
{
- if ( this.m_tracked.size() > 0 )
+ if ( m_tracked.size() > 0 )
{
- return this.m_tracked.values().iterator().next();
+ return m_tracked.values().iterator().next();
}
return null;
@@ -214,11 +214,11 @@
*/
Object[] getServices()
{
- synchronized ( this.m_tracked )
+ synchronized ( m_tracked )
{
- if ( this.m_tracked.size() > 0 )
+ if ( m_tracked.size() > 0 )
{
- return this.m_tracked.values().toArray( new ServiceReference[this.m_tracked.size()] );
+ return m_tracked.values().toArray( new ServiceReference[m_tracked.size()] );
}
return null;
@@ -233,7 +233,7 @@
*/
String getName()
{
- return this.m_dependencyMetadata.getName();
+ return m_dependencyMetadata.getName();
}
@@ -243,7 +243,7 @@
*/
boolean isValid()
{
- return this.size() > 0 || this.m_dependencyMetadata.isOptional();
+ return this.size() > 0 || m_dependencyMetadata.isOptional();
}
@@ -278,7 +278,7 @@
int max = 1;
boolean retval = true;
- if ( this.m_dependencyMetadata.isMultiple() == true )
+ if ( m_dependencyMetadata.isMultiple() == true )
{
max = refs.length;
}
@@ -290,7 +290,7 @@
{
// There was an exception when calling the bind method
Activator.error( "Dependency Manager: Possible exception in the bind method during initialize()",
- this.m_componentManager.getComponentMetadata() );
+ m_componentManager.getComponentMetadata() );
return false;
}
}
@@ -355,7 +355,7 @@
method = AbstractComponentManager.getMethod( targetClass, methodname, new Class[]
{ ServiceReference.class } );
- this.m_bindUsesServiceReference = true;
+ m_bindUsesServiceReference = true;
}
catch ( NoSuchMethodException ex )
{
@@ -364,9 +364,9 @@
{
// Case2
- this.m_bindUsesServiceReference = false;
+ m_bindUsesServiceReference = false;
- parameterClass = this.m_componentManager.getActivator().getBundleContext().getBundle().loadClass(
+ parameterClass = m_componentManager.getActivator().getBundleContext().getBundle().loadClass(
parameterClassName );
method = AbstractComponentManager.getMethod( targetClass, methodname, new Class[]
@@ -425,7 +425,7 @@
}
catch ( ClassNotFoundException ex2 )
{
- Activator.exception( "Cannot load class used as parameter " + parameterClassName, this.m_componentManager
+ Activator.exception( "Cannot load class used as parameter " + parameterClassName, m_componentManager
.getComponentMetadata(), ex2 );
}
}
@@ -457,10 +457,10 @@
try
{
// Get the bind method
- Activator.trace( "getting bind: " + this.m_dependencyMetadata.getBind(), this.m_componentManager
+ Activator.trace( "getting bind: " + m_dependencyMetadata.getBind(), m_componentManager
.getComponentMetadata() );
- Method bindMethod = this.getBindingMethod( this.m_dependencyMetadata.getBind(), implementationObject.getClass(),
- this.m_dependencyMetadata.getInterface() );
+ Method bindMethod = this.getBindingMethod( m_dependencyMetadata.getBind(), implementationObject.getClass(),
+ m_dependencyMetadata.getInterface() );
if ( bindMethod == null )
{
@@ -468,14 +468,14 @@
// error
// message with the log service, if present, and ignore the
// method
- Activator.error( "bind() method not found", this.m_componentManager.getComponentMetadata() );
+ Activator.error( "bind() method not found", m_componentManager.getComponentMetadata() );
return false;
}
// Get the parameter
Object parameter;
- if ( this.m_bindUsesServiceReference == false )
+ if ( m_bindUsesServiceReference == false )
{
parameter = service;
}
@@ -488,7 +488,7 @@
bindMethod.invoke( implementationObject, new Object[]
{ parameter } );
- Activator.trace( "bound: " + this.getName(), this.m_componentManager.getComponentMetadata() );
+ Activator.trace( "bound: " + this.getName(), m_componentManager.getComponentMetadata() );
return true;
}
@@ -498,17 +498,17 @@
// public, SCR must log an error
// message with the log service, if present, and ignore the
// method
- Activator.exception( "bind() method cannot be called", this.m_componentManager.getComponentMetadata(), ex );
+ Activator.exception( "bind() method cannot be called", m_componentManager.getComponentMetadata(), ex );
return false;
}
catch ( InvocationTargetException ex )
{
- Activator.exception( "DependencyManager : exception while invoking " + this.m_dependencyMetadata.getBind()
- + "()", this.m_componentManager.getComponentMetadata(), ex );
+ Activator.exception( "DependencyManager : exception while invoking " + m_dependencyMetadata.getBind()
+ + "()", m_componentManager.getComponentMetadata(), ex );
return false;
}
}
- else if ( implementationObject == null && this.m_componentManager.getComponentMetadata().isImmediate() == false )
+ else if ( implementationObject == null && m_componentManager.getComponentMetadata().isImmediate() == false )
{
return true;
}
@@ -537,16 +537,16 @@
{
try
{
- Activator.trace( "getting unbind: " + this.m_dependencyMetadata.getUnbind(), this.m_componentManager
+ Activator.trace( "getting unbind: " + m_dependencyMetadata.getUnbind(), m_componentManager
.getComponentMetadata() );
- Method unbindMethod = this.getBindingMethod( this.m_dependencyMetadata.getUnbind(), implementationObject
- .getClass(), this.m_dependencyMetadata.getInterface() );
+ Method unbindMethod = this.getBindingMethod( m_dependencyMetadata.getUnbind(), implementationObject
+ .getClass(), m_dependencyMetadata.getInterface() );
// Recover the object that is bound from the map.
// Object parameter = m_boundServices.get(ref);
Object parameter = null;
- if ( this.m_bindUsesServiceReference == true )
+ if ( m_bindUsesServiceReference == true )
{
parameter = ref;
}
@@ -561,14 +561,14 @@
// error
// message with the log service, if present, and ignore the
// method
- Activator.error( "unbind() method not found", this.m_componentManager.getComponentMetadata() );
+ Activator.error( "unbind() method not found", m_componentManager.getComponentMetadata() );
return false;
}
unbindMethod.invoke( implementationObject, new Object[]
{ parameter } );
- Activator.trace( "unbound: " + this.getName(), this.m_componentManager.getComponentMetadata() );
+ Activator.trace( "unbound: " + this.getName(), m_componentManager.getComponentMetadata() );
return true;
}
@@ -578,18 +578,18 @@
// public, SCR must log an error
// message with the log service, if present, and ignore the
// method
- Activator.exception( "unbind() method cannot be called", this.m_componentManager.getComponentMetadata(), ex );
+ Activator.exception( "unbind() method cannot be called", m_componentManager.getComponentMetadata(), ex );
return false;
}
catch ( InvocationTargetException ex )
{
- Activator.exception( "DependencyManager : exception while invoking " + this.m_dependencyMetadata.getUnbind()
- + "()", this.m_componentManager.getComponentMetadata(), ex );
+ Activator.exception( "DependencyManager : exception while invoking " + m_dependencyMetadata.getUnbind()
+ + "()", m_componentManager.getComponentMetadata(), ex );
return false;
}
}
- else if ( implementationObject == null && this.m_componentManager.getComponentMetadata().isImmediate() == false )
+ else if ( implementationObject == null && m_componentManager.getComponentMetadata().isImmediate() == false )
{
return true;
}
@@ -605,10 +605,10 @@
private void addingService( ServiceReference reference )
{
// get the service and keep it here (for now or later)
- Object service = this.m_componentManager.getActivator().getBundleContext().getService( reference );
- synchronized ( this.m_tracked )
+ Object service = m_componentManager.getActivator().getBundleContext().getService( reference );
+ synchronized ( m_tracked )
{
- this.m_tracked.put( reference, service );
+ m_tracked.put( reference, service );
}
// forward the event if in event handling state
@@ -618,25 +618,25 @@
// the component is UNSATISFIED if enabled but any of the references
// have been missing when activate was running the last time or
// the component has been deactivated
- if ( this.m_componentManager.getState() == AbstractComponentManager.STATE_UNSATISFIED )
+ if ( m_componentManager.getState() == AbstractComponentManager.STATE_UNSATISFIED )
{
- this.m_componentManager.activate();
+ m_componentManager.activate();
}
// Otherwise, this checks for dynamic 0..1, 0..N, and 1..N
// it never
// checks for 1..1 dynamic which is done above by the
// validate()
- else if ( !this.m_dependencyMetadata.isStatic() )
+ else if ( !m_dependencyMetadata.isStatic() )
{
// For dependency that are aggregates, always bind the
// service
// Otherwise only bind if bind services is zero, which
// captures the 0..1 case
// (size is still zero as we are called for the first service)
- if ( this.m_dependencyMetadata.isMultiple() || this.size() == 0 )
+ if ( m_dependencyMetadata.isMultiple() || this.size() == 0 )
{
- this.invokeBindMethod( this.m_componentManager.getInstance(), reference, service );
+ this.invokeBindMethod( m_componentManager.getInstance(), reference, service );
}
}
}
@@ -647,9 +647,9 @@
{
// remove the service from the internal registry, ignore if not cached
Object service;
- synchronized ( this.m_tracked )
+ synchronized ( m_tracked )
{
- service = this.m_tracked.remove( reference );
+ service = m_tracked.remove( reference );
}
// do nothing in the unlikely case that we do not have it cached
@@ -662,18 +662,18 @@
{
// A static dependency is broken the instance manager will
// be invalidated
- if ( this.m_dependencyMetadata.isStatic() )
+ if ( m_dependencyMetadata.isStatic() )
{
// setStateDependency(DependencyChangeEvent.DEPENDENCY_INVALID);
try
{
- Activator.trace( "Dependency Manager: Static dependency is broken", this.m_componentManager
+ Activator.trace( "Dependency Manager: Static dependency is broken", m_componentManager
.getComponentMetadata() );
- this.m_componentManager.reactivate();
+ m_componentManager.reactivate();
}
catch ( Exception ex )
{
- Activator.exception( "Exception while recreating dependency ", this.m_componentManager
+ Activator.exception( "Exception while recreating dependency ", m_componentManager
.getComponentMetadata(), ex );
}
}
@@ -683,7 +683,7 @@
// Release references to the service, call unbinder
// method
// and eventually request service unregistration
- Object instance = this.m_componentManager.getInstance();
+ Object instance = m_componentManager.getInstance();
this.invokeUnbindMethod( instance, reference, service );
// The only thing we need to do here is check if we can
@@ -700,13 +700,13 @@
// try to reinitialize
if ( !this.bind( instance ) )
{
- if ( !this.m_dependencyMetadata.isOptional() )
+ if ( !m_dependencyMetadata.isOptional() )
{
Activator
.trace(
"Dependency Manager: Mandatory dependency not fullfilled and no replacements available... unregistering service...",
- this.m_componentManager.getComponentMetadata() );
- this.m_componentManager.reactivate();
+ m_componentManager.getComponentMetadata() );
+ m_componentManager.reactivate();
}
}
}
@@ -714,13 +714,13 @@
}
// finally unget the service
- this.m_componentManager.getActivator().getBundleContext().ungetService( reference );
+ m_componentManager.getActivator().getBundleContext().ungetService( reference );
}
private boolean handleServiceEvent()
{
- return ( this.m_componentManager.getState() & STATE_MASK ) != 0;
+ return ( m_componentManager.getState() & STATE_MASK ) != 0;
// return state != AbstractComponentManager.INSTANCE_DESTROYING
// && state != AbstractComponentManager.INSTANCE_DESTROYED
// && state != AbstractComponentManager.INSTANCE_CREATING
diff --git a/scr/src/main/java/org/apache/felix/scr/ImmediateComponentManager.java b/scr/src/main/java/org/apache/felix/scr/ImmediateComponentManager.java
index 022fd1e..1c5e563 100644
--- a/scr/src/main/java/org/apache/felix/scr/ImmediateComponentManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/ImmediateComponentManager.java
@@ -62,7 +62,7 @@
{
super(activator, metadata);
- this.m_componentId = componentId;
+ m_componentId = componentId;
}
@@ -80,16 +80,16 @@
// if something failed craeating the object, we fell back to
// unsatisfied !!
if (tmpComponent != null) {
- this.m_componentContext = tmpContext;
- this.m_implementationObject = tmpComponent;
+ m_componentContext = tmpContext;
+ m_implementationObject = tmpComponent;
}
}
protected void deleteComponent() {
- this.disposeImplementationObject( this.m_implementationObject, this.m_componentContext );
- this.m_implementationObject = null;
- this.m_componentContext = null;
- this.m_properties = null;
+ this.disposeImplementationObject( m_implementationObject, m_componentContext );
+ m_implementationObject = null;
+ m_componentContext = null;
+ m_properties = null;
}
@@ -101,7 +101,7 @@
* @return the object that implements the services
*/
public Object getInstance() {
- return this.m_implementationObject;
+ return m_implementationObject;
}
protected Object createImplementationObject(ComponentContext componentContext) {
@@ -224,11 +224,11 @@
* factory component.
*/
protected Object getService() {
- return this.m_implementationObject;
+ return m_implementationObject;
}
protected void setFactoryProperties(Dictionary dictionary) {
- this.m_factoryProperties = this.copyTo( null, dictionary );
+ m_factoryProperties = this.copyTo( null, dictionary );
}
/**
@@ -245,7 +245,7 @@
// TODO: Currently on ManagedService style configuration is supported, ManagedServiceFactory style is missing
- if ( this.m_properties == null )
+ if ( m_properties == null )
{
// 1. the properties from the component descriptor
@@ -269,16 +269,16 @@
}
// 3. copy any component factory properties, not supported yet
- this.copyTo( props, this.m_factoryProperties );
+ this.copyTo( props, m_factoryProperties );
// 4. set component.name and component.id
props.put( ComponentConstants.COMPONENT_NAME, this.getComponentMetadata().getName() );
- props.put( ComponentConstants.COMPONENT_ID, new Long( this.m_componentId ) );
+ props.put( ComponentConstants.COMPONENT_ID, new Long( m_componentId ) );
- this.m_properties = props;
+ m_properties = props;
}
- return this.m_properties;
+ return m_properties;
}
}