Skip to content

Commit d69da23

Browse files
committed
Formatting cleanup
Added @OVERRIDES Converted to shorter lambda-style calls for functional interfaces
1 parent 925a40d commit d69da23

File tree

7 files changed

+18
-22
lines changed

7 files changed

+18
-22
lines changed

SPManager/src/artofillusion/spmanager/HttpSPMFileSystem.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,7 @@ public HtmlVersioningParserCallback( List<String> v, URL from )
973973
*@param data Description of the Parameter
974974
*@param pos Description of the Parameter
975975
*/
976+
@Override
976977
public void handleText( char[] data, int pos )
977978
{
978979
System.out.println( "handleText " + new String( data ) + " " + pos );
@@ -1032,6 +1033,7 @@ private String findCorrectVersion( String AoIversion, String[] versions )
10321033
*@param a Description of the Parameter
10331034
*@param pos Description of the Parameter
10341035
*/
1036+
@Override
10351037
public void handleStartTag( HTML.Tag t, MutableAttributeSet a, int pos )
10361038
{
10371039
System.out.println( "StartTag :" + t + ":" + a + ":" + pos );

SPManager/src/artofillusion/spmanager/LocalSPMFileSystem.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public LocalSPMFileSystem()
2121
super();
2222
}
2323

24+
@Override
2425
public void initialize()
2526
{
2627
super.initialize();

SPManager/src/artofillusion/spmanager/ManageSplitPane.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public ManageSplitPane()
5151
/**
5252
* Description of the Method
5353
*/
54+
@Override
5455
protected void updateTree()
5556
{
5657
//update the file system

SPManager/src/artofillusion/spmanager/SPMObjectInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ private void readInfoFromDocumentNode(Node script)
784784

785785
extType = SPManagerUtils.getAttribute(node, "type");
786786
extAssoc = SPManagerUtils.getAttribute(node, "association");
787-
externals.put(extName, extName + ":"+extType+"= " + extAssoc);
787+
externals.put(extName, extName + ":" + extType + "= " + extAssoc);
788788

789789
extAction = SPManagerUtils.getAttribute(node, "action");
790790
if (extAction != null && extAction.length() > 0) {

SPManager/src/artofillusion/spmanager/SPMSplitPane.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ public SPMTreeRenderer()
722722
*@param hasFocus Description of the Parameter
723723
*@return The treeCellRendererComponent value
724724
*/
725+
@Override
725726
public Component getTreeCellRendererComponent(
726727
JTree tree,
727728
Object value,

SPManager/src/artofillusion/spmanager/SPManagerFrame.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ private void doTabbedPaneSelection()
189189
*/
190190
protected void checkForUpdatedMe()
191191
{
192-
193192
Predicate<SPMObjectInfo> self = (SPMObjectInfo t) -> t.getName().equals("SPManager");
194193
SPMObjectInfo localinfo = manageSplitPane.getFileSystem().getPlugins().stream().filter(self).findFirst().orElse(null);
195194
SPMObjectInfo remoteinfo = updateSplitPane.getFileSystem().getPlugins().stream().filter(self).findFirst().orElse(null);
@@ -230,18 +229,17 @@ else if ( remoteinfo.getMinor() == localinfo.getMinor() ) {
230229
final SPMObjectInfo info = remoteinfo;
231230

232231
(new Thread() {
232+
@Override
233233
public void run()
234234
{
235235
updateSplitPane.installFile(info);
236236
updateSplitPane.showErrors();
237237

238-
SwingUtilities.invokeLater(new Runnable() {
239-
public void run()
240-
{
241-
status.dispose();
242-
hideSPManager();
243-
}
244-
});
238+
SwingUtilities.invokeLater(() ->
239+
{
240+
status.dispose();
241+
hideSPManager();
242+
});
245243

246244
}
247245
}).start();

SPManager/src/artofillusion/spmanager/SPManagerPlugin.java

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class SPManagerPlugin implements Plugin
5252
*@param message Description of the Parameter
5353
*@param args Description of the Parameter
5454
*/
55+
@Override
5556
public void processMessage( int message, Object args[] )
5657
{
5758
// NTJ: get the AOI run-time (*not* compile-time) version
@@ -100,8 +101,7 @@ public void processMessage( int message, Object args[] )
100101
Method addUrl = null;
101102

102103
try {
103-
addUrl =
104-
URLClassLoader.class.getDeclaredMethod("addURL", sig);
104+
addUrl = URLClassLoader.class.getDeclaredMethod("addURL", sig);
105105
addUrl.setAccessible(true);
106106
} catch (Exception e) {
107107
System.out.println("Error getting addURL method: " + e);
@@ -113,8 +113,7 @@ public void processMessage( int message, Object args[] )
113113
Class plugType;
114114
File files[], urlfile;
115115
URL url;
116-
Map.Entry entry;
117-
String key[], value;
116+
118117
File plugdir = new File(PLUGIN_DIRECTORY);
119118
if (plugdir.exists()) {
120119
files = plugdir.listFiles();
@@ -174,30 +173,24 @@ public void processMessage( int message, Object args[] )
174173

175174
System.out.println("SPM: adding path: " + url);
176175

177-
value = entry.getValue().toString();
178-
179-
180176
if ("classpath".equalsIgnoreCase(value)) {
181177
if (searchldr != null)
182178
searchldr.add(url);
183179
else if (addUrl != null) {
184180
try {
185181
addUrl.invoke(urlldr, url);
186182
} catch (Exception e) {
187-
System.out.println("Error invoking: "
188-
+ e);
183+
System.out.println("Error invoking: " + e);
189184
}
190185
}
191-
else System.out.println("Could not add path" +
192-
url);
186+
else System.out.println("Could not add path" + url);
193187
}
194188
else if ("import".equalsIgnoreCase(value)) {
195189
ldr = (ClassLoader) loaders.get(url);
196190

197191
if (key.length == 1) {
198192
if (obj != null) searchldr.add(ldr);
199-
else System.out.println("SPM: could not find"
200-
+ " loader for: " + url);
193+
else System.out.println("SPM: could not find" + " loader for: " + url);
201194
}
202195

203196
}

0 commit comments

Comments
 (0)