Skip to content

Commit

Permalink
- removed some warnings
Browse files Browse the repository at this point in the history
- used fix in SVN 5233 for ysearch.java and search.java

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5237 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Oct 1, 2008
1 parent 69925a7 commit 820a03f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.properties
Expand Up @@ -3,7 +3,7 @@ javacSource=1.5
javacTarget=1.5

# Release Configuration
releaseVersion=0.604
releaseVersion=0.605
stdReleaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
embReleaseFile=yacy_emb_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
proReleaseFile=yacy_pro_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
Expand Down
1 change: 1 addition & 0 deletions htroot/yacy/search.java
Expand Up @@ -93,6 +93,7 @@ public static serverObjects respond(final httpRequestHeader header, final server
String agent = header.get("User-Agent");
if (agent == null) agent = System.getProperty("user.language");
language = (agent == null) ? "en" : iso639.userAgentLanguageDetection(agent);
if (language == null) language = "en";
}
final int partitions = post.getInt("partitions", 30);
String profile = post.get("profile", ""); // remote profile hand-over
Expand Down
1 change: 1 addition & 0 deletions htroot/yacy/user/ysearch.java
Expand Up @@ -138,6 +138,7 @@ public static serverObjects respond(final httpRequestHeader header, final server
String agent = header.get("User-Agent");
if (agent == null) agent = System.getProperty("user.language");
String language = (agent == null) ? "en" : iso639.userAgentLanguageDetection(agent);
if (language == null) language = "en";

// SEARCH
//final boolean indexDistributeGranted = sb.getConfig(plasmaSwitchboard.INDEX_DIST_ALLOW, "true").equals("true");
Expand Down
1 change: 1 addition & 0 deletions source/de/anomic/plasma/plasmaSearchQuery.java
Expand Up @@ -137,6 +137,7 @@ public plasmaSearchQuery(
this.linesPerPage = Math.min((specialRights) ? 1000 : 10, lines);
this.offset = Math.min((specialRights) ? 10000 : 100, offset);
this.urlMask = urlMask;
assert language != null;
this.targetlang = language;
this.domType = domType;
this.zonecode = domainzone;
Expand Down
1 change: 1 addition & 0 deletions source/de/anomic/yacy/yacySearch.java
Expand Up @@ -295,6 +295,7 @@ public static yacySearch[] primaryRemoteSearches(
//if (wordIndex.seedDB.mySeed() == null || wordIndex.seedDB.mySeed().getPublicAddress() == null) { return null; }

// prepare seed targets and threads
assert language != null;
final yacySeed[] targetPeers = (clusterselection == null) ? selectSearchTargets(wordIndex.seedDB, wordIndex.peerActions, plasmaSearchQuery.hashes2Set(wordhashes), targets) : selectClusterPeers(wordIndex.seedDB, clusterselection);
if (targetPeers == null) return new yacySearch[0];
targets = targetPeers.length;
Expand Down
19 changes: 10 additions & 9 deletions source/de/anomic/yacy/yacyTray.java
Expand Up @@ -65,7 +65,7 @@ public void actionPerformed(final ActionEvent e) {
trayClickAction();
}
};
ti = new nativeTrayIcon(sb, iconpath, al, setupPopupMenu());
ti = new nativeTrayIcon(iconpath, al, setupPopupMenu());

ti.addToSystemTray();
isShown = true;
Expand Down Expand Up @@ -160,7 +160,6 @@ public static void removeTray(){
}

class nativeTrayIcon {
private plasmaSwitchboard sb;
private Object SystemTray;
private Object TrayIcon;
private Class<?> SystemTrayClass;
Expand All @@ -179,10 +178,9 @@ public static boolean isSupported() {

}

public nativeTrayIcon(final plasmaSwitchboard sb, String IconPath, ActionListener al, PopupMenu menu) {
if(!isSupported())
return;
this.sb = sb;
@SuppressWarnings("unchecked")
public nativeTrayIcon(String IconPath, ActionListener al, PopupMenu menu) {
if(!isSupported()) return;

final Image i = Toolkit.getDefaultToolkit().getImage(IconPath);

Expand Down Expand Up @@ -232,7 +230,8 @@ public nativeTrayIcon(final plasmaSwitchboard sb, String IconPath, ActionListene
}
}

public void addToSystemTray() {
@SuppressWarnings("unchecked")
public void addToSystemTray() {
try {
// with reflections: this.SystemTray.add(this.TrayIcon)
Class partypes1[] = new Class[1];
Expand All @@ -247,7 +246,8 @@ public void addToSystemTray() {
}
}

public void removeFromSystemTray() {
@SuppressWarnings("unchecked")
public void removeFromSystemTray() {
try {
// with reflections: this.SystemTray.remove(this.TrayIcon)
Class partypes1[] = new Class[1];
Expand All @@ -262,7 +262,8 @@ public void removeFromSystemTray() {
}
}

public void displayBalloonMessage(final String title, final String message) {
@SuppressWarnings("unchecked")
public void displayBalloonMessage(final String title, final String message) {
try {
// with reflections: this.TrayIcon.displayBalloonMessage(title, message, TrayIcon.MessageType.NONE)
Class partypes1[] = new Class[3];
Expand Down

0 comments on commit 820a03f

Please sign in to comment.