Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 11 additions & 13 deletions tika-app/src/main/java/org/apache/tika/cli/AsyncHelper.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.tika.cli;

Expand All @@ -33,7 +31,7 @@ public static String[] translateArgs(String[] args) {
argList.add("-c");
argList.add(c);
} else if (arg.equals("-a")) {
//do nothing
// do nothing
} else {
argList.add(args[i]);
}
Expand Down
293 changes: 149 additions & 144 deletions tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.tika.gui;

Expand Down Expand Up @@ -47,7 +45,7 @@ class ParsingTransferHandler extends TransferHandler {
uriListFlavor = new DataFlavor("text/uri-list;class=java.lang.String");
urlListFlavor = new DataFlavor("text/plain;class=java.lang.String");
} catch (ClassNotFoundException e) {
//swallow
// swallow
}
}

Expand All @@ -70,15 +68,16 @@ private static List<File> uriToFileList(Object data) {
try {
list.add(new File(new URI(s)));
} catch (Exception e) {
//swallow
// swallow
}
}
return list;
}

public boolean canImport(JComponent component, DataFlavor[] flavors) {
for (DataFlavor flavor : flavors) {
if (flavor.equals(DataFlavor.javaFileListFlavor) || flavor.equals(uriListFlavor) || flavor.equals(urlListFlavor)) {
if (flavor.equals(DataFlavor.javaFileListFlavor) || flavor.equals(uriListFlavor)
|| flavor.equals(urlListFlavor)) {
return true;
}
}
Expand All @@ -89,7 +88,8 @@ public boolean canImport(JComponent component, DataFlavor[] flavors) {
public boolean importData(JComponent component, Transferable transferable) {
try {
if (transferable.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
importFiles((List<File>) transferable.getTransferData(DataFlavor.javaFileListFlavor));
importFiles((List<File>) transferable
.getTransferData(DataFlavor.javaFileListFlavor));
} else if (transferable.isDataFlavorSupported(urlListFlavor)) {
Object data = transferable.getTransferData(urlListFlavor);
tika.openURL(new URL(data.toString()));
Expand All @@ -112,7 +112,8 @@ public void exportAsDrag(JComponent arg0, InputEvent arg1, int arg2) {
delegate.exportAsDrag(arg0, arg1, arg2);
}

public void exportToClipboard(JComponent arg0, Clipboard arg1, int arg2) throws IllegalStateException {
public void exportToClipboard(JComponent arg0, Clipboard arg1, int arg2)
throws IllegalStateException {
delegate.exportToClipboard(arg0, arg1, arg2);
}

Expand Down
Loading