[sip-comm-dev] Re: svn commit: r5876 - trunk/src/net/java/sip/communicator: impl/protocol/icq plugin/otr


#1

Hi George,

I know I'm likely to be bitching for nothing while you're working on
resolving actual issues but since we've been trying to follow the
convention for some time now... :slight_smile:

- This commit adds characters beyond the 80 chars per line. I guess
there may have been another line that already breaks the convention
but...

- Earlier commits use class-specific imports while our convention
requires that we import packages with *.

Could I please bother you to fix them whenever you feel like it?

Thank you very much,
Lubomir

P.S. And for the sake of completeness of my nags, just a reminder
about the license headers at the top of the java files.

路路路

On Fri, Aug 28, 2009 at 5:04 PM, <666f6f@dev.java.net> wrote:

Author: 666f6f
Date: 2009-08-28 14:04:16+0000
New Revision: 5876

Modified:
trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java
trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java

Log:
Otr Plugin: Fixed otr.w3c.dom.DOMException for ICQ protocol. Also make sure we deliver the transformed message.

Modified: trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java?view=diff&rev=5876&p1=trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java&p2=trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java&r1=5875&r2=5876

--- trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java 2009-08-28 14:04:16+0000
@@ -177,14 +177,16 @@
if (msgDeliveryPendingEvt == null)
return;

+ String transformedContent = msgDeliveryPendingEvt.getSourceMessage().getContent();
+
if (to.getPresenceStatus().isOnline())
{
//do not add the conversation listener in here. we'll add it
//inside the icbm listener
- imConversation.sendMessage(new SimpleMessage(messageContent));
+ imConversation.sendMessage(new SimpleMessage(transformedContent));
}
else
- imConversation.sendMessage(new SimpleMessage(messageContent), true);
+ imConversation.sendMessage(new SimpleMessage(transformedContent), true);

    MessageDeliveredEvent msgDeliveredEvt = new MessageDeliveredEvent\(
            message, to, System\.currentTimeMillis\(\)\);

Modified: trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java?view=diff&rev=5876&p1=trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java&p2=trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java&r1=5875&r2=5876

--- trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java (original)
+++ trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java 2009-08-28 14:04:16+0000
@@ -223,6 +223,14 @@
class Configurator {

   private String getXmlFriendlyString\(String s\)\{

+ if (s == null || s.length() < 1)
+ return s;
+
+ // XML Tags are not allowed to start with digits,
+ // insert a dummy "p" char.
+ if (Character.isDigit(s.charAt(0)))
+ s = "p" + s;
+
char[] cId = new char[s.length()];
for (int i = 0; i < cId.length; i++) {
char c = s.charAt(i);

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

argh.. you are absolutely right, will take care of this. Thanks for
the reminder :>

路路路

On Fri, Aug 28, 2009 at 6:31 PM, Lubomir Marinov<lubomir.marinov@gmail.com> wrote:

Hi George,

I know I'm likely to be bitching for nothing while you're working on
resolving actual issues but since we've been trying to follow the
convention for some time now... :slight_smile:

- This commit adds characters beyond the 80 chars per line. I guess
there may have been another line that already breaks the convention
but...

- Earlier commits use class-specific imports while our convention
requires that we import packages with *.

Could I please bother you to fix them whenever you feel like it?

Thank you very much,
Lubomir

P.S. And for the sake of completeness of my nags, just a reminder
about the license headers at the top of the java files.

On Fri, Aug 28, 2009 at 5:04 PM, <666f6f@dev.java.net> wrote:

Author: 666f6f
Date: 2009-08-28 14:04:16+0000
New Revision: 5876

Modified:
trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java
trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java

Log:
Otr Plugin: Fixed otr.w3c.dom.DOMException for ICQ protocol. Also make sure we deliver the transformed message.

Modified: trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java?view=diff&rev=5876&p1=trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java&p2=trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java&r1=5875&r2=5876

--- trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java 2009-08-28 14:04:16+0000
@@ -177,14 +177,16 @@
if (msgDeliveryPendingEvt == null)
return;

+ String transformedContent = msgDeliveryPendingEvt.getSourceMessage().getContent();
+
if (to.getPresenceStatus().isOnline())
{
//do not add the conversation listener in here. we'll add it
//inside the icbm listener
- imConversation.sendMessage(new SimpleMessage(messageContent));
+ imConversation.sendMessage(new SimpleMessage(transformedContent));
}
else
- imConversation.sendMessage(new SimpleMessage(messageContent), true);
+ imConversation.sendMessage(new SimpleMessage(transformedContent), true);

    MessageDeliveredEvent msgDeliveredEvt = new MessageDeliveredEvent\(
            message, to, System\.currentTimeMillis\(\)\);

Modified: trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java?view=diff&rev=5876&p1=trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java&p2=trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java&r1=5875&r2=5876

--- trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java (original)
+++ trunk/src/net/java/sip/communicator/plugin/otr/ScOtrEngineImpl.java 2009-08-28 14:04:16+0000
@@ -223,6 +223,14 @@
class Configurator {

   private String getXmlFriendlyString\(String s\)\{

+ if (s == null || s.length() < 1)
+ return s;
+
+ // XML Tags are not allowed to start with digits,
+ // insert a dummy "p" char.
+ if (Character.isDigit(s.charAt(0)))
+ s = "p" + s;
+
char[] cId = new char[s.length()];
for (int i = 0; i < cId.length; i++) {
char c = s.charAt(i);

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net