mbien commented on code in PR #5320:
URL: https://github.com/apache/netbeans/pull/5320#discussion_r1096448926
##########
nbi/engine/src/org/netbeans/installer/utils/system/launchers/impl/CommonLauncher.java:
##########
@@ -95,8 +95,6 @@ protected long addData(FileOutputStream fos, File file,
Progress progress, long
//add rnd data
protected void addData(FileOutputStream fos) throws IOException {
- double rand = Math.random() * Byte.MAX_VALUE;
- //fos.write(new byte[] {(byte)rand});
fos.write(new byte[] {'#'});
}
Review Comment:
i don't know why this is commented out but the method does not make sense
without it
##########
platform/api.visual/src/org/netbeans/modules/visual/anchor/DefaultAnchorShapeResolver.java:
##########
@@ -49,33 +49,23 @@ public DefaultAnchorShapeResolver(ConnectionWidget
connection,
this.attachedEnd = attachedTo;
this.attachedWidget = attachedWidget;
}
-
- public int getEndLocation()
- {
- int retVal = 0;
-
- if(attachedWidget != null)
- {
+
+ public int getEndLocation() {
+ int retVal;
+
+ if (attachedWidget != null) {
Rectangle bounds = attachedWidget.getBounds();
retVal = getLocation(bounds);
- }
- else
- {
-// Rectangle bounds = attachedWidget.getBounds();
- Rectangle bounds = new Rectangle();
- if(attachedEnd == ConnectionEnd.SOURCE)
- {
- Widget sourceWidget =
getConnection().getSourceAnchor().getRelatedWidget();
- bounds = sourceWidget.getBounds();
- }
- else
- {
- Widget sourceWidget =
getConnection().getTargetAnchor().getRelatedWidget();
- bounds = sourceWidget.getBounds();
+ } else {
+ Widget sourceWidget;
+ if (attachedEnd == ConnectionEnd.SOURCE) {
+ sourceWidget =
getConnection().getSourceAnchor().getRelatedWidget();
+ } else {
+ sourceWidget =
getConnection().getTargetAnchor().getRelatedWidget();
}
- retVal = getLocation(bounds);
+ retVal = getLocation(sourceWidget.getBounds());
}
-
+
Review Comment:
please don't change the formatting of big blocks. This feels unnecessary and
obfuscates the actual change here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists