Menu

#85 comment between } and "catch"

closed
None
1
2015-02-14
2002-06-15
Larry Hamel
No

in source file attached, line 1738, has comment between brace and "catch". a deletion of a EOL at end of comment causes the creation of a syntax-error:

$ ant format
Buildfile: build.xml

format:
[jalopy] Jalopy Java Source Code Formatter 1.0b7

before:
--------------------------------------------------

try {
successObject = session.getPersistentAttribute(
sessionKey);
} //Can occur if user invalidated the session! (ugly)
catch (NullPointerException npe) {
}

-------------------------------------------------------

after:

try {
successObject = session.getPersistentAttribute(
sessionKey);
} //Can occur if user invalidated the session! (ugly) catch (NullPointerException npe) {
}

---------------------------------------------------

prefs:

<jalopy>
<printer>
<whitespace>
<paddingLogicalOperators>true</paddingLogicalOperators>
<padddingBraces>true</padddingBraces>
<beforeStatementParenthesis>true</beforeStatementParenthesis>
<padddingParenthesis>false</padddingParenthesis>
<beforeBraces>true</beforeBraces>
<paddingShiftOperators>true</paddingShiftOperators>
<beforeMethodCallParenthesis>false</beforeMethodCallParenthesis>
<beforeLogicalNot>false</beforeLogicalNot>
<beforeBracketsTypes>false</beforeBracketsTypes>
<paddingMathematicalOperators>true</paddingMathematicalOperators>
<afterComma>true</afterComma>
<afterCastingParenthesis>false</afterCastingParenthesis>
<paddingBitwiseOperators>true</paddingBitwiseOperators>
<padddingTypeCast>true</padddingTypeCast>
<beforeCaseColon>false</beforeCaseColon>
<beforeBrackets>false</beforeBrackets>
<padddingBrackets>false</padddingBrackets>
<paddingRelationalOperators>true</paddingRelationalOperators>
<paddingAssignmentOperators>true</paddingAssignmentOperators>
<beforeMethodDeclarationParenthesis>false</beforeMethodDeclarationParenthesis>
<afterSemiColon>true</afterSemiColon>
</whitespace>
<blankLines>
<afterClass>1</afterClass>
<beforeBraceRight>-1</beforeBraceRight>
<beforeFooter>0</beforeFooter>
<afterInterface>1</afterInterface>
<beforeDeclaration>1</beforeDeclaration>
<beforeCommentMultiLine>1</beforeCommentMultiLine>
<afterDeclaration>0</afterDeclaration>
<afterPackage>1</afterPackage>
<afterBlock>1</afterBlock>
<afterFooter>0</afterFooter>
<beforeControl>1</beforeControl>
<beforeHeader>0</beforeHeader>
<keepUpTo>0</keepUpTo>
<afterMethod>1</afterMethod>
<beforeCaseBlock>1</beforeCaseBlock>
<beforeJavadoc>1</beforeJavadoc>
<beforeBlock>1</beforeBlock>
<afterBraceLeft>-1</afterBraceLeft>
<beforeCommentSingleLine>1</beforeCommentSingleLine>
<afterHeader>0</afterHeader>
<afterLastImport>2</afterLastImport>
</blankLines>
<indentation>
<leading>0</leading>
<continationIfTernary>true</continationIfTernary>
<braceCuddled>1</braceCuddled>
<label>false</label>
<general>4</general>
<firstColumnComments>true</firstColumnComments>
<tabs>
<size>4</size>
<use>false</use>
</tabs>
<extends>-1</extends>
<caseFromSwitch>true</caseFromSwitch>
<braceLeft>1</braceLeft>
<continuation>4</continuation>
<deep>60</deep>
<braceRight>0</braceRight>
<commentEndline>1</commentEndline>
<throws>8</throws>
<braceRightAfter>0</braceRightAfter>
<implements>-1</implements>
<continationIf>false</continationIf>
</indentation>
<sorting>
<class>false</class>
<modifiers>
<use>false</use>
</modifiers>
<method>false</method>
<constructor>false</constructor>
<use>false</use>
<order>Variable,Initializer,Constructor,Method,Interface,Class</order>
<interface>false</interface>
<variable>false</variable>
</sorting>
<wrapping>
<paramsMethodDef>false</paramsMethodDef>
<beforeOperator>false</beforeOperator>
<use>true</use>
<afterExtendsTypes>true</afterExtendsTypes>
<arrayElements>0</arrayElements>
<beforeExtends>true</beforeExtends>
<afterLabel>true</afterLabel>
<paramsMethodCall>false</paramsMethodCall>
<afterThrowsTypes>false</afterThrowsTypes>
<beforeImplements>true</beforeImplements>
<beforeThrows>true</beforeThrows>
<afterImplementsTypes>true</afterImplementsTypes>
<paramsMethodCallIfCall>false</paramsMethodCallIfCall>
<afterChainedMethodCall>false</afterChainedMethodCall>
<lineLength>79</lineLength>
</wrapping>
<comments>
<insertSeparator>false</insertSeparator>
<javadoc>
<addCtor>0</addCtor>
<tags>
<standard />
<in-line />
</tags>
<remove>false</remove>
<addMethod>0</addMethod>
<addClass>0</addClass>
<templateDescription>DOCUMENT ME!</templateDescription>
<templateThrows>DOCUMENT ME!</templateThrows>
<checkTags>false</checkTags>
<templateReturn>DOCUMENT ME!</templateReturn>
<parseComments>false</parseComments>
<checkInnerClass>false</checkInnerClass>
<templateParam>DOCUMENT ME!</templateParam>
</javadoc>
<removeSeparator>false</removeSeparator>
<removeSingleLine>false</removeSingleLine>
<formatMultiLine>true</formatMultiLine>
<removeMultiLine>false</removeMultiLine>
<insertSeparatorRecursive>false</insertSeparatorRecursive>
</comments>
<footer>
<keys />
<text />
<use>false</use>
</footer>
<braces>
<treatMethodClassDifferent>false</treatMethodClassDifferent>
<insertBracesWhile>true</insertBracesWhile>
<removeBracesWhile>false</removeBracesWhile>
<insertBracesFor>true</insertBracesFor>
<insertBracesDoWhile>true</insertBracesDoWhile>
<emptyInsertStatement>false</emptyInsertStatement>
<rightBraceNewLine>false</rightBraceNewLine>
<removeBracesFor>false</removeBracesFor>
<removeBracesIfElse>false</removeBracesIfElse>
<removeBracesBlock>false</removeBracesBlock>
<removeBracesDoWhile>false</removeBracesDoWhile>
<insertBracesIfElse>true</insertBracesIfElse>
<emptyCuddle>false</emptyCuddle>
<leftBraceNewLine>false</leftBraceNewLine>
</braces>
<chunks>
<byBlankLines>true</byBlankLines>
<byComments>true</byComments>
</chunks>
<alignment>
<varIdents>false</varIdents>
<ParamsMethodDef>false</ParamsMethodDef>
<varAssigns>false</varAssigns>
<ternaryExpresssion>false</ternaryExpresssion>
<ternaryValue>false</ternaryValue>
</alignment>
<header>
<use>true</use>
<keys>JCorporate Ltd</keys>
<text>/*
* Copyright 1999-2002 Jcorporate Ltd.
*/
</text>
</header>
<history>
<policy>0</policy>
</history>
</printer>
<transform>
<misc>
<insertLoggingConditional>true</insertLoggingConditional>
<insertUID>false</insertUID>
<insertExpressionParenthesis>false</insertExpressionParenthesis>
</misc>
<import>
<policy>0</policy>
<grouping>javax:2|java:2|gnu:2</grouping>
<groupingDepth>3</groupingDepth>
<sort>false</sort>
</import>
</transform>
<messages>
<transformMsgPrio>30000</transformMsgPrio>
<printerMsgPrio>30000</printerMsgPrio>
<parserJavadocMsgPrio>30000</parserJavadocMsgPrio>
<parserMsgPrio>30000</parserMsgPrio>
<printerJavadocMsgPrio>30000</printerJavadocMsgPrio>
<showErrorStackTrace>true</showErrorStackTrace>
<ioMsgPrio>30000</ioMsgPrio>
</messages>
<general>
<styleDescription>java</styleDescription>
<backupDirectory>C:\Documents and Settings\larry\.jalopy\bak</backupDirectory>
<styleName>larry</styleName>
<threadCount>1</threadCount>
<backupLevel>1</backupLevel>
<forceFormatting>false</forceFormatting>
</general>
<internal>
<styleLastPanelClass>de.hunsicker.jalopy.ui.IndentationPanel</styleLastPanelClass>
<version>2</version>
<urls>
<export>C:\Documents and Settings\larry\larry2.jalopy.xml|C:\Documents and Settings\larry\larry1.xml|C:\Documents and Settings\larry\larry1|larry1</export>
</urls>
<styleLastPanel>indentation</styleLastPanel>
<styleLastPanelTitle>Indentation</styleLastPanelTitle>
</internal>
</jalopy>

Discussion

  • Larry Hamel

    Larry Hamel - 2002-06-15
     
  • Marco Hunsicker

    Marco Hunsicker - 2002-06-15
    • assigned_to: nobody --> marcohu
    • summary: comment between } and "catch" --> comment between } and "catch"
    • status: open --> closed
     
  • Marco Hunsicker

    Marco Hunsicker - 2002-06-15

    Logged In: YES
    user_id=44430

    Duplicates #562034. Will be fixed with the next beta.
    Workaround: use C brace style

     
  • Marco Hunsicker

    Marco Hunsicker - 2002-07-28
    • priority: 5 --> 1
    • summary: comment between } and "catch" --> comment between } and "catch"
     

Log in to post a comment.