Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] JDT core ASTMatcher comparing 'Long' variables

Please open a bug against JDT/Core. I would be tempted to say that 1L or 1l should be identical even if this is different from a lexical point of view,
Same should apply for floats.

Note that for this kind of questions, the jdt forum is more appropriate. This mailing list is reserved for development issues with JDT/Core.

Olivier


From: Johannes Tietje <johannes.tietje@xxxxxxxxxxxxxxxxx>
To: jdt-core-dev@xxxxxxxxxxx
Date: 2011-05-03 05:02
Subject: [jdt-core-dev] JDT core ASTMatcher comparing 'Long' variables
Sent by: jdt-core-dev-bounces@xxxxxxxxxxx





Hello,

I recently came along this incident when using the JDT core ASTMatcher,
which kind of confused me---I compare two compilation units through

sourceUnit.subtreeMatch(matcher, targetUnit)

which turn out not no be equal, but what these two units distinguish is
only a single character. The first unit contains the line

  private static final long serialVersionUID = 1l;

while this line in the second unit looks like

   private static final long serialVersionUID = 1L;

and otherwise, the two units are identical. Is this "difference"
appropriate (aka. where is the syntactical/semantical difference between
"1l" and "1L") or not?

Kind regards,
Johannes Tietje

_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev



Back to the top