Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
BZ-1192459: quick remediation for deadlock. this should be improved i…
Browse files Browse the repository at this point in the history
…n order to avoid method level sync.

(definitive solution should be careful in order to preserve clustering sync)
  • Loading branch information
porcelli committed Feb 19, 2015
1 parent fcc4db2 commit 87d1961
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -47,8 +47,8 @@ public class WorkbenchServicesImpl
private final XStream xs = new XStream();

@Override
public void save( final String perspectiveId,
final PerspectiveDefinition perspective ) {
public synchronized void save( final String perspectiveId,
final PerspectiveDefinition perspective ) {
final String xml = xs.toXML( perspective );
final Path perspectivePath = userServices.buildPath( "perspectives",
perspectiveId + ".perspective" );
Expand All @@ -61,7 +61,7 @@ public void save( final String perspectiveId,
}

@Override
public void save( SplashScreenFilter splashFilter ) {
public synchronized void save( SplashScreenFilter splashFilter ) {
final String xml = xs.toXML( splashFilter );
final Path splashFilterPath = userServices.buildPath( "splash",
splashFilter.getName() + ".filter" );
Expand All @@ -86,7 +86,7 @@ public PerspectiveDefinition loadPerspective( final String perspectiveName ) {
}

@Override
public void removePerspectiveStates() {
public synchronized void removePerspectiveStates() {
final Path perspectivesPath = userServices.buildPath( "perspectives" );
if ( ioService.exists( perspectivesPath ) ) {
try {
Expand Down Expand Up @@ -135,7 +135,7 @@ public Map<String, String> loadDefaultEditorsMap() {
}

@Override
public void saveDefaultEditors( final Map<String, String> properties ) {
public synchronized void saveDefaultEditors( final Map<String, String> properties ) {
final StringBuilder text = new StringBuilder();
for ( String key : properties.keySet() ) {
text.append( String.format( "%s=%s", key, properties.get( key ) ) );
Expand Down

0 comments on commit 87d1961

Please sign in to comment.