Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Maxim Mossienko
Subsystem
Find, Replace, Find Usages
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Raja Nagendra Kumar
    4 years ago (08 Apr 2007 08:26)
  • Updated by   root
    2 years ago (17 Jan 2010 20:44)
  • Jira: IDEADEV-16080
    (history, comments)
 
IDEA-38043 Strucural replace is resulting in extra ";" for some cases related to brack; and continue; statements
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
On Structural replace of

Find:
try {
$TryStatement$;
} catch(Exception $ExceptionDcl$) {
$CatchStatement$;
}

Replace:

try {
$TryStatement$;
} catch(Throwable $ExceptionDcl$) {
$CatchStatement$;
}

is resulting in extra ';' for code like

for (int i = 0; i < MIMEHelper.MIME_MAP.length; i++)
    {
     String s = aFileNameWithOutExtention + MIMEHelper.MIME_MAP[i][0][0];
     try
     {
        if (ENABLE_Z107_READING)
        {
         in = aFileNameWithOutExtention.getClass().getResourceAsStream(s);
        }
        else
        {
         data = ResourceHelper.readResource(s);
        }
        mime = MIMEHelper.MIME_MAP[i][1][0];
        break;
     }
     catch (final Throwable e)
     {
        continue;
     }
    }

After replace the result is


for (int i = 0; i < MIMEHelper.MIME_MAP.length; i++)
    {
     String s = aFileNameWithOutExtention + MIMEHelper.MIME_MAP[i][0][0];
     try
     {
        if (ENABLE_Z107_READING)
        {
         in = aFileNameWithOutExtention.getClass().getResourceAsStream(s);
        }
        else
        {
         data = ResourceHelper.readResource(s);
        }
        mime = MIMEHelper.MIME_MAP[i][1][0];
        break;
        ;
     }
     catch (final Throwable e) {
continue
     ;;
}
    }

This is resulting in compilation error of unreachable statement.

Regards,
Raja Nagendra Kumar

Environment: Windows

Issue was resolved
Comments (0)
 
History
 
Linked Issues (?)
 
Issue has no comments